0) {
$factor=str_replace('+','',urldecode($_GET['zoom']));
}
}
if (isset($_GET['uselatlaong'])) {
$dolatlong=true;
$longoff=0.0;
$latoff=0.0;
} else if (file_exists('countries.html')) {
if ($factor != 1.0) {
echo str_replace("function onl() {", "function onl() { \n document.body.style.zoom=((izoom == 1.0) ? ('' + eval(izoom * 100.0) + '%') : '" . (100.0 * $factor) . "%'); \n ", file_get_contents('countries.html'));
exit;
} else {
echo file_get_contents('countries.html');
exit;
}
}
// Create a transparent image thanks to https://www.php.net/manual/en/function.imagecolortransparent.php
$im = imagecreatetruecolor((360.0 * $factor), (180.0 * $factor));
$black = imagecolorallocate($im, 0, 0, 0);
// Make the background transparent
imagecolortransparent($im, $black);
// Save the image
$udirnameprebimg='/tmp/imagecolortransparent.png';
imagepng($im, $udirnameprebimg);
$duis='data:image/' . str_replace('jpg','jpeg',strtolower(explode('.',$udirnameprebimg)[-1 + sizeof(explode('.',$udirnameprebimg))])) . ';base64,' . base64_encode(file_get_contents($udirnameprebimg));
imagedestroy($im);
unlink($udirnameprebimg);
$htmlis="
Display GeoJSON Countries
var origmapurl=\"//www.rjmprogramming.com.au/PHP/Map/map.php?title=Nearby%20TimeZone%20Places&onclick=y&label=['Lat',&value='Lon','Name']&data=,[\";
var yourtzlist='';
var izoom=location.search.split('zoom=')[1] ? eval(decodeURIComponent(location.search.split('zoom=')[1].split('&')[0])) : 1.0;
var lastl='', longlastl='', elem=null, context=null, thislat=0.0, thisong=0.0, mapwo=null, jtwo=' ', mapwog=null;
var rectisleft=0, rectistop=0, rectisy=0;
var imglookdone=false;
function onl() {
if (izoom != 1.0) document.body.style.zoom=('' + eval(izoom * 100.0) + '%');
elem = document.getElementById('mycanvas');
elem.style.cursor='progress';
context = elem.getContext('2d');
context.strokeStyle = '#000000';
context.lineWidth = 0.4;
}
";
$midbit="
function ouralert(athis,ctyname, isothree, isotwo, inclist) {
if (('' + isotwo).length == 2) { jtwo=isotwo; }
if (inclist.indexOf(',') != -1) {
var cls=inclist.replace('Longitude,Latitude coordinates are ','').split(',');
longlastl=ctyname + ': ' + inclist;
document.getElementById('ntz').value='';
//document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent(cls[1]) + '&longitude=' + encodeURIComponent(cls[0]) + '&ntztontz=y';
//setTimeout(lookforntz, 1000);
checkdsa(athis);
}
}
function drawc(centerX, centerY) {
var topllong=-180.0;
var topllat=90.0;
var onepixelequals=izoom;
context.beginPath();
context.globalAlpha = 0.5;
context.arc(centerX, centerY, 1, 0, 2 * Math.PI, false);
context.fillStyle = 'green';
context.fill();
context.lineWidth = 5;
context.lineWidth = 2;
context.strokeStyle = '#003300';
context.stroke();
}
function callmap(inintzl, tp, itwo) {
var intzl=inintzl;
var thisplace=-1;
var places=['', '', ''];
var mapurl=origmapurl + thislat + ',' + thislong + ',~Your%20Place~]';
var tzs=['', '', ''];
var lats=[0, 0, 0];
var longs=[0, 0, 0];
var ioff=0, joff=0;
var wasp='';
var prefix='', thismu='', newdatabit='', lastgeourl='', areg='', newpeninfo='' + thislat + '|' + thislong + '|127968_Your%20Place';
var tzls=intzl.split('/');
var enin='';
if (tp != '') {
if (tp.indexOf('/wiki/') != -1) {
areg='HTTP.' + tp.split('/wiki/')[1].replace(/\ /g,'_');
enin=encodeURIComponent(' in ') + tp.split('/wiki/')[1].replace(/\_/g,'%20');
if (itwo.trim() != '') { enin+='%20' + encodeURIComponent(orflag(itwo.toUpperCase())); }
mapurl=mapurl.replace('~]', enin + '~]');
newpeninfo=newpeninfo.replace('Your$%20Place', tp.split('/wiki/')[1].replace(/\ /g,'_'));
} else {
areg='HTTP.' + tp.replace(/\ /g,'_');
enin=encodeURIComponent(' in ' + tp);
if (itwo.trim() != '') { enin+='%20' + encodeURIComponent(orflag(itwo.toUpperCase())); }
mapurl=mapurl.replace('~]', encodeURIComponent(' in ' + tp) + '~]');
newpeninfo=newpeninfo.replace('Your$%20Place', tp.replace(/\ /g,'_'));
}
} else if (gtwop != '') {
if (gtwop.indexOf('/wiki/') != -1) {
areg='HTTP.' + gtwop.split('/wiki/')[1].replace(/\ /g,'_');
enin=encodeURIComponent(' in ') + gtwop.split('/wiki/')[1].replace(/\_/g,'%20');
if (itwo.trim() != '') { enin+='%20' + encodeURIComponent(orflag(itwo.toUpperCase())); }
mapurl=mapurl.replace('~]', enin + '~]');
newpeninfo=newpeninfo.replace('Your$%20Place', gtwop.split('/wiki/')[1].replace(/\ /g,'_'));
} else {
areg='HTTP.' + gtwop.replace(/\ /g,'_');
enin=encodeURIComponent(' in ' + tp);
if (itwo.trim() != '') { enin+='%20' + encodeURIComponent(orflag(itwo.toUpperCase())); }
mapurl=mapurl.replace('~]', encodeURIComponent(' in ' + tp) + '~]');
newpeninfo=newpeninfo.replace('Your$%20Place', gtwop.replace(/\ /g,'_'));
}
}
if (eval('' + tzls.length) > 3) {
for (var ih=0; ih<3; ih++) {
if (tzls[eval(1 + ih + ioff)].indexOf(' ') == -1) {
prefix='/' + tzls[eval(1 + ih + ioff)] + '/';
joff++;
} else {
prefix='/';
}
thisplace=-1;
while (tzls[eval(0 + ih + ioff)].slice(thisplace).substring(0,1) != '.' && tzls[eval(0 + ih + ioff)].slice(thisplace).substring(0,1) != ' ') {
wasp=prefix;
prefix=tzls[eval(0 + ih + ioff)].slice(thisplace).substring(0,1) + wasp;
//alert('IH=' + ih + ' and prefix=' + prefix + ' ' + tzls[eval(0 + ih + ioff)].slice(thisplace));
thisplace--;
}
//alert('ih=' + ih + ' and prefix=' + prefix);
places[ih]=prefix;
tzs[ih]=prefix;
thisplace=1;
ioff=joff;
while (tzls[eval(1 + ih + ioff)].substring(0,thisplace).slice(-1) != '.' && tzls[eval(1 + ih + ioff)].substring(0,thisplace).slice(-1) != ' ') {
places[ih]+=tzls[eval(1 + ih + ioff)].substring(0,thisplace).slice(-1);
tzs[ih]+=tzls[eval(1 + ih + ioff)].substring(0,thisplace).slice(-1);
thisplace++;
}
//alert('ih=' + ih + ' and thisplace=' + thisplace + ' and tzs[]=' + tzs[eval(0 + ih)] + ' and yourtzlist=' + yourtzlist);
if (tzls[eval(1 + ih + ioff)].indexOf(' is ') != -1) {
if (areg == '') {
areg='HTTP.GeoJSON';
}
areg+=',http.' + places[ih].split('/')[eval(-1 + places[ih].split('/').length)].replace(/\ /g,'_');
places[ih]+=(' in ' + ('' + tzls[eval(1 + ih + ioff)].substring(thisplace).split(' is ')[0]).replace(' in ','').replace(' in ','').replace(' in ','').replace(' in ','')).replace(' in in ',' in ');
}
if (yourtzlist.indexOf(tzs[ih]) != -1) {
newpeninfo+=',' + yourtzlist.split(tzs[ih])[1].split('=')[1].split(',')[0].replace(String.fromCharCode(34),'') + '|' + yourtzlist.split(tzs[ih])[1].split('=')[1].split(',')[1].replace(String.fromCharCode(34),'') + '|' + encodeURIComponent(places[ih].split('/')[eval(-1 + places[ih].split('/').length)].replace(/\ /g,'_'));
mapurl+=',[' + yourtzlist.split(tzs[ih])[1].split('=')[1].split(',')[0].replace(String.fromCharCode(34),'') + ',' + yourtzlist.split(tzs[ih])[1].split('=')[1].split(',')[1].replace(String.fromCharCode(34),'') + ',~' + encodeURIComponent(places[ih]) + '~]';
}
}
var maptarget='_blank';
var geotarget='_blank';
if (itwo != itwo.toUpperCase() && itwo != itwo.toLowerCase()) {
maptarget='mapchart';
geotarget='geochart';
document.getElementById('geomaps').style.display='block';
}
if (mapwo) {
if (!mapwo.closed) {
mapwo.close();
mapwo=null;
}
if (mapwog) {
if (!mapwog.closed) {
mapwog.close();
mapwog=null;
}
}
//alert(mapurl); // https://www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php?title=GB;Greenwich%20London%20Places&aregexographicals=y&aregeographicals=&width=834&height=520&country=Places&popularity=&data=%20[51.4769|-0.0005|~From~,2]%20,%20[51.4769|-0.0005|~To~,2]%20,%20[51.4769|-0.0005|~Greenwich~,2]
mapwo=window.open(mapurl, maptarget, 'top=20,left=20,width=' + eval(-40 + screen.width) + ',height=' + eval(-40 + screen.height));
setTimeout(mapwoz, 5000);
if (itwo.trim() != '') {
thismu=decodeURIComponent(mapurl.split('&data=')[1]);
//newpeninfo=thismu.replace(/\]\,\[/g, ',').replace(/\,\[/g, '').replace(/\~\]/g, '').replace(/\,\~/g, '|').replace(/\,/g, '|').replace(/\ /g,'_'); //.replace(/\~\|/g,',');
newdatabit=' ' + mapurl.split('&data=')[1].substring(1).replace(/\~\]/g, '~,2]');
//lastgeourl=(mapurl.split('&')[0].replace('/PHP/Map/map.php?title=', '/PHP/GeoChart/geo_chart.php?title=' + itwo.toUpperCase() + ';') + '&aregexographicals=y&aregeographicals=' + areg + '&peninfo=' + (newpeninfo.replace(/\~\|/g,',').replace(/\+/g,' ')) + '&width=556&height=347&country=Places&popularity=Popularity&data=' + (newdatabit).replace(/\ /g, '%20')).replace('%20Places&', '%20Places' + enin + '&');
lastgeourl=(mapurl.split('&')[0].replace('/PHP/Map/map.php?title=Nearby%20TimeZone%20Places', '/PHP/GeoChart/geo_chart.php?title=' + itwo.toUpperCase() + ';' + enin.substring(8) + '%20Nearby%20TimeZone%20Places') + '&aregexographicals=y&aregeographicals=' + areg + '&peninfo=' + (newpeninfo.replace(/\~\|/g,',').replace(/\+/g,' ')) + '&width=556&height=347&country=Places&popularity=Popularity&data=' + (newdatabit).replace(/\ /g, '%20')).replace('%20Places&', '%20Places' + enin + '&');
if (tp == '') {
mapwog=window.open(lastgeourl, geotarget, 'top=80,left=600,width=' + eval(-600 + screen.width) + ',height=' + eval(-40 + screen.height));
setTimeout(mapwogz, 5000); //mapwog.document.body.style.zoom='100%';
} else {
mapwog=window.open(lastgeourl, geotarget, 'top=' + eval(-400 + screen.height) + ',left=0,width=' + eval(-600 + screen.width) + ',height=400');
setTimeout(mapwogz, 5000); //mapwog.document.body.style.zoom='100%';
}
}
if (tp != '') {
window.open(tp, '_blank', 'top=80,left=' + eval(-600 + screen.width) + ',width=600,height=600');
}
} else {
if (mapwog) {
if (!mapwog.closed) {
mapwog.close();
mapwog=null;
}
}
mapwo=window.open(mapurl, maptarget, 'top=20,left=20,width=' + eval(-40 + screen.width) + ',height=' + eval(-40 + screen.height));
setTimeout(mapwoz, 5000);
if (itwo.trim() != '') {
thismu=decodeURIComponent(mapurl.split('&data=')[1]);
//newpeninfo=thismu.replace(/\]\,\[/g, ',').replace(/\,\[/g, '').replace(/\~\]/g, '').replace(/\,\~/g, '|').replace(/\,/g, '|').replace(/\ /g,'_'); //.replace(/\~\|/g,',');
newdatabit=' ' + mapurl.split('&data=')[1].substring(1).replace(/\~\]/g, '~,2]');
lastgeourl=(mapurl.split('&')[0].replace('/PHP/Map/map.php?title=Nearby%20TimeZone%20Places', '/PHP/GeoChart/geo_chart.php?title=' + itwo.toUpperCase() + ';' + enin.substring(8) + '%20Nearby%20TimeZone%20Places') + '&aregexographicals=y&aregeographicals=' + areg + '&peninfo=' + (newpeninfo.replace(/\~\|/g,',').replace(/\+/g,' ')) + '&width=556&height=347&country=Places&popularity=Popularity&data=' + (newdatabit).replace(/\ /g, '%20')).replace('%20Places&', '%20Places' + enin + '&');
if (tp == '') {
mapwog=window.open(lastgeourl, geotarget, 'top=80,left=600,width=' + eval(-600 + screen.width) + ',height=' + eval(-40 + screen.height));
setTimeout(mapwogz, 5000); //mapwog.document.body.style.zoom='100%';
} else {
mapwog=window.open(lastgeourl, geotarget, 'top=' + eval(-400 + screen.height) + ',left=0,width=' + eval(-600 + screen.width) + ',height=400');
setTimeout(mapwogz, 5000); //mapwog.document.body.style.zoom='100%';
}
}
if (tp != '') {
window.open(tp, '_blank', 'top=80,left=' + eval(-600 + screen.width) + ',width=600,height=600');
}
}
}
jtwo=' ';
}
function mapwogz() {
if (1 == 2) { mapwog.document.body.style.transform='scale(1.0)'; }
}
function mapwoz() {
if (1 == 2) { mapwo.document.body.style.transform='scale(1.0)'; }
}
function withinit(abi) {
var outi='';
var putin=true;
for (var ii=0; ii') {
putin=true;
if (outi != '') { outi+=' '; }
} else if (putin) {
outi+=abi.substring(ii).substring(0,1);
}
}
return outi.replace('rror :', 'rror:');
}
function checkif(iois) {
var morehuh=false;
var mixedcase=true;
var twop='';
var what='', ourabi='';
var ourl=lastl;
var ourlong=longlastl;
gtwop='';
if (iois.src.indexOf('tz_places.php') != -1) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
ourabi='' + aconto.body.innerHTML;
if (aconto.body != null) {
lastl='';
longlastl='';
if (ourlong != '') {
what=withinit(ourabi).replace(/\)/g,') ');
if (what.indexOf('rror:') != -1) {
alert(what + ' ' + ourlong);
} else if (ourlong.indexOf(': ') != -1) {
morehuh=prompt(what + ' See these on a map? See Wikipedia page about ' + ourlong.split(':')[0] + ' by answering Y for just this or Yes for both this and the map. ' + ourlong, ' ');
if (morehuh == null) {
morehuh='';
} else if (morehuh.trim().toUpperCase() == 'Y') {
morehuh='';
window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600');
} else if (morehuh.trim().toUpperCase().substring(0,1) == 'Y') {
twop='//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]); //window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600');
} else if (morehuh.trim() == '') {
gtwop='//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]); //window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600');
morehuh='n';
} else {
gtwop='//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]); //window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600');
morehuh='N';
}
if (morehuh == '') { morehuh=false; } else { morehuh=true; }
} else {
morehuh=confirm(what + ' See these on a map? ' + ourlong);
}
} else {
what=withinit(ourabi).replace(/\)/g,') ');
if (what.indexOf('rror:') != -1) {
alert(what.replace(/\)/g,') ') + ' ' + ourl);
} else if (ourlong.indexOf(': ') != -1) {
morehuh=prompt(what + ' See these on a map? See Wikipedia page about ' + ourlong.split(':')[0] + ' by answering Y for just this or Yes for both this and the map. ' + ourlong, ' ');
if (morehuh == null) {
morehuh='';
} else if (morehuh.trim().toUpperCase() == 'Y') {
morehuh='';
window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600');
} else if (morehuh.trim().toUpperCase().substring(0,1) == 'Y') {
twop='//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]); //window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600');
} else if (morehuh.trim() == '') {
gtwop='//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]); //window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600');
morehuh='n';
} else {
gtwop='//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]); //window.open('//en.wikipedia.org/wiki/' + encodeURIComponent(ourlong.split(':')[0]), '_blank', 'top=50,left=50,width=600,height=600');
morehuh='N';
}
if (morehuh == '') { morehuh=false; } else { morehuh=true; }
} else {
morehuh=confirm(what + ' See these on a map? ' + ourlong);
}
//} else {
//morehuh=confirm(what.replace(/\)/g,') ') + ' See these on a map? ' + ourl);
//}
}
}
}
}
if (morehuh) { if (mixedcase) { callmap(what, twop, jtwo.substring(0,1).toLowerCase() + jtwo.substring(1,2).toUpperCase()); } else { callmap(what, twop, jtwo); } }
}
function oldcanvasclick(e) {
var rectis=document.body.getBoundingClientRect();
var topllong=-180.0;
var topllat=90.0;
var onepixelequals=izoom;
//document.title='canvasclick';
e = e || window.event;
e.preventDefault();
if (e.touches) {
if (e.touches[0].pageX) {
//lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals);
drawc(eval(-rectis.left + e.touches[0].pageX), eval(-rectis.top + e.touches[0].pageY));
thislat=eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals);
thislong=eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals);
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals)) + '&ntztontz=y';
} else {
//lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals);
drawc(eval(-rectis.left + e.touches[0].clientX), eval(-rectis.top + e.touches[0].clientY));
thislat=eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals);
thislong=eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals);
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals)) + '&ntztontz=y';
}
} else if (e.clientX || e.clientY) {
//lastl='Longitude,Latitude coordinates are ' + eval(topllong + e.clientX * onepixelequals) + ',' + eval(topllat - e.clientY * onepixelequals);
drawc(eval(-rectis.left + e.pageX), eval(-rectis.top + e.pageY));
thislat=eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals);
thislong=eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals);
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - e.clientY * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + e.clientX * onepixelequals)) + '&ntztontz=y';
} else {
//lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals);
drawc(eval(-rectis.left + e.clientX), eval(-rectis.top + e.clientY));
thislat=eval(topllat - e.clientY * onepixelequals);
thislong=eval(topllong + e.clientX * onepixelequals);
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals)) + '&ntztontz=y';
}
}
function olddefclick(e) {
var rectis=document.body.getBoundingClientRect();
var topllong=-180.0;
var topllat=90.0;
var onepixelequals=izoom;
//document.title='defclick';
e = e || window.event;
e.preventDefault();
if (e.touches) {
if (e.touches[0].pageX) {
lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals);
drawc(eval(-rectis.left + e.touches[0].pageX), eval(-rectis.top + e.touches[0].pageY));
thislat=eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals);
thislong=eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals);
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals)) + '&ntztontz=y';
} else {
lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals);
drawc(eval(-rectis.left + e.touches[0].clientX), eval(-rectis.top + e.touches[0].clientY));
thislat=eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals);
thislong=eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals);
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals)) + '&ntztontz=y';
}
} else if (e.clientX || e.clientY) {
lastl='Longitude,Latitude coordinates are ' + eval(topllong + e.clientX * onepixelequals) + ',' + eval(topllat - e.clientY * onepixelequals);
drawc(eval(-rectis.left + e.pageX), eval(-rectis.top + e.pageY));
thislat=eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals);
thislong=eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals);
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - e.clientY * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + e.clientX * onepixelequals)) + '&ntztontz=y';
} else {
lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals);
drawc(eval(-rectis.left + e.clientX), eval(-rectis.top + e.clientY));
thislat=eval(topllat - e.clientY * onepixelequals);
thislong=eval(topllong + e.clientX * onepixelequals);
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals)) + '&ntztontz=y';
}
}
function canvasclick(e) {
var rectis=document.body.getBoundingClientRect();
var topllong=-180.0;
var topllat=90.0;
var onepixelequals=izoom;
//document.title='canvasclick';
e = e || window.event;
e.preventDefault();
if (e.touches) {
if (e.touches[0].pageX) {
//lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals);
drawc(eval(-rectisleft + e.touches[0].pageX), eval(-rectistop + e.touches[0].pageY));
thislat=eval(topllat - eval(-rectistop + e.touches[0].pageY) * onepixelequals);
thislong=eval(topllong + eval(-rectisleft + e.touches[0].pageX) * onepixelequals);
//console.log('rectistop=' + rectistop + ' and rectisleft=' + rectisleft + ' and rectisy=' + rectisy + ' and thislat=' + thislat);
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectistop + e.touches[0].pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectisleft + e.touches[0].pageX) * onepixelequals)) + '&ntztontz=y';
} else {
//lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals);
drawc(eval(-rectis.left + e.touches[0].clientX), eval(-rectis.top + e.touches[0].clientY));
thislat=eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals);
thislong=eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals);
//console.log('rectis.top=' + rectis.top + ' and rectis.left=' + rectis.left + ' and rectis.y=' + rectis.y + ' anD thislat=' + thislat);
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals)) + '&ntztontz=y';
}
} else if (e.pageX || e.pageY) {
//lastl='Longitude,Latitude coordinates are ' + eval(topllong + e.clientX * onepixelequals) + ',' + eval(topllat - e.clientY * onepixelequals);
drawc(eval(-rectisleft + e.pageX), eval(-rectistop + e.pageY));
thislat=eval(topllat - eval(-rectistop + e.pageY) * onepixelequals);
thislong=eval(topllong + eval(-rectisleft + e.pageX) * onepixelequals);
//console.log('rectistop=' + rectistop + ' and rectisleft=' + rectisleft + ' and rectisy=' + rectisy + ' aNd thislat=' + thislat + ' and e.pageY=' + e.pageY + ' and new plus idea=' + eval(topllat - eval(rectistop + e.pageY) * onepixelequals));
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectistop + e.pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectisleft + e.pageX) * onepixelequals)) + '&ntztontz=y';
} else {
//lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals);
drawc(eval(-rectis.left + e.clientX), eval(-rectis.top + e.clientY));
thislat=eval(topllat - eval(-rectis.top + e.clientY) * onepixelequals);
thislong=eval(topllong + eval(-rectis.left + e.clientX) * onepixelequals);
//console.log('rectis.top=' + rectis.top + ' and rectis.left=' + rectis.left + ' and rectis.y=' + rectis.y + ' And thislat=' + thislat);
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.clientY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.clientX) * onepixelequals)) + '&ntztontz=y';
}
}
function defclick(e) {
var rectis=document.body.getBoundingClientRect();
var topllong=-180.0;
var topllat=90.0;
var onepixelequals=izoom;
//document.title='canvasclick';
e = e || window.event;
e.preventDefault();
if (e.touches) {
if (e.touches[0].pageX) {
//lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].pageY) * onepixelequals);
drawc(eval(-rectisleft + e.touches[0].pageX), eval(-rectistop + e.touches[0].pageY));
thislat=eval(topllat - eval(-rectistop + e.touches[0].pageY) * onepixelequals);
thislong=eval(topllong + eval(-rectisleft + e.touches[0].pageX) * onepixelequals);
//console.log('rectistop=' + rectistop + ' and rectisleft=' + rectisleft + ' and rectisy=' + rectisy + ' and thislat=' + thislat);
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectistop + e.touches[0].pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectisleft + e.touches[0].pageX) * onepixelequals)) + '&ntztontz=y';
} else {
//lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals);
drawc(eval(-rectis.left + e.touches[0].clientX), eval(-rectis.top + e.touches[0].clientY));
thislat=eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals);
thislong=eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals);
//console.log('rectis.top=' + rectis.top + ' and rectis.left=' + rectis.left + ' and rectis.y=' + rectis.y + ' anD thislat=' + thislat);
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.touches[0].clientY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.touches[0].clientX) * onepixelequals)) + '&ntztontz=y';
}
} else if (e.pageX || e.pageY) {
//lastl='Longitude,Latitude coordinates are ' + eval(topllong + e.clientX * onepixelequals) + ',' + eval(topllat - e.clientY * onepixelequals);
drawc(eval(-rectisleft + e.pageX), eval(-rectistop + e.pageY));
thislat=eval(topllat - eval(-rectistop + e.pageY) * onepixelequals);
thislong=eval(topllong + eval(-rectisleft + e.pageX) * onepixelequals);
//console.log('rectistop=' + rectistop + ' and rectisleft=' + rectisleft + ' and rectisy=' + rectisy + ' aNd thislat=' + thislat + ' and e.pageY=' + e.pageY + ' and new plus idea=' + eval(topllat - eval(rectistop + e.pageY) * onepixelequals));
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectistop + e.pageY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectisleft + e.pageX) * onepixelequals)) + '&ntztontz=y';
} else {
//lastl='Longitude,Latitude coordinates are ' + eval(topllong + eval(-rectis.left + e.pageX) * onepixelequals) + ',' + eval(topllat - eval(-rectis.top + e.pageY) * onepixelequals);
drawc(eval(-rectis.left + e.clientX), eval(-rectis.top + e.clientY));
thislat=eval(topllat - eval(-rectis.top + e.clientY) * onepixelequals);
thislong=eval(topllong + eval(-rectis.left + e.clientX) * onepixelequals);
//console.log('rectis.top=' + rectis.top + ' and rectis.left=' + rectis.left + ' and rectis.y=' + rectis.y + ' And thislat=' + thislat);
document.getElementById('nearestif').src='/PHP/tz_places.php?place=&latitude=' + encodeURIComponent('' + eval(topllat - eval(-rectis.top + e.clientY) * onepixelequals)) + '&longitude=' + encodeURIComponent('' + eval(topllong + eval(-rectis.left + e.clientX) * onepixelequals)) + '&ntztontz=y';
}
}
function orflag(thiscc) {
var ccchar='', ccsuff='';
var lri='ABCDEFGHIJKLMNOPQRSTUVWXYZ';
var dri=['127462','127463','127464','127465','127466','127467','127468','127469','127470','127471','127472','127473','127474','127475','127476','127477','127478','127479','127480','127481','127482','127483','127484','127485','127486','127487'];
for (var iccsuff=0; iccsuff= 2) {
if (eval('' + cs[0]) != eval('' + cs[eval(-2 + cs.length)]) || eval('' + cs[1]) != eval('' + cs[eval(-1 + cs.length)])) {
ars[ij].coords+=',' + cs[0] + ',' + cs[1];
}
}
}
setTimeout(cursorcheck, 3000);
}
function cursorcheck() {
if (('' + document.body.style.cursor).indexOf('progress') != -1) {
elem.style.cursor='progress';
setTimeout(cursorcheck, 3000);
} else {
document.getElementById('myimg').title='';
elem.style.cursor='pointer';
}
}
function lhovin(indesc) {
lhov=indesc;
if (1 == 2) { document.getElementById('myimg').title=lhov; }
}
function lhovout(indesc) {
if (1 == 2) { document.getElementById('myimg').title=document.getElementById('myimg').title.replace(lhov,''); }
}
function retll(x, y) {
return '' + eval(-180.0 + x) + ',' + eval(90.0 - y);
}
function checkdsa(ath) {
if (('' + appendtoinnerHTML).indexOf(('' + ath.coords)) != -1) {
if (document.getElementById('svgd').innerHTML.indexOf(' title=' + String.fromCharCode(34) + '' + ath.title + '' + String.fromCharCode(34) + '') != -1) {
document.getElementById('svgd').innerHTML=document.getElementById('svgd').innerHTML.replace(/rgba\(255\,87\,51\,0.5\)/g, 'rgba(200,200,200,0.3)');
document.getElementById('svgd').innerHTML+='