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 x=0, y=0, isclear=true;
var xs=10, ys=10;
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 . "';
function menuize(rans) {
var rdescis=lastplace;
if ((rans + ' ').toUpperCase().substring(0,1) == 'W') {
if (rdescis == '') {
window.open('//wikipedia.org','_blank','top=10,left=10,width=600,height=600');
} else {
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') {
if (rdescis == '') {
window.open('//www.youtube.com','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else {
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') {
if (rdescis == '') {
window.open('//www.google.com','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else {
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) {
if (rdescis == '') {
window.open('//www.rjmprogramming.com.au/PHP/tz_places.php','_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
} else {
window.open('//www.rjmprogramming.com.au/PHP/tz_places.php?iso=' + ('' + lastcode + ' ').toUpperCase().substring(0,2).trim(),'_blank','top=' + ys + ',left=' + xs + ',width=600,height=' + Math.max(100,eval(-100 + screenheight - ys)));
}
}
}
function okd(e){
var charx = e.which || e.keyCode;
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') { // tz_places.php
menuize('T');
} else if (('' + e.keyCode) == '71') { // Google
menuize('G');
}
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';
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;
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 gmenu(rcodeis, erdescis) {
var rdescis=decodeURIComponent(erdescis);
if (rdescis != lastplace && lastplace.trim() != '') { rdescis=lastplace; }
if ((1 == 1 || rcodeis.trim()) != '' && rdescis.trim() != '') {
var rans=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) + String.fromCharCode(10), '');
if (rans == null) { rans=''; }
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)));
}
}
}
function thisonl() {
//alert(21);
elem = document.getElementById('mycanvas');
//alert(211);
context = elem.getContext('2d');
//alert(2111);
setTimeout(canvasize, 5000);
//alert(21111);
}
function canvasize() { //(ioel) {
var ioel=document.getElementById('ici');
//alert(1);
context.drawImage(document.getElementById('ici'), 0, 0);
//document.getElementById('mycanvas').style.display='block';
//alert(11);
document.getElementById('moreturnxytoparent').value=elem.toDataURL('image/jpeg', 0.4);
//alert('111 ' + document.getElementById('moreturnxytoparent').value.length);
return true;
}
function lfdfn(inoh) {
var bits=inoh.split(' data-fcn=\"');
if (document.getElementById('ici').title == origtitle && eval('' + bits.length) > 1) {
origtitle=origtitle.replace('relevant region', 'relevant ' + bits[1].split('\"')[0] + ' region');
document.getElementById('ici').title=origtitle;
}
return inoh;
}