<!doctype html>
<html>
<head>
<title>Missing Two - RJM Programming - December, 2018 ... Thanks to https: www.igismap.com formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude </title>
<meta id="myviewport" name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.1, maximum-scale=8, user-scalable=yes" >
<style>
summary { background-color: #f0f0f0; }

.ph::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
color: red;
opacity: 1; /* Firefox */
font-size: 8px;
}

.ph:-ms-input-placeholder { /* Internet Explorer 10-11 */
color: red;
font-size: 8px;
}

.ph::-ms-input-placeholder { /* Microsoft Edge */
color: red;
font-size: 8px;
}
</style>
<script type='text/javascript'>
var xzhr=null;

var iinb=0;
var ati=0, atis=[], atic=[];
var apz="";
var dly=1;
var fdone=false;
var wor=0.0;
var xwor=0.0;
var gts=0.0;
var oiqplaceholder='';
var userlatitude=0.0, userlongitude=0.0;
var zalpha=0, chalpha=null, ralpha=0.0;
var WGS_ELLIPSOID = { a: 6378137.0, b: 6356752.314 }; // meter ... thanks to https: gis.stackexchange.com questions 242188calculating-the-earth-radius-at-latitude

var dmore='none';
var trfoota="<td id=posttdmid style='vertical-align:top;><input id=goagain style='display:none;background-color:lightgreen;font-size:24px;' onclick=\"nextplease(); this.style.display='none';\" type=button value='Go Again'></input></td>";
var tdfoota="";
var xipn=location.search.split('ipn=')[1] ? ('' + decodeURIComponent(location.search.split('ipn=')[1].split('&')[0]).replace(/\+/g,' ')) : ''; //document.getElementById('tplacen').value;
var xxipn=xipn.trim();
var xxxipn=xipn;
if (xxipn != xxxipn) { dly=3000; }

var wasthisso='' + (screen.msOrientation || screen.mozOrientation || (screen.orientation || {}).type); //"portrait";
var wasangle=eval(180 - eval('' + window.orientation));
if (xxxipn != xxipn) { wor=eval(180 + eval('' + window.orientation)); xwor=wor; xwor+=90; }

if ((navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || document.URL.indexOf('alert=') != -1) && document.URL.toLowerCase().indexOf('https:') != 0) {
location.href=(document.URL.replace('http:','https:') + '&random=' + Math.floor(Math.random() * 174765654)).replace('.html&','.html?');
}
if ((navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || document.URL.indexOf('update=') != -1) && document.URL.toLowerCase().indexOf('https:') != 0) {
location.href=(document.URL.replace('http:','https:') + '&random=' + Math.floor(Math.random() * 174765654)).replace('.html&','.html?');
}

var gid, gtarget, goptions;

function stateChanged() {
if (xzhr.readyState == 4) {
if (xzhr.status == 200) {
//alert(xzhr.response);
if (xzhr.response.indexOf('</a>') != -1) {
document.getElementById('mtodiv').innerHTML='<a' + xzhr.response.split('<a')[eval(-1 + xzhr.response.split('<a').length)].split('</a>')[0] + '</a>';
var alista=document.getElementsByTagName('a');
alista[eval(-1 + alista.length)].click();
}
}
}
}

function gsuccess(pos) {
var crd = pos.coords;

if (gtarget.latitude === crd.latitude && gtarget.longitude === crd.longitude) {
console.log('Congratulations, you reached the target');
navigator.geolocation.clearWatch(gid);
//} else {
// alert('now at ' + crd.latitude + ',' + crd.longitude);
}
}

function gerror(err) {
console.warn('ERROR(' + err.code + '): ' + err.message);
}

gtarget = {
latitude : 0,
longitude: 0
};

goptions = {
enableHighAccuracy: false,
timeout: 5000,
maximumAge: 0
};

// Thanks to https: developer.mozilla.org en-US docs/Web JavaScript Reference Operators await and
// https: gist.github.com Ajasra ddd616505013a4309c0dda8a8ba626cb

async function myfunction() {
console.log('Inside of myfunction');
//alert(0);
if (window.DeviceOrientationEvent && typeof(DeviceOrientationEvent.requestPermission) === "function") {
//alert(4);
const permissionState = await DeviceOrientationEvent.requestPermission().then(response => {
if (response === 'granted') {
if (1 == 2) { alert('GrAnted'); }
//window.addEventListener('deviceorientation', OrientationHandler, true);
setTimeout(fallow, 2000);
dorh();
} else { console.log('prompt'); return false; } //} else if (result.state === 'prompt') {
//if (1 == 2) { alert("Need prompt!"); }
//} else {
//if (1 == 2) { alert("Not Supported!"); }
//}
}).catch(console.error);

//if (permissionState === "granted") {
// alert('granted');
//} else {
// alert('denied');
//}
} else if (window.DeviceOrientationEvent) {
//alert(44);
dmore='none';
setTimeout(fallow, 2000); //document.getElementById('ballow').style.display='block';
dorh();
} else {
dmore='none';
setTimeout(fallow, 2000);
}

if (window.DeviceMotionEvent && typeof(DeviceMotionEvent.requestPermission) === "function") {
//alert(24);
const permissionStateM = await DeviceMotionEvent.requestPermission().then(response => {
if (response === 'granted') {
if (1 == 2) { alert('GranTed'); }
window.addEventListener('devicemotion', function(event) {
lalpha='' + event.rotationRate.alpha;
if (chalpha != null) {
zalpha='' + chalpha;
} else if (eval('' + zalpha) == 0) {
zalpha='' + Math.abs(eval('' + event.accelerationIncludingGravity.z));
} else if (eval('' + Math.abs(eval('' + event.accelerationIncludingGravity.z))) < eval('' + zalpha)) {
zalpha='' + Math.abs(eval('' + event.accelerationIncludingGravity.z));
}
});
//window.addEventListener('deviceorientation', OrientationHandler, true);
} else { console.log('prompt'); return false; } //} else if (result.state === 'prompt') {
//if (1 == 2) { alert("NeeD prompt!"); }
//} else {
//if (1 == 2) { alert("NoT Supported!"); }
//}
}).catch(console.error);

//if (permissionStateM === "granted") {
// alert('Granted');
//} else {
// alert('Denied');
//}
} else if (window.DeviceMotionEvent) {
//alert(244);
window.addEventListener('devicemotion', function(event) {
lalpha='' + event.rotationRate.alpha;
if (chalpha != null) {
zalpha='' + chalpha;
} else if (eval('' + zalpha) == 0) {
zalpha='' + Math.abs(eval('' + event.accelerationIncludingGravity.z));
} else if (eval('' + Math.abs(eval('' + event.accelerationIncludingGravity.z))) < eval('' + zalpha)) {
zalpha='' + Math.abs(eval('' + event.accelerationIncludingGravity.z));
}
});
}


}

// Here we wait for the myfunction to finish
// and then returns a promise that'll be waited for aswell
// It's useless to wait the myfunction to finish before to return
// we can simply returns a promise that will be resolved later

// Also point that we don't use async keyword on the function because
// we can simply returns the promise returned by myfunction
function start() {
return myfunction();
}

// Call start
(async() => {
console.log('before start');

await start();

console.log('after start');
})();

var degtorad = Math.PI / 180; // Degree-to-Radian conversion ... thanks to https: www.w3.org TR orientation-event #worked-example

var appendz="";
var sf=50, prets=450;
var oldprets=prets;
var eles=['latf','longf','brg','dist','latt','longt'];
var cwhat=[false,false,false,false,true,true];
var decided=false;
var isokformore='';
var wasthisso="portrait";
var jsokformore='';
var trid='trgraphics';
var elev=2.0;
var dorbrg=-1.0, tiltLeftToRight=-1.0, tiltFrontToBack=-1.0, datstart=true, initial_yaw=0.0, initial_pitch=-1.0, initial_roll=-1.0, lalpha=0.0, lastalpha='';
var dok=true;
var viastart=false;
var dcnt=0;
var gllentry='';
var gllonesuffix='f';
var faux=false;
var cfok=true;
var lastclick='';
var fplacen=location.search.split('fplacen=')[1] ? (' ' + decodeURIComponent(location.search.split('fplacen=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
var sparefplacen=fplacen;
var tplacen=location.search.split('tplacen=')[1] ? (' ' + decodeURIComponent(location.search.split('tplacen=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
var fromto=location.search.split('tplacen=')[1] ? (location.search.split('fplacen=')[1] ? 'to' : 'from') : 'from';
var tdid='tdfrom';
var divid='dfrom';
var gc='//www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php?title=Earth%20Places&aregexographicals=y&aregeographicals=HTTP.From%2Chttp.To' +
'&peninfo=latfrom|longfrom|127968_From,latto|longto|128205_To,nearestlat|nearestlong|nearestplace' +
'&width=417&height=260&country=Places&popularity=' +
'&data=%20[latfrom|longfrom|~From~,2]%20,%20[latto|longto|~To~,2]%20,%20[nearestlat|nearestlong|~nearestplace~,2]';
var mu="//www.rjmprogramming.com.au/PHP/Map/map.php?title=London&onclick=y&label=['Lat',&value='Lon','Name']&data=,[51.5072,-0.1275,~London~]";
var origmu=mu;
var tpurl="https://www.google.com/maps/dir/Sydney+NSW,+Australia/Brisbane+QLD,+Australia";
var origtpurl=tpurl;
var accomurl='//www.google.com/search?q=accommodation+in+Springwood,+New+South+Wales&rlz=1C5CHFA_enAU832AU832&sxsrf=AOaemvKkE3W-5RrqTUzo4tGtosOlwjOXFA:1631413859134&source=lnms&tbm=isch&sa=X&ved=2ahUKEwiHjbicsvjyAhWIyzgGHb-bDkcQ_AUoA3oECAEQBQ&biw=1439&bih=729';
var woesright=null;
var yourtzlist="<option value=\"GMT\" data-geo=\"51.4934,0.0098,GMT,GB,+0\">GMT</option><option value=\"Africa/Abidjan\" data-geo=\"5.31666,-4.03334,GMT,CI,+0\">Africa/Abidjan</option><option value=\"Africa/Accra\" data-geo=\"5.55,-0.21667,GMT,GH,+0\">Africa/Accra</option><option value=\"Africa/Addis_Ababa\" data-geo=\"9.03333,38.7,EAT,ET,+3\">Africa/Addis_Ababa</option><option value=\"Africa/Algiers\" data-geo=\"36.78333,3.05,CET,DZ,+1\">Africa/Algiers</option><option value=\"Africa/Asmara\" data-geo=\"15.33333,38.88333,EAT,ER,+3\">Africa/Asmara</option><option value=\"Africa/Bamako\" data-geo=\"12.65,-8,GMT,ML,+0\">Africa/Bamako</option><option value=\"Africa/Bangui\" data-geo=\"4.36666,18.58333,WAT,CF,+1\">Africa/Bangui</option><option value=\"Africa/Banjul\" data-geo=\"13.46666,-16.65,GMT,GM,+0\">Africa/Banjul</option><option value=\"Africa/Bissau\" data-geo=\"11.85,-15.58334,GMT,GW,+0\">Africa/Bissau</option><option value=\"Africa/Blantyre\" data-geo=\"-15.78334,35,CAT,MW,+2\">Africa/Blantyre</option><option value=\"Africa/Brazzaville\" data-geo=\"-4.26667,15.28333,WAT,CG,+1\">Africa/Brazzaville</option><option value=\"Africa/Bujumbura\" data-geo=\"-3.38334,29.36666,CAT,BI,+2\">Africa/Bujumbura</option><option value=\"Africa/Cairo\" data-geo=\"30.05,31.25,EET,EG,+2\">Africa/Cairo</option><option value=\"Africa/Casablanca\" data-geo=\"33.65,-7.58334,+01,MA,+0\">Africa/Casablanca</option><option value=\"Africa/Ceuta\" data-geo=\"35.88333,-5.31667,CEST,ES,+1\">Africa/Ceuta</option><option value=\"Africa/Conakry\" data-geo=\"9.51666,-13.71667,GMT,GN,+0\">Africa/Conakry</option><option value=\"Africa/Dakar\" data-geo=\"14.66666,-17.43334,GMT,SN,+0\">Africa/Dakar</option><option value=\"Africa/Dar_es_Salaam\" data-geo=\"-6.8,39.28333,EAT,TZ,+3\">Africa/Dar_es_Salaam</option><option value=\"Africa/Djibouti\" data-geo=\"11.6,43.15,EAT,DJ,+3\">Africa/Djibouti</option><option value=\"Africa/Douala\" data-geo=\"4.05,9.7,WAT,CM,+1\">Africa/Douala</option><option value=\"Africa/El_Aaiun\" data-geo=\"27.15,-13.2,+01,EH,+0\">Africa/El_Aaiun</option><option value=\"Africa/Freetown\" data-geo=\"8.5,-13.25,GMT,SL,+0\">Africa/Freetown</option><option value=\"Africa/Gaborone\" data-geo=\"-24.65001,25.91666,CAT,BW,+2\">Africa/Gaborone</option><option value=\"Africa/Harare\" data-geo=\"-17.83334,31.05,CAT,ZW,+2\">Africa/Harare</option><option value=\"Africa/Johannesburg\" data-geo=\"-26.25,28,SAST,ZA,+2\">Africa/Johannesburg</option><option value=\"Africa/Juba\" data-geo=\"4.85,31.6,EAT,SS,+3\">Africa/Juba</option><option value=\"Africa/Kampala\" data-geo=\"0.31666,32.41666,EAT,UG,+3\">Africa/Kampala</option><option value=\"Africa/Khartoum\" data-geo=\"15.6,32.53333,CAT,SD,+3\">Africa/Khartoum</option><option value=\"Africa/Kigali\" data-geo=\"-1.95,30.06666,CAT,RW,+2\">Africa/Kigali</option><option value=\"Africa/Kinshasa\" data-geo=\"-4.3,15.3,WAT,CD,+1\">Africa/Kinshasa</option><option value=\"Africa/Lagos\" data-geo=\"6.45,3.4,WAT,NG,+1\">Africa/Lagos</option><option value=\"Africa/Libreville\" data-geo=\"0.38333,9.45,WAT,GA,+1\">Africa/Libreville</option><option value=\"Africa/Lome\" data-geo=\"6.13333,1.21666,GMT,TG,+0\">Africa/Lome</option><option value=\"Africa/Luanda\" data-geo=\"-8.8,13.23333,WAT,AO,+1\">Africa/Luanda</option><option value=\"Africa/Lubumbashi\" data-geo=\"-11.66667,27.46666,CAT,CD,+2\">Africa/Lubumbashi</option><option value=\"Africa/Lusaka\" data-geo=\"-15.41667,28.28333,CAT,ZM,+2\">Africa/Lusaka</option><option value=\"Africa/Malabo\" data-geo=\"3.75,8.78333,WAT,GQ,+1\">Africa/Malabo</option><option value=\"Africa/Maputo\" data-geo=\"-25.96667,32.58333,CAT,MZ,+2\">Africa/Maputo</option><option value=\"Africa/Maseru\" data-geo=\"-29.46667,27.5,SAST,LS,+2\">Africa/Maseru</option><option value=\"Africa/Mbabane\" data-geo=\"-26.3,31.1,SAST,SZ,+2\">Africa/Mbabane</option><option value=\"Africa/Mogadishu\" data-geo=\"2.06666,45.36666,EAT,SO,+3\">Africa/Mogadishu</option><option value=\"Africa/Monrovia\" data-geo=\"6.3,-10.78334,GMT,LR,+0\">Africa/Monrovia</option><option value=\"Africa/Nairobi\" data-geo=\"-1.28334,36.81666,EAT,KE,+3\">Africa/Nairobi</option><option value=\"Africa/Ndjamena\" data-geo=\"12.11666,15.05,WAT,TD,+1\">Africa/Ndjamena</option><option value=\"Africa/Niamey\" data-geo=\"13.51666,2.11666,WAT,NE,+1\">Africa/Niamey</option><option value=\"Africa/Nouakchott\" data-geo=\"18.1,-15.95,GMT,MR,+0\">Africa/Nouakchott</option><option value=\"Africa/Ouagadougou\" data-geo=\"12.36666,-1.51667,GMT,BF,+0\">Africa/Ouagadougou</option><option value=\"Africa/Porto-Novo\" data-geo=\"6.48333,2.61666,WAT,BJ,+1\">Africa/Porto-Novo</option><option value=\"Africa/Sao_Tome\" data-geo=\"0.33333,6.73333,GMT,ST,+0\">Africa/Sao_Tome</option><option value=\"Africa/Tripoli\" data-geo=\"32.9,13.18333,EET,LY,+2\">Africa/Tripoli</option><option value=\"Africa/Tunis\" data-geo=\"36.8,10.18333,CET,TN,+1\">Africa/Tunis</option><option value=\"Africa/Windhoek\" data-geo=\"-22.56667,17.1,CAT,NA,+2\">Africa/Windhoek</option><option value=\"America/Adak\" data-geo=\"51.88,-176.65806,HDT,US,-10\">America/Adak</option><option value=\"America/Anchorage\" data-geo=\"61.21805,-149.90028,AKDT,US,-9\">America/Anchorage</option><option value=\"America/Anguilla\" data-geo=\"18.2,-63.06667,AST,AI,-4\">America/Anguilla</option><option value=\"America/Antigua\" data-geo=\"17.05,-61.8,AST,AG,-4\">America/Antigua</option><option value=\"America/Araguaina\" data-geo=\"-7.2,-48.2,-03,BR,-3\">America/Araguaina</option><option value=\"America/Argentina/Buenos_Aires\" data-geo=\"-34.6,-58.45,-03,AR,-3\">America/Argentina/Buenos_Aires</option><option value=\"America/Argentina/Catamarca\" data-geo=\"-28.46667,-65.78334,-03,AR,-3\">America/Argentina/Catamarca</option><option value=\"America/Argentina/Cordoba\" data-geo=\"-31.4,-64.18334,-03,AR,-3\">America/Argentina/Cordoba</option><option value=\"America/Argentina/Jujuy\" data-geo=\"-24.18334,-65.3,-03,AR,-3\">America/Argentina/Jujuy</option><option value=\"America/Argentina/La_Rioja\" data-geo=\"-29.43334,-66.85,-03,AR,-3\">America/Argentina/La_Rioja</option><option value=\"America/Argentina/Mendoza\" data-geo=\"-32.88334,-68.81667,-03,AR,-3\">America/Argentina/Mendoza</option><option value=\"America/Argentina/Rio_Gallegos\" data-geo=\"-51.63334,-69.21667,-03,AR,-3\">America/Argentina/Rio_Gallegos</option><option value=\"America/Argentina/Salta\" data-geo=\"-24.78334,-65.41667,-03,AR,-3\">America/Argentina/Salta</option><option value=\"America/Argentina/San_Juan\" data-geo=\"-31.53334,-68.51667,-03,AR,-3\">America/Argentina/San_Juan</option><option value=\"America/Argentina/San_Luis\" data-geo=\"-33.31667,-66.35,-03,AR,-3\">America/Argentina/San_Luis</option><option value=\"America/Argentina/Tucuman\" data-geo=\"-26.81667,-65.21667,-03,AR,-3\">America/Argentina/Tucuman</option><option value=\"America/Argentina/Ushuaia\" data-geo=\"-54.8,-68.3,-03,AR,-3\">America/Argentina/Ushuaia</option><option value=\"America/Aruba\" data-geo=\"12.5,-69.96667,AST,AW,-4\">America/Aruba</option><option value=\"America/Asuncion\" data-geo=\"-25.26667,-57.66667,-04,PY,-3\">America/Asuncion</option><option value=\"America/Atikokan\" data-geo=\"48.75861,-91.62167,EST,CA,-5\">America/Atikokan</option><option value=\"America/Bahia\" data-geo=\"-12.98334,-38.51667,-03,BR,-3\">America/Bahia</option><option value=\"America/Bahia_Banderas\" data-geo=\"20.8,-105.25,CDT,MX,-6\">America/Bahia_Banderas</option><option value=\"America/Barbados\" data-geo=\"13.1,-59.61667,AST,BB,-4\">America/Barbados</option><option value=\"America/Belem\" data-geo=\"-1.45,-48.48334,-03,BR,-3\">America/Belem</option><option value=\"America/Belize\" data-geo=\"17.5,-88.2,CST,BZ,-6\">America/Belize</option><option value=\"America/Blanc-Sablon\" data-geo=\"51.41666,-57.11667,AST,CA,-4\">America/Blanc-Sablon</option><option value=\"America/Boa_Vista\" data-geo=\"2.81666,-60.66667,-04,BR,-4\">America/Boa_Vista</option><option value=\"America/Bogota\" data-geo=\"4.6,-74.08334,-05,CO,-5\">America/Bogota</option><option value=\"America/Boise\" data-geo=\"43.61361,-116.2025,MDT,US,-7\">America/Boise</option><option value=\"America/Cambridge_Bay\" data-geo=\"69.11388,-105.05278,MDT,CA,-7\">America/Cambridge_Bay</option><option value=\"America/Campo_Grande\" data-geo=\"-20.45,-54.61667,-04,BR,-3\">America/Campo_Grande</option><option value=\"America/Cancun\" data-geo=\"21.08333,-86.76667,EST,MX,-5\">America/Cancun</option><option value=\"America/Caracas\" data-geo=\"10.5,-66.93334,-04,VE,-4.5\">America/Caracas</option><option value=\"America/Cayenne\" data-geo=\"4.93333,-52.33334,-03,GF,-3\">America/Cayenne</option><option value=\"America/Cayman\" data-geo=\"19.3,-81.38334,EST,KY,-5\">America/Cayman</option><option value=\"America/Chicago\" data-geo=\"41.85,-87.65,CDT,US,-6\">America/Chicago</option><option value=\"America/Chihuahua\" data-geo=\"28.63333,-106.08334,MDT,MX,-7\">America/Chihuahua</option><option value=\"America/Costa_Rica\" data-geo=\"9.93333,-84.08334,CST,CR,-6\">America/Costa_Rica</option><option value=\"America/Creston\" data-geo=\"49.1,-116.51667,MST,CA,-7\">America/Creston</option><option value=\"America/Cuiaba\" data-geo=\"-15.58334,-56.08334,-04,BR,-3\">America/Cuiaba</option><option value=\"America/Curacao\" data-geo=\"12.18333,-69,AST,CW,-4\">America/Curacao</option><option value=\"America/Danmarkshavn\" data-geo=\"76.76666,-18.66667,GMT,GL,+0\">America/Danmarkshavn</option><option value=\"America/Dawson\" data-geo=\"64.06666,-139.41667,PDT,CA,-8\">America/Dawson</option><option value=\"America/Dawson_Creek\" data-geo=\"59.76666,-120.23334,MST,CA,-7\">America/Dawson_Creek</option><option value=\"America/Denver\" data-geo=\"39.73916,-104.98417,MDT,US,-7\">America/Denver</option><option value=\"America/Detroit\" data-geo=\"42.33138,-83.04584,EDT,US,-5\">America/Detroit</option><option value=\"America/Dominica\" data-geo=\"15.3,-61.4,AST,DM,-4\">America/Dominica</option><option value=\"America/Edmonton\" data-geo=\"53.55,-113.46667,MDT,CA,-7\">America/Edmonton</option><option value=\"America/Eirunepe\" data-geo=\"-6.66667,-69.86667,-05,BR,-5\">America/Eirunepe</option><option value=\"America/El_Salvador\" data-geo=\"13.7,-89.2,CST,SV,-6\">America/El_Salvador</option><option value=\"America/Fortaleza\" data-geo=\"-3.71667,-38.5,-03,BR,-3\">America/Fortaleza</option><option value=\"America/Glace_Bay\" data-geo=\"46.19999,-59.95,ADT,CA,-4\">America/Glace_Bay</option><option value=\"America/Godthab\" data-geo=\"64.18333,-51.73334,-02,GL,-3\">America/Godthab</option><option value=\"America/Goose_Bay\" data-geo=\"53.33333,-60.41667,ADT,CA,-4\">America/Goose_Bay</option><option value=\"America/Grand_Turk\" data-geo=\"21.46666,-71.13334,EDT,TC,-4\">America/Grand_Turk</option><option value=\"America/Grenada\" data-geo=\"12.05,-61.75,AST,GD,-4\">America/Grenada</option><option value=\"America/Guadeloupe\" data-geo=\"16.23333,-61.53334,AST,GP,-4\">America/Guadeloupe</option><option value=\"America/Guatemala\" data-geo=\"14.63333,-90.51667,CST,GT,-6\">America/Guatemala</option><option value=\"America/Guayaquil\" data-geo=\"-2.16667,-79.83334,-05,EC,-5\">America/Guayaquil</option><option value=\"America/Guyana\" data-geo=\"6.8,-58.16667,-04,GY,-4\">America/Guyana</option><option value=\"America/Halifax\" data-geo=\"44.65,-63.6,ADT,CA,-4\">America/Halifax</option><option value=\"America/Havana\" data-geo=\"23.13333,-82.36667,CDT,CU,-5\">America/Havana</option><option value=\"America/Hermosillo\" data-geo=\"29.06666,-110.96667,MST,MX,-7\">America/Hermosillo</option><option value=\"America/Indiana/Indianapolis\" data-geo=\"39.76833,-86.15806,EDT,US,-5\">America/Indiana/Indianapolis</option><option value=\"America/Indiana/Knox\" data-geo=\"41.29583,-86.625,CDT,US,-6\">America/Indiana/Knox</option><option value=\"America/Indiana/Marengo\" data-geo=\"38.37555,-86.34473,EDT,US,-5\">America/Indiana/Marengo</option><option value=\"America/Indiana/Petersburg\" data-geo=\"38.49194,-87.27862,EDT,US,-5\">America/Indiana/Petersburg</option><option value=\"America/Indiana/Tell_City\" data-geo=\"37.95305,-86.76139,CDT,US,-6\">America/Indiana/Tell_City</option><option value=\"America/Indiana/Vevay\" data-geo=\"38.74777,-85.06723,EDT,US,-5\">America/Indiana/Vevay</option><option value=\"America/Indiana/Vincennes\" data-geo=\"38.67722,-87.52862,EDT,US,-5\">America/Indiana/Vincennes</option><option value=\"America/Indiana/Winamac\" data-geo=\"41.05138,-86.60306,EDT,US,-5\">America/Indiana/Winamac</option><option value=\"America/Inuvik\" data-geo=\"68.34972,-133.71667,MDT,CA,-7\">America/Inuvik</option><option value=\"America/Iqaluit\" data-geo=\"63.73333,-68.46667,EDT,CA,-5\">America/Iqaluit</option><option value=\"America/Jamaica\" data-geo=\"18,-76.8,EST,JM,-5\">America/Jamaica</option><option value=\"America/Juneau\" data-geo=\"58.30194,-134.41973,AKDT,US,-9\">America/Juneau</option><option value=\"America/Kentucky/Louisville\" data-geo=\"38.25416,-85.75945,EDT,US,-5\">America/Kentucky/Louisville</option><option value=\"America/Kentucky/Monticello\" data-geo=\"36.82972,-84.84917,EDT,US,-5\">America/Kentucky/Monticello</option><option value=\"America/Kralendijk\" data-geo=\"12.15083,-68.27667,AST,BQ,-4\">America/Kralendijk</option><option value=\"America/La_Paz\" data-geo=\"-16.5,-68.15,-04,BO,-4\">America/La_Paz</option><option value=\"America/Lima\" data-geo=\"-12.05,-77.05,-05,PE,-5\">America/Lima</option><option value=\"America/Los_Angeles\" data-geo=\"34.05222,-118.24278,PDT,US,-8\">America/Los_Angeles</option><option value=\"America/Lower_Princes\" data-geo=\"18.05138,-63.04723,AST,SX,-4\">America/Lower_Princes</option><option value=\"America/Maceio\" data-geo=\"-9.66667,-35.71667,-03,BR,-3\">America/Maceio</option><option value=\"America/Managua\" data-geo=\"12.15,-86.28334,CST,NI,-6\">America/Managua</option><option value=\"America/Manaus\" data-geo=\"-3.13334,-60.01667,-04,BR,-4\">America/Manaus</option><option value=\"America/Marigot\" data-geo=\"18.06666,-63.08334,AST,MF,-4\">America/Marigot</option><option value=\"America/Martinique\" data-geo=\"14.6,-61.08334,AST,MQ,-4\">America/Martinique</option><option value=\"America/Matamoros\" data-geo=\"25.83333,-97.5,CDT,MX,-6\">America/Matamoros</option><option value=\"America/Mazatlan\" data-geo=\"23.21666,-106.41667,MDT,MX,-7\">America/Mazatlan</option><option value=\"America/Menominee\" data-geo=\"45.10777,-87.61417,CDT,US,-6\">America/Menominee</option><option value=\"America/Merida\" data-geo=\"20.96666,-89.61667,CDT,MX,-6\">America/Merida</option><option value=\"America/Metlakatla\" data-geo=\"55.12694,-131.57639,AKDT,US,-8\">America/Metlakatla</option><option value=\"America/Mexico_City\" data-geo=\"19.4,-99.15001,CDT,MX,-6\">America/Mexico_City</option><option value=\"America/Miquelon\" data-geo=\"47.05,-56.33334,-02,PM,-3\">America/Miquelon</option><option value=\"America/Moncton\" data-geo=\"46.1,-64.78334,ADT,CA,-4\">America/Moncton</option><option value=\"America/Monterrey\" data-geo=\"25.66666,-100.31667,CDT,MX,-6\">America/Monterrey</option><option value=\"America/Montevideo\" data-geo=\"-34.88334,-56.18334,-03,UY,-2\">America/Montevideo</option><option value=\"America/Montreal\" data-geo=\"45.51666,-73.56667,UTC,??,-5\">America/Montreal</option><option value=\"America/Montserrat\" data-geo=\"16.71666,-62.21667,AST,MS,-4\">America/Montserrat</option><option value=\"America/Nassau\" data-geo=\"25.08333,-77.35,EDT,BS,-5\">America/Nassau</option><option value=\"America/New_York\" data-geo=\"40.71416,-74.00639,EDT,US,-5\">America/New_York</option><option value=\"America/Nipigon\" data-geo=\"49.01666,-88.26667,EDT,CA,-5\">America/Nipigon</option><option value=\"America/Nome\" data-geo=\"64.50111,-165.40639,AKDT,US,-9\">America/Nome</option><option value=\"America/Noronha\" data-geo=\"-3.85,-32.41667,-02,BR,-2\">America/Noronha</option><option value=\"America/North_Dakota/Beulah\" data-geo=\"47.26416,-101.77778,CDT,US,-6\">America/North_Dakota/Beulah</option><option value=\"America/North_Dakota/Center\" data-geo=\"47.11638,-101.29917,CDT,US,-6\">America/North_Dakota/Center</option><option value=\"America/North_Dakota/New_Salem\" data-geo=\"46.845,-101.41084,CDT,US,-6\">America/North_Dakota/New_Salem</option><option value=\"America/Ojinaga\" data-geo=\"29.56666,-104.41667,MDT,MX,-7\">America/Ojinaga</option><option value=\"America/Panama\" data-geo=\"8.96666,-79.53334,EST,PA,-5\">America/Panama</option><option value=\"America/Pangnirtung\" data-geo=\"66.13333,-65.73334,EDT,CA,-5\">America/Pangnirtung</option><option value=\"America/Paramaribo\" data-geo=\"5.83333,-55.16667,-03,SR,-3\">America/Paramaribo</option><option value=\"America/Phoenix\" data-geo=\"33.44833,-112.07334,MST,US,-7\">America/Phoenix</option><option value=\"America/Port-au-Prince\" data-geo=\"18.53333,-72.33334,EDT,HT,-5\">America/Port-au-Prince</option><option value=\"America/Port_of_Spain\" data-geo=\"10.65,-61.51667,AST,TT,-4\">America/Port_of_Spain</option><option value=\"America/Porto_Velho\" data-geo=\"-8.76667,-63.9,-04,BR,-4\">America/Porto_Velho</option><option value=\"America/Puerto_Rico\" data-geo=\"18.46833,-66.10612,AST,PR,-4\">America/Puerto_Rico</option><option value=\"America/Rainy_River\" data-geo=\"48.71666,-94.56667,CDT,CA,-6\">America/Rainy_River</option><option value=\"America/Rankin_Inlet\" data-geo=\"62.81666,-92.08306,CDT,CA,-6\">America/Rankin_Inlet</option><option value=\"America/Recife\" data-geo=\"-8.05,-34.9,-03,BR,-3\">America/Recife</option><option value=\"America/Regina\" data-geo=\"50.4,-104.65001,CST,CA,-6\">America/Regina</option><option value=\"America/Resolute\" data-geo=\"74.69555,-94.82917,CDT,CA,-6\">America/Resolute</option><option value=\"America/Rio_Branco\" data-geo=\"-9.96667,-67.8,-05,BR,-5\">America/Rio_Branco</option><option value=\"America/Santa_Isabel\" data-geo=\"30.3,-114.86667,UTC,MX,-8\">America/Santa_Isabel</option><option value=\"America/Santarem\" data-geo=\"-2.43334,-54.86667,-03,BR,-3\">America/Santarem</option><option value=\"America/Santiago\" data-geo=\"-33.45,-70.66667,-03,CL,-3\">America/Santiago</option><option value=\"America/Santo_Domingo\" data-geo=\"18.46666,-69.9,AST,DO,-4\">America/Santo_Domingo</option><option value=\"America/Sao_Paulo\" data-geo=\"-23.53334,-46.61667,-03,BR,-2\">America/Sao_Paulo</option><option value=\"America/Scoresbysund\" data-geo=\"70.48333,-21.96667,+00,GL,-1\">America/Scoresbysund</option><option value=\"America/Shiprock\" data-geo=\"36.78555,-108.68639,UTC,??,-7\">America/Shiprock</option><option value=\"America/Sitka\" data-geo=\"57.17638,-135.30195,AKDT,US,-9\">America/Sitka</option><option value=\"America/St_Barthelemy\" data-geo=\"17.88333,-62.85,AST,BL,-4\">America/St_Barthelemy</option><option value=\"America/St_Johns\" data-geo=\"47.56666,-52.71667,NDT,CA,-3.5\">America/St_Johns</option><option value=\"America/St_Kitts\" data-geo=\"17.3,-62.71667,AST,KN,-4\">America/St_Kitts</option><option value=\"America/St_Lucia\" data-geo=\"14.01666,-61,AST,LC,-4\">America/St_Lucia</option><option value=\"America/St_Thomas\" data-geo=\"18.35,-64.93334,AST,VI,-4\">America/St_Thomas</option><option value=\"America/St_Vincent\" data-geo=\"13.15,-61.23334,AST,VC,-4\">America/St_Vincent</option><option value=\"America/Swift_Current\" data-geo=\"50.28333,-107.83334,CST,CA,-6\">America/Swift_Current</option><option value=\"America/Tegucigalpa\" data-geo=\"14.1,-87.21667,CST,HN,-6\">America/Tegucigalpa</option><option value=\"America/Thule\" data-geo=\"76.56666,-68.78334,ADT,GL,-4\">America/Thule</option><option value=\"America/Thunder_Bay\" data-geo=\"48.38333,-89.25,EDT,CA,-5\">America/Thunder_Bay</option><option value=\"America/Tijuana\" data-geo=\"32.53333,-117.01667,PDT,MX,-8\">America/Tijuana</option><option value=\"America/Toronto\" data-geo=\"43.65,-79.38334,EDT,CA,-5\">America/Toronto</option><option value=\"America/Tortola\" data-geo=\"18.45,-64.61667,AST,VG,-4\">America/Tortola</option><option value=\"America/Vancouver\" data-geo=\"49.26666,-123.11667,PDT,CA,-8\">America/Vancouver</option><option value=\"America/Whitehorse\" data-geo=\"60.71666,-135.05001,PDT,CA,-8\">America/Whitehorse</option><option value=\"America/Winnipeg\" data-geo=\"49.88333,-97.15001,CDT,CA,-6\">America/Winnipeg</option><option value=\"America/Yakutat\" data-geo=\"59.54694,-139.72723,AKDT,US,-9\">America/Yakutat</option><option value=\"America/Yellowknife\" data-geo=\"62.44999,-114.35,MDT,CA,-7\">America/Yellowknife</option><option value=\"Antarctica/Casey\" data-geo=\"-66.28334,110.51666,+08,AQ,+8\">Antarctica/Casey</option><option value=\"Antarctica/Davis\" data-geo=\"-68.58334,77.96666,+07,AQ,+7\">Antarctica/Davis</option><option value=\"Antarctica/DumontDUrville\" data-geo=\"-66.66667,140.01666,+10,AQ,+10\">Antarctica/DumontDUrville</option><option value=\"Antarctica/Macquarie\" data-geo=\"-54.5,158.95,+11,AU,+11\">Antarctica/Macquarie</option><option value=\"Antarctica/Mawson\" data-geo=\"-67.6,62.88333,+05,AQ,+5\">Antarctica/Mawson</option><option value=\"Antarctica/McMurdo\" data-geo=\"-77.83334,166.6,NZST,AQ,+13\">Antarctica/McMurdo</option><option value=\"Antarctica/Palmer\" data-geo=\"-64.8,-64.1,-03,AQ,-3\">Antarctica/Palmer</option><option value=\"Antarctica/Rothera\" data-geo=\"-67.56667,-68.13334,-03,AQ,-3\">Antarctica/Rothera</option><option value=\"Antarctica/South_Pole\" data-geo=\"-90,0,UTC,??,+13\">Antarctica/South_Pole</option><option value=\"Antarctica/Syowa\" data-geo=\"-69.00612,39.59,+03,AQ,+3\">Antarctica/Syowa</option><option value=\"Antarctica/Vostok\" data-geo=\"-78.40001,106.89999,+06,AQ,+6\">Antarctica/Vostok</option><option value=\"Arctic/Longyearbyen\" data-geo=\"78,16,CEST,SJ,+1\">Arctic/Longyearbyen</option><option value=\"Asia/Aden\" data-geo=\"12.75,45.2,+03,YE,+3\">Asia/Aden</option><option value=\"Asia/Almaty\" data-geo=\"43.25,76.95,+06,KZ,+6\">Asia/Almaty</option><option value=\"Asia/Amman\" data-geo=\"31.95,35.93333,EEST,JO,+2\">Asia/Amman</option><option value=\"Asia/Anadyr\" data-geo=\"64.75,177.48333,+12,RU,+12\">Asia/Anadyr</option><option value=\"Asia/Aqtau\" data-geo=\"44.51666,50.26666,+05,KZ,+5\">Asia/Aqtau</option><option value=\"Asia/Aqtobe\" data-geo=\"50.28333,57.16666,+05,KZ,+5\">Asia/Aqtobe</option><option value=\"Asia/Ashgabat\" data-geo=\"37.95,58.38333,+05,TM,+5\">Asia/Ashgabat</option><option value=\"Asia/Baghdad\" data-geo=\"33.35,44.41666,+03,IQ,+3\">Asia/Baghdad</option><option value=\"Asia/Bahrain\" data-geo=\"26.38333,50.58333,+03,BH,+3\">Asia/Bahrain</option><option value=\"Asia/Baku\" data-geo=\"40.38333,49.85,+04,AZ,+4\">Asia/Baku</option><option value=\"Asia/Bangkok\" data-geo=\"13.75,100.51666,+07,TH,+7\">Asia/Bangkok</option><option value=\"Asia/Beirut\" data-geo=\"33.88333,35.5,EEST,LB,+2\">Asia/Beirut</option><option value=\"Asia/Bishkek\" data-geo=\"42.9,74.6,+06,KG,+6\">Asia/Bishkek</option><option value=\"Asia/Brunei\" data-geo=\"4.93333,114.91666,+08,BN,+8\">Asia/Brunei</option><option value=\"Asia/Choibalsan\" data-geo=\"48.06666,114.5,+08,MN,+8\">Asia/Choibalsan</option><option value=\"Asia/Chongqing\" data-geo=\"29.56666,106.58333,UTC,??,+8\">Asia/Chongqing</option><option value=\"Asia/Colombo\" data-geo=\"6.93333,79.85,+0530,LK,+5.5\">Asia/Colombo</option><option value=\"Asia/Damascus\" data-geo=\"33.5,36.3,EEST,SY,+2\">Asia/Damascus</option><option value=\"Asia/Dhaka\" data-geo=\"23.71666,90.41666,+06,BD,+6\">Asia/Dhaka</option><option value=\"Asia/Dili\" data-geo=\"-8.55,125.58333,+09,TL,+9\">Asia/Dili</option><option value=\"Asia/Dubai\" data-geo=\"25.3,55.3,+04,AE,+4\">Asia/Dubai</option><option value=\"Asia/Dushanbe\" data-geo=\"38.58333,68.8,+05,TJ,+5\">Asia/Dushanbe</option><option value=\"Asia/Gaza\" data-geo=\"31.5,34.46666,EEST,PS,+2\">Asia/Gaza</option><option value=\"Asia/Harbin\" data-geo=\"45.75,126.68333,UTC,??,+8\">Asia/Harbin</option><option value=\"Asia/Hebron\" data-geo=\"31.53333,35.095,EEST,PS,+2\">Asia/Hebron</option><option value=\"Asia/Ho_Chi_Minh\" data-geo=\"10.75,106.66666,+07,VN,+7\">Asia/Ho_Chi_Minh</option><option value=\"Asia/Hong_Kong\" data-geo=\"22.28333,114.14999,HKT,HK,+8\">Asia/Hong_Kong</option><option value=\"Asia/Hovd\" data-geo=\"48.01666,91.64999,+07,MN,+7\">Asia/Hovd</option><option value=\"Asia/Irkutsk\" data-geo=\"52.26666,104.33333,+08,RU,+8\">Asia/Irkutsk</option><option value=\"Asia/Jakarta\" data-geo=\"-6.16667,106.8,WIB,ID,+7\">Asia/Jakarta</option><option value=\"Asia/Jayapura\" data-geo=\"-2.53334,140.7,WIT,ID,+9\">Asia/Jayapura</option><option value=\"Asia/Jerusalem\" data-geo=\"31.76666,35.23333,IDT,IL,+2\">Asia/Jerusalem</option><option value=\"Asia/Kabul\" data-geo=\"34.51666,69.2,+0430,AF,+4.5\">Asia/Kabul</option><option value=\"Asia/Kamchatka\" data-geo=\"53.01666,158.65,+12,RU,+12\">Asia/Kamchatka</option><option value=\"Asia/Karachi\" data-geo=\"24.86666,67.05,PKT,PK,+5\">Asia/Karachi</option><option value=\"Asia/Kashgar\" data-geo=\"39.48333,75.98333,UTC,??,+6\">Asia/Kashgar</option><option value=\"Asia/Kathmandu\" data-geo=\"27.71666,85.31666,+0545,NP,+5.75\">Asia/Kathmandu</option><option value=\"Asia/Kolkata\" data-geo=\"22.53333,88.36666,IST,IN,+5.5\">Asia/Kolkata</option><option value=\"Asia/Krasnoyarsk\" data-geo=\"56.01666,92.83333,+07,RU,+7\">Asia/Krasnoyarsk</option><option value=\"Asia/Kuala_Lumpur\" data-geo=\"3.16666,101.7,+08,MY,+8\">Asia/Kuala_Lumpur</option><option value=\"Asia/Kuching\" data-geo=\"1.55,110.33333,+08,MY,+8\">Asia/Kuching</option><option value=\"Asia/Kuwait\" data-geo=\"29.33333,47.98333,+03,KW,+3\">Asia/Kuwait</option><option value=\"Asia/Macau\" data-geo=\"22.23333,113.58333,CST,MO,+8\">Asia/Macau</option><option value=\"Asia/Magadan\" data-geo=\"59.56666,150.8,+11,RU,+10\">Asia/Magadan</option><option value=\"Asia/Makassar\" data-geo=\"-5.11667,119.39999,WITA,ID,+8\">Asia/Makassar</option><option value=\"Asia/Manila\" data-geo=\"14.58333,121,PST,PH,+8\">Asia/Manila</option><option value=\"Asia/Muscat\" data-geo=\"23.6,58.58333,+04,OM,+4\">Asia/Muscat</option><option value=\"Asia/Nicosia\" data-geo=\"35.16666,33.36666,EEST,CY,+2\">Asia/Nicosia</option><option value=\"Asia/Novokuznetsk\" data-geo=\"53.75,87.11666,+07,RU,+7\">Asia/Novokuznetsk</option><option value=\"Asia/Novosibirsk\" data-geo=\"55.03333,82.91666,+07,RU,+6\">Asia/Novosibirsk</option><option value=\"Asia/Omsk\" data-geo=\"55,73.4,+06,RU,+6\">Asia/Omsk</option><option value=\"Asia/Oral\" data-geo=\"51.21666,51.35,+05,KZ,+5\">Asia/Oral</option><option value=\"Asia/Phnom_Penh\" data-geo=\"11.55,104.91666,+07,KH,+7\">Asia/Phnom_Penh</option><option value=\"Asia/Pontianak\" data-geo=\"-0.03334,109.33333,WIB,ID,+7\">Asia/Pontianak</option><option value=\"Asia/Pyongyang\" data-geo=\"39.01666,125.75,KST,KP,+9\">Asia/Pyongyang</option><option value=\"Asia/Qatar\" data-geo=\"25.28333,51.53333,+03,QA,+3\">Asia/Qatar</option><option value=\"Asia/Qyzylorda\" data-geo=\"44.8,65.46666,+05,KZ,+6\">Asia/Qyzylorda</option><option value=\"Asia/Rangoon\" data-geo=\"16.78333,96.16666,UTC,MM,+6.5\">Asia/Rangoon</option><option value=\"Asia/Riyadh\" data-geo=\"24.63333,46.71666,+03,SA,+3\">Asia/Riyadh</option><option value=\"Asia/Sakhalin\" data-geo=\"46.96666,142.7,+11,RU,+10\">Asia/Sakhalin</option><option value=\"Asia/Samarkand\" data-geo=\"39.66666,66.8,+05,UZ,+5\">Asia/Samarkand</option><option value=\"Asia/Seoul\" data-geo=\"37.55,126.96666,KST,KR,+9\">Asia/Seoul</option><option value=\"Asia/Shanghai\" data-geo=\"31.23333,121.46666,CST,CN,+8\">Asia/Shanghai</option><option value=\"Asia/Singapore\" data-geo=\"1.28333,103.85,+08,SG,+8\">Asia/Singapore</option><option value=\"Asia/Taipei\" data-geo=\"25.05,121.5,CST,TW,+8\">Asia/Taipei</option><option value=\"Asia/Tashkent\" data-geo=\"41.33333,69.3,+05,UZ,+5\">Asia/Tashkent</option><option value=\"Asia/Tbilisi\" data-geo=\"41.71666,44.81666,+04,GE,+4\">Asia/Tbilisi</option><option value=\"Asia/Tehran\" data-geo=\"35.66666,51.43333,+0430,IR,+3.5\">Asia/Tehran</option><option value=\"Asia/Thimphu\" data-geo=\"27.46666,89.64999,+06,BT,+6\">Asia/Thimphu</option><option value=\"Asia/Tokyo\" data-geo=\"35.65444,139.74472,JST,JP,+9\">Asia/Tokyo</option><option value=\"Asia/Ulaanbaatar\" data-geo=\"47.91666,106.88333,+08,MN,+8\">Asia/Ulaanbaatar</option><option value=\"Asia/Urumqi\" data-geo=\"43.8,87.58333,+06,CN,+6\">Asia/Urumqi</option><option value=\"Asia/Vientiane\" data-geo=\"17.96666,102.6,+07,LA,+7\">Asia/Vientiane</option><option value=\"Asia/Vladivostok\" data-geo=\"43.16666,131.93333,+10,RU,+10\">Asia/Vladivostok</option><option value=\"Asia/Yakutsk\" data-geo=\"62,129.66666,+09,RU,+9\">Asia/Yakutsk</option><option value=\"Asia/Yekaterinburg\" data-geo=\"56.85,60.6,+05,RU,+5\">Asia/Yekaterinburg</option><option value=\"Asia/Yerevan\" data-geo=\"40.18333,44.5,+04,AM,+4\">Asia/Yerevan</option><option value=\"Atlantic/Azores\" data-geo=\"37.73333,-25.66667,+00,PT,-1\">Atlantic/Azores</option><option value=\"Atlantic/Bermuda\" data-geo=\"32.28333,-64.76667,ADT,BM,-4\">Atlantic/Bermuda</option><option value=\"Atlantic/Canary\" data-geo=\"28.1,-15.4,WEST,ES,+0\">Atlantic/Canary</option><option value=\"Atlantic/Cape_Verde\" data-geo=\"14.91666,-23.51667,-01,CV,-1\">Atlantic/Cape_Verde</option><option value=\"Atlantic/Faroe\" data-geo=\"62.01666,-6.76667,WEST,FO,+0\">Atlantic/Faroe</option><option value=\"Atlantic/Madeira\" data-geo=\"32.63333,-16.9,WEST,PT,+0\">Atlantic/Madeira</option><option value=\"Atlantic/Reykjavik\" data-geo=\"64.15,-21.85,GMT,IS,+0\">Atlantic/Reykjavik</option><option value=\"Atlantic/South_Georgia\" data-geo=\"-54.26667,-36.53334,-02,GS,-2\">Atlantic/South_Georgia</option><option value=\"Atlantic/St_Helena\" data-geo=\"-15.91667,-5.7,GMT,SH,+0\">Atlantic/St_Helena</option><option value=\"Atlantic/Stanley\" data-geo=\"-51.70001,-57.85,-03,FK,-3\">Atlantic/Stanley</option><option value=\"Australia/Adelaide\" data-geo=\"-34.91667,138.58333,ACST,AU,+10.5\">Australia/Adelaide</option><option value=\"Australia/Brisbane\" data-geo=\"-27.46667,153.03333,AEST,AU,+10\">Australia/Brisbane</option><option value=\"Australia/Broken_Hill\" data-geo=\"-31.95,141.45,ACST,AU,+10.5\">Australia/Broken_Hill</option><option value=\"Australia/Currie\" data-geo=\"-39.93334,143.86666,AEST,AU,+11\">Australia/Currie</option><option value=\"Australia/Darwin\" data-geo=\"-12.46667,130.83333,ACST,AU,+9.5\">Australia/Darwin</option><option value=\"Australia/Eucla\" data-geo=\"-31.71667,128.86666,+0845,AU,+8.75\">Australia/Eucla</option><option value=\"Australia/Hobart\" data-geo=\"-42.88334,147.31666,AEST,AU,+11\">Australia/Hobart</option><option value=\"Australia/Lindeman\" data-geo=\"-20.26667,149,AEST,AU,+10\">Australia/Lindeman</option><option value=\"Australia/Lord_Howe\" data-geo=\"-31.55,159.08333,+1030,AU,+11\">Australia/Lord_Howe</option><option value=\"Australia/Melbourne\" data-geo=\"-37.81667,144.96666,AEST,AU,+11\">Australia/Melbourne</option><option value=\"Australia/Sydney\" data-geo=\"-33.86667,151.21666,AEST,AU,+11\">Australia/Sydney</option><option value=\"Europe/Amsterdam\" data-geo=\"52.36666,4.9,CEST,NL,+1\">Europe/Amsterdam</option><option value=\"Europe/Andorra\" data-geo=\"42.5,1.51666,CEST,AD,+1\">Europe/Andorra</option><option value=\"Europe/Athens\" data-geo=\"37.96666,23.71666,EEST,GR,+2\">Europe/Athens</option><option value=\"Europe/Belgrade\" data-geo=\"44.83333,20.5,CEST,RS,+1\">Europe/Belgrade</option><option value=\"Europe/Berlin\" data-geo=\"52.5,13.36666,CEST,DE,+1\">Europe/Berlin</option><option value=\"Europe/Bratislava\" data-geo=\"48.15,17.11666,CEST,SK,+1\">Europe/Bratislava</option><option value=\"Europe/Brussels\" data-geo=\"50.83333,4.33333,CEST,BE,+1\">Europe/Brussels</option><option value=\"Europe/Bucharest\" data-geo=\"44.43333,26.1,EEST,RO,+2\">Europe/Bucharest</option><option value=\"Europe/Budapest\" data-geo=\"47.5,19.08333,CEST,HU,+1\">Europe/Budapest</option><option value=\"Europe/Chisinau\" data-geo=\"47,28.83333,EEST,MD,+2\">Europe/Chisinau</option><option value=\"Europe/Copenhagen\" data-geo=\"55.66666,12.58333,CEST,DK,+1\">Europe/Copenhagen</option><option value=\"Europe/Dublin\" data-geo=\"53.33333,-6.25,IST,IE,+0\">Europe/Dublin</option><option value=\"Europe/Gibraltar\" data-geo=\"36.13333,-5.35,CEST,GI,+1\">Europe/Gibraltar</option><option value=\"Europe/Guernsey\" data-geo=\"49.44999,-2.53334,BST,GG,+0\">Europe/Guernsey</option><option value=\"Europe/Helsinki\" data-geo=\"60.16666,24.96666,EEST,FI,+2\">Europe/Helsinki</option><option value=\"Europe/Isle_of_Man\" data-geo=\"54.15,-4.46667,BST,IM,+0\">Europe/Isle_of_Man</option><option value=\"Europe/Istanbul\" data-geo=\"41.01666,28.96666,+03,TR,+2\">Europe/Istanbul</option><option value=\"Europe/Jersey\" data-geo=\"49.19999,-2.11667,BST,JE,+0\">Europe/Jersey</option><option value=\"Europe/Kaliningrad\" data-geo=\"54.71666,20.5,EET,RU,+2\">Europe/Kaliningrad</option><option value=\"Europe/Kiev\" data-geo=\"50.43333,30.51666,EEST,UA,+2\">Europe/Kiev</option><option value=\"Europe/Lisbon\" data-geo=\"38.71666,-9.13334,WEST,PT,+0\">Europe/Lisbon</option><option value=\"Europe/Ljubljana\" data-geo=\"46.05,14.51666,CEST,SI,+1\">Europe/Ljubljana</option><option value=\"Europe/Luxembourg\" data-geo=\"49.6,6.15,CEST,LU,+1\">Europe/Luxembourg</option><option value=\"Europe/Madrid\" data-geo=\"40.4,-3.68334,CEST,ES,+1\">Europe/Madrid</option><option value=\"Europe/Malta\" data-geo=\"35.9,14.51666,CEST,MT,+1\">Europe/Malta</option><option value=\"Europe/Mariehamn\" data-geo=\"60.1,19.95,EEST,AX,+2\">Europe/Mariehamn</option><option value=\"Europe/Minsk\" data-geo=\"53.9,27.56666,+03,BY,+3\">Europe/Minsk</option><option value=\"Europe/Monaco\" data-geo=\"43.69999,7.38333,CEST,MC,+1\">Europe/Monaco</option><option value=\"Europe/Moscow\" data-geo=\"55.75,37.58333,MSK,RU,+3\">Europe/Moscow</option><option value=\"Europe/Oslo\" data-geo=\"59.91666,10.75,CEST,NO,+1\">Europe/Oslo</option><option value=\"Europe/Paris\" data-geo=\"48.86666,2.33333,CEST,FR,+1\">Europe/Paris</option><option value=\"Europe/Podgorica\" data-geo=\"42.43333,19.26666,CEST,ME,+1\">Europe/Podgorica</option><option value=\"Europe/Prague\" data-geo=\"50.08333,14.43333,CEST,CZ,+1\">Europe/Prague</option><option value=\"Europe/Riga\" data-geo=\"56.94999,24.1,EEST,LV,+2\">Europe/Riga</option><option value=\"Europe/Rome\" data-geo=\"41.9,12.48333,CEST,IT,+1\">Europe/Rome</option><option value=\"Europe/Samara\" data-geo=\"53.19999,50.15,+04,RU,+4\">Europe/Samara</option><option value=\"Europe/San_Marino\" data-geo=\"43.91666,12.46666,CEST,SM,+1\">Europe/San_Marino</option><option value=\"Europe/Sarajevo\" data-geo=\"43.86666,18.41666,CEST,BA,+1\">Europe/Sarajevo</option><option value=\"Europe/Simferopol\" data-geo=\"44.94999,34.1,MSK,RU,+3\">Europe/Simferopol</option><option value=\"Europe/Skopje\" data-geo=\"41.98333,21.43333,CEST,MK,+1\">Europe/Skopje</option><option value=\"Europe/Sofia\" data-geo=\"42.68333,23.31666,EEST,BG,+2\">Europe/Sofia</option><option value=\"Europe/Stockholm\" data-geo=\"59.33333,18.05,CEST,SE,+1\">Europe/Stockholm</option><option value=\"Europe/Tallinn\" data-geo=\"59.41666,24.75,EEST,EE,+2\">Europe/Tallinn</option><option value=\"Europe/Tirane\" data-geo=\"41.33333,19.83333,CEST,AL,+1\">Europe/Tirane</option><option value=\"Europe/Uzhgorod\" data-geo=\"48.61666,22.3,EEST,UA,+2\">Europe/Uzhgorod</option><option value=\"Europe/Vaduz\" data-geo=\"47.15,9.51666,CEST,LI,+1\">Europe/Vaduz</option><option value=\"Europe/Vatican\" data-geo=\"41.90222,12.45305,CEST,VA,+1\">Europe/Vatican</option><option value=\"Europe/Vienna\" data-geo=\"48.21666,16.33333,CEST,AT,+1\">Europe/Vienna</option><option value=\"Europe/Vilnius\" data-geo=\"54.68333,25.31666,EEST,LT,+2\">Europe/Vilnius</option><option value=\"Europe/Volgograd\" data-geo=\"48.73333,44.41666,+04,RU,+3\">Europe/Volgograd</option><option value=\"Europe/Warsaw\" data-geo=\"52.25,21,CEST,PL,+1\">Europe/Warsaw</option><option value=\"Europe/Zagreb\" data-geo=\"45.8,15.96666,CEST,HR,+1\">Europe/Zagreb</option><option value=\"Europe/Zaporozhye\" data-geo=\"47.83333,35.16666,EEST,UA,+2\">Europe/Zaporozhye</option><option value=\"Europe/Zurich\" data-geo=\"47.38333,8.53333,CEST,CH,+1\">Europe/Zurich</option><option value=\"Indian/Antananarivo\" data-geo=\"-18.91667,47.51666,EAT,MG,+3\">Indian/Antananarivo</option><option value=\"Indian/Chagos\" data-geo=\"-7.33334,72.41666,+06,IO,+6\">Indian/Chagos</option><option value=\"Indian/Christmas\" data-geo=\"-10.41667,105.71666,+07,CX,+7\">Indian/Christmas</option><option value=\"Indian/Cocos\" data-geo=\"-12.16667,96.91666,+0630,CC,+6.5\">Indian/Cocos</option><option value=\"Indian/Comoro\" data-geo=\"-11.68334,43.26666,EAT,KM,+3\">Indian/Comoro</option><option value=\"Indian/Kerguelen\" data-geo=\"-49.35278,70.2175,+05,TF,+5\">Indian/Kerguelen</option><option value=\"Indian/Mahe\" data-geo=\"-4.66667,55.46666,+04,SC,+4\">Indian/Mahe</option><option value=\"Indian/Maldives\" data-geo=\"4.16666,73.5,+05,MV,+5\">Indian/Maldives</option><option value=\"Indian/Mauritius\" data-geo=\"-20.16667,57.5,+04,MU,+4\">Indian/Mauritius</option><option value=\"Indian/Mayotte\" data-geo=\"-12.78334,45.23333,EAT,YT,+3\">Indian/Mayotte</option><option value=\"Indian/Reunion\" data-geo=\"-20.86667,55.46666,+04,RE,+4\">Indian/Reunion</option><option value=\"Pacific/Apia\" data-geo=\"-13.83334,-171.73334,+13,WS,+14\">Pacific/Apia</option><option value=\"Pacific/Auckland\" data-geo=\"-36.86667,174.76666,NZST,NZ,+13\">Pacific/Auckland</option><option value=\"Pacific/Chatham\" data-geo=\"-43.95,-176.55001,+1245,NZ,+13.75\">Pacific/Chatham</option><option value=\"Pacific/Chuuk\" data-geo=\"7.41666,151.78333,+10,FM,+10\">Pacific/Chuuk</option><option value=\"Pacific/Easter\" data-geo=\"-27.15,-109.43334,-05,CL,-5\">Pacific/Easter</option><option value=\"Pacific/Efate\" data-geo=\"-17.66667,168.41666,+11,VU,+11\">Pacific/Efate</option><option value=\"Pacific/Enderbury\" data-geo=\"-3.13334,-171.08334,+13,KI,+13\">Pacific/Enderbury</option><option value=\"Pacific/Fakaofo\" data-geo=\"-9.36667,-171.23334,+13,TK,+13\">Pacific/Fakaofo</option><option value=\"Pacific/Fiji\" data-geo=\"-18.13334,178.41666,+12,FJ,+13\">Pacific/Fiji</option><option value=\"Pacific/Funafuti\" data-geo=\"-8.51667,179.21666,+12,TV,+12\">Pacific/Funafuti</option><option value=\"Pacific/Galapagos\" data-geo=\"-0.9,-89.6,-06,EC,-6\">Pacific/Galapagos</option><option value=\"Pacific/Gambier\" data-geo=\"-23.13334,-134.95,-09,PF,-9\">Pacific/Gambier</option><option value=\"Pacific/Guadalcanal\" data-geo=\"-9.53334,160.2,+11,SB,+11\">Pacific/Guadalcanal</option><option value=\"Pacific/Guam\" data-geo=\"13.46666,144.75,ChST,GU,+10\">Pacific/Guam</option><option value=\"Pacific/Honolulu\" data-geo=\"21.30694,-157.85834,HST,US,-10\">Pacific/Honolulu</option><option value=\"Pacific/Johnston\" data-geo=\"16.75,-169.51667,UTC,UM,-10\">Pacific/Johnston</option><option value=\"Pacific/Kiritimati\" data-geo=\"1.86666,-157.33334,+14,KI,+14\">Pacific/Kiritimati</option><option value=\"Pacific/Kosrae\" data-geo=\"5.31666,162.98333,+11,FM,+11\">Pacific/Kosrae</option><option value=\"Pacific/Kwajalein\" data-geo=\"9.08333,167.33333,+12,MH,+12\">Pacific/Kwajalein</option><option value=\"Pacific/Majuro\" data-geo=\"7.15,171.2,+12,MH,+12\">Pacific/Majuro</option><option value=\"Pacific/Marquesas\" data-geo=\"-9,-139.5,-0930,PF,-9.5\">Pacific/Marquesas</option><option value=\"Pacific/Midway\" data-geo=\"28.21666,-177.36667,SST,UM,-11\">Pacific/Midway</option><option value=\"Pacific/Nauru\" data-geo=\"-0.51667,166.91666,+12,NR,+12\">Pacific/Nauru</option><option value=\"Pacific/Niue\" data-geo=\"-19.01667,-169.91667,-11,NU,-11\">Pacific/Niue</option><option value=\"Pacific/Norfolk\" data-geo=\"-29.05,167.96666,+11,NF,+11.5\">Pacific/Norfolk</option><option value=\"Pacific/Noumea\" data-geo=\"-22.26667,166.45,+11,NC,+11\">Pacific/Noumea</option><option value=\"Pacific/Pago_Pago\" data-geo=\"-14.26667,-170.7,SST,AS,-11\">Pacific/Pago_Pago</option><option value=\"Pacific/Palau\" data-geo=\"7.33333,134.48333,+09,PW,+9\">Pacific/Palau</option><option value=\"Pacific/Pitcairn\" data-geo=\"-25.06667,-130.08334,-08,PN,-8\">Pacific/Pitcairn</option><option value=\"Pacific/Pohnpei\" data-geo=\"6.96666,158.21666,+11,FM,+11\">Pacific/Pohnpei</option><option value=\"Pacific/Port_Moresby\" data-geo=\"-9.5,147.16666,+10,PG,+10\">Pacific/Port_Moresby</option><option value=\"Pacific/Rarotonga\" data-geo=\"-21.23334,-159.76667,-10,CK,-10\">Pacific/Rarotonga</option><option value=\"Pacific/Saipan\" data-geo=\"15.2,145.75,ChST,MP,+10\">Pacific/Saipan</option><option value=\"Pacific/Tahiti\" data-geo=\"-17.53334,-149.56667,-10,PF,-10\">Pacific/Tahiti</option><option value=\"Pacific/Tarawa\" data-geo=\"1.41666,173,+12,KI,+12\">Pacific/Tarawa</option><option value=\"Pacific/Tongatapu\" data-geo=\"-21.16667,-175.16667,+13,TO,+13\">Pacific/Tongatapu</option><option value=\"Pacific/Wake\" data-geo=\"19.28333,166.61666,+12,UM,+12\">Pacific/Wake</option><option value=\"Pacific/Wallis\" data-geo=\"-13.3,-176.16667,+12,WF,+12\">Pacific/Wallis</option><option value=\"Australia/Perth\" data-geo=\"-31.95,115.85,AWST,AU,+8\">Australia/Perth</option><option value=\"Antarctica/Troll\" data-geo=\"-72.01139,2.535,+02,AQ,+0\">Antarctica/Troll</option><option value=\"Asia/Chita\" data-geo=\"52.05,113.46666,+09,RU,+8\">Asia/Chita</option><option value=\"Asia/Khandyga\" data-geo=\"62.65638,135.55388,+09,RU,+9\">Asia/Khandyga</option><option value=\"Asia/Srednekolymsk\" data-geo=\"67.46666,153.71666,+11,RU,+11\">Asia/Srednekolymsk</option><option value=\"Asia/Ust-Nera\" data-geo=\"64.56027,143.22666,+10,RU,+10\">Asia/Ust-Nera</option><option value=\"Europe/Busingen\" data-geo=\"47.69999,8.68333,CEST,DE,+1\">Europe/Busingen</option><option value=\"Pacific/Bougainville\" data-geo=\"-6.21667,155.56666,+11,PG,+11\">Pacific/Bougainville</option><option value=\"America/Fort_Nelson\" data-geo=\"58.8,-122.7,MST\">America/Fort_Nelson</option><option value=\"Asia/Atyrau\" data-geo=\"47.11666,51.93333,+05\">Asia/Atyrau</option><option value=\"Asia/Barnaul\" data-geo=\"53.36666,83.75,+07\">Asia/Barnaul</option><option value=\"Asia/Famagusta\" data-geo=\"35.11666,33.95,EEST\">Asia/Famagusta</option><option value=\"Asia/Tomsk\" data-geo=\"56.5,84.96666,+07\">Asia/Tomsk</option><option value=\"Europe/London\" data-geo=\"51.5074,-0.1278,BST,GB,+0\">Europe/London</option>";

var documentURL=document.URL;

setTimeout(bthe, 3000);

function fallow() {
document.getElementById('ballow').style.display=dmore; //'none';
}


function get_radius_at_lat(lat) { // thanks to https: gis.stackexchange.com questions 242188calculating-the-earth-radius-at-latitude
lat = lat * (Math.PI / 180.0);
var f1 = Math.pow((Math.pow(WGS_ELLIPSOID.a, 2) * Math.cos(lat)), 2);
var f2 = Math.pow((Math.pow(WGS_ELLIPSOID.b, 2) * Math.sin(lat)), 2);
var f3 = Math.pow((WGS_ELLIPSOID.a * Math.cos(lat)), 2);
var f4 = Math.pow((WGS_ELLIPSOID.b * Math.sin(lat)), 2);

var radius = Math.sqrt((f1 + f2) / (f3 + f4));

return radius;
}

function elevviaz(inlat) { // thanks to www.physicsclassroom.com class circles Lesson-3 The-Value-of-g
var dsq=0.0, ddsql=0.0;
if (eval('' + zalpha) != 0) {
var cone=0.0000000000667430;
var mone=5980000000000000000000000.0;
var rone=get_radius_at_lat(inlat); //6380000.0000;
//for (var ii=1; ii<=24; ii++) {
// mone*=10.0;
//}
dsq=eval('' + mone);
alert('dsq(1 is big const)=' + dsq);
dsq*=eval('' + cone);
alert('dsq(2 times small const vs 398600441800000.0)=' + dsq);
dsq=398600441800000.0;
dsq/=9.8; //eval('' + zalpha);
alert('dsq(3 divide by iphone ' + zalpha + ')=' + dsq);
dsq=Math.pow(dsq, 0.5);
alert('dsq(4 square root)=' + dsq);
rone=dsq; //dsq-=rone;
alert('dsq(5 minus sea level earth radius ' + rone + ')=' + dsq);

dsq=eval('' + mone);
alert('dsq(1 is big const)=' + dsq);
dsq*=eval('' + cone);
alert('dsq(2 times small const vs 398600441800000.0)=' + dsq);
dsq=398600441800000.0;
dsq/=eval('' + zalpha);
alert('dsq(3 divide by iphone ' + zalpha + ')=' + dsq);
dsq=Math.pow(dsq, 0.5);
alert('dsq(4 square root)=' + dsq);
dsq-=rone;
alert('dsq(5 minus sea level earth radius ' + rone + ')=' + dsq);


}
return dsq;
}

function getLocation(inb) {
iinb=inb.indexOf(';');
if (navigator.geolocation) {
try {
navigator.geolocation.getCurrentPosition(showPosition);
//setTimeout(later, 1000);
if (appendz != "" && iinb != -1) { appendz=""; }
if (inb != inb.trim() && document.getElementById('spfr').innerHTML.indexOf('rom') != -1) { fplacen+=' '; }
if (inb != inb.trim() && document.getElementById('spfr').innerHTML.indexOf('rom') == -1) { tplacen+=' '; }
if (document.getElementById('spfr').innerHTML.indexOf('rom') != -1) {
document.getElementById('ipn').value=fplacen;
} else {
document.getElementById('ipn').value=tplacen;
}
gid = navigator.geolocation.watchPosition(gsuccess, gerror, goptions);
return false;
} catch(err) {
//setTimeout(later, 1000);
}
} else if (userlatitude != 0.0 || userlongitude != 0.0) {
//document.getElementById('you').innerHTML='(0,0)';
if (document.getElementById('spfr').innerHTML.indexOf('rom') != -1) {
if (document.getElementById('latf') && document.getElementById('longf')) {
document.getElementById('latf').focus();
document.getElementById('latf').value=userlatitude;
document.getElementById('longf').focus();
document.getElementById('longf').value=userlongitude;
document.getElementById('latf').focus();
userlatitude=0.0;
userlongitude=0.0;
document.getElementById('ssf').innerHTML='Here';
if (appendz != '') {
fplacen='Here (elevation ' + appendz.substring(1) + ' m)';
document.getElementById('ssf').innerHTML=fplacen;
} else {
fplacen='Here';
}
gllentry='' + document.getElementById('latf').value + ',' + document.getElementById('longf').value + ',' + fplacen;
askit();
//document.getElementById('spfr').innerHTML='to';
return false;
}
} else {
if (document.getElementById('latt') && document.getElementById('longt')) {
document.getElementById('latt').focus();
document.getElementById('latt').value=userlatitude;
document.getElementById('longt').focus();
document.getElementById('longt').value=userlongitude;
document.getElementById('latt').focus();
userlatitude=0.0;
userlongitude=0.0;
document.getElementById('sst').innerHTML='Here';
if (appendz != '') {
tplacen='Here (elevation ' + appendz.substring(1) + ' m)';
document.getElementById('sst').innerHTML=tplacen;
} else {
tplacen='Here';
}
gllentry='' + document.getElementById('latt').value + ',' + document.getElementById('longt').value + ',' + tplacen;
askit();
return false;
}
}
}
return true;
}

function showPosition(position) {
if (userlatitude == 0.0 && userlongitude == 0.0) {
userlatitude=eval('' + position.coords.latitude);
userlongitude=eval('' + position.coords.longitude);
//alert('' + position.coords.heading);
if (('' + position.coords.altitude).replace('null','') != '' && iinb == -1) {
appendz=";" + ('' + position.coords.altitude).replace('null','');
}
if (userlatitude != 0.0 || userlongitude != 0.0) {
//document.getElementById('you').innerHTML='(0,0)';
if (document.getElementById('spfr').innerHTML.indexOf('rom') != -1) {
if (document.getElementById('latf') && document.getElementById('longf')) {
document.getElementById('latf').focus();
document.getElementById('latf').value=userlatitude;
document.getElementById('longf').focus();
document.getElementById('longf').value=userlongitude;
document.getElementById('latf').focus();
userlatitude=0.0;
userlongitude=0.0;
document.getElementById('ssf').innerHTML='Here';
if (appendz != '') {
fplacen='Here (elevation ' + appendz.substring(1) + ' m)';
document.getElementById('ssf').innerHTML=fplacen;
} else {
fplacen='Here';
}
gllentry='' + document.getElementById('latf').value + ',' + document.getElementById('longf').value + ',' + fplacen;
askit();
//document.getElementById('spfr').innerHTML='to';
}
} else {
if (document.getElementById('latt') && document.getElementById('longt')) {
document.getElementById('latt').focus();
document.getElementById('latt').value=userlatitude;
document.getElementById('longt').focus();
document.getElementById('longt').value=userlongitude;
document.getElementById('latt').focus();
userlatitude=0.0;
userlongitude=0.0;
document.getElementById('sst').innerHTML='Here';
if (appendz != '') {
tplacen='Here (elevation ' + appendz.substring(1) + ' m)';
document.getElementById('sst').innerHTML=tplacen;
} else {
tplacen='Here';
}
gllentry='' + document.getElementById('latt').value + ',' + document.getElementById('longt').value + ',' + tplacen;
askit();
}
}
}
}
}


function mdms(tvis, otvis) {
var altvl=0.0, dvr=1.0, isv=0;
if (eval('' + atic.length) >= 1) {
//alert('ov=' + otvis.value + ' and atic[0]=' + atic[0]);
if (atic[0].indexOf('-') != -1 && otvis.value.indexOf('-') == -1) {
isv++;
} else if (atic[0].indexOf('+') != -1 && otvis.value.indexOf('+') == -1) {
isv++;
} else if (eval('' + atis.length) >= 2) {
if (eval('' + atis[1]) > 60) { isv++; }
}
}
if (eval('' + atic.length) > 1) {
//alert('Here ' + atic.length + ' last is=' + atic[eval(-1 + atic.length)]);
for (var ijh=0; ijh<atic.length; ijh++) {
if (atic[ijh].trim() != '') {
isv++;
if (atic[0].indexOf('-') != -1) {
altvl-=eval(eval('' + dvr) * eval(atic[ijh].replace('-','')));
} else {
altvl+=eval(eval('' + dvr) * eval(atic[ijh].replace('-','')));
}
//alert('Here ' + altvl);
dvr/=60.0;
}
}
if (isv > 1) {
tvis='' + altvl;
otvis.value='' + altvl;
}
}
ati=0;
atic=[];
atis=[];
return tvis;
}

function idms(otvis) {
var altvl=0.0, dvr=1.0, isv=0;
if (eval('' + atic.length) >= 1) {
//alert('Ov=' + otvis.value + ' and Atic[0]=' + atic[0]);
if (atic[0].indexOf('-') != -1 && otvis.value.indexOf('-') == -1) {
isv++;
} else if (atic[0].indexOf('+') != -1 && otvis.value.indexOf('+') == -1) {
isv++;
} else if (eval('' + atis.length) >= 2) {
if (eval('' + atis[1]) > 60) { isv++; }
}
}
if (eval('' + atic.length) > 1) {
//alert('here ' + atic.length + ' last is=' + atic[eval(-1 + atic.length)]);
for (var ijh=0; ijh<atic.length; ijh++) {
if (atic[ijh].trim() != '') {
isv++;
if (atic[0].indexOf('-') != -1) {
altvl-=eval(eval('' + dvr) * eval(atic[ijh].replace('-','').replace('+','')));
} else {
altvl+=eval(eval('' + dvr) * eval(atic[ijh].replace('-','').replace('+','')));
}
//alert('here ' + altvl);
dvr/=60.0;
}
}
if (isv > 1) {
otvis.value='' + altvl;
}
}
ati=0;
atic=[];
atis=[];
return otvis;
}

function couldbedms(event) {
var wasc='';
if (eval('' + event.keyCode) == 69 || eval('' + event.keyCode) == 78 || eval('' + event.keyCode) == 87 || eval('' + event.keyCode) == 83 || eval('' + event.keyCode) == 187 || eval('' + event.keyCode) == 189 || eval('' + event.keyCode) == 190 || (eval('' + event.keyCode) >= 48 && eval('' + event.keyCode) <= 57)) {
if (ati == 0) { atis=[]; atis.push(0); atic.push(''); } else if (ati < 0) { ati=0; }
ati++;
atis[eval(-1 + atis.length)]=ati;
if (eval('' + event.keyCode) == 87 || eval('' + event.keyCode) == 83) {
if (atic[0].indexOf('-') == -1) { wasc=atic[0]; atic[0]='-' + wasc; }
} else if (eval('' + event.keyCode) == 69 || eval('' + event.keyCode) == 78) {
if (atic[0].indexOf('+') == -1) { wasc=atic[0]; atic[0]='+' + wasc; }
} else if (eval('' + event.keyCode) != 187) {
atic[eval(-1 + atic.length)]+=String.fromCharCode(eval(eval('' + event.keyCode) % 144));
}
} else {
ati=-1;
if (eval('' + event.keyCode) >= 65 && eval('' + event.keyCode) <= 90) {
atis.push(eval('' + event.keyCode));
} else {
atis.push(0);
}
atic.push('');
}
}

function compassHeading( alpha, beta, gamma ) { // thanks to https: www.w3.org TR orientation-event #worked-example

var _x = beta ? beta * degtorad : 0; // beta value
var _y = gamma ? gamma * degtorad : 0; // gamma value
var _z = alpha ? alpha * degtorad : 0; // alpha value

var cX = Math.cos( _x );
var cY = Math.cos( _y );
var cZ = Math.cos( _z );
var sX = Math.sin( _x );
var sY = Math.sin( _y );
var sZ = Math.sin( _z );

// Calculate Vx and Vy components
var Vx = - cZ * sY - sZ * sX * cY;
var Vy = - sZ * sY + cZ * sX * cY;

// Calculate compass heading
var compassHeading = Math.atan( Vx / Vy );

// Convert compass heading to use whole unit circle
if( Vy < 0 ) {
compassHeading += Math.PI;
} else if( Vx < 0 ) {
compassHeading += 2 * Math.PI;
}

return compassHeading * ( 180 / Math.PI ); // Compass Heading (in degrees)

}

function bthe() {
if (documentURL.indexOf('?') != -1) {
isokformore='?' + documentURL.split('?')[1].split('#')[0];
}
}

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

function nextplease() {
var i;
console.log('nextplease 1');
if ((isokformore + jsokformore) != '' && 1 == 1) {
console.log('nextplease 11');
if (1 == 1) {
window.open(document.URL.split('?')[0].split('?')[0], '_blank');
} else {
document.getElementById('outofthisworld').value='slong';
window.scrollTo(0,0); //location.href='#dtop';
}
} else {
console.log('nextplease 111');

for (i=0; i<eles.length; i++) {
document.getElementById(eles[i]).value='0.0000000';
document.getElementById(eles[i]).style.backgroundColor='white';
}
eles=['latf','longf','brg','dist','latt','longt'];
cwhat=[false,false,false,false,true,true];
decided=false;
}
console.log('nextplease 2');
}

function calcit() {
var i, ourbrg=0.0, ourdist=0.0, j;
if (jsokformore != '') {
document.getElementById('latf').type='text';
document.getElementById('longf').type='text';
document.getElementById('latt').type='text';
document.getElementById('longt').type='text';
document.getElementById('brg').type='text';
document.getElementById('dist').type='text';
} else {
if ((isokformore + jsokformore) != '') {
document.getElementById('outofthisworld').value='ifill';
} else {
if (!cwhat[0] && !cwhat[1] && !cwhat[2] && !cwhat[3] && !cwhat[4] && !cwhat[5]) {
if (Math.abs(eval('' + document.getElementById(eles[4]).value)) < 0.00000004 && Math.abs(eval('' + document.getElementById(eles[5]).value)) < 0.00000004) {
cwhat[4]=true;
cwhat[5]=true;
} else if (Math.abs(eval('' + document.getElementById(eles[2]).value)) < 0.00000004 && Math.abs(eval('' + document.getElementById(eles[3]).value)) < 0.00000004) {
cwhat[2]=true;
cwhat[3]=true;
}
}
//alert(('' + cwhat[0]) + ('' + cwhat[1]) + ('' + cwhat[2]) + ('' + cwhat[3]) + ('' + cwhat[4]) + ('' + cwhat[5]));
if (jsokformore != '' || (cwhat[0] && cwhat[1] || (!cwhat[0] && !cwhat[1] && !cwhat[2] && !cwhat[3] && !cwhat[4] && !cwhat[5]))) {
isokformore=' ';
if (('' + document.getElementById('mysel').value) == '1') {
ourbrg=eval(eval(540.0 + 180.0 + eval('' + document.getElementById(eles[2]).value)) % 360.0);
} else {
ourbrg=eval('' + document.getElementById(eles[2]).value);
}
for (j=eval(('' + document.getElementById('mysel').value)); j>=1; j--) {
ourdist=eval('' + document.getElementById(eles[3]).value);

document.getElementById(eles[0]).value='' +
eval(eval(eval(180.0 / Math.PI) * Math.asin(
eval(eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value))) *
eval('' + Math.cos(eval(eval('' + ourdist) / 6371000.0)))) +
eval(eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value))) *
eval('' + Math.sin(eval(eval('' + ourdist) / 6371000.0))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + ourbrg)))))));

document.getElementById(eles[1]).value=eval(eval(180.0 / Math.PI) * eval(eval(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[5]).value)) +
Math.atan2(
eval(eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + ourbrg)) *
eval('' + Math.sin(eval(eval('' + ourdist) / 6371000.0)))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value)))),
eval(eval('' + Math.cos(eval(eval('' + ourdist) / 6371000.0))) -
eval(eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value)))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value)))))));
//alert('1:' + document.getElementById(eles[1]).value);


if (document.getElementById(eles[0]).value.indexOf('e-') != -1) { document.getElementById(eles[0]).value='0.0000000'; }
if (document.getElementById(eles[1]).value.indexOf('e-') != -1) { document.getElementById(eles[1]).value='0.0000000'; }

if (j != 1) {
ourbrg=eval(eval(360.0 + eval(eval(eval(180.0 / Math.PI) * Math.atan2(
eval(eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval(eval('' + document.getElementById(eles[5]).value) - eval('' + document.getElementById(eles[1]).value))))),
eval(eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value)))) -
eval(eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval(eval('' + document.getElementById(eles[5]).value) - eval('' + document.getElementById(eles[1]).value)))))
)))) % 360.0);
//alert('2:' + ourbrg);

//ourbrg=eval(eval(540.0 + eval('' + document.getElementById(eles[2]).value)) % 360.0);
document.getElementById(eles[2]).value='' + ourbrg;
document.getElementById('mysel').value='1';
//alert(ourbrg);
}


}

document.getElementById(eles[0]).style.backgroundColor='lightgreen';
document.getElementById(eles[1]).style.backgroundColor='lightgreen';
document.getElementById('goagain').style.display='block'; // setTimeout(nextplease,10000);

} else if (cwhat[2] && cwhat[3]) {
isokformore=' ';

ourdist=great_circle_distance(document.getElementById(eles[0]).value,document.getElementById(eles[1]).value,document.getElementById(eles[4]).value,document.getElementById(eles[5]).value);
document.getElementById(eles[3]).value='' + ourdist;


//Let ‘R’ be the radius of Earth,
//‘L’ be the longitude,
//‘θ’ be latitude,
//‘β‘ be Bearing.

//Bearing from point A to B, can be calculated as,

//β = atan2(X,Y),

//where, X and Y are two quantities and can be calculated as:

//X = cos θb * sin ∆L

//Y = cos θa * sin θb – sin θa * cos θb * cos ∆L

ourbrg=eval(eval(360.0 + eval(eval(eval(180.0 / Math.PI) * Math.atan2(
eval(eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval(eval('' + document.getElementById(eles[5]).value) - eval('' + document.getElementById(eles[1]).value))))),
eval(eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value)))) -
eval(eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval(eval('' + document.getElementById(eles[5]).value) - eval('' + document.getElementById(eles[1]).value)))))
)))) % 360.0);
//alert('3:' + ourbrg);

document.getElementById('mysel').value='2';
document.getElementById(eles[2]).value='' + ourbrg;
document.getElementById(eles[2]).style.backgroundColor='lightgreen';
document.getElementById(eles[3]).style.backgroundColor='lightgreen';
document.getElementById('goagain').style.display='block'; // setTimeout(nextplease,10000);

} else if (cwhat[4] && cwhat[5]) {
isokformore=' ';

if (('' + document.getElementById('mysel').value) == '2') {
ourbrg=eval(eval(540.0 + 180.0 + eval('' + document.getElementById(eles[2]).value)) % 360.0);
} else {
ourbrg=eval('' + document.getElementById(eles[2]).value);
}
for (j=eval(3 - eval(('' + document.getElementById('mysel').value))); j>=1; j--) {
ourdist=eval('' + document.getElementById(eles[3]).value);


//Let first point latitude be la1,
///longitude as lo1,
//d be distance,
//R as radius of Earth,
//Ad be the angular distance i.e d/R and
//θ be the bearing,

//Here is the formula to find the second point, when first point, bearing and distance is known:

//latitude of second point = la2 = asin(sin la1 * cos Ad + cos la1 * sin Ad * cos θ), and
//longitude of second point = lo2 = lo1 + atan2(sin θ * sin Ad * cos la1 , cos Ad – sin la1 * sin la2)

document.getElementById(eles[4]).value='' +
eval(eval(eval(180.0 / Math.PI) * Math.asin(
Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value)) *
Math.cos(eval(eval('' + ourdist) / 6371000.0)) +
Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value)) *
Math.sin(eval(eval('' + ourdist) / 6371000.0)) *
Math.cos(eval(Math.PI / 180.0) * eval('' + ourbrg)))));
//alert('4:' + document.getElementById(eles[4]).value);

//Let first point latitude be la1,
//longitude as lo1,
//d be distance,
//R as radius of Earth,
//Ad be the angular distance i.e d/R and
//θ be the bearing,
// longitude of second point = lo2 = lo1 + atan2(sin θ * sin Ad * cos la1 , cos Ad – sin la1 * sin la2)

document.getElementById(eles[5]).value=eval(eval(180.0 / Math.PI) * eval(eval(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[1]).value)) +
Math.atan2(
eval(eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + ourbrg)) *
eval('' + Math.sin(eval(eval('' + ourdist) / 6371000.0)))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value)))),
eval(eval('' + Math.cos(eval(eval('' + ourdist) / 6371000.0))) -
eval(eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value)))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value)))))));


if (j != 1) {
ourbrg=eval(eval(360.0 + eval(eval(eval(180.0 / Math.PI) * Math.atan2(
eval(eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval(eval('' + document.getElementById(eles[1]).value) - eval('' + document.getElementById(eles[5]).value))))),
eval(eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value)))) -
eval(eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval(eval('' + document.getElementById(eles[1]).value) - eval('' + document.getElementById(eles[5]).value)))))
)))) % 360.0);
//alert('5:' + ourbrg);
//ourbrg=eval(eval(540.0 + eval('' + document.getElementById(eles[2]).value)) % 360.0);
document.getElementById(eles[2]).value='' + ourbrg;
document.getElementById('mysel').value='2';
//alert(ourbrg);
}



}

if (document.getElementById(eles[4]).value.indexOf('e-') != -1) { document.getElementById(eles[4]).value='0.0000000'; }
if (document.getElementById(eles[5]).value.indexOf('e-') != -1) { document.getElementById(eles[5]).value='0.0000000'; }

document.getElementById(eles[4]).style.backgroundColor='lightgreen';
document.getElementById(eles[5]).style.backgroundColor='lightgreen';
document.getElementById('goagain').style.display='block'; // setTimeout(nextplease,10000);

} else {
alert('Oops! Cannot calculate this mix, sorry.');
nextplease();
}

if ((isokformore + jsokformore) != '') {
document.getElementById('slong').style.cursor='pointer';
document.getElementById('slong').style.textDecoration='underline';
document.getElementById('slong').title='Click for another leg of a trip, perhaps?';
document.getElementById('slong').innerHTML='+';
isokformore='?latf=' + encodeURIComponent(document.getElementById('latt').value) + '&longf=' + encodeURIComponent(document.getElementById('longt').value);
window.scrollTo(0,0); //location.href='#dtop';
setTimeout(bthen, 3000);
} else {
window.scrollTo(0,0); //location.href='#dtop';
setTimeout(bthen, 3000);
}
}
}
}

// 38.627089
// -90.200203
// 96.51262423499941 279.26239975009173
// 382900

function mapit(ao) {
if ((isokformore + jsokformore) != '' && !faux) {
console.log('ao.id=' + ao.id);
//alert(isokformore + ' ... ' + top.document.getElementById('ltt').value);
if (ao.id.toLowerCase().indexOf('from') != -1) {
document.getElementById('outofthisworld').value=ao.id + '|' + top.document.getElementById('ltf').value + ',' + top.document.getElementById('lgf').value;
top.document.getElementById('outofthisworld').value=ao.id + '|' + top.document.getElementById('ltf').value + ',' + top.document.getElementById('lgf').value;
} else if (ao.id.toLowerCase().indexOf('to') != -1) {
document.getElementById('outofthisworld').value=ao.id + '|' + top.document.getElementById('ltt').value + ',' + top.document.getElementById('lgt').value;
top.document.getElementById('outofthisworld').value=ao.id + '|' + top.document.getElementById('ltt').value + ',' + top.document.getElementById('lgt').value;
} else {
document.getElementById('outofthisworld').value=ao.id;
}
} else {
trid='trgraphics';
tdid='td' + ao.id.replace('td','').replace('a','');
divid='d' + ao.id.replace('td','').replace('a','');
var htt='http:';
if (document.URL.toLowerCase().indexOf('https:') == 0) { htt='https:'; }
console.log('tdid=' + tdid);
if (tdid == 'tdfrom') {
if (('' + document.getElementById(ao.id.replace('td','a')).href).replace('undefined','') == '') {
document.getElementById(ao.id.replace('td','a')).setAttribute('data-href',htt + '//www.rjmprogramming.com.au/PHP/tz_places.php?place=&latitude=' + encodeURIComponent(document.getElementById('latf').value) + '&longitude=' + encodeURIComponent(document.getElementById('longf').value));
//document.getElementById(ao.id.replace('td','a')).target='_blank';
//alert(document.getElementById(ao.id.replace('td','a')).href);
//} else {
//alert(('' + document.getElementById(ao.id.replace('td','a')).href));
}
if (1 == 1) {
if (!faux) { top.document.getElementById('nearestif').src='//www.rjmprogramming.com.au/PHP/tz_places.php?place=&latitude=' + encodeURIComponent(document.getElementById('latf').value) + '&longitude=' + encodeURIComponent(document.getElementById('longf').value); }
} else {
top.document.getElementById('latitude').value=document.getElementById('latf').value;
top.document.getElementById('longitude').value=document.getElementById('longf').value;
if (!faux) { top.document.getElementById('inearest').click(); }
}
} else if (tdid == 'tdto') {
if (('' + document.getElementById(ao.id.replace('td','a')).href).replace('undefined','') == '') {
document.getElementById(ao.id.replace('td','a')).setAttribute('data-href',htt + '//www.rjmprogramming.com.au/PHP/tz_places.php?place=&latitude=' + encodeURIComponent(document.getElementById('latt').value) + '&longitude=' + encodeURIComponent(document.getElementById('longt').value));
//document.getElementById(ao.id.replace('td','a')).target='_blank';
//alert(document.getElementById(ao.id.replace('td','a')).href);
//} else {
//alert(('' + document.getElementById(ao.id.replace('td','a')).href));
}
if (1 == 1) {
if (!faux) { top.document.getElementById('nearestif').src='//www.rjmprogramming.com.au/PHP/tz_places.php?place=&latitude=' + encodeURIComponent(document.getElementById('latt').value) + '&longitude=' + encodeURIComponent(document.getElementById('longt').value); }
} else {
top.document.getElementById('latitude').value=document.getElementById('latt').value;
top.document.getElementById('longitude').value=document.getElementById('longt').value;
if (!faux) { top.document.getElementById('inearest').click(); }
}
}
}
window.scrollTo(0,document.body.scrollHeight); //location.href='#ifill';
faux=false;
}

function athen() {
if (top.document.getElementById('dto')) {
if (top.document.getElementById('dto').innerHTML.indexOf(' size="3"') != -1) {
top.document.getElementById('dto').innerHTML=top.document.getElementById('dto').innerHTML.replace(' size="3"', ' size="4"');
}
}
if (top.document.getElementById('dfrom')) {
if (top.document.getElementById('dfrom').innerHTML.indexOf(' size="3"') != -1) {
top.document.getElementById('dfrom').innerHTML=top.document.getElementById('dfrom').innerHTML.replace(' size="3"', ' size="4"');
}
}
window.scrollTo(0,document.body.scrollHeight); //location.href='#ifill';
}

function bthen() {
if (top.document.getElementById('dto')) {
if (top.document.getElementById('dto').innerHTML.indexOf(' size="3"') != -1) {
top.document.getElementById('dto').innerHTML=top.document.getElementById('dto').innerHTML.replace(' size="3"', ' size="4"');
}
}
if (top.document.getElementById('dfrom')) {
if (top.document.getElementById('dfrom').innerHTML.indexOf(' size="3"') != -1) {
top.document.getElementById('dfrom').innerHTML=top.document.getElementById('dfrom').innerHTML.replace(' size="3"', ' size="4"');
}
}
top.window.scrollTo(0,0); //location.href='#ifill';
}

function checknp(oiis) {
var i, j, k, plist='', ogc='';
// www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php
//?title=Earth%20Places
//&aregexographicals=y
//&aregeographicals=HTTP.From%2Chttp.To%2Chttp.Lome
//&peninfo=75.57|-92.28|127968_From,64.04|-18.15|128205_To,-16.30|151.44|Lome
//&width=417
//&height=260
//&country=Places
//&popularity=
//&data=%20[75.57|-92.28|~From~,2]%20,%20[64.04|-18.15|~To~,2]%20,%20[-16.30|151.44|~Lome~,2]

// <select size="4" id="snearest" style="background-color:olive;" onchange=" alert(this.options[this.selectedIndex].title + String.fromCharCode(32) + this.options[this.selectedIndex].text); "><option title="" value="">Please see Nearest TimeZone Places below ...</option>
// <option data-ll="(5.55,-0.21667)" title="Nearest" value="Africa/Accra">Africa/Accra in Ghana is 617.6km (+0) from (0.0000000,0.0000000)</option>
// <option data-ll="(6.13333,1.21666)" title="Next Nearest" value="Africa/Lome">Africa/Lome in Togo is 695.234km (+0) from (0.0000000,0.0000000)</option>
// <option data-ll="(5.31666,-4.03334)" title="Third Nearest" value="Africa/Abidjan">Africa/Abidjan in Cote d'Ivoire is 741.662km (+0) from (0.0000000,0.0000000)</option>
// </select>

// www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php?title=Earth%20Places&aregexographicals=y&aregeographicals=HTTP.From%2Chttp.To%2Chttp.Lome&peninfo=75.57|-92.28|127968_From,64.04|-18.15|128205_To,-16.30|151.44|Lome&width=417&height=260&country=Places&popularity=&data=%20[75.57|-92.28|~From~,2]%20,%20[64.04|-18.15|~To~,2]%20,%20[-16.30|151.44|~Lome~,2]
var altolat='', altolong='';


if (document.getElementById('nearest')) {
//alert('hereIS');
if (document.getElementById('nearest').innerHTML != '' && document.getElementById('nearest').innerHTML.trim() == document.getElementById('nearest').innerHTML) {
//alert(top.document.getElementById('outofthisworld').value);
document.getElementById('nearest').innerHTML+=' ';
setTimeout(athen, 3000);
if (top.document.getElementById('outofthisworld').value.indexOf('|') != -1) {
if (top.document.getElementById('outofthisworld').value.split('|')[1] != '') {
altolat=top.document.getElementById('outofthisworld').value.split('|')[1].split(',')[0];
altolong=top.document.getElementById('outofthisworld').value.split('|')[1].split(',')[1];
//alert(top.document.getElementById('outofthisworld').value);
tdid='td' + top.document.getElementById('outofthisworld').value.split('|')[0].replace('a','');
divid='d' + top.document.getElementById('outofthisworld').value.split('|')[0].replace('a','');
top.document.getElementById('outofthisworld').value=top.document.getElementById('outofthisworld').value.split('|')[0];
}
}
document.getElementById(divid).style.display='table-cell';
document.getElementById(divid).innerHTML=document.getElementById('nearest').innerHTML.replace('position:','background-color:lightblue;').replace('absolute;','').replace('top:','').replace('left:','').replace('70px;','').replace('350px;','');
//var dbits=document.getElementById(divid).innerHTML=document.getElementById('nearest').innerHTML.split(' data-ll=');
//var vbits=document.getElementById(divid).innerHTML=document.getElementById('nearest').innerHTML.replace(' value=',' Value=').split(' value=');
//alert(top.document.getElementById('nearest').innerHTML);
var dbits=top.document.getElementById('nearest').innerHTML.split(' data-ll=');
var vbits=top.document.getElementById('nearest').innerHTML.replace(' value=',' Value=').split(' value=');
if (dbits.length > 1) {
ogc='//www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php?title=Earth%20Places&aregexographicals=y&aregeographicals=HTTP.From%2Chttp.To' +
'&peninfo=latfrom|longfrom|127968_From,latto|longto|128205_To,nearestlat|nearestlong|nearestplace' +
'&width=417&height=260&country=Places&popularity=' +
'&data=%20[latfrom|longfrom|~From~,2]%20,%20[latto|longto|~To~,2]%20,%20[nearestlat|nearestlong|~nearestplace~,2]';
if (tdid.toLowerCase().indexOf('from') != -1) {
//alert(altolat + ' ... ' + altolong + ' ___ ' + document.getElementById(divid).innerHTML);
if (altolat != '' && altolong != '') {
ogc=ogc.replace('latfrom', altolat).replace('latfrom', altolat);
ogc=ogc.replace('longfrom', altolong).replace('longfrom', altolong);
} else {
ogc=ogc.replace('latfrom', document.getElementById('latf').value).replace('latfrom', document.getElementById('latf').value);
ogc=ogc.replace('longfrom', document.getElementById('longf').value).replace('longfrom', document.getElementById('longf').value);
}
plist='';
for (i=1; i<vbits.length; i++) {
plist+='%2Chttp.' + encodeURIComponent(vbits[i].substring(1).split(vbits[i].substring(0,1))[0].split('/')[eval(-1 + vbits[i].substring(1).split(vbits[i].substring(0,1))[0].split('/').length)].replace(/\_/g,' '));
}
ogc=ogc.replace('%2Chttp.To', plist);
plist='';
for (i=1; i<dbits.length; i++) {
plist+='%20,%20[' + dbits[i].substring(2).split(dbits[i].substring(0,1))[0].replace(')','').split(',')[0] + '|' + dbits[i].substring(2).split(dbits[i].substring(0,1))[0].replace(')','').split(',')[1] + '|~' + encodeURIComponent(vbits[i].substring(1).split(vbits[i].substring(0,1))[0].split('/')[eval(-1 + vbits[i].substring(1).split(vbits[i].substring(0,1))[0].split('/').length)].replace(/\_/g,' ')) + '~]';
}
ogc=ogc.replace('%20,%20[latto|longto|~To~,2]%20,%20[nearestlat|nearestlong|~nearestplace~,2]', plist);
plist='';
for (i=1; i<dbits.length; i++) {
plist+=',' + dbits[i].substring(2).split(dbits[i].substring(0,1))[0].replace(')','').split(',')[0] + '|' + dbits[i].substring(2).split(dbits[i].substring(0,1))[0].replace(')','').split(',')[1] + '|' + encodeURIComponent(vbits[i].substring(1).split(vbits[i].substring(0,1))[0].split('/')[eval(-1 + vbits[i].substring(1).split(vbits[i].substring(0,1))[0].split('/').length)].replace(/\_/g,' ')) + '';
}
ogc=ogc.replace(',latto|longto|128205_To,nearestlat|nearestlong|nearestplace', plist);
} else if (tdid.toLowerCase().indexOf('to') != -1) {
ogc='//www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php?title=Earth%20Places&aregexographicals=y&aregeographicals=HTTP.To%2Chttp.From' +
'&peninfo=latto|longto|128205_To,latfrom|longfrom|127968_From,nearestlat|nearestlong|nearestplace' +
'&width=417&height=260&country=Places&popularity=' +
'&data=%20[latto|longto|~To~,2]%20,%20[latfrom|longfrom|~From~,2]%20,%20[nearestlat|nearestlong|~nearestplace~,2]';
if (altolat != '' && altolong != '') {
ogc=ogc.replace('latto', altolat).replace('latto', altolat);
ogc=ogc.replace('longto', altolong).replace('longto', altolong);
//alert(altolat + ' .#. ' + altolong + ' ___ ' + ogc);
} else {
ogc=ogc.replace('latto', document.getElementById('latt').value).replace('latto', document.getElementById('latt').value);
ogc=ogc.replace('longto', document.getElementById('longt').value).replace('longto', document.getElementById('longt').value);
}
plist='';
for (i=1; i<vbits.length; i++) {
plist+='%2Chttp.' + encodeURIComponent(vbits[i].substring(1).split(vbits[i].substring(0,1))[0].split('/')[eval(-1 + vbits[i].substring(1).split(vbits[i].substring(0,1))[0].split('/').length)].replace(/\_/g,' '));
}
//alert(plist + ' ... ' + ogc.replace('%2Chttp.From', plist) + ' via ' + ogc);
ogc=ogc.replace('%2Chttp.From', plist);
plist='';
for (i=1; i<dbits.length; i++) {
plist+='%20,%20[' + dbits[i].substring(2).split(dbits[i].substring(0,1))[0].replace(')','').split(',')[0] + '|' + dbits[i].substring(2).split(dbits[i].substring(0,1))[0].replace(')','').split(',')[1] + '|~' + encodeURIComponent(vbits[i].substring(1).split(vbits[i].substring(0,1))[0].split('/')[eval(-1 + vbits[i].substring(1).split(vbits[i].substring(0,1))[0].split('/').length)].replace(/\_/g,' ')) + '~]';
}
//alert(plist + ' ... ' + ogc.replace('%20,%20[latfrom|longfrom|~From~,2]%20,%20[nearestlat|nearestlong|~nearestplace~,2]', plist) + ' via ' + ogc);
ogc=ogc.replace('%20,%20[latfrom|longfrom|~From~,2]%20,%20[nearestlat|nearestlong|~nearestplace~,2]', plist);
plist='';
for (i=1; i<dbits.length; i++) {
plist+=',' + dbits[i].substring(2).split(dbits[i].substring(0,1))[0].replace(')','').split(',')[0] + '|' + dbits[i].substring(2).split(dbits[i].substring(0,1))[0].replace(')','').split(',')[1] + '|' + encodeURIComponent(vbits[i].substring(1).split(vbits[i].substring(0,1))[0].split('/')[eval(-1 + vbits[i].substring(1).split(vbits[i].substring(0,1))[0].split('/').length)].replace(/\_/g,' ')) + '';
}
//alert(plist + ' ... ' + ogc.replace(',latfrom|longfrom|127968_From,nearestlat|nearestlong|nearestplace', plist) + ' via ' + ogc);
ogc=ogc.replace(',latfrom|longfrom|127968_From,nearestlat|nearestlong|nearestplace', plist);

}
document.getElementById(trid).style.display='table-row';
if (document.getElementById(tdid).innerHTML.indexOf(ogc) == -1 && ogc.indexOf('nearestlat') == -1) {
document.getElementById(tdid).innerHTML+='<iframe style=display:inline-block;height:300px;width:450px; src="' + ogc + '"></iframe>';
}
} else if (tdid.toLowerCase().indexOf('from') != -1) {
document.getElementById(trid).style.display='table-row';
if (altolat == '') { altolat=top.document.getElementById('ltf').value; }
if (altolong == '') { altolong=top.document.getElementById('lgf').value; }
document.getElementById(tdid).innerHTML+='<iframe style=display:inline-block;height:300px;width:450px; src="' + '//www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php?title=Earth%20Places&aregexographicals=y&aregeographicals=HTTP.From' +
'&peninfo=' + altolat + '|' + altolong + '|127968_From' +
'&width=417&height=260&country=Places&popularity=' +
'&data=%20[' + altolat + '|' + altolong + '|~From~,2]' + '"></iframe>';
} else if (tdid.toLowerCase().indexOf('to') != -1) {
document.getElementById(trid).style.display='table-row';
if (altolat == '') { altolat=top.document.getElementById('ltt').value; }
if (altolong == '') { altolong=top.document.getElementById('lgt').value; }
document.getElementById(tdid).innerHTML+='<iframe style=display:inline-block;height:300px;width:450px; src="' + '//www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php?title=Earth%20Places&aregexographicals=y&aregeographicals=HTTP.To' +
'&peninfo=' + altolat + '|' + altolong + '|128205_To' +
'&width=417&height=260&country=Places&popularity=' +
'&data=%20[' + altolat + '|' + altolong + '|~To~,2]' + '"></iframe>';
}
}
}
}

function moreifok() {
//alert('add row here');
//bthe();
if (cfok) {
//alert(isokformore);
cfok=false;
if (isokformore.trim() != '') {
//alert(5);
document.getElementById('next1').style.display='table-row';
document.getElementById('niframe').style.backgroundColor='yellow';
document.getElementById('niframe').src=document.URL.split('#')[0].split('?')[0] + isokformore;
isokformore=' ';
//alert(55);
}
}
}

function myselit(oso) {
if (oso.value == '1') {
document.getElementById('brg').value='' + eval(eval(180.0 + eval(('' + document.getElementById('brg').value).replace('~0.','.').replace('~',''))) % 360.0);
}
oso.value='2';
}

function dorh() {
//let laSensor = new LinearAccelerationSensor({frequency: 60});

//laSensor.addEventListener('reading', e => {
// console.log("Linear acceleration along the X-axis " + laSensor.x);
// console.log("Linear acceleration along the Y-axis " + laSensor.y);
// console.log("Linear acceleration along the Z-axis " + laSensor.z);
//});
//laSensor.start();

//window.addEventListener('devicemotion', function(event) {
// alert(event.rotationRate.alpha + ' m/s2');
//});

if (1 == 1) {
window.addEventListener("orientationchange", function() {
// Announce the new orientation number
wasangle=eval(180 - eval('' + window.orientation));
if (xxxipn != xxipn) { wor=eval(180 + eval('' + window.orientation)); xwor=wor; xwor+=90; }
if (document.getElementById('arrowup') && xxxipn == xxipn) {
//alert('' + eval(Math.round(0) - eval('' + wasangle)));
try { document.getElementById('arrowup').style.webkitTransform = ("rotate(" + eval(Math.round(-180) + eval('' + wasangle)) + "deg)"); } catch(e10) { }
try { document.getElementById('arrowup').style.MozTransform = ("rotate(" + eval(Math.round(-180) + eval('' + wasangle)) + "deg)"); } catch(e1000) { }
try { document.getElementById('arrowup').style.msTransform = ("rotate(" + eval(Math.round(-180) + eval('' + wasangle)) + "deg)"); } catch(e100) { }
try { document.getElementById('arrowup').style.OTransform = ("rotate(" + eval(Math.round(-180) + eval('' + wasangle)) + "deg)"); } catch(e10000) { }
try { document.getElementById('arrowup').style.transform = ("rotate(" + eval(Math.round(-180) + eval('' + wasangle)) + "deg)"); } catch(e1) { }
} else if (document.getElementById('arrowup')) {
document.getElementById('arrowup').title='Bearing in yellow is with respect to direction you are pointing with respect to up the screen';
}
var thisso='' + screen.msOrientation || screen.mozOrientation || (screen.orientation || {}).type;
if (('' + thisso) == 'undefined') {
var mql=window.matchMedia("(orientation: portrait)");
// If there are matches, we're in portrait
if (mql.matches) {
thisso="Portrait"; // Portrait orientation
} else {
thisso="Landscape"; // Landscape orientation
}
}

if (thisso != wasthisso) {
wasthisso=thisso;
//alert('ori');
}
}, false);
}

if (window.DeviceOrientationEvent) {
if (1 == 2) { alert(1); }
// Listen for orientation changes ... thanks to https: davidwalsh.name orientation-change
// Listen for the deviceorientation event and handle the raw data
window.addEventListener('deviceorientation', function(eventData) {
// gamma is the left-to-right tilt in degrees, where right is positive
if (1 == 2) { alert(11); }
if (document.getElementById('ipn')) {
//if (('' + document.getElementById('ipn').placeholder).indexOf('Append space and face north for gyroscope bearing.') == -1) {
if (('' + document.getElementById('ipn').placeholder).indexOf(' and ') == -1) {
document.getElementById('ipn').className='ph';
document.getElementById('ipn').placeholder+='. Append space and portrait face north for gyroscope bearing.';
if (xxxipn == xxipn) {
document.getElementById("myviewport").setAttribute("content", "width=device-width, initial-scale=1.5, minimum-scale=0.1, maximum-scale=8, user-scalable=yes");
}
setTimeout(asafn, 5000);
}
}
//eventData.absolute=true;

var eventDataalpha = eval(360.0 - eval('' + eventData.alpha)); // lalpha)); //
if (sf < 90) { sf++; }
if (eventData.absolute !== true && navigator.userAgent.match(/iPhone/i)) {
sf=70;
sf=80;
sf=90;
if (navigator.userAgent.toLowerCase().indexOf('safari/') > -1) {
prets=eval(360 + 90 + eval(0 * eval('' + eventData.webkitCompassAccuracy))); // 360;
} else {
prets=eval(180 + 270 + eval(0 * eval('' + eventData.webkitCompassAccuracy))); // 360;
}
oldprets=prets;
} else if (eventData.absolute !== true && eval('' + eventData.webkitCompassAccuracy) > 0 && +eventData.webkitCompassAccuracy < sf) { // 50
prets=eval(450 - eval(1 * eval('' + eventData.webkitCompassAccuracy))); // 360;
oldprets=prets;
}
if (eventData.absolute !== true && eval('' + eventData.webkitCompassAccuracy) > 0 && +eventData.webkitCompassAccuracy < sf) { // 50
if (!fdone) {
fdone=true;
console.log('final eventData.webkitCompassHeading/Accuracy=' + eventData.webkitCompassHeading + '/' + eventData.webkitCompassAccuracy);
}
eventDataalpha = eval('' + eventData.webkitCompassHeading || 0);
if (xxipn == xxxipn) { xxxipn+=' '; wor=eval(180 + eval('' + window.orientation)); xwor=wor; xwor+=90; }
if (document.getElementById('dntable')) { document.getElementById('dntable').style.display='inline-block'; }
} else if (eventData.absolute !== true && navigator.userAgent.match(/iPhone/i)) {
console.log('eventData.webkitCompassAccuracy=' + +eventData.webkitCompassAccuracy);
}

if (!datstart) { if (xxxipn != xxipn && 1 == 2) { initial_yaw=eval(eventData.alpha); } eventDataalpha-=initial_yaw; }

tiltLeftToRight = eval('' + eventData.gamma);

// beta is the front-to-back tilt in degrees, where front is positive
tiltFrontToBack = eval('' + eventData.beta);

// alpha is the compass direction the device is facing in degrees
lastalpha='' + eventData.alpha; // lalpha; //
dorbrg = eval('' + eventDataalpha); //compassHeading(eval('' + eventDataalpha), tiltFrontToBack, tiltLeftToRight);
if (1 == 2) { alert(dorbrg); }
if (document.URL.indexOf('aleJUNKrt=') != -1) {
alert(dorbrg);
}
if (document.URL.indexOf('upJUNKdate=') != -1 || (fplacen != '' && tplacen == '')) {
if (eventData.absolute || 1 == 1) {
//document.getElementById('brg').value='' + eval(eval(540.0 - eval('' + dorbrg)) % 360.0);
//document.getElementById('brg').value='' + eval(eval(720.0 - eval('' + dorbrg)) % 360.0);
//document.getElementById('brg').value='' + dorbrg;
if (eval(dcnt % 10) == 0) {
document.getElementById('brg').value='' + eval(eval(720.0 + eval('' + wor) + eval('' + dorbrg)) % 360.0);
document.getElementById('brg').style.backgroundColor='yellow';
}
dcnt++;
}
}


if (datstart && (fplacen != '' && tplacen == '')) {
datstart=false;
//initial_yaw=eval(360.0 - eval('' + lalpha)); //eventData.alpha));
//alert('0:' + initial_yaw);
if (!eventData.absolute) {
if (xxxipn != xxipn && 1 == 2) {
initial_yaw=initial_yaw; //0.0000001;
} else {
initial_yaw=eventDataalpha; //eval(360.0 - eval('' + eventData.alpha)); // lalpha)); //
}
}
//alert('' + initial_yaw);
initial_pitch=Math.round(tiltFrontToBack);
initial_roll=Math.round(tiltLeftToRight);
//alert(initial_yaw + ',' + initial_pitch + ',' + initial_roll);
}

if (document.getElementById('ntable')) {
var ts=prets;
if (document.getElementById('arrowup') && xxxipn == xxipn) {
try { document.getElementById('arrowup').style.webkitTransform = ("rotate(" + eval(Math.round(-180) + eval('' + wasangle)) + "deg)"); } catch(e10) { }
try { document.getElementById('arrowup').style.MozTransform = ("rotate(" + eval(Math.round(-180) + eval('' + wasangle)) + "deg)"); } catch(e1000) { }
try { document.getElementById('arrowup').style.msTransform = ("rotate(" + eval(Math.round(-180) + eval('' + wasangle)) + "deg)"); } catch(e100) { }
try { document.getElementById('arrowup').style.OTransform = ("rotate(" + eval(Math.round(-180) + eval('' + wasangle)) + "deg)"); } catch(e10000) { }
try { document.getElementById('arrowup').style.transform = ("rotate(" + eval(Math.round(-180) + eval('' + wasangle)) + "deg)"); } catch(e1) { }
} else if (document.getElementById('arrowup')) {
document.getElementById('arrowup').title='Bearing in yellow is with respect to direction you are pointing with respect to up the screen';
}
if (wasangle != 0) {
ts+=wasangle;
if (xxipn != xxxipn && 1 == 1) {
//document.getElementById('tdn').innerHTML='' + window.orientation + '<br>' + Math.round(dorbrg);
//if (wasangle != 180) { ts-=eval(360 - wasangle); }
ts-=wor
//ts-=180.0;
//if (1 == 1 && navigator.userAgent.toLowerCase().indexOf('safari/') > -1) {
//ts-=90;
//} else if (wasangle == 90) {
//ts-=180.0;
//}
//ts=xwor;

ts=eval(2.0 * Math.round(dorbrg));
ts=eval('' + window.orientation); //wasangle;
if (Math.abs(eval('' + window.orientation)) == 90) { ts+=90.0; } else { ts-=90.0; }
ts-=eval(1 * eval('' + eventData.webkitCompassAccuracy));
if (navigator.userAgent.match(/iPhone/i)) { ts-=180.0; }
}
}
gts=eval(ts - Math.round(dorbrg));
try { document.getElementById('ntable').style.webkitTransform = ("rotate(" + eval(ts - Math.round(dorbrg)) + "deg)"); } catch(e10) { }
try { document.getElementById('ntable').style.MozTransform = ("rotate(" + eval(ts - Math.round(dorbrg)) + "deg)"); } catch(e1000) { }
try { document.getElementById('ntable').style.msTransform = ("rotate(" + eval(ts - Math.round(dorbrg)) + "deg)"); } catch(e100) { }
try { document.getElementById('ntable').style.OTransform = ("rotate(" + eval(ts - Math.round(dorbrg)) + "deg)"); } catch(e10000) { }
try { document.getElementById('ntable').style.transform = ("rotate(" + eval(ts - Math.round(dorbrg)) + "deg)"); } catch(e1) { }
}


handleOrientationEvent(tiltFrontToBack, tiltLeftToRight, dorbrg, eventData.absolute);


if ((fplacen != '' && tplacen == '') && document.getElementById('ipn')) {
//if (('' + document.getElementById('ipn').placeholder).indexOf('Append space and face north for gyroscope bearing.') != -1) {
if (('' + document.getElementById('ipn').placeholder).indexOf('Append space and ') != -1) {
document.getElementById('ipn').style.backgroundColor='#f0f0f0';
//document.getElementById('ipn').placeholder=document.getElementById('ipn').placeholder.split('Append space and face north for gyroscope bearing.')[0] + ' Now swivel to direction of interest then tap yellow textbox.';
document.getElementById('ipn').placeholder=document.getElementById('ipn').placeholder.split('Append space and ')[0] + ' Now swivel to direction of interest then tap yellow textbox.';
if (xxxipn == xxipn) {
document.getElementById("myviewport").setAttribute("content", "width=device-width, initial-scale=1.2, minimum-scale=0.1, maximum-scale=8, user-scalable=yes");
}
//window.scrollBy(0,50); //location.href='#brg';
}
}


}, false);
}
}

var handleOrientationEvent = function(tiltFrontToBack, tiltLeftToRight, dorbrg, absis) {
// do something amazing
if (1 == 2) { alert(dorbrg); }
if (document.URL.indexOf('alJUNKert=') != -1) {
alert(dorbrg);
}
if (document.URL.indexOf('upJUNKdate=') != -1 || (fplacen != '' && tplacen == '')) {
if (absis || 1 == 1) {
//document.getElementById('brg').value='' + eval(eval(540.0 - eval('' + dorbrg)) % 360.0);
//document.getElementById('brg').value='' + eval(eval(720.0 - eval('' + dorbrg)) % 360.0);
//document.getElementById('brg').value='' + dorbrg;
if (eval(dcnt % 10) == 0) {
document.getElementById('brg').value='' + eval(eval(720.0 + eval('' + dorbrg)) % 360.0);
document.getElementById('brg').style.backgroundColor='yellow';
//if (xxxipn != xxipn) { alert(prets); document.getElementById('sstatus').innerHTML='x:' + prets; }
}
dcnt++;
}
}
};

function asafn() {
if (document.getElementById('ipn')) {
//if (('' + document.getElementById('ipn').placeholder).indexOf('Append space and face north for gyroscope bearing.') == -1) {
if (('' + document.getElementById('ipn').placeholder).indexOf('Append space and portrait face north for ') != -1) {
document.getElementById('ipn').placeholder=document.getElementById('ipn').placeholder.split('Append space and ')[0] + 'Append space and portrait face north onto ;elevation(m)?';
setTimeout(asafn, 5000);
} else if (('' + document.getElementById('ipn').placeholder).indexOf('Append space and ') != -1) {
document.getElementById('ipn').placeholder=document.getElementById('ipn').placeholder.split('Append space and ')[0] + 'Append space and portrait face north for horizon bearing.';
setTimeout(asafn, 5000);
}
}
}

function ocesright() {
var documentgetElementByIddvesrightinnerHTML='';
// https://www.rjmprogramming.com.au/HTMLCSS/missing_two.html?tplacen=Melbourne&fplacen=Sydney&latf=-33.86778&longf=151.21000&brg=230.27273658545278&dist=713590&latt=-37.81417&longt=144.96306
// https://www.rjmprogramming.com.au/HTMLCSS/earthscanner.htm#nontz=Budgewoi%2C%20Australia%7C151.557%7C_33.234%7CAU%2CAlice_Springs%7C133.87000%7C_23.70000%7CAU%2CTennant_Creek%7C134.19028%7C_19.64722%7CAU&Budgewoi-Alice_Springs-Tennant_Creek
if (eval('' + document.URL.split('placen=').length) >= 3 && eval('' + document.URL.split('&l').length) >= 5) {
if (woesright) {
if (woesright.closed) {
woesright=null;
document.getElementById('dvesright').innerHTML='';
}
}
if (document.getElementById('dvesright').innerHTML == '') {
var lhis='';
if (eval('' + ('' + location.hash).replace('#','').length) == 4) {
lhis='#nontz=' + (location.search.split('fplacen=')[1] ? (location.search.split('fplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('|') + (location.search.split('longf=')[1] ? (location.search.split('longf=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent('|') + (location.search.split('latf=')[1] ? (location.search.split('latf=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent('|') + ('' + location.hash).replace('#','').substring(0,2) + encodeURIComponent(',') + (location.search.split('tplacen=')[1] ? (location.search.split('tplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('|') + (location.search.split('longt=')[1] ? (location.search.split('longt=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent('|') + (location.search.split('latt=')[1] ? (location.search.split('latt=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent('|') + ('' + location.hash).replace('#','').substring(2).substring(0,2) + '&' + (location.search.split('fplacen=')[1] ? (location.search.split('fplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('-') + (location.search.split('tplacen=')[1] ? (location.search.split('tplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_');
} else if (eval('' + document.URL.split('cc=').length) >= 3) {
lhis='#nontz=' + (location.search.split('fplacen=')[1] ? (location.search.split('fplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('|') + (location.search.split('longf=')[1] ? (location.search.split('longf=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent('|') + (location.search.split('latf=')[1] ? (location.search.split('latf=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent('|') + (location.search.split('fcc=')[1] ? (location.search.split('fcc=')[1].split('&')[0]) : '') + encodeURIComponent(',') + (location.search.split('tplacen=')[1] ? (location.search.split('tplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('|') + (location.search.split('longt=')[1] ? (location.search.split('longt=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent('|') + (location.search.split('latt=')[1] ? (location.search.split('latt=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent('|') + (location.search.split('tcc=')[1] ? (location.search.split('tcc=')[1].split('&')[0]) : '') + '&' + (location.search.split('fplacen=')[1] ? (location.search.split('fplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('-') + (location.search.split('tplacen=')[1] ? (location.search.split('tplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_');
} else {
lhis='#nontz=' + (location.search.split('fplacen=')[1] ? (location.search.split('fplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('|') + (location.search.split('longf=')[1] ? (location.search.split('longf=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent('|') + (location.search.split('latf=')[1] ? (location.search.split('latf=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent(',') + (location.search.split('tplacen=')[1] ? (location.search.split('tplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('|') + (location.search.split('longt=')[1] ? (location.search.split('longt=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent('|') + (location.search.split('latt=')[1] ? (location.search.split('latt=')[1].split('&')[0]) : '').replace('-','_') + '&' + (location.search.split('fplacen=')[1] ? (location.search.split('fplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('-') + (location.search.split('tplacen=')[1] ? (location.search.split('tplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_');
}
//location.hash=lhis;
if (1 == 11) {
documentgetElementByIddvesrightinnerHTML='<iframe name=ifesright id=ifesright style="width:10800px;height:5400px;" src="//www.rjmprogramming.com.au/HTMLCSS/earth_scanner.html' + lhis.replace('#','?') + '"></iframe>'; //'#nontz=' + (location.search.split('fplacen=')[1] ? (location.search.split('fplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('|') + (location.search.split('longf=')[1] ? (location.search.split('longf=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent('|') + (location.search.split('latf=')[1] ? (location.search.split('latf=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent(',') + (location.search.split('tplacen=')[1] ? (location.search.split('tplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('|') + (location.search.split('longt=')[1] ? (location.search.split('longt=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent('|') + (location.search.split('latt=')[1] ? (location.search.split('latt=')[1].split('&')[0]) : '').replace('-','_') + '&' + (location.search.split('fplacen=')[1] ? (location.search.split('fplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('-') + (location.search.split('tplacen=')[1] ? (location.search.split('tplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + '"></iframe>';
document.getElementById('dvesright').innerHTML=' ';
} else {
documentgetElementByIddvesrightinnerHTML='<iframe name=ifesright id=ifesright style="width:10800px;height:5400px;display:none;" src="//www.rjmprogramming.com.au/HTMLCSS/earth_scanner.html#nontz=' + (location.search.split('fplacen=')[1] ? (location.search.split('fplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('|') + (location.search.split('longf=')[1] ? (location.search.split('longf=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent('|') + (location.search.split('latf=')[1] ? (location.search.split('latf=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent(',') + (location.search.split('tplacen=')[1] ? (location.search.split('tplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('|') + (location.search.split('longt=')[1] ? (location.search.split('longt=')[1].split('&')[0]) : '').replace('-','_') + encodeURIComponent('|') + (location.search.split('latt=')[1] ? (location.search.split('latt=')[1].split('&')[0]) : '').replace('-','_') + '&' + (location.search.split('fplacen=')[1] ? (location.search.split('fplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + encodeURIComponent('-') + (location.search.split('tplacen=')[1] ? (location.search.split('tplacen=')[1].split('&')[0]) : '').replace(/\%20/g,'_').replace(/\+/g,'_') + '"></iframe>';
document.getElementById('dvesright').innerHTML=' ';
}
if (woesright) {
if (woesright.closed) {
woesright=null;
woesright=window.open(documentgetElementByIddvesrightinnerHTML.split(' src="')[1].split('"')[0], '_blank', 'top=0,left=0,width=' + screen.width + ',height=' + screen.height);
} else {
woesright.focus();
}
} else {
woesright=window.open(documentgetElementByIddvesrightinnerHTML.split(' src="')[1].split('"')[0], '_blank', 'top=0,left=0,width=' + screen.width + ',height=' + screen.height);
}
}
}
}

function moremaybe() {
if (sparefplacen != '') {
fplacen=sparefplacen;
sparefplacen='';
}
var ofplacen=fplacen;
var otplacen=tplacen;
if (xipn != '') {
document.getElementById('ipn').value=xipn;
//alert(xipn);
}
//dorh();
if (document.getElementById('gform')) {
if (document.URL.indexOf('https:') != -1) { document.getElementById('gform').action=document.getElementById('gform').action.replace('http:','https:'); }
}
var latto=location.search.split('latf=')[1] ? decodeURIComponent(location.search.split('latf=')[1].split('&')[0]) : '';
var longto=location.search.split('longf=')[1] ? decodeURIComponent(location.search.split('longf=')[1].split('&')[0]) : '';
var clatto=location.search.split('latt=')[1] ? decodeURIComponent(location.search.split('latt=')[1].split('&')[0]) : '';
var clongto=location.search.split('longt=')[1] ? decodeURIComponent(location.search.split('longt=')[1].split('&')[0]) : '';
var cbrg=location.search.split('brg=')[1] ? decodeURIComponent(location.search.split('brg=')[1].split('&')[0]) : '';
var cdist=location.search.split('dist=')[1] ? decodeURIComponent(location.search.split('dist=')[1].split('&')[0]) : '';
var mysel=location.search.split('mysel=')[1] ? decodeURIComponent(location.search.split('mysel=')[1].split('&')[0]) : '2';
var dosms=location.search.split('sms=')[1] ? decodeURIComponent(location.search.split('sms=')[1].split('&')[0]) : '';

if (fplacen != '') {
document.getElementById('ssf').innerHTML=fplacen;
fplacen='';
}
if (tplacen.trim() != '') {
document.getElementById('sst').innerHTML=tplacen.trim();
if (tplacen.trim() != tplacen) { tplacen=' '; } else { tplacen=''; }
}

if (latto != '' && longto != '') {
nextplease();
top.document.getElementById('goagain').style.display='block';
document.getElementById('latf').value=latto;
document.getElementById('latf').style.backgroundColor="pink";
cwhat[0]=false;
cwhat[1]=false;
if (!decided) {
if (!cwhat[5]) {
cwhat[5]=true;
}
if (!cwhat[4]) {
cwhat[4]=true;
}
decided=true;
}
top.document.getElementById("ltf").value=latto;
document.getElementById('longf').value=longto;
document.getElementById('longf').style.backgroundColor="pink";
cwhat[0]=false;
cwhat[1]=false;
if (!decided) {
if (!cwhat[5]) {
cwhat[5]=true;
}
if (!cwhat[4]) {
cwhat[4]=true;
}
decided=true;
}
top.document.getElementById("lgf").value=longto;
document.getElementById('dtop').style.display='none';
document.getElementById('trhead').style.display='none';
document.getElementById('trfoot').style.display='none';
document.getElementById('myt').border=0;
var recti=parent.document.getElementById('niframe').getBoundingClientRect();
parent.document.getElementById('niframe').height=eval(200 + eval(('' + recti.height).replace('px',''))) + 'px';
if (parent.document.getElementById('niframe') != top.document.getElementById('niframe')) {
var trecti=top.document.getElementById('niframe').getBoundingClientRect();
top.document.getElementById('niframe').height=eval(200 + eval(('' + trecti.height).replace('px',''))) + 'px';
}
setTimeout(checkfill, 500);
parent.document.getElementById("slong").innerHTML=":";
parent.document.getElementById("slong").title="";
parent.document.getElementById("slong").style.textDecoration="none";
//top.document.title+=' started ';
}
if (latto != '' && longto != '' && clatto != '' && clongto != '' && cbrg != '' && cdist != '') {
document.getElementById('gform').action=document.URL.split('?')[0].split('#')[0];
document.getElementById('latf').type='text';
document.getElementById('longf').type='text';
document.getElementById('latt').type='text';
document.getElementById('longt').type='text';
document.getElementById('brg').type='text';
document.getElementById('dist').type='text';
document.getElementById('latf').value=('' + latto).replace('~0.','.').replace('~','');
document.getElementById('longf').value=('' + longto).replace('~0.','.').replace('~','');
document.getElementById('latt').value=('' + clatto).replace('~0.','.').replace('~','');
document.getElementById('longt').value=('' + clongto).replace('~0.','.').replace('~','');

if (('' + mysel) == '1') {
document.getElementById('brg').value='' + eval(eval(180.0 + eval(('' + cbrg).replace('~0.','.').replace('~',''))) % 360.0);
} else {
document.getElementById('brg').value=('' + cbrg).replace('~0.','.').replace('~','');
}
document.getElementById('dist').value=('' + cdist).replace('~0.','.').replace('~','');
document.getElementById('dtop').style.display='block';
document.getElementById('myt').border='10';
document.getElementById('myt').cellspacing='2';
document.getElementById('myt').cellpadding='2';
document.getElementById('trhead').style.display='table-row';
document.getElementById('trfoot').style.display='table-row';
document.getElementById('ifill').style.display='block';
document.getElementById('ifill').type='submit';
//cwhat=[false,false,true,true,true,true];
calcit();
if (document.getElementById('latf').value.indexOf('0.000') != 0) { document.getElementById('latf').focus(); document.getElementById('latf').value+=' '; }
if (document.getElementById('longf').value.indexOf('0.000') != 0) { document.getElementById('longf').focus(); document.getElementById('longf').value+=' '; }
if (document.getElementById('latt').value.indexOf('0.000') != 0) { document.getElementById('latt').focus(); document.getElementById('latt').value+=' '; }
if (document.getElementById('longt').value.indexOf('0.000') != 0) { document.getElementById('longt').focus(); document.getElementById('longt').value+=' '; }
if (document.getElementById('brg').value.indexOf('0.000') != 0) { document.getElementById('brg').focus(); document.getElementById('brg').value+=' '; }
if (document.getElementById('dist').value.indexOf('0.000') != 0) { document.getElementById('dist').focus(); document.getElementById('dist').value+=' '; }
decided=true;
document.getElementById('latf').value=document.getElementById('latf').value.trim();
document.getElementById('longf').value=document.getElementById('longf').value.trim();
document.getElementById('latt').value=document.getElementById('latt').value.trim();
document.getElementById('longt').value=document.getElementById('longt').value.trim();
document.getElementById('brg').value=document.getElementById('brg').value.trim();
document.getElementById('dist').value=document.getElementById('dist').value.trim();
document.getElementById('latf').focus();
cwhat=[true,true,false,false,true,true];
jsokformore=' ';
isokformore=' ';
console.log(cwhat);
faux=true;
mapit(document.getElementById('tdfrom'));
console.log(document.getElementById('afrom').href);
console.log('tdto');
faux=true;
mapit(document.getElementById('tdto'));
console.log(document.getElementById('ato').href);
if (dosms != '') { setTimeout(clicksms, 2000); }
}

if (ofplacen != '' && otplacen.trim() == '') {
fplacen=ofplacen;
tpurl=origtpurl;
mu=mu.replace('[51.5072,','[' + document.getElementById('latf').value + ',');
mu=mu.replace(',-0.1275,',',' + document.getElementById('longf').value + ',');
mu=mu.replace('=LonJunkdon','=' + encodeURIComponent(fplacen)).replace(',~London~]',',~' + encodeURIComponent(fplacen) + '~],[051.5072,-00.1275,~LonDon~]');
tpurl=tpurl.replace("Sydney+NSW,+Australia",encodeURIComponent(fplacen));
viastart=true;
//alert(146);
if (document.URL.indexOf('&brg=0.0000001&') != -1) {
//setTimeout(predfillablemaybe, 2000); //dfillablemaybe(document.getElementById('dist'));
dfillablemaybe(document.getElementById('dist'));
} else {
fillablemaybe(document.getElementById('brg'));
}
//alert(246);
} else if (ofplacen != '' && otplacen.trim() != '') {
mu=mu.replace('[51.5072,','[' + document.getElementById('latf').value + ',');
mu=mu.replace(',-0.1275,',',' + document.getElementById('longf').value + ',');
//mu=mu.replace('=LonJunkdon','=' + encodeURIComponent(fplacen)).replace(',~London~]',',~' + encodeURIComponent(ofplacen) + '~],[051.5072,-00.1275,~LonDon~]');
mu=mu.replace('=LonJunkdon','=' + encodeURIComponent(ofplacen)).replace(',~London~]',',~' + encodeURIComponent(ofplacen) + '~],[051.5072,-00.1275,~LonDon~]');
tpurl=origtpurl;
tpurl=tpurl.replace("Sydney+NSW,+Australia",encodeURIComponent(ofplacen));
mu=mu.replace('[051.5072,','[' + '' + document.getElementById('latt').value + ',');
mu=mu.replace(',-00.1275,',',' + '' + document.getElementById('longt').value + ',');
mu=mu.replace(',~LonDon~]',',~' + encodeURIComponent(otplacen.trim()) + '~]');
mu=mu.replace('=London','=' + encodeURIComponent(ofplacen + ' to ' + otplacen.trim()));
tpurl=tpurl.replace("Brisbane+QLD,+Australia",encodeURIComponent(otplacen.trim()));
if (document.getElementById('posttdmid')) { document.getElementById('posttdmid').style.display='none'; }
document.getElementById('tdmid').colSpan='2';
//alert(5);
tdfoota=' <input ' + trfoota.split('</td>')[0].split('<input ')[0];
trfoota='';
document.getElementById('tdmid').innerHTML='<details id=dftif open><summary id=sftif><a target=_blank title="' + ofplacen + '" style=text-decoration:underline;cursor:pointer; onclick=woit(this); data-href="//en.wikipedia.org/wiki/' + encodeURIComponent(ofplacen) + '">' + ofplacen + '</a> <a target=_blank id=addacc style="display:NONE;text-decoration:underline;cursor:pointer;" title=Accomodation onclick=woit(this); data-href="' + accomurl.replace(/Springwood\,\+New\+South\+Wales/g, encodeURIComponent(ofplacen)) + '">🛌</a> <a target=_blank title="Google Maps Directions" onclick=woit(this); style=text-decoration:underline;cursor:pointer; data-href="' + tpurl.replace('https:','') + '">to</a><a id="addafirst" title="Map of this trip leg" class="adda" onclick="addto(this);" data-from="' + ofplacen + '" data-to="' + otplacen.trim() + '" data-latf=' + document.getElementById('latf').value + ' data-longf=' + document.getElementById('longf').value + ' data-latt=' + document.getElementById('latt').value + ' data-longt=' + document.getElementById('longt').value + ' data-gcd=' + eval(eval('' + great_circle_distance(document.getElementById(eles[0]).value,document.getElementById(eles[1]).value,document.getElementById(eles[4]).value,document.getElementById(eles[5]).value)) / 1000.000) + ' style="display:NONE;cursor:pointer;">⬆</a> <a target=_blank title="' + otplacen.trim() + '" onclick=woit(this); style=text-decoration:underline;cursor:pointer; data-href="//en.wikipedia.org/wiki/' + encodeURIComponent(otplacen.trim()) + '">' + otplacen.trim() + '</a> (' + eval(eval('' + great_circle_distance(document.getElementById(eles[0]).value,document.getElementById(eles[1]).value,document.getElementById(eles[4]).value,document.getElementById(eles[5]).value)) / 1000.000) + ' kilometres)</summary><table><tr><td><iframe id=iftif src="' + mu + '" style="width:500px;height:600px;"></iframe></td><td id=tdesright style=vertical-align:top;><details onclick=ocesright(); id=dtesright><summary id=smesright>Earth Scanner ...</summary><div id=dvesright></div></details></td></tr></table></details>';
}
if (document.getElementById('spfr') && fromto == 'to') {
//fromto='';
document.getElementById('spfr').innerHTML='to';
document.getElementById('ipn').focus();
}


if (trfoota != '') {
document.getElementById('trfoot').innerHTML+=trfoota;
}
if (tdfoota != '') {
document.getElementById('tdfoot').innerHTML+=tdfoota;
}

if (xipn != '') {
if (xipn != '') {
document.getElementById('ipn').value=xipn;
//alert('2:' + xipn);
}
lkwk(document.getElementById('ipn'), ' ');
xipn='';
}
}

function addto(aois) {
var ourmu=origmu;
var ourtpurl=origtpurl;
var origtdm=document.getElementById('tdmid').innerHTML.replace(/\ open/g, ' data-open=');
var ofplacen=aois.getAttribute('data-from');
var otplacen=aois.getAttribute('data-to');
var gcd=aois.getAttribute('data-gcd');
var latf=aois.getAttribute('data-latf');
var longf=aois.getAttribute('data-longf');
var latt=aois.getAttribute('data-latt');
var longt=aois.getAttribute('data-longt');
ourmu=ourmu.replace('[51.5072,','[' + latf + ',');
ourmu=ourmu.replace(',-0.1275,',',' + longf + ',');
ourmu=ourmu.replace('=LonJunkdon','=' + encodeURIComponent(ofplacen)).replace(',~London~]',',~' + encodeURIComponent(ofplacen) + '~],[051.5072,-00.1275,~LonDon~]');
ourtpurl=ourtpurl.replace("Sydney+NSW,+Australia",encodeURIComponent(ofplacen));
ourmu=ourmu.replace('[051.5072,','[' + '' + latt + ',');
ourmu=ourmu.replace(',-00.1275,',',' + '' + longt + ',');
ourmu=ourmu.replace(',~LonDon~]',',~' + encodeURIComponent(otplacen) + '~]');
ourmu=ourmu.replace('=London','=' + encodeURIComponent(ofplacen + ' to ' + otplacen));
ourtpurl=ourtpurl.replace("Brisbane+QLD,+Australia",encodeURIComponent(otplacen));
if (document.getElementById('posttdmid')) { document.getElementById('posttdmid').style.display='none'; }
//alert(55);
document.getElementById('tdmid').colSpan='2';
document.getElementById('tdmid').innerHTML='<details data-id=dftif open><summary data-id=sftif><a target=_blank title="' + ofplacen + '" onclick=woit(this); style=text-decoration:underline;cursor:pointer; data-href="//en.wikipedia.org/wiki/' + encodeURIComponent(ofplacen) + '">' + ofplacen + '</a> <a target=_blank title="Google Maps Directions" onclick=woit(this); style=text-decoration:underline;cursor:pointer; data-href="' + ourtpurl.replace('https:','') + '">to</a> <a target=_blank title="' + otplacen + '" onclick=woit(this); style=text-decoration:underline;cursor:pointer; data-href="//en.wikipedia.org/wiki/' + encodeURIComponent(otplacen) + '">' + otplacen + '</a> (' + gcd + ' kilometres)</summary><iframe data-id=iftif src="' + ourmu + '" style="width:100%;height:600px;"></iframe></details><br>' + origtdm;
}

function clicksms() {
document.getElementById('ssms').click();
}

function filltwo() {
document.getElementById('latf').type='text';
document.getElementById('longf').type='text';
document.getElementById('latt').type='text';
document.getElementById('longt').type='text';
document.getElementById('brg').type='text';
document.getElementById('dist').type='text';
document.getElementById('ifill').type='submit';
}

function checkfill() {
if (!cfok) {
console.log('not cfok');
top.document.getElementById('outofthisworld').value='';
//top.document.title+=' finished ';
} else if (jsokformore == '' && ('' + document.getElementById('latf').value).indexOf('0.000') == -1 && ('' + document.getElementById('longf').value).indexOf('0.000') == -1 && ('' + document.getElementById('latt').value).indexOf('0.000') == -1 && ('' + document.getElementById('longt').value).indexOf('0.000') == -1 && ('' + document.getElementById('brg').value).indexOf('0.000') == -1 && ('' + document.getElementById('dist').value).indexOf('0.000') == -1) {
if (jsokformore == '') { console.log('not cfok two'); top.document.getElementById('outofthisworld').value=''; } else { console.log('huh'); }
//top.document.title+=' finished ';
} else if (top.document.getElementById('outofthisworld').value != '') {
console.log('click ' + top.document.getElementById('outofthisworld').value);
if (lastclick != top.document.getElementById('outofthisworld').value.split('|')[0]) {
lastclick=top.document.getElementById('outofthisworld').value.split('|')[0];
if (!faux) {
if (top.document.getElementById('outofthisworld').value.indexOf('from') != -1) {
document.getElementById('nearestif').src='//www.rjmprogramming.com.au/PHP/tz_places.php?place=&latitude=' + encodeURIComponent(document.getElementById('latf').value) + '&longitude=' + encodeURIComponent(document.getElementById('longf').value); checknp(null); //mapit(document.getElementById('afrom')); //top.document.getElementById('nearestif').src='//www.rjmprogramming.com.au/PHP/tz_places.php?place=&latitude=' + encodeURIComponent(document.getElementById('latf').value) + '&longitude=' + encodeURIComponent(document.getElementById('longf').value);
} else if (top.document.getElementById('outofthisworld').value.indexOf('to') != -1) {
document.getElementById('nearestif').src='//www.rjmprogramming.com.au/PHP/tz_places.php?place=&latitude=' + encodeURIComponent(document.getElementById('latt').value) + '&longitude=' + encodeURIComponent(document.getElementById('longt').value); checknp(null); //mapit(document.getElementById('ato')); //top.document.getElementById('nearestif').src='//www.rjmprogramming.com.au/PHP/tz_places.php?place=&latitude=' + encodeURIComponent(document.getElementById('latt').value) + '&longitude=' + encodeURIComponent(document.getElementById('longt').value);
}
}
document.getElementById(top.document.getElementById('outofthisworld').value.split('|')[0]).click();
}
if (top.document.getElementById('outofthisworld').value.split('|')[0] == 'slong' && ('' + document.getElementById('latf').value).indexOf('0.000') == -1 && ('' + document.getElementById('longf').value).indexOf('0.000') == -1 && ('' + document.getElementById('latt').value).indexOf('0.000') == -1 && ('' + document.getElementById('longt').value).indexOf('0.000') == -1 && ('' + document.getElementById('brg').value).indexOf('0.000') == -1 && ('' + document.getElementById('dist').value).indexOf('0.000') == -1) {
top.document.getElementById('outofthisworld').value='';
//top.document.title+=' finished ';
} else if (top.document.getElementById('outofthisworld').value.indexOf('|') != -1) {
if (top.document.getElementById('outofthisworld').value.split('|')[1] == '') {
if (top.document.getElementById('outofthisworld').value.toLowerCase().indexOf('from') != -1) {
top.document.getElementById('outofthisworld').value+=document.getElementById('latf').value.trim() + ',' + document.getElementById('longf').value.trim();
} else if (top.document.getElementById('outofthisworld').value.toLowerCase().indexOf('to') != -1) {
top.document.getElementById('outofthisworld').value+=document.getElementById('latt').value.trim() + ',' + document.getElementById('longt').value.trim();
}
}
setTimeout(checkfill, 500);
} else {
top.document.getElementById('outofthisworld').value='';
setTimeout(checkfill, 500);
}
} else if (jsokformore == '' && ('' + document.getElementById('latf').value).indexOf('0.000') == -1 && ('' + document.getElementById('longf').value).indexOf('0.000') == -1 && ('' + document.getElementById('latt').value).indexOf('0.000') == -1 && ('' + document.getElementById('longt').value).indexOf('0.000') == -1 && ('' + document.getElementById('brg').value).indexOf('0.000') == -1 && ('' + document.getElementById('dist').value).indexOf('0.000') == -1) {
top.document.getElementById('outofthisworld').value='';
//top.document.title+=' finished ';
} else {
setTimeout(checkfill, 500);
}
}

function toize(defe) {
var suffbits='?latf=' + encodeURIComponent(document.getElementById('latf').value) + '&longf=' + encodeURIComponent(document.getElementById('longf').value) + '&latt=' + encodeURIComponent(document.getElementById('latt').value) + '&longt=' + encodeURIComponent(document.getElementById('longt').value) + '&brg=' + encodeURIComponent(document.getElementById('brg').value) + '&dist=' + encodeURIComponent(document.getElementById('dist').value);
var em='';
if (defe.trim() != '') {
em=defe
} else {
em=prompt('SMS to?', '');
}
if (em == null) { em=''; }
if (em.trim() != '') {
//document.getElementById('from').value=em;
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('asms').href='sms:' + em + '&body=' + dummyencodeURIComponent(encodeURIComponent(document.URL.split('#')[0].split('?')[0] + suffbits)); // + '?gradient=' + encodeURIComponent(encodeURIComponent(document.getElementById('dfix').innerHTML.replace('background: ','').replace('background:','').replace(');',')').replace(';',''))));
} else {
document.getElementById('asms').href='sms:' + em + '&body=' + encodeURIComponent(encodeURIComponent(document.URL.split('#')[0].split('?')[0] + suffbits)); // + '?gradient=' + encodeURIComponent(encodeURIComponent(document.getElementById('dfix').innerHTML.replace('background: ','').replace('background:','').replace(');',')').replace(';',''))));
}
document.getElementById('asms').click();
}
return true;
}

function preemailit(ine) {
if (ine.indexOf('@') != -1) {
emailit(ine);
} else if (ine != '') {
toize(ine);
}
}

function dummyencodeURIComponent(invl) {
return invl;
}

function emailit(defe) {
//document.getElementById('ih').value=document.getElementById('tdlook').innerHTML.replace(/\<br\>/g,String.fromCharCode(10));
var lastfis='youllneverfindthis';
var lasttis='';
var lasteis='youllneverfindthis';
var lastenow='';
var lastsis='youllneverfindthis';
var lastsnow='';
var lasteis2='youllneverfindthis';
var lastenow2='';
var lastsis2='youllneverfindthis';
var lastsnow2='';
var em='';
var suffbits='?latf=' + encodeURIComponent(document.getElementById('latf').value) + '&longf=' + encodeURIComponent(document.getElementById('longf').value) + '&latt=' + encodeURIComponent(document.getElementById('latt').value) + '&longt=' + encodeURIComponent(document.getElementById('longt').value) + '&brg=' + encodeURIComponent(document.getElementById('brg').value) + '&dist=' + encodeURIComponent(document.getElementById('dist').value);
if (defe.indexOf('@') != -1) {
em=defe
} else {
em=prompt('Email to? (all uppercase uses client email else sends an Inline HTML Email Form)', '');
}
if (em == null) { em=''; }
if (em.indexOf('@') != -1) {
//document.getElementById('from').value=em;
if (document.URL.toLowerCase().indexOf('rjmprogramming.com.au') != -1 && em != em.toUpperCase()) {
document.getElementById('asms').href='mailto:' + em.trim() + '?subject=' + encodeURIComponent('Missing Two') + '&body=' + encodeURIComponent(document.URL.split('#')[0].split('?')[0] + suffbits); // + '?missing_two=' + encodeURIComponent(encodeURIComponent(document.getElementById('dfix').innerHTML.replace('background: ','').replace('background:','').replace(');',')').replace(';',''))));
xzhr = new XMLHttpRequest();
var xform=new FormData();
xform.append('inline','');
xform.append('to',em.trim());
var flatf=document.getElementById('latf').outerHTML;
var flongf=document.getElementById('longf').outerHTML;
var flatt=document.getElementById('latt').outerHTML;
var flongt=document.getElementById('longt').outerHTML;
var fbrg=document.getElementById('brg').outerHTML;
var fdist=document.getElementById('dist').outerHTML;
var tlatf='<input type=text name=latf id=latf value="' + document.getElementById('latf').value + '"></input>';
var tlongf='<input type=text name=longf id=longf value="' + document.getElementById('longf').value + '"></input>';
var tlatt='<input type=text name=latt id=latt value="' + document.getElementById('latt').value + '"></input>';
var tlongt='<input type=text name=longt id=longt value="' + document.getElementById('longt').value + '"></input>';
var tbrg='<input type=text name=brg id=brg value="' + document.getElementById('brg').value + '"></input>';
var tdist='<input type=text name=dist id=dist value="' + document.getElementById('dist').value + '"></input>';
//if (from.indexOf('@') != -1) { xform.append('cc',from.trim()); }
console.log('tdfrom');
faux=true;
mapit(document.getElementById('tdfrom'));
console.log(document.getElementById('afrom').href);
console.log('tdto');
faux=true;
mapit(document.getElementById('tdto'));
console.log(document.getElementById('ato').href);
if (document.body.innerHTML.indexOf('<tr id="trfoot"') != -1) {
lastfis='<tr id="trfoot"' + document.body.innerHTML.split('<tr id="trfoot"')[1].split('</tr>')[0] + '</tr>';
if (document.getElementById('asms').href.indexOf('sms:') != -1) {
lasteis='<span ';
lastenow='<a target=_blank href="mailto:?subject=' + dummyencodeURIComponent(encodeURIComponent('Missing%20Two')) + '&body=' + dummyencodeURIComponent(encodeURIComponent(document.getElementById('asms').href.split('&body=')[1])) + '" ';
lasteis2='</span>';
lastenow2='</a>';
lastsis='<span ';
lastsnow='<a target=_blank href="' + document.getElementById('asms').href.split('&')[0] + '&body=' + dummyencodeURIComponent(encodeURIComponent(document.getElementById('asms').href.split('&body=')[1])) + '" ';
lastsis2='</span>';
lastsnow2='</a>';
} else if (document.getElementById('asms').href.indexOf('mailto:') != -1) {
lastsis='<span ';
lastsis=document.getElementById('ssms').outerHTML.split('>')[0] + '>';
lastsnow='<a target=_blank href="sms:&body=' + dummyencodeURIComponent(encodeURIComponent(document.getElementById('asms').href.split('&body=')[1])) + '" ';
lastsnow='<input type=submit title=SMS name=sms id=ssms value="';
lastsis2='</span>';
lastsnow2='</a>';
lastsnow2='"></input>';
lasteis='<span ';
lastenow='<a target=_blank href="mailto:' + em.trim() + '?subject=' + dummyencodeURIComponent(encodeURIComponent('Missing%20Two')) + '&body=' + dummyencodeURIComponent(encodeURIComponent(document.getElementById('asms').href.split('&body=')[1])) + '" ';
lasteis2='</span>';
lastenow2='</a>';
}
}
if (em.trim() != em) {
xform.append('subj','Missing Two');
//var cbgtd=document.getElementById('tdlook').getBoundingClientRect();
xform.append('body','<body>' + document.body.innerHTML.replace(/\ id\=\"mysel\"/g, ' name="mysel" id="mysel"').replace(/\ size\=\"3\"/g, ' size="4"').replace(/\ data\-href\=/g, ' target=_blank href=').replace('</form>', '<br><br><input style=background-color:lightgreen; type=submit value=Solve></input></form>').replace('DISPLAY:table-row','DISPLAY:none').replace(lastfis,lasttis).replace(lasteis,lastenow).replace(lasteis2,lastenow2).replace(lastsis,lastsnow).replace(lastsis2,lastsnow2).replace('absolute;','absolute;display:none;').replace(flatf,tlatf).replace(flongf,tlongf).replace(flatt,tlatt).replace(flongt,tlongt).replace(fbrg,tbrg).replace(fdist,tdist) + '</body>');
} else {
xform.append('subj','Missing Two');
xform.append('body','<body>' + document.body.innerHTML.replace(/\ id\=\"mysel\"/g, ' name="mysel" id="mysel"').replace(/\ size\=\"3\"/g, ' size="4"').replace(/\ data\-href\=/g, ' target=_blank href=').replace('</form>', '<br><br><input style=background-color:lightgreen; type=submit value=Solve></input></form>').replace('DISPLAY:table-row','DISPLAY:none').replace(lastfis,lasttis).replace(lasteis,lastenow).replace(lasteis2,lastenow2).replace(lastsis,lastsnow).replace(lastsis2,lastsnow2).replace('absolute;','absolute;display:none;').replace(flatf,tlatf).replace(flongf,tlongf).replace(flatt,tlatt).replace(flongt,tlongt).replace(fbrg,tbrg).replace(fdist,tdist) + '</body>');
}
xzhr.onreadystatechange=stateChanged;
xzhr.open('post','//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php',true);
xzhr.send(xform);
} else {
document.getElementById('asms').href='mailto:' + em.trim() + '?subject=' + encodeURIComponent('Missing Two') + '&body=' + encodeURIComponent(document.URL.split('#')[0].split('?')[0] + suffbits); // + '?missing_two=' + encodeURIComponent(encodeURIComponent(document.getElementById('dfix').innerHTML.replace('background: ','').replace('background:','').replace(');',')').replace(';',''))));
document.getElementById('asms').click();
}
}
}

function woit(ina) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
window.open(ina.getAttribute('data-href'), '_blank');
} else {
window.open(ina.getAttribute('data-href'), '_blank', 'top=50,left=50,width=900,height=700');
}
}

function askit() {
var ourdist=0.0, ourbrg=0.0;
var clickcmd='';
//alert(gllentry);
if (gllentry.indexOf(',') != -1) {
if ((1 == 2 && gllonesuffix == 'f') || document.getElementById('spfr').innerHTML == 'from') {
tpurl=origtpurl;
document.getElementById('latf').focus();
document.getElementById('latf').value=gllentry.split(',')[0];
//var mu="//www.rjmprogramming.com.au/PHP/Map/map.php?title=London&label=['Lat',&value='Lon','Name']&data=,[51.5072,-0.1275,~London~]";
mu=mu.replace('[51.5072,','[' + gllentry.split(',')[0] + ',');
document.getElementById('longf').focus();
document.getElementById('longf').value=gllentry.split(',')[1];
mu=mu.replace(',-0.1275,',',' + gllentry.split(',')[1] + ',');
document.getElementById('latf').focus();
gllonesuffix = 't';
document.getElementById('spfr').innerHTML=document.getElementById('spfr').innerHTML.replace('from','to<input type=hidden name=fplacen value="' + gllentry.split(',')[2].replace(/\;/g,',') + '"></input>');
fplacen=gllentry.split(',')[2].replace(/\;/g,',');
document.getElementById('ssf').innerHTML=' ' + gllentry.split(',')[2].replace(/\;/g,',');
mu=mu.replace('=LonJunkdon','=' + encodeURIComponent(gllentry.split(',')[2].replace(/\;/g,','))).replace(',~London~]',',~' + encodeURIComponent(gllentry.split(',')[2].replace(/\;/g,',')) + '~],[051.5072,-00.1275,~LonDon~]');
tpurl=tpurl.replace("Sydney+NSW,+Australia",encodeURIComponent(gllentry.split(',')[2].replace(/\;/g,',')));
if (document.getElementById('sftif') && document.getElementById('iftif')) {
document.getElementById('iftif').src=document.getElementById('iftif').src.replace('&',encodeURIComponent(' from ' + gllentry.split(',')[2].replace(/\;/g,',')) + '&') + ',[' + gllentry.replace(',' + gllentry.split(',')[1] + ',', ',' + gllentry.split(',')[1] + ',~').replace(/\ /g,'%20') + '~]';
document.getElementById('sftif').innerHTML+=' <a target=_blank title=Accomodation onclick=woit(this); style=text-decoration:underline;cursor:pointer; data-href="' + accomurl.replace(/Springwood\,\+New\+South\+Wales/g, encodeURIComponent(gllentry.split(',')[2].replace(/\;/g,',')).replace(/\%20/g,'+')) + '">from 🛌</a> <a target=_blank title="' + gllentry.split(',')[2].replace(/\;/g,',') + '" href="//en.wikipedia.org/wiki/' + encodeURIComponent(gllentry.split(',')[2].replace(/\;/g,',')) + '">' + gllentry.split(',')[2].replace(/\;/g,',') + '</a>';
document.getElementById('brg').value='0.0000000';
document.getElementById('dist').value='0.000';
document.getElementById('brg').style.backgroundColor='white';
document.getElementById('dist').style.backgroundColor='white';
cwhat=[false,false,true,true,false,false];
ourdist=great_circle_distance(document.getElementById(eles[0]).value,document.getElementById(eles[1]).value,document.getElementById(eles[4]).value,document.getElementById(eles[5]).value);
document.getElementById(eles[3]).value='' + ourdist;

//Let ‘R’ be the radius of Earth,
//‘L’ be the longitude,
//‘θ’ be latitude,
//‘β‘ be Bearing.

//Bearing from point A to B, can be calculated as,

//β = atan2(X,Y),

//where, X and Y are two quantities and can be calculated as:

//X = cos θb * sin ∆L

//Y = cos θa * sin θb – sin θa * cos θb * cos ∆L

ourbrg=eval(eval(360.0 + eval(eval(eval(180.0 / Math.PI) * Math.atan2(
eval(eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval(eval('' + document.getElementById(eles[5]).value) - eval('' + document.getElementById(eles[1]).value))))),
eval(eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value)))) -
eval(eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval(eval('' + document.getElementById(eles[5]).value) - eval('' + document.getElementById(eles[1]).value)))))
)))) % 360.0);

document.getElementById('mysel').value='2';
document.getElementById(eles[2]).value='' + ourbrg;
document.getElementById(eles[2]).style.backgroundColor='lightgreen';
document.getElementById(eles[3]).style.backgroundColor='lightgreen';
}
} else {
var interesting=false, waslatt='', waslongt='', wasfplacen='';
if (gllonesuffix == 'f') {
interesting=true;
waslatt=document.getElementById('latt').value;
waslongt=document.getElementById('longt').value;
if (documentURL == document.URL) {
wasfplacen=location.search.split('tplacen=')[1] ? (' ' + decodeURIComponent(location.search.split('tplacen=')[1].split('&')[0]).replace(/\+/g,' ')) : ''; //document.getElementById('tplacen').value;
} else {
wasfplacen=decodeURIComponent(documentURL.split('tplacen=')[eval(-1 + documentURL.split('tplacen=').length)].split('&')[0]);
}
//alert('interesting');
}
mu=mu.replace('=London','=' + encodeURIComponent(fplacen));
document.getElementById('brg').focus();
document.getElementById('dist').focus();
document.getElementById('latt').focus();
document.getElementById('latt').value=gllentry.split(',')[0];
mu=mu.replace('[051.5072,','[' + gllentry.split(',')[0] + ',');
document.getElementById('longt').focus();
document.getElementById('longt').value=gllentry.split(',')[1];
mu=mu.replace(',-00.1275,',',' + gllentry.split(',')[1] + ',');
document.getElementById('latt').focus();
gllonesuffix = 'f';
if (interesting) {
document.getElementById('spfr').innerHTML=document.getElementById('spfr').innerHTML.replace('to','from<input type=hidden id=tplacen name=tplacen value="' + gllentry.split(',')[2].replace(/\;/g,',') + '"></input>');
} else {
document.getElementById('spfr').innerHTML=document.getElementById('spfr').innerHTML.replace('to','from<input type=hidden id=tplacen name=tplacen value="' + gllentry.split(',')[2].replace(/\;/g,',') + '"></input>');
}
if (document.getElementById('brg').value.indexOf('0.0') != -1 && document.getElementById('dist').value.indexOf('0.0') != -1) {
clickcmd="document.getElementById('ifill').click();";
}
document.getElementById('ifill').value='Map Trip';
document.getElementById('sst').innerHTML=' ' + gllentry.split(',')[2].replace(/\;/g,',');
mu=mu.replace(',~LonDon~]',',~' + encodeURIComponent(gllentry.split(',')[2].replace(/\;/g,',')) + '~]');
tpurl=tpurl.replace("Brisbane+QLD,+Australia",encodeURIComponent(gllentry.split(',')[2].replace(/\;/g,',')));
if (document.getElementById('sftif') && document.getElementById('iftif')) {
if (document.getElementById('addafirst')) { document.getElementById('addafirst').style.display='inline-block'; }
if (document.getElementById('addacc')) { document.getElementById('addacc').style.display='inline-block'; }
document.getElementById('iftif').src=document.getElementById('iftif').src.replace('&',encodeURIComponent(' to ' + gllentry.split(',')[2].replace(/\;/g,',')) + '&') + ',[' + gllentry.replace(',' + gllentry.split(',')[1] + ',', ',' + gllentry.split(',')[1] + ',~').replace(/\ /g,'%20') + '~]';
//if (interesting) {
// alert('interesting ... fplacen=' + fplacen);
//}
if (interesting) {
document.getElementById('sftif').innerHTML+=(' from <a target=_blank title="' + wasfplacen + '" href="//en.wikipedia.org/wiki/' + encodeURIComponent(wasfplacen) + '">' + wasfplacen + '</a> ').substring(0,1) + '<a target=_blank title=Accomodation onclick=woit(this); style=text-decoration:underline;cursor:pointer; data-href="' + accomurl.replace(/Springwood\,\+New\+South\+Wales/g, encodeURIComponent(wasfplacen).replace(/\%20/g,'+')) + '">🛌</a>' + '<a target=_blank title="Google Maps Directions" href="' + tpurl.replace('https:','') + '">to</a><a title="Map of this trip leg" class="adda" onclick="addto(this);" data-from="' + (wasfplacen ? wasfplacen : fplacen) + '" data-to="' + gllentry.split(',')[2].replace(/\;/g,',') + '" style="display:inline-block;cursor:pointer;" data-latf=' + (waslatt ? waslatt : document.getElementById('latf').value) + ' data-longf=' + (waslongt ? waslongt : document.getElementById('longf').value) + ' data-latt=' + document.getElementById('latt').value + ' data-longt=' + document.getElementById('longt').value + ' data-gcd=' + eval(eval('' + great_circle_distance((waslatt ? waslatt : document.getElementById(eles[0]).value),(waslongt ? waslongt : document.getElementById(eles[1]).value),document.getElementById(eles[4]).value,document.getElementById(eles[5]).value)) / 1000.000) + '>⬆</a> <a target=_blank title="' + gllentry.split(',')[2].replace(/\;/g,',') + '" href="//en.wikipedia.org/wiki/' + encodeURIComponent(gllentry.split(',')[2].replace(/\;/g,',')) + '">' + gllentry.split(',')[2].replace(/\;/g,',') + '</a> (' + '<a target=_blank title=Accomodation onclick=woit(this); style=text-decoration:underline;cursor:pointer; data-href="' + accomurl.replace(/Springwood\,\+New\+South\+Wales/g, encodeURIComponent(gllentry.split(',')[2].replace(/\;/g,',')).replace(/\%20/g,'+')) + '">🛌</a> ' + eval(eval('' + great_circle_distance(document.getElementById(eles[0]).value,document.getElementById(eles[1]).value,document.getElementById(eles[4]).value,document.getElementById(eles[5]).value)) / 1000.000) + ' kilometres)';
//alert('interesting ... fplacen=' + wasfplacen);
} else {
document.getElementById('sftif').innerHTML+=' <a target=_blank title="Google Maps Directions" href="' + tpurl.replace('https:','') + '">to</a><a title="Map of this trip leg" class="adda" onclick="addto(this);" data-from="' + (wasfplacen ? wasfplacen : fplacen) + '" data-to="' + gllentry.split(',')[2].replace(/\;/g,',') + '" style="display:inline-block;cursor:pointer;" data-latf=' + (waslatf ? waslatf : document.getElementById('latf').value) + ' data-longf=' + (waslongf ? waslongf : document.getElementById('longf').value) + ' data-latt=' + document.getElementById('latt').value + ' data-longt=' + document.getElementById('longt').value + ' data-gcd=' + eval(eval('' + great_circle_distance((waslatf ? waslatf : document.getElementById(eles[0]).value),(waslongf ? waslongf : document.getElementById(eles[1]).value),document.getElementById(eles[4]).value,document.getElementById(eles[5]).value)) / 1000.000) + '>⬆</a> <a target=_blank title="' + gllentry.split(',')[2].replace(/\;/g,',') + '" href="//en.wikipedia.org/wiki/' + encodeURIComponent(gllentry.split(',')[2].replace(/\;/g,',')) + '">' + gllentry.split(',')[2].replace(/\;/g,',') + '</a> (' + '<a target=_blank title=Accomodation onclick=woit(this); style=text-decoration:underline;cursor:pointer; data-href="' + accomurl.replace(/Springwood\,\+New\+South\+Wales/g, encodeURIComponent(gllentry.split(',')[2].replace(/\;/g,',')).replace(/\%20/g,'+')) + '">🛌</a> ' + eval(eval('' + great_circle_distance(document.getElementById(eles[0]).value,document.getElementById(eles[1]).value,document.getElementById(eles[4]).value,document.getElementById(eles[5]).value)) / 1000.000) + ' kilometres)';
}
document.getElementById('brg').style.backgroundColor='white';
document.getElementById('dist').style.backgroundColor='white';
documentURL+='&tplacen=' + encodeURIComponent(gllentry.split(',')[2].replace(/\;/g,','));
cwhat=[false,false,true,true,false,false];
ourdist=great_circle_distance(document.getElementById(eles[0]).value,document.getElementById(eles[1]).value,document.getElementById(eles[4]).value,document.getElementById(eles[5]).value);
document.getElementById(eles[3]).value='' + ourdist;


//Let ‘R’ be the radius of Earth,
//‘L’ be the longitude,
//‘θ’ be latitude,
//‘β‘ be Bearing.

//Bearing from point A to B, can be calculated as,

//β = atan2(X,Y),

//where, X and Y are two quantities and can be calculated as:

//X = cos θb * sin ∆L

//Y = cos θa * sin θb – sin θa * cos θb * cos ∆L

ourbrg=eval(eval(360.0 + eval(eval(eval(180.0 / Math.PI) * Math.atan2(
eval(eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval(eval('' + document.getElementById(eles[5]).value) - eval('' + document.getElementById(eles[1]).value))))),
eval(eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value)))) -
eval(eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval(eval('' + document.getElementById(eles[5]).value) - eval('' + document.getElementById(eles[1]).value)))))
)))) % 360.0);


document.getElementById('mysel').value='2';
document.getElementById(eles[2]).value='' + ourbrg;
document.getElementById(eles[2]).style.backgroundColor='lightgreen';
document.getElementById(eles[3]).style.backgroundColor='lightgreen';


if (interesting) {
document.getElementById('spfr').innerHTML='to';
document.getElementById('ipn').focus();
}
}
}
document.getElementById('ipn').placeholder=gllentry.split(',')[2].replace(/\;/g,',');
}
gllentry='';
document.getElementById('placegeo').value='';
if (clickcmd != '') {
eval(clickcmd);
}
}

function lookforg() {
if (document.getElementById('placegeo').value != '') {
// alert('2:' + document.getElementById('placegeo').value + ' versus ' + document.getElementById('placegeo').title);
if (eval('' + document.getElementById('placegeo').title.length) > eval('' + document.getElementById('placegeo').value.length) && document.getElementById('placegeo').title.indexOf(document.getElementById('placegeo').value) == 3) {
gllentry=document.getElementById('placegeo').value + ',' + decodeURIComponent(document.getElementById('ifplacegeo').src.split('?placegeo=')[1]).replace(/\,/g,';'); //
if (document.getElementById('gform').action.indexOf('#') == -1) {
document.getElementById('gform').action='#' + document.getElementById('placegeo').title.substring(0,2);
} else if (document.getElementById('gform').action.indexOf('#') != -1) {
document.getElementById('gform').action+='' + document.getElementById('placegeo').title.substring(0,2);
} else if (!document.getElementById('fcc')) {
document.getElementById('gform').innerHTML+='<input type=hidden name=fcc id=fcc value="' + document.getElementById('placegeo').title.substring(0,2) + '"></input>';
} else if (!document.getElementById('tcc')) {
document.getElementById('gform').innerHTML+='<input type=hidden name=tcc id=tcc value="' + document.getElementById('placegeo').title.substring(0,2) + '"></input>';
} else {
document.getElementById('tcc').value=document.getElementById('placegeo').title.substring(0,2);
}
} else {
gllentry=document.getElementById('placegeo').value + ',' + decodeURIComponent(document.getElementById('ipn').src.split('?placegeo=')[1]).replace(/\,/g,';');
}
askit();
} else {
setTimeout(lookforg,1000);
}
}

function checkit(iois) {
if (iois != null) {
if (iois.src.indexOf('?placegeo=') != -1) {
//alert(1);
var aconto = (iois.contentWindow || iois.contentDocument);
//alert(11);
if (aconto != null) {
//alert(111);
if (aconto.document) { aconto = aconto.document; }
//alert(1111);
if (aconto.body != null) {
//alert(2);
document.body.style.cursor='pointer';
if (document.getElementById('placegeo').value != '') {
if (eval('' + document.getElementById('placegeo').title.length) > eval('' + document.getElementById('placegeo').value.length) && document.getElementById('placegeo').title.indexOf(document.getElementById('placegeo').value) == 3) {
gllentry=document.getElementById('placegeo').value + ',' + decodeURIComponent(document.getElementById('ifplacegeo').src.split('?placegeo=')[1]).replace(/\,/g,';'); // + ',' + document.getElementById('placegeo').title.substring(0,2);
if (document.getElementById('gform').action.indexOf('#') == -1) {
document.getElementById('gform').action='#' + document.getElementById('placegeo').title.substring(0,2);
} else if (document.getElementById('gform').action.indexOf('#') != -1) {
document.getElementById('gform').action+='' + document.getElementById('placegeo').title.substring(0,2);
} else if (!document.getElementById('fcc')) {
document.getElementById('gform').innerHTML+='<input type=hidden name=fcc id=fcc value="' + document.getElementById('placegeo').title.substring(0,2) + '"></input>';
} else if (!document.getElementById('tcc')) {
document.getElementById('gform').innerHTML+='<input type=hidden name=tcc id=tcc value="' + document.getElementById('placegeo').title.substring(0,2) + '"></input>';
} else {
document.getElementById('tcc').value=document.getElementById('placegeo').title.substring(0,2);
}
} else {
gllentry=document.getElementById('placegeo').value + ',' + decodeURIComponent(iois.src.split('?placegeo=')[1]).replace(/\,/g,';');
}
askit();
} else {
//alert(8);
setTimeout(lookforg,1000);
}
}
}
}
}
}

function lkwk(oiis, twop) {

var doi=true;
appendz="";
if (oiis.value.trim() != '') {
if (yourtzlist.toUpperCase().indexOf('/' + oiis.value.trim().replace(/\ /g,'_').toUpperCase() + '"') != -1) { // <option value=\"Australia/Sydney\" data-geo=\"-33.86667,151.21666,AEST,AU,+11\">Australia/Sydney</option>
document.getElementById('placegeo').title='' + yourtzlist.toUpperCase().split('/' + oiis.value.trim().replace(/\ /g,'_').toUpperCase() + '<')[0].split(' DATA-GEO="')[eval(-1 + yourtzlist.toUpperCase().split('/' + oiis.value.trim().replace(/\ /g,'_').toUpperCase() + '<')[0].split(' DATA-GEO="').length)].split(',')[3] + ',' + yourtzlist.toUpperCase().split('/' + oiis.value.trim().replace(/\ /g,'_').toUpperCase() + '<')[0].split(' DATA-GEO="')[eval(-1 + yourtzlist.toUpperCase().split('/' + oiis.value.trim().replace(/\ /g,'_').toUpperCase() + '<')[0].split(' DATA-GEO="').length)].split(',')[0] + ',' + yourtzlist.toUpperCase().split('/' + oiis.value.trim().replace(/\ /g,'_').toUpperCase() + '<')[0].split(' DATA-GEO="')[eval(-1 + yourtzlist.toUpperCase().split('/' + oiis.value.trim().replace(/\ /g,'_').toUpperCase() + '<')[0].split(' DATA-GEO="').length)].split(',')[1];
document.getElementById('placegeo').value='' + yourtzlist.toUpperCase().split('/' + oiis.value.trim().replace(/\ /g,'_').toUpperCase() + '<')[0].split(' DATA-GEO="')[eval(-1 + yourtzlist.toUpperCase().split('/' + oiis.value.trim().replace(/\ /g,'_').toUpperCase() + '<')[0].split(' DATA-GEO="').length)].split(',')[0] + ',' + yourtzlist.toUpperCase().split('/' + oiis.value.trim().replace(/\ /g,'_').toUpperCase() + '<')[0].split(' DATA-GEO="')[eval(-1 + yourtzlist.toUpperCase().split('/' + oiis.value.trim().replace(/\ /g,'_').toUpperCase() + '<')[0].split(' DATA-GEO="').length)].split(',')[1];
if (document.getElementById('placegeo').value != '') {
if (eval('' + document.getElementById('placegeo').title.length) > eval('' + document.getElementById('placegeo').value.length) && document.getElementById('placegeo').title.indexOf(document.getElementById('placegeo').value) == 3) {
gllentry=document.getElementById('placegeo').value + ',' + document.getElementById('ipn').value.replace(/\,/g,';'); // + ',' + document.getElementById('placegeo').title.substring(0,2);
if (document.getElementById('gform').action.indexOf('#') == -1) {
document.getElementById('gform').action='#' + document.getElementById('placegeo').title.substring(0,2);
} else if (document.getElementById('gform').action.indexOf('#') != -1) {
document.getElementById('gform').action+='' + document.getElementById('placegeo').title.substring(0,2);
} else if (!document.getElementById('fcc')) {
document.getElementById('gform').innerHTML+='<input type=hidden name=fcc id=fcc value="' + document.getElementById('placegeo').title.substring(0,2) + '"></input>';
} else if (!document.getElementById('tcc')) {
document.getElementById('gform').innerHTML+='<input type=hidden name=tcc id=tcc value="' + document.getElementById('placegeo').title.substring(0,2) + '"></input>';
} else {
document.getElementById('tcc').value=document.getElementById('placegeo').title.substring(0,2);
}
} else {
gllentry=document.getElementById('placegeo').value + ',' + document.getElementById('ipn').value.replace(/\,/g,';');
}
askit();
document.getElementById('ipn').value='';
} //else {
//alert(8);
//setTimeout(lookforg,1000);
//}
} else {
if ((('' + oiis.value).replace(/\"/g,'').replace(/\'/g,'').replace(';',' ') + ' ').toLowerCase().indexOf('here ') == 0) { doi=false; if (1 == 2) { oiis.value=''; } doi=getLocation(oiis.value); if (1 == 2) { return ''; } }
if (document.getElementById('tdmid')) {
if (document.getElementById('tdmid').innerHTML.toLowerCase().indexOf('<iframe') != -1) {
if (document.getElementById('spfr')) {
if (document.getElementById('spfr').innerHTML.toLowerCase().indexOf('rom') != -1) {
location.href=document.URL.split('#')[0].split('?')[0] + '?ipn=' + encodeURIComponent(oiis.value);
}
}
}
}
if (oiis.value.trim() != oiis.value) { tplacen=tplacen.trim(); } else { tplacen+=String.fromCharCode(32); }
var ois=oiis.value.trim().split(';');
if (doi) { document.getElementById('ifplacegeo').src=document.getElementById('ifplacegeo').src.split('?')[0].split('#')[0] + '?placegeo=' + encodeURIComponent(ois[0]); }
if (eval('' + ois.length) > 1) { elev=eval('' + ois[1]); evel=Math.max(elev, 2.0); } else if (appendz != "") { elev=eval('' + appendz.substring(1)); evel=Math.max(elev, 2.0); }
//appendz="";
if (twop == '') { oiis.value=''; }
if (doi) { document.body.style.cursor='progress'; }
}
}
}

function fillablemaybe(brgo) {
if (('' + brgo.value).replace(/0/g,'').replace('.','') != '') {
//alert('356:' + document.getElementById('dist').value);
if (('' + document.getElementById('dist').value).replace(/0/g,'').replace('.','') == '' || (fplacen != '' && tplacen == '')) {
//alert(456);
if (('' + document.getElementById('latt').value).replace(/0/g,'').replace('.','') == '' || (fplacen != '' && tplacen == '')) {
//alert(556);
if (('' + document.getElementById('longt').value).replace(/0/g,'').replace('.','') == '' || (fplacen != '' && tplacen == '')) {
//alert(656);
if (('' + document.getElementById('ssf').innerHTML) != '') {
//alert(756);
if (!viastart) {
dok=false;
document.getElementById('dist').focus();
if (1 == 1) { // assume 2m elevation ... thanks to https://en.wikipedia.org/wiki/Horizon
document.getElementById('dist').value='' + Math.floor(Math.pow(eval(eval(2.0 * eval('' + elev)) * 6371000.0), 0.5)) + '.000';
} else {
document.getElementById('dist').value='5000.000';
}
elev=2.0;
brgo.focus();
}
if (mu.indexOf('[051.5072,') != -1) {
//alert(856);
if (!viastart) {
document.getElementById('ifill').click();
}
mu=mu.replace('[051.5072,','[' + document.getElementById('latt').value + ',');
mu=mu.replace(',-00.1275,',',' + document.getElementById('longt').value + ',');
mu=mu.replace(',~LonDon~]',',~' + encodeURIComponent(fplacen + apz + ' looking out at bearing ' + brgo.value + ' degrees towards horizon') + '~]');
mu=mu.replace('=London','=' + encodeURIComponent(fplacen + apz + ' looking out at bearing ' + brgo.value + ' degrees towards horizon'));
//alert('956:' + mu);
//document.getElementById('hplacen').innerHTML='<input type=hidden name=fplacen value="' + mu + '"></input>';
//alert(567);
tdfoota=' <input ' + trfoota.split('</td>')[0].split('<input ')[0];
trfoota='';
document.getElementById('tdmid').colSpan='2';
document.getElementById('tdmid').innerHTML='<iframe src="' + mu + '" style="width:100%;height:600px;"></iframe>';
if (viastart) {
fplacen='';
}
}

}
}
}
}
}
}

function predfillablemaybe() {
dfillablemaybe(document.getElementById('dist'));
}

function dfillablemaybe(brgo) {
//alert(45);
if (!dok) { return ''; }
//alert(('' + brgo.value).replace(/0/g,'').replace('.',''));
var i, ourbrg=0.0, ourdist=0.0, j, dvlat='', dvlong='';
if (('' + brgo.value).replace(/0/g,'').replace('.','') != '') {
//alert('356:' + document.getElementById('dist').value);
if (('' + document.getElementById('dist').value).replace(/0/g,'').replace('.','') != '' || (fplacen != '' && tplacen == '')) {
//alert(456);
if (('' + document.getElementById('latt').value).replace(/0/g,'').replace('.','') == '' || (fplacen != '' && tplacen == '')) {
//alert(556);
if (('' + document.getElementById('longt').value).replace(/0/g,'').replace('.','') == '' || (fplacen != '' && tplacen == '')) {
//alert(656);
if (('' + document.getElementById('ssf').innerHTML) != '') {
//alert(756);
if (!viastart) {
//document.getElementById('brg').focus();
document.getElementById('brg').value='0.0000001';
//brgo.focus();
}
if (mu.indexOf('[051.5072,') != -1) {
//alert(856);
if (!viastart) {
//alert(1);
document.getElementById('ifill').click();
//alert(11);
}
mu=mu.replace('[051.5072,','[' + eval('' + document.getElementById('latt').value).toFixed(3) + ',');
mu=mu.replace(',-00.1275,',',' + eval('' + document.getElementById('longt').value).toFixed(3) + ',');
if (('' + brgo.value).indexOf('000.000') != -1) {
//mu=mu.replace(encodeURIComponent('looking out North'), encodeURIComponent(('' + brgo.value).split('000.000')[0] + 'km Ring'));
mu=mu.replace(',~LonDon~]',',~' + encodeURIComponent(fplacen + apz + ' looking North') + '~]');
mu=mu.replace('=London','=' + encodeURIComponent(fplacen + (' ' + brgo.value).split('000.000')[0] + 'km Ring'));
} else {
mu=mu.replace(',~LonDon~]',',~' + encodeURIComponent(fplacen + apz + ' looking North') + '~]');
mu=mu.replace('=London','=' + encodeURIComponent(fplacen + apz + ' looking out North'));
}
//mu=mu.replace(',~LonDon~]',',~' + encodeURIComponent(fplacen + ' looking North') + '~]');
//mu=mu.replace('=London','=' + encodeURIComponent(fplacen + ' looking out North'));
//alert('956:' + mu);
//document.getElementById('hplacen').innerHTML='<input type=hidden name=fplacen value="' + mu + '"></input>';
//document.getElementById('tdmid').innerHTML='<iframe src="' + mu + '" style="width:100%;height:600px;"></iframe>';
if (viastart) {
for (var dbrg=30; dbrg<=330; dbrg+=30) {
//document.getElementById('brg').value='' + dbrg + '.0000000';

if (('' + document.getElementById('mysel').value) == '2') {
ourbrg=eval(eval(540.0 + 180.0 + eval('' + document.getElementById(eles[2]).value)) % 360.0);
} else {
ourbrg=eval('' + document.getElementById(eles[2]).value);
}
ourbrg=eval('' + dbrg);
for (j=eval(3 - eval(('' + document.getElementById('mysel').value))); j>=1; j--) {
ourdist=eval('' + document.getElementById(eles[3]).value);


//Let first point latitude be la1,
///longitude as lo1,
//d be distance,
//R as radius of Earth,
//Ad be the angular distance i.e d/R and
//θ be the bearing,

//Here is the formula to find the second point, when first point, bearing and distance is known:

//latitude of second point = la2 = asin(sin la1 * cos Ad + cos la1 * sin Ad * cos θ), and
//longitude of second point = lo2 = lo1 + atan2(sin θ * sin Ad * cos la1 , cos Ad – sin la1 * sin la2)

dvlat='' +
eval(eval(eval(180.0 / Math.PI) * Math.asin(
Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value)) *
Math.cos(eval(eval('' + ourdist) / 6371000.0)) +
Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value)) *
Math.sin(eval(eval('' + ourdist) / 6371000.0)) *
Math.cos(eval(Math.PI / 180.0) * eval('' + ourbrg)))));

//Let first point latitude be la1,
//longitude as lo1,
//d be distance,
//R as radius of Earth,
//Ad be the angular distance i.e d/R and
//θ be the bearing,
// longitude of second point = lo2 = lo1 + atan2(sin θ * sin Ad * cos la1 , cos Ad – sin la1 * sin la2)

dvlong='' + eval(eval(180.0 / Math.PI) * eval(eval(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[1]).value)) +
Math.atan2(
eval(eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + ourbrg)) *
eval('' + Math.sin(eval(eval('' + ourdist) / 6371000.0)))) *
eval('' + Math.cos(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value)))),
eval(eval('' + Math.cos(eval(eval('' + ourdist) / 6371000.0))) -
eval(eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[0]).value)))) *
eval('' + Math.sin(eval(Math.PI / 180.0) * eval('' + document.getElementById(eles[4]).value)))))));
mu+=',[' + eval('' + dvlat).toFixed(3) + ',' + eval('' + dvlong).toFixed(3) + ',~' + dbrg + '~]';

}

}
//alert(mu);
tdfoota=' <input ' + trfoota.split('</td>')[0].split('<input ')[0];
trfoota='';
document.getElementById('tdmid').colSpan='2';
document.getElementById('tdmid').innerHTML='<iframe src="' + mu + '" style="width:100%;height:600px;"></iframe>';
fplacen='';
}
}

}
}
}
}
}
}

function oiqit() {
if (oiqplaceholder != '') {
hereit(document.getElementById('ipn'), oiqplaceholder);
oiqplaceholder='';
} else if (document.getElementById('ipn')) {
if (('' + document.getElementById('ipn').placeholder).indexOf('"Here" ') == 0 && ('' + document.getElementById('ipn').placeholder).indexOf(' Longitude. ') != -1) {
document.getElementById('ipn').placeholder=document.getElementById('ipn').placeholder.split(' Longitude. ')[1];
}
}
}

function hereit(oiq, twopis) {
var wasp='';
if (twopis != '') {
if (('' + oiq.placeholder).indexOf('"Here"') == -1) {
wasp=('' + oiq.placeholder);
oiq.placeholder='"Here" uses Geolocation derived Latitude, Longitude. ' + wasp;
setTimeout(oiqit, 7000);
}
document.getElementById('myh1').style.cursor='pointer';
} else if (oiq.value == '' && document.URL.toLowerCase().indexOf('https') == 0) {
//alert('elevviaz=' + elevviaz(-33.8688));
if (('' + oiq.placeholder).indexOf('"Here"') == -1) {
wasp=('' + oiq.placeholder);
oiqplaceholder='"Here" uses Geolocation derived Latitude, Longitude. ' + wasp;
document.getElementById('myh1').style.cursor='progess';
//alert('zalpha=' + zalpha);
setTimeout(oiqit, 500);
}
}
}

</script>
</head>
<body onload='if (xxipn != xxxipn) { fplacen=""; } setTimeout(moremaybe,dly);'>
<button id=ballow style='display:block;background-color:yellow;' onclick='start();'>Allow</button>
<form id=gform method=GET action='//www.rjmprogramming.com.au/HTMLCSS/missing_two.html'><div id=hplacen></div>
<div id=dtop style=display:block;>
<h1 id=myh1 style='display:block;'>Missing Two (<font size=1>optional</font> <span onclick="this.innerHTML=this.innerHTML.replace('to','From').replace('from','to').replace('From','from'); document.getElementById('ipn').focus(); " id=spfr title='Click me to toggle between from and to' style='cursor:pointer;'>from</span> <input onfocus='hereit(this,"");' title='Optionally semicolon separate an elevation affecting horizon distance used for Place Name/Bearing (where Compass app might show you this elevation value) input scenarios. Note that a Place Name/Distance scenario shows a Locality Distance Ring map. Append space for gyroscope bearing.' onblur='lkwk(this,"");' style='display:inline-block;width:280px;' placeholder='Place Name' id=ipn value='' type=text></input>) in Table Column <span data-onfocus="document.getElementById('semail').innerHTML='';" data-title='Email to (append a space to just show the table cell with the gradient)?' data-contenteditable=true data-onblur=preemail(this.innerHTML); onclick=emailit(''); id=semail title=Email>📧</span> <span data-onfocus="document.getElementById('semail').innerHTML='';" data-title='SMS to?' data-contenteditable=true data-onblur=preemail(this.innerHTML); onclick=toize(''); id=ssms title=SMS>📟</span><div id=dntable style=display:none;>    <table border=1 id=ntable style="background-color:pink;display:inline-block;font-size:10px;"><tr><td id=tdn>N</td></tr><tr><td>⬆</td></tr></table>    <div style='display:inline-block;cursor:pointer;' id=arrowup title='To Portrait Up ... line up, parallel, with compass N to face North the ideal way' onclick='alert(this.title);'>⬆</div></div></h1>
<h3 id=myh3 style='display:block;'>RJM Programming <a style="text-decoration:underline;cursor:pointer;" onclick="location.href=document.URL.split('#')[0].split('?')[0];">-</a> December, 2018</h3>
<h3>Thanks to <a target=_blank title='Thanks' href='//www.igismap.com/formula-to-find-bearing-or-heading-angle-between-two-points-latitude-longitude/'>Formula to Find Bearing angle between 2 points: Latitude Longitude</a></title>
</div>
<table border=10 cellspacing=6 cellpadding=6 style='width:100%;' id=myt>
<tbody id=tdlook>
<tr id=trhead style='display:table-row;'><th style='width:30%;text-align:left;background-color:#f0e0d0;'><a title='Show nearest TimeZone places' id=afrom onclick=mapit(this); style='cursor:pointer;text-decoration:underline;'>From</a> <span id=ssf></span> <div id=dfrom style='display:none;'></div></th><th style='width:30%;text-align:left;background-color:#e0d0f0;'> ... On The Way ...</th><th style='text-align:left;background-color:#d0f0e0;'><a title='Show nearest TimeZone places' id=ato onclick=mapit(this); style='cursor:pointer;text-decoration:underline;'>To</a> <span id=sst></span> <div id=dto style='display:none;'></div></th></tr>
<tr id=trorig style='display:table-row;'><td id='from'>
Latitude (decimal degrees): <input title='' style='width:90px;display:inline-block;' onchange='this.style.backgroundColor="pink";cwhat[0]=false; cwhat[1]=false; if (!decided) { if (!cwhat[5]) { cwhat[5]=true; } if (!cwhat[4]) { cwhat[4]=true; } decided=true; } top.document.getElementById("ltf").value=this.value; ' onblur='this.style.backgroundColor="pink"; cwhat[0]=false; cwhat[1]=false; if (!decided) { if (!cwhat[5]) { cwhat[5]=true; } if (!cwhat[4]) { cwhat[4]=true; } decided=true; } top.document.getElementById("ltf").value=mdms(this.value,this); ' id=latf name=latf type=number onfocus='ati=0; atic=[]; atis=[];' onkeydown='couldbedms(event);' min=-90.0000000 max=90.0000000 step=0.0000010 value='0.0000000'></input><br>
Longitude (decimal degrees): <input title='' style='width:90pxdisplay:inline-block;;' onchange='this.style.backgroundColor="pink"; cwhat[0]=false; cwhat[1]=false; if (!decided) { if (!cwhat[5]) { cwhat[5]=true; } if (!cwhat[4]) { cwhat[4]=true; } decided=true; } top.document.getElementById("lgf").value=this.value; ' onblur='this.style.backgroundColor="pink"; cwhat[0]=false; cwhat[1]=false; if (!decided) { if (!cwhat[5]) { cwhat[5]=true; } if (!cwhat[4]) { cwhat[4]=true; } decided=true; } top.document.getElementById("lgf").value=mdms(this.value,this); ' id=longf name=longf type=number onfocus='ati=0; atic=[]; atis=[];' onkeydown='couldbedms(event);' min=-180.0000000 max=180.0000000 step=0.0000010 value='0.0000000'></input>
</td><td id='ontheway'>
Bearing <select id="mysel" onchange="myselit(this);"><option value='2'>From->To</option><option value='1'>To->From</option></select> (decimal degrees): <input style='width:90px;' onclick="tplacen+=String.fromCharCode(32); if (fplacen.trim().length != 0 && tplacen.trim().length == 0) { this.style.backgroundColor='pink'; cwhat[3]=false; cwhat[2]=false; if (!decided) { decided=true; } fillablemaybe(this); } " onchange='this.style.backgroundColor="pink"; cwhat[3]=false; cwhat[2]=false; if (!decided) { decided=true; } ' onblur='this.style.backgroundColor="pink"; cwhat[3]=false; cwhat[2]=false; if (!decided) { decided=true; } fillablemaybe(idms(idms(this))); ' id=brg name=brg type=number onfocus='ati=0; atic=[]; atis=[];' onkeydown='couldbedms(event);' min=-360.0000000 max=360.0000000 step=0.0000010 value='0.0000000'></input><br>
Distance (metres):  <input style='width:90px;' onchange='this.style.backgroundColor="pink"; cwhat[3]=false; cwhat[2]=false; if (!decided) { decided=true; } ' onblur='this.style.backgroundColor="pink"; cwhat[3]=false; cwhat[2]=false; if (!decided) { decided=true; } dfillablemaybe(this); ' id=dist name=dist type=number min=0.000 step=0.001 value='0.000'></input>
</td><td id='to'>
Latitude (decimal degrees): <input title='' style='width:90px;' onchange='this.style.backgroundColor="pink"; cwhat[4]=false; cwhat[5]=false; if (!decided) { if (!cwhat[1]) { cwhat[1]=true; } if (!cwhat[0]) { cwhat[0]=true; } decided=true; } top.document.getElementById("ltt").value=this.value; ' onblur='this.style.backgroundColor="pink"; cwhat[4]=false; cwhat[5]=false; if (!decided) { if (!cwhat[1]) { cwhat[1]=true; } if (!cwhat[0]) { cwhat[0]=true; } decided=true; } top.document.getElementById("ltt").value=mdms(this.value,this); ' id=latt name=latt type=number onfocus='ati=0; atic=[]; atis=[];' onkeydown='couldbedms(event);' min=-90.0000000 max=90.0000000 step=0.0000010 value='0.0000000'></input><br>
Longitude (decimal degrees)<span onclick='moreifok();' id=slong>:</span> <input title='' style='width:90px;display:inline-block;' onchange='this.style.backgroundColor="pink"; cwhat[5]=false; cwhat[4]=false; if (!decided) { if (!cwhat[1]) { cwhat[1]=true; } if (!cwhat[0]) { cwhat[0]=true; } decided=true; } top.document.getElementById("lgt").value=this.value; ' onblur='this.style.backgroundColor="pink"; cwhat[4]=false; cwhat[5]=false; if (!decided) { if (!cwhat[1]) { cwhat[1]=true; } if (!cwhat[0]) { cwhat[0]=true; } decided=true; } top.document.getElementById("lgt").value=mdms(this.value,this); ' id=longt name=longt type=number onkeydown='couldbedms(event);' min=-180.0000000 max=180.0000000 step=0.0000010 value='0.0000000'></input>
</td></tr>
<tr id=next1 style='display:none;'><td id='nfromonthewayto' colspan=3><iframe style='width:100%;' id=niframe src=''></iframe></td></tr>
<tr id=trgraphics style='display:none;'><td id=tdfrom></td><td id=tdmidh></td><td id=tdto></td></tr>
<tr id="trfoot" style='DISPLAY:table-row;'><td id=tdfoot style='vertical-align:top;'><input id=ifill style='background-color:yellow;font-size:24px;display:block;' onclick="calcit(); filltwo();" type=button value='Fill'></input></td><td id=tdmid style='vertical-align:top;></td><!--td id=posttdmid style='vertical-align:top;><input id=goagain style='display:none;background-color:lightgreen;font-size:24px;' onclick="nextplease(); this.style.display='none';" type=button value='Go Again'></input></td--></tr>
</tbody>
</table>
</form>
<input id=outofthisworld style='position:absolute;top:-200px;left:-200px;' type='text' value=''></input>
<iframe onload='checknp(this);' id=nearestif name=nearestif style=display:none; src=about:none></iframe>
<div id=nearest style=display:none;></div><div id=getmell style=display:none;></div>
<form style='display:none;' target=nearestif action=//www.rjmprogramming.com.au/PHP/tz_places.php method=GET>
Place: <input onblur=" if (this.value.length > 0) { document.getElementById('nearestif').src='//www.rjmprogramming.com.au/PHP/tz_places.php?latitude=&longitude=&place=' + encodeURIComponent(this.value); } " type=text name=place value=></input>
Latitude: <input type=number id=latitude name=latitude value=0.0000 max=90.0000 min=-90.0000 step=0.0001></input>
Longitude: <input type=number id=longitude name=longitude value=0.0000 max=180.0000 min=-180.0000 step=0.0001></input><br>
<input type=submit id=inearest value='Nearest TimeZone Places'></input></form>
<input type=hidden value='' id=ltf></input><input type=hidden value='' id=lgf></input><input type=hidden value='' id=ltt></input><input type=hidden value='' id=lgt></input>
<a target=_top href='sms:' id=asms style=display:none;>SMS</a>
<iframe onload='checkit(this);' style='display:none;' id=ifplacegeo src='../PHP/fgc/index.php'></iframe>
<input type=hidden id=placegeo value=''></input>
<div id=mtodiv></div>
</body>
</html>