<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Australia Place Crowfly Distances - RJM Programming - April, 2019 ... thanks to https://www.matthewproctor.com/australian_postcodes</title>
<style>
div { background-color:yellow; width:100%; text-align:center; height:25px; }
td { text-align:center; }
/* Fading in popup window greying out the rest of the page ... thanks to https://github.com/twbs/bootstrap/issues/8723 */
/* Outer */
.popup {
width:100%;
height:100%;
display:none;
position:fixed;
top:0px;
left:0px;
background:rgba(0,0,0,0.75);
z-index:1000;
}
/* Inner */
.popup-inner {
max-width:550px;
height:550px;
width:100%;
padding:40px;
position:absolute;
top:50%;
left:50%;
-webkit-transform:translate(-50%, -50%);
transform:translate(-50%, -50%);
background:#fff;
text-align:center;
border: 1px solid red;
}
.popup-inner input.SlimBorder {
width:97%;
border: 1px silver solid;
}
.popup-inner a.SmallLink {
font-size:14px;
color:#f15927;
}
.popup-inner a.SmallLink:hover {
font-size:14px;
color:#f15927;
text-decoration:underline;
}
.popup-inner .SmallLetters td {
font-size:10pt;
}
.popup-close {
text-decoration: none;
float: left;
}
/* End of Fading in popup window greying out the rest of the page */
.bw { background-color: white; }
</style>
<script type='text/javascript'>
var argsare='';
var statesuffix='', statewsuffix='';
var userlatitude=0.0, userlongitude=0.0;
var setofthree=0;
var fromok=false, took=false;
var ksuffix=' kilometres';
var http=' HTTP';
var precomma=',', comma=',', postcomma='';
var doneonce=false;
var postcodea=[];
var placea=[];
var lata=[];
var longa=[];
var ourarguments='';
var sofarlist=[];
var soarglist=[];
var popupwhere=null;
var wois=null, woistwo=null;
var angle=0;
var deviceWidth = window.orientation == 0 ? window.screen.width : window.screen.height;
var deviceHeight = window.orientation == 0 ? window.screen.height : window.screen.width;
var pinurl='';
var pmodewin='';
var pwh='';
var goes=0;
var geoprefix="//www.rjmprogramming.com.au/PHP/Map/map.php?title=Australian%20Postcode%20Places&onclick=y&label=%5b%27Lat%27,&value=%27Lon%27,%20%27Name%27%5d&width=7860.080&height=6875.068&arexplaces=y&aregeographicals=&peninfo=&data=";
geoprefix=geoprefix.replace('map.php','geo_chart.php').replace('/Map', '/GeoChart');
geoprefix=geoprefix.replace('&onclick=y', '&onclick=y&country=Country&popularity=Popularity');
precomma='';
comma='|';
postcomma=',2';
function stateb(inpc, divoi) {
var outo='';
var wymfs=['QLD','NSW','VIC','TAS','SA','ACT','NT','WA','WA'];
var wymfl=['Queensland','New South Wales','Victoria','Tasmania','South Australia','Australian Capital Territory','Northern Territory','Western Australia','West Australia'];
statesuffix='';
statewsuffix='';
if (inpc.indexOf(',') != -1) {
var usuff=inpc.split(',')[eval(-1 + inpc.split(',').length)].trim();
for (var ibc=0; ibc<wymfs.length; ibc++) {
if (inpc.toUpperCase() == wymfs[ibc]) {
statesuffix=',' + wymfs[ibc];
statewsuffix=',' + (' ' + wymfl[Math.min(ibc,7)]).replace(/\ /g,'_');
if (divoi) {
outo=divoi.innerHTML.replace(',' + divoi.innerHTML.split(',')[eval(-1 + divoi.innerHTML.split(',').length)], '')
divoi.innerHTML=outo;
return outo.toUpperCase();
}
return inpc.replace(',' + inpc.split(',')[eval(-1 + inpc.split(',').length)], '') + statesuffix;
} else if (inpc.toUpperCase() == wymfl[ibc].toUpperCase()) {
statesuffix=',' + wymfs[ibc];
statewsuffix=',' + (' ' + wymfl[Math.min(ibc,7)]).replace(/\ /g,'_');
if (divoi) {
outo=divoi.innerHTML.replace(',' + divoi.innerHTML.split(',')[eval(-1 + divoi.innerHTML.split(',').length)], '')
divoi.innerHTML=outo;
return outo.toUpperCase();
}
return inpc.replace(',' + inpc.split(',')[eval(-1 + inpc.split(',').length)], '') + statesuffix;
}
}
}
return inpc;
}
function fillcomparray(dataarr) {
var fldsa, ij, jk, cdelim='', thisplace='', lm=-1, xpc='';
//alert('dataarr.length=' + dataarr.length);
for (ij=1; ij<dataarr.length; ij++) {
if ((dataarr[ij] + ' ').substring(0,1) >= '0' && (dataarr[ij] + ' ').substring(0,1) <= '9') {
fldsa=dataarr[ij].split(',');
//postcodea.push(fldsa[0]);
xpc=fldsa[0];
cdelim='';
thisplace='';
lm=-1;
for (jk=1; jk<fldsa.length; jk++) {
if ((fldsa[jk] + ' ').substring(0,1) == '-' || ((fldsa[jk] + ' ').substring(0,1) >= '0' && (fldsa[jk] + ' ').substring(0,1) <= '9')) { if (lm < 0) { lm=jk; } }
if (lm == -1) {
thisplace+=cdelim + fldsa[jk];
cdelim=',';
}
}
if (fldsa[lm].match(/^[0-9-.]*$/) && fldsa[eval(1 + eval('' + lm))].match(/^[0-9-.]*$/)) {
postcodea.push(xpc);
//console.log(thisplace);
//if (thisplace.toLowerCase() == 'alice springs') { alert(xpc); }
placea.push(thisplace);
longa.push(fldsa[lm]);
lm++;
lata.push(fldsa[lm]);
}
}
}
}
function nearestto(ogset, ogtwoset, gset) {
var iou=0, outset=gset, this_lat=0.0, this_long=0.0, this_diff=-1.0, smallest_diff=-1.0, largest_diff=-1.0, smallest_num=0;
var sofar=';', pa='';
var things=[];
if (sofarlist.length < 1) {
sofarlist.push(ogset.innerHTML + ", " + ogtwoset.innerHTML);
} else {
if (sofarlist[eval(-1 + sofarlist.length)] != ogset.innerHTML + ", " + ogtwoset.innerHTML) {
sofarlist.push(ogset.innerHTML + ", " + ogtwoset.innerHTML);
}
}
ourarguments='?title=' + encodeURIComponent('Australian Postcode Places Nearby ' + ogset.innerHTML + ', ' + ogtwoset.innerHTML) + '&onclick=y&label=%5b%27Lat%27,&value=%27Lon%27,%20%27Name%27%5d&data=';
if (postcodea.length > 1) {
this_long=eval(gset.split(' ')[0].split(',')[1]);
this_lat=eval(gset.split(' ')[0].split(',')[0]);
for (iou=0; iou<postcodea.length; iou++) {
//alert(longa[iou] + ',' + lata[iou] + ' ---' + this_long + ',' + this_lat);
this_diff=eval(Math.abs(eval(('' + this_long)) - eval(('' + longa[iou]))) + Math.abs(eval(('' + this_lat)) - eval(('' + lata[iou]))));
//alert('' + this_diff + ' ' + longa[iou] + ',' + lata[iou] + ' ---' + this_long + ',' + this_lat);
if (this_diff < 20 && this_diff > 0.00001) {
sofar+='' + iou + '+' + placea[iou] + '+' + longa[iou] + '+' + lata[iou] + '-' + this_diff + ';';
things.push('' + eval(1000000.0 + eval('' + this_diff)) + ' ~' + lata[iou] + '~' + longa[iou] + '~ near to ' + placea[iou] + ',' + postcodea[iou]);
if (smallest_diff < 0.0 || eval('' + this_diff) < eval('' + smallest_diff)) {
smallest_diff=this_diff;
smallest_num=iou;
}
if (largest_diff < 0.0 || eval('' + this_diff) > eval('' + largest_diff)) {
largest_diff=this_diff;
}
} else if (this_diff < 20 && this_diff <= 0.00001) {
if (soarglist.length < 1) {
//alert(',%20[' + lata[iou] + ',' + longa[iou] + ',~' + encodeURIComponent(placea[iou] + ',' + postcodea[iou]) + '~]');
soarglist.push(',%20[' + lata[iou] + ',' + longa[iou] + ',~' + encodeURIComponent(placea[iou] + ',' + postcodea[iou]) + '~]');
} else {
if (soarglist[eval(-1 + soarglist.length)].indexOf(',%20[' + lata[iou] + ',' + longa[iou] + ',~') != 0) {
//alert(',%20[' + lata[iou] + ',' + longa[iou] + ',~' + encodeURIComponent(placea[iou] + ',' + postcodea[iou]) + '~]');
soarglist.push(',%20[' + lata[iou] + ',' + longa[iou] + ',~' + encodeURIComponent(placea[iou] + ',' + postcodea[iou]) + '~]');
}
}
if (ourarguments.indexOf('[' + lata[iou] + ',' + longa[iou] + ',') == -1) {
ourarguments+=',%20[' + lata[iou] + ',' + longa[iou] + ',~' + encodeURIComponent(placea[iou] + ',' + postcodea[iou]) + '~]';
}
}
}
things.sort();
if (ourarguments.indexOf('[' + lata[smallest_num] + ',' + longa[smallest_num] + ',') == -1) {
outset+=' near to ' + placea[smallest_num] + ',' + postcodea[smallest_num];
ourarguments+=',%20[' + lata[smallest_num] + ',' + longa[smallest_num] + ',~' + encodeURIComponent(placea[smallest_num] + ',' + postcodea[smallest_num]) + '~]';
pa="//www.rjmprogramming.com.au/PHP/Map/map.php" + ourarguments;
for (iou=0; iou<=15; iou++) {
if (things.length > iou && outset.indexOf(things[iou].split(' near to ')[1]) == -1) {
outset+=' and near to ' + things[iou].split(' near to ')[1];
if (pa.indexOf(things[iou].split('~')[1] + 'X,X' + things[iou].split('~')[2]) == -1) { pa+=',%20[' + things[iou].split('~')[1] + ',' + things[iou].split('~')[2] + ',~' + encodeURIComponent(things[iou].split(' near to ')[1]) + '~]'; }
if (pa.length < 751) { ourarguments='?' + pa.split('?')[1]; }
//alert(things[iou] + ' ... ' + outset);
}
}
}
//alert(("http://www.rjmprogramming.com.au/PHP/Map/map.php" + ourarguments).length);
//ourarguments='';
//alert('' + ourarguments.length + ' ... ' + ourarguments);
// Modal backdrop below ...
if (ogset.innerHTML != '') {
ogset.onclick=function() {
document.getElementById('mypopup').style.display='block';
document.getElementById('mypopup-inner').style.display='block';
if (1 == 1) {
//alert(("//www.rjmprogramming.com.au/PHP/Map/map.php" + ourarguments).length + ' ... ' + ourarguments.substring(0,800));
document.getElementById('myiframe').src="//www.rjmprogramming.com.au/PHP/Map/map.php" + ourarguments;
} else {
document.getElementById('mypopup-inner').innerHTML='<a title="Close" id="alertclose" class="popup-close" data-popup-close="popup-alert" onclick=" if (wois) { woistwo=wois; setTimeout(woisclose,60000); wois=null; } event.stopPropagation(); document.getElementById(' + "'" + 'mypopup' + "'" + ').style.display=' + "'" + 'none' + "'" + ';" href="#">❌</a><br><iframe onclick=" event.stopPropagation(); " src="//www.rjmprogramming.com.au/PHP/Map/map.php' + ourarguments + '" id=myiframe style="width:500px;height:500px;"></iframe>';
}
};
}
if (ogtwoset.innerHTML != '') {
ogtwoset.onclick=function() {
document.getElementById('mypopup').style.display='block';
document.getElementById('mypopup-inner').style.display='block';
if (1 == 1) {
//alert("0:" + ("//www.rjmprogramming.com.au/PHP/Map/map.php" + ourarguments).length);
document.getElementById('myiframe').src="//www.rjmprogramming.com.au/PHP/Map/map.php" + ourarguments;
} else {
document.getElementById('mypopup-inner').innerHTML='<a title="Close" id="alertclose" class="popup-close" data-popup-close="popup-alert" onclick=" if (wois) { woistwo=wois; setTimeout(woisclose,60000); wois=null; } event.stopPropagation(); document.getElementById(' + "'" + 'mypopup' + "'" + ').style.display=' + "'" + 'none' + "'" + ';" href="#">❌</a><br><iframe onclick=" event.stopPropagation(); " src="//www.rjmprogramming.com.au/PHP/Map/map.php' + ourarguments + '" id=myiframe style="width:500px;height:500px;"></iframe>';
}
};
}
}
return outset;
}
function woisclose() {
if (woistwo) {
woistwo.close();
woistwo=null;
}
}
function windowopen(inurl, modewin, howwin) {
document.getElementById('mypopup').style.display='block';
document.getElementById('mypopup-inner').style.display='block';
if (!popupwhere) { popupwhere=document.getElementById('mypopup-inner').getBoundingClientRect(); }
//alert("//www.rjmprogramming.com.au/PHP/Map/map.php" + ourarguments.split('&data=')[0] + '&data=' + soarglist[eval(-1 + soarglist.length)] + soarglist[eval(-2 + soarglist.length)] + ' ... ' + inurl + "," + modewin + "," + 'top=' + ('' + popupwhere.top).replace('px','').split('.')[0] + ',left=' + ('' + popupwhere.left).replace('px','').split('.')[0] + ',width=' + ('' + popupwhere.width).replace('px','').split('.')[0] + ',height=' + ('' + popupwhere.height).replace('px','').split('.')[0]);
if (1 == 1) {
document.getElementById('myiframe').src="//www.rjmprogramming.com.au/PHP/Map/map.php" + ourarguments.split('&data=')[0] + '&data=' + soarglist[eval(-1 + soarglist.length)] + soarglist[eval(-2 + soarglist.length)];
} else {
document.getElementById('mypopup-inner').innerHTML='<a title="Close" id="alertclose" class="popup-close" data-popup-close="popup-alert" onclick=" if (wois) { woistwo=wois; setTimeout(woisclose,60000); wois=null; } event.stopPropagation(); document.getElementById(' + "'" + 'mypopup' + "'" + ').style.display=' + "'" + 'none' + "'" + ';" href="#">❌</a><br><iframe onclick=" event.stopPropagation(); " src="' + "//www.rjmprogramming.com.au/PHP/Map/map.php" + ourarguments.split('&data=')[0] + '&data=' + soarglist[eval(-1 + soarglist)] + soarglist[eval(-2 + soarglist)] + '" id=myiframe style="width:500px;height:500px;"></iframe>';
}
pinurl=inurl;
pmodewin=modewin;
pwh='width=' + ('' + eval(eval('' + popupwhere.width) / 2)).replace('px','').split('.')[0] + ',height=' + ('' + eval(eval('' + popupwhere.height) / 2)).replace('px','').split('.')[0];
//alert(inurl);
if (inurl.indexOf('/0,0/') == -1) {
if (wois != null) { woistwo=wois; setTimeout(woisclose,60000); wois=null; }
wois=window.open(inurl, modewin, 'width=' + ('' + eval(eval('' + popupwhere.width) / 2)).replace('px','').split('.')[0] + ',height=' + ('' + eval(eval('' + popupwhere.height) / 2)).replace('px','').split('.')[0] + ',screenY=' + ('' + popupwhere.top).replace('px','').split('.')[0] + ',screenX=' + ('' + popupwhere.left).replace('px','').split('.')[0]);
}
angle=10.0;
setTimeout(domoveto, 9000);
}
function domoveto() {
//alert('' + deviceWidth + ',' + deviceHeight);
var sone=deviceWidth;
if (deviceHeight < sone) { sone=deviceHeight; }
var topx=0.0, topy=0.0, xangle=angle;
//while (xangle <= 360.0) {
topx=eval(deviceWidth / 2.0) + Math.sin(xangle * Math.PI / 180.0) * eval(sone / 2.0);
topy=eval(deviceHeight / 2.0) - Math.cos(xangle * Math.PI / 180.0) * eval(sone / 2.0);
//alert('' + deviceWidth + ',' + deviceHeight + ': For angle=' + xangle + ' left=' + topx + ' and top=' + topy);
if (xangle >= 349.0) {
xangle=0.0;
} else {
xangle+=10.0;
}
//}
angle=xangle;
if (wois) {
//document.title='' + eval(('' + topx).split('.')[0]) + ',' + eval(('' + topy).split('.')[0]);
if (1 == 1) {
if (wois != null) { woistwo=wois; setTimeout(woisclose,60000); wois=null; }
pinurl+='0';
//document.title='wois=window.open(' + pinurl + ',' + pmodewin + ',' + pwh + ',screenY=' + eval(('' + topy).split('.')[0]) + ',screenX=' + eval(('' + topx).split('.')[0]) + ')';
var pwhx=pwh + ',screenY=' + eval(('' + topy).split('.')[0]) + ',screenX=' + eval(('' + topx).split('.')[0]);
wois=window.open(pinurl, pmodewin, pwhx);
//wois.focus();
} else {
wois.moveTo(eval(('' + topx).split('.')[0]), eval(('' + topy).split('.')[0]));
wois.focus();
}
//document.title='' + eval(('' + topx).split('.')[0]) + ',' + eval(('' + topy).split('.')[0]) + '.';
//document.title='' + eval(('' + topx).split('.')[0]) + ',' + eval(('' + topy).split('.')[0]) + '.0';
setTimeout(domoveto, 29000);
} else {
angle=0.0;
}
}
function later() {
//document.title=' ' + setofthree + ' ... ' + doneonce + ' +++ ' + userlatitude + ',' + userlongitude;
if (userlatitude == 0.0 && userlongitude == 0.0) {
document.getElementById('you').innerHTML='(0,0)';
if (document.getElementById('inlat') && document.getElementById('inlong')) {
document.getElementById('inlat').value=userlatitude;
document.getElementById('inlong').value=userlongitude;
}
if (document.getElementById('ipostcode')) {
document.getElementById('ipostcode').click();
newthree();
}
} else if (!doneonce) {
//alert('huh'+ setofthree);
if (document.getElementById('ipostcode')) {
//alert('' + setofthree);
document.getElementById('ipostcode').click();
newthree();
}
}
}
function getLocation() {
if (navigator.geolocation) {
try {
navigator.geolocation.getCurrentPosition(showPosition);
setTimeout(later, 1000);
} catch(err) {
setTimeout(later, 1000);
}
} else {
document.getElementById('you').innerHTML='(0,0)';
if (document.getElementById('inlat') && document.getElementById('inlong')) {
document.getElementById('inlat').value=userlatitude;
document.getElementById('inlong').value=userlongitude;
}
if (document.getElementById('ipostcode')) {
document.getElementById('ipostcode').click();
newthree();
}
}
}
function showPosition(position) {
if (userlatitude == 0.0 && userlongitude == 0.0) {
userlatitude=eval('' + position.coords.latitude);
userlongitude=eval('' + position.coords.longitude);
if (document.getElementById('inlat') && document.getElementById('inlong')) {
document.getElementById('inlat').value=userlatitude;
document.getElementById('inlong').value=userlongitude;
document.getElementById('you').innerHTML='you';
}
if (document.getElementById('ipostcode')) {
document.getElementById('ipostcode').click();
newthree();
}
}
}
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;
//https://www.google.com/maps/dir/Sydney,+New+South+Wales/Melbourne,+Victoria+3004/@-35.8140444,145.8111971,7z/data=!3m1!4b1!4m13!4m12!1m5!1m1!1s0x6b129838f39a743f:0x3017d681632a850!2m2!1d151.2092955!2d-33.8688197!1m5!1m1!1s0x6ad642af0f11fd81:0x5045675218ce7e0!2m2!1d144.963056!2d-37.813611
ksuffix=" <a title='Google Maps Directions' style='text-decoration:underline;cursor:pointer;' onclick=\"windowopen('//www.google.com/maps/dir/" + talis + ',' + gnolis + "/" + latis + "," + longis + "','_blank','top=50,left=50,width=900,height=600');\">kilometres</a>";
return eval(ourdist / 1000.0);
}
function newthree() {
var okay=true;
doneonce=true;
if (setofthree > 0) {
if (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').innerHTML == '' && document.getElementById('setofthree_' + eval(-1 + setofthree) + '_02').innerHTML == '') {
okay=false;
}
}
if (okay) {
//alert('here');
document.getElementById('mytbody').innerHTML+='<tr><td><div title="" contenteditable=true onblur=processone(this); id=setofthree_' + setofthree + '_01></div></td><td><div title="" contenteditable=true onblur=processone(this); id=setofthree_' + setofthree + '_02></div></td><td id=distfrom_' + setofthree + '></td><td></td><td></td></tr><tr><td></td><td></td><td id=dist_' + setofthree + '></td><td></td><td></td></tr><tr><td></td><td></td><td id=distto_' + setofthree + '></td><td><div title="" contenteditable=true onblur=processtwo(this); id=setofthree_' + setofthree + '_04></div></td><td><div title="" contenteditable=true onblur=processtwo(this); id=setofthree_' + setofthree + '_05></div></td></tr>';
setofthree++;
}
}
function ulit(ino, inpl) {
var divoi=ino;
var ibc=0;
var outo='';
var xstatesuffix='';
var xstatewsuffix='';
var suff='';
var inpc='', xzb=false;
var wymfs=['QLD','NSW','VIC','TAS','SA','ACT','NT','WA','WA'];
var wymfl=['Queensland','New South Wales','Victoria','Tasmania','South Australia','Australian Capital Territory','Northern Territory','Western Australia','West Australia'];
if (inpl == inpl.toLowerCase() || inpl == inpl.toUpperCase()) {
var outpl='', outdl='';
var wds=inpl.toLowerCase().split(' ');
for (var inb=0; inb<wds.length; inb++) {
if (wds[inb].length > 2 || outpl.replace('mt','').replace('st','') == '') {
outpl+=outdl + wds[inb].substring(0,1).toUpperCase() + (wds[inb] + ' ').substring(1).trim();
} else if (wds[inb] == 'po') {
outpl+=outdl + wds[inb].toUpperCase();
} else {
outpl+=outdl + wds[inb];
}
outdl=' ';
}
if (ino) { ino.innerHTML=outpl; }
if (document.getElementById('imageson').checked) {
if (('' + document.getElementById('mytable').outerHTML).split('>')[0].indexOf('15') == -1) {
document.getElementById('mytable').style.marginTop='149px';
} else {
document.getElementById('myh1').style.marginLeft='265px';
document.getElementById('myh3').style.marginLeft='265px';
document.getElementById('myh4').style.marginLeft='265px';
}
document.getElementById('sdesc').innerHTML=outpl + ' ';
suff=' ';
document.getElementById('sdesc').style.backgroundColor='white';
if (outpl.indexOf(',') != -1) {
inpc=outpl.split(',')[eval(-1 + outpl.split(',').length)].trim();
for (ibc=0; ibc<wymfs.length; ibc++) {
if (inpc.toUpperCase() == wymfs[ibc]) {
xstatesuffix=',' + wymfs[ibc];
xstatewsuffix=',' + (' ' + wymfl[Math.min(ibc,7)]).replace(/\ /g,'_');
if (divoi) {
outo=divoi.innerHTML.replace(',' + divoi.innerHTML.split(',')[eval(-1 + divoi.innerHTML.split(',').length)], '')
divoi.innerHTML=outo;
//return outo.toUpperCase();
}
//return inpc.replace(',' + inpc.split(',')[eval(-1 + inpc.split(',').length)], '') + statesuffix;
} else if (inpc.toUpperCase() == wymfl[ibc].toUpperCase()) {
xstatesuffix=',' + wymfs[ibc];
xstatewsuffix=',' + (' ' + wymfl[Math.min(ibc,7)]).replace(/\ /g,'_');
if (divoi) {
outo=divoi.innerHTML.replace(',' + divoi.innerHTML.split(',')[eval(-1 + divoi.innerHTML.split(',').length)], '')
divoi.innerHTML=outo;
//return outo.toUpperCase();
}
//return inpc.replace(',' + inpc.split(',')[eval(-1 + inpc.split(',').length)], '') + statesuffix;
}
}
if (xstatesuffix != '') {
argsare='';
statesuffix=xstatesuffix;
statewsuffix=xstatewsuffix;
document.getElementById('tzi').src=document.getElementById('tzi').src.split('?')[0] + '?tzexact=' + encodeURIComponent(outpl.replace(',' + outpl.split(',')[eval(-1 + outpl.split(',').length)],'')) + '&tznickname=' + encodeURIComponent(outpl.replace(',' + outpl.split(',')[eval(-1 + outpl.split(',').length)],'').replace(/_/g,' ')) + '&avaJUNKtar=multiply&trysuff=' + encodeURIComponent(',_' + noshort(outpl.split(',')[eval(-1 + outpl.split(',').length)].trim().replace(/\ /g,'_'))); // + avatar_at;
} else {
argsare='?tzexact=' + encodeURIComponent(outpl) + '&tznickname=' + encodeURIComponent(outpl.replace(/_/g,' ')) + '&avaJUNKtar=multiply'; // + avatar_at;
}
} else {
argsare='?tzexact=' + encodeURIComponent(outpl) + '&tznickname=' + encodeURIComponent(outpl.replace(/_/g,' ')) + '&avaJUNKtar=multiply'; // + avatar_at;
}
} else if (('' + document.getElementById('mytable').outerHTML).indexOf('15') != -1) {
document.getElementById('mytable').style.marginTop='0px';
if (1 == 2) { document.getElementById('sdesc').innerHTML=''; }
} else if (1 == 2) {
document.getElementById('sdesc').innerHTML='';
}
goes++;
if (goes == 2) {
document.getElementById('ourcanvas').style.height='100%';
}
return outpl + suff;
} else {
if (document.getElementById('imageson').checked) {
if (('' + document.getElementById('mytable').outerHTML).split('>')[0].indexOf('15') == -1) {
document.getElementById('mytable').style.marginTop='149px';
} else {
document.getElementById('myh1').style.marginLeft='265px';
document.getElementById('myh3').style.marginLeft='265px';
document.getElementById('myh4').style.marginLeft='265px';
}
document.getElementById('sdesc').innerHTML=inpl + ' ';
suff=' ';
document.getElementById('sdesc').style.backgroundColor='white';
if (inpl.indexOf(',') != -1) {
inpc=inpl.split(',')[eval(-1 + inpl.split(',').length)].trim();
for (ibc=0; ibc<wymfs.length; ibc++) {
if (inpc.toUpperCase() == wymfs[ibc]) {
xstatesuffix=',' + wymfs[ibc];
xstatewsuffix=',' + (' ' + wymfl[Math.min(ibc,7)]).replace(/\ /g,'_');
if (divoi) {
outo=divoi.innerHTML.replace(',' + divoi.innerHTML.split(',')[eval(-1 + divoi.innerHTML.split(',').length)], '')
divoi.innerHTML=outo;
//return outo.toUpperCase();
}
//return inpc.replace(',' + inpc.split(',')[eval(-1 + inpc.split(',').length)], '') + statesuffix;
} else if (inpc.toUpperCase() == wymfl[ibc].toUpperCase()) {
xstatesuffix=',' + wymfs[ibc];
xstatewsuffix=',' + (' ' + wymfl[Math.min(ibc,7)]).replace(/\ /g,'_');
if (divoi) {
outo=divoi.innerHTML.replace(',' + divoi.innerHTML.split(',')[eval(-1 + divoi.innerHTML.split(',').length)], '')
divoi.innerHTML=outo;
//return outo.toUpperCase();
}
//return inpc.replace(',' + inpc.split(',')[eval(-1 + inpc.split(',').length)], '') + statesuffix;
}
}
if (xstatesuffix != '') {
argsare='';
statesuffix=xstatesuffix;
statewsuffix=xstatewsuffix;
document.getElementById('tzi').src=document.getElementById('tzi').src.split('?')[0] + '?tzexact=' + encodeURIComponent(inpl.replace(',' + inpl.split(',')[eval(-1 + inpl.split(',').length)],'')) + '&tznickname=' + encodeURIComponent(inpl.replace(',' + inpl.split(',')[eval(-1 + inpl.split(',').length)],'').replace(/_/g,' ')) + '&avaJUNKtar=multiply&trysuff=' + encodeURIComponent(',_' + noshort(inpl.split(',')[eval(-1 + inpl.split(',').length)].trim().replace(/\ /g,'_'))); // + avatar_at;
} else {
argsare='?tzexact=' + encodeURIComponent(inpl) + '&tznickname=' + encodeURIComponent(inpl.replace(/_/g,' ')) + '&avaJUNKtar=multiply'; // + avatar_at;
}
} else {
argsare='?tzexact=' + encodeURIComponent(inpl) + '&tznickname=' + encodeURIComponent(inpl.replace(/_/g,' ')) + '&avaJUNKtar=multiply'; // + avatar_at;
}
} else if (('' + document.getElementById('mytable').outerHTML).indexOf('15') != -1) {
document.getElementById('mytable').style.marginTop='0px';
if (1 == 2) { document.getElementById('sdesc').innerHTML=''; }
} else if (1 == 2) {
document.getElementById('sdesc').innerHTML='';
}
goes++;
if (goes == 2) {
document.getElementById('ourcanvas').style.height='100%';
}
return inpl + suff;
}
}
function noshort(inz) {
var outz=inz;
var wymfs=['QLD','NSW','VIC','TAS','SA','ACT','NT','WA','WA'];
var wymfl=['Queensland','New South Wales','Victoria','Tasmania','South Australia','Australian Capital Territory','Northern Territory','Western Australia','West Australia'];
document.getElementById('sdesc').innerHTML=document.getElementById('sdesc').innerHTML.replace(inz, ' ' + outz.replace('QLD','Queensland').replace('NSW','New South Wales').replace('VIC','Victoria').replace('TAS','Tasmania').replace('SA','South Australia').replace('ACT','Australian Capital Territory').replace('NT','Northern Territory').replace('WA','Western Australia'));
return outz.replace('QLD','Queensland').replace('NSW','New South Wales').replace('VIC','Victoria').replace('TAS','Tasmania').replace('SA','South Australia').replace('ACT','Australian Capital Territory').replace('NT','Northern Territory').replace('WA','Western Australia').replace(/\ /g,'_');
}
function postargs(inz) {
var ipc=5;
var pcone=['4','2','3','7','5','2600-2617;2900-2914','0','6','6']
var wymfs=['QLD','NSW','VIC','TAS','SA','ACT','NT','WA','WA'];
var wymfl=['Queensland','New South Wales','Victoria','Tasmania','South Australia','Australian Capital Territory','Northern Territory','Western Australia','West Australia'];
//alert('argsare=' + argsare)
if (argsare != '') {
if (inz == '0221' || inz == '0200') {
document.getElementById('tzi').src=document.getElementById('tzi').src.split('?')[0] + argsare.replace('tzexact','tzexact') + '&trysuff=' + encodeURIComponent(',_Australian_Capital_Territory'); // + avatar_at;
argsare='';
} else if ((inz + ' ').substring(0,1) == '2') {
if ((eval(inz) >= 2600 && eval(inz) <= 2617) || (eval(inz) >= 2900 && eval(inz) <= 2914)) {
document.getElementById('tzi').src=document.getElementById('tzi').src.split('?')[0] + argsare.replace('tzexact','tzexact') + '&trysuff=' + encodeURIComponent(',_Australian_Capital_Territory'); // + avatar_at;
argsare='';
} else {
document.getElementById('tzi').src=document.getElementById('tzi').src.split('?')[0] + argsare.replace('tzexact','tzexact') + '&trysuff=' + encodeURIComponent(',_New_South_Wales'); // + avatar_at;
argsare='';
}
} else if ((inz + ' ').substring(0,1) == '4') {
document.getElementById('tzi').src=document.getElementById('tzi').src.split('?')[0] + argsare.replace('tzexact','tzexact') + '&trysuff=' + encodeURIComponent(',_Queensland'); // + avatar_at;
argsare='';
} else if ((inz + ' ').substring(0,1) == '3') {
document.getElementById('tzi').src=document.getElementById('tzi').src.split('?')[0] + argsare.replace('tzexact','tzexact') + '&trysuff=' + encodeURIComponent(',_Victoria'); // + avatar_at;
argsare='';
} else if ((inz + ' ').substring(0,1) == '7') {
document.getElementById('tzi').src=document.getElementById('tzi').src.split('?')[0] + argsare.replace('tzexact','tzexact') + '&trysuff=' + encodeURIComponent(',_Tasmania'); // + avatar_at;
argsare='';
} else if ((inz + ' ').substring(0,1) == '5') {
document.getElementById('tzi').src=document.getElementById('tzi').src.split('?')[0] + argsare.replace('tzexact','tzexact') + '&trysuff=' + encodeURIComponent(',_South_Australia'); // + avatar_at;
argsare='';
} else if ((inz + ' ').substring(0,1) == '0') {
//alert(document.getElementById('tzi').src.split('?')[0] + argsare + '&trysuff=' + encodeURIComponent(',_Northern_Territory'));
document.getElementById('tzi').src=document.getElementById('tzi').src.split('?')[0] + argsare.replace('tzexact','tzexact') + '&trysuff=' + encodeURIComponent(',_Northern_Territory'); // + avatar_at;
argsare='';
} else if ((inz + ' ').substring(0,1) == '6') {
document.getElementById('tzi').src=document.getElementById('tzi').src.split('?')[0] + argsare.replace('tzexact','tzexact') + '&trysuff=' + encodeURIComponent(',_Western_Australia'); // + avatar_at;
argsare='';
}
if (argsare != '') {
document.getElementById('tzi').src=document.getElementById('tzi').src.split('?')[0] + argsare; // + '&trysuff=' + encodeURIComponent(',_Western_Australia'); // + avatar_at;
argsare='';
}
}
return inz;
}
function processone(indivo) {
var pcone=['4','2','3','7','5','2600-2617;2900-2914','0','6','6']
var wymfs=['QLD','NSW','VIC','TAS','SA','ACT','NT','WA','WA'];
var wymfl=['Queensland','New South Wales','Victoria','Tasmania','South Australia','Australian Capital Territory','Northern Territory','Western Australia','West Australia'];
var findit=[], ii, jj=1, kk, uul='';
if (indivo.innerHTML.trim() != '') {
//alert(31);
if (postcodea.length <= 1 && document.getElementById('apll')) { fillcomparray(document.getElementById('apll').value.split(';')); }
if (indivo.id.indexOf('_02') != -1) {
//alert(3331);
findit=document.getElementById('apll').value.split(';' + ('0000' + indivo.innerHTML).slice(-4) + ',');
if (findit.length > 1) {
if (document.getElementById(indivo.id.replace('_02','_01')).innerHTML == '') {
if (('0000' + indivo.innerHTML).slice(-4) != indivo.innerHTML) { indivo.innerHTML=postargs(('0000' + indivo.innerHTML).slice(-4)); }
uul=ulit(null, findit[1].split(',')[0]);
document.getElementById(indivo.id.replace('_02','_01')).innerHTML=uul.trim();
if (uul != uul.trim()) {
document.getElementById(indivo.id.replace('_02','_01')).onmousedown=function() { ait(null, eval("'" + uul.trim() + "'")); }
document.getElementById(indivo.id.replace('_02','_01')).ontouchdown=function() { ait(null, eval("'" + uul.trim() + "'")); }
document.getElementById(indivo.id.replace('_02','_01')).style.cursor='pointer';
}
}
}
} else {
//alert(43331);
uul=ulit(indivo,indivo.innerHTML);
for (ii=0; ii<10; ii++) {
if (findit.length <= 1) {
//alert('53331 ' + document.getElementById('apll').value.length);
findit=document.getElementById('apll').value.replace(/[A-Z]\,Delivery\ Area/g, '1,Delivery Area').split('' + ii + ',' + stateb(uul.toUpperCase().trim(),indivo) + '');
jj=-1;
for (kk=1; kk<findit.length; kk++) {
if (jj < 1) {
if (findit[kk].split(',')[eval(8 - indivo.innerHTML.split(',').length)].indexOf('Removed') == -1) {
if (findit[kk].split(',')[eval(3 - indivo.innerHTML.split(',').length)].replace('-','').substring(0,1) >= '0' && findit[kk].split(',')[eval(3 - indivo.innerHTML.split(',').length)].replace('-','').substring(0,1) <= '9') {
if (findit[kk].split(',')[eval(4 - indivo.innerHTML.split(',').length)].replace('-','').substring(0,1) >= '0' && findit[kk].split(',')[eval(4 - indivo.innerHTML.split(',').length)].replace('-','').substring(0,1) <= '9') {
jj=kk;
//alert('1:' + findit[eval(-1 + kk)].split(';')[eval(-1 + findit[eval(-1 + kk)].split(';').length)] + ii);
//alert(findit[eval(-1 + kk)].slice(-100) + ' 2:' + findit[eval(-1 + kk)].split(';')[eval(-1 + findit[eval(-1 + kk)].split(';').length)]);
document.getElementById(indivo.id.replace('_01','_02')).innerHTML=postargs(('0000' + findit[eval(-1 + kk)].split(';')[eval(-1 + findit[eval(-1 + kk)].split(';').length)] + ii).slice(-4));
if (uul != uul.trim()) {
document.getElementById(indivo.id.replace('_02','_01')).onmousedown=function() { ait(null, eval("'" + uul.trim() + "'")); }
document.getElementById(indivo.id.replace('_02','_01')).ontouchdown=function() { ait(null, eval("'" + uul.trim() + "'")); }
document.getElementById(indivo.id.replace('_02','_01')).style.cursor='pointer';
}
}
}
}
}
}
if (jj < 1) { findit=[]; }
}
}
}
if (findit.length > 1) {
//alert(63331);
document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').title=nearestto(document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01'), document.getElementById('setofthree_' + eval(-1 + setofthree) + '_02'), findit[jj].split(',')[eval(4 - indivo.innerHTML.split(',').length)] + ',' + findit[jj].split(',')[eval(3 - indivo.innerHTML.split(',').length)]);
fromok=true;
if (fromok && took) {
calcdist();
}
}
}
}
function processtwo(indivo) {
var wymfs=['QLD','NSW','VIC','TAS','SA','ACT','NT','WA','WA'];
var wymfl=['Queensland','New South Wales','Victoria','Tasmania','South Australia','Australian Capital Territory','Northern Territory','Western Australia','West Australia'];
var findit=[], ii, jj=1, kk, uul='';
if (indivo.innerHTML.trim() != '') {
//alert(1);
if (postcodea.length <= 1 && document.getElementById('apll')) {
fillcomparray(document.getElementById('apll').value.split(';'));
//alert(11);
}
if (indivo.id.indexOf('_05') != -1) {
//alert(111);
findit=document.getElementById('apll').value.split(';' + ('0000' + indivo.innerHTML).slice(-4) + ',');
if (findit.length > 1) {
if (document.getElementById(indivo.id.replace('_05','_04')).innerHTML == '') {
if (('0000' + indivo.innerHTML).slice(-4) != indivo.innerHTML) { indivo.innerHTML=postargs(('0000' + indivo.innerHTML).slice(-4)); }
uul=ulit(null, findit[1].split(',')[0]);
document.getElementById(indivo.id.replace('_05','_04')).innerHTML=uul.trim();
if (uul != uul.trim()) {
document.getElementById(indivo.id.replace('_05','_04')).onmousedown=function() { ait(null, eval("'" + uul.trim() + "'")); }
document.getElementById(indivo.id.replace('_05','_04')).ontouchdown=function() { ait(null, eval("'" + uul.trim() + "'")); }
document.getElementById(indivo.id.replace('_05','_04')).style.cursor='pointer';
}
}
}
} else {
//alert(1111);
uul=ulit(indivo,indivo.innerHTML);
for (ii=0; ii<10; ii++) {
if (findit.length <= 1) {
findit=document.getElementById('apll').value.replace(/[A-Z]\,Delivery\ Area/g, '1,Delivery Area').split('' + ii + ',' + stateb(uul.toUpperCase().trim(),indivo) + '');
jj=-1;
for (kk=1; kk<findit.length; kk++) {
if (jj < 1) {
if (findit[kk].split(',')[eval(8 - indivo.innerHTML.split(',').length)].indexOf('Removed') == -1) {
if (findit[kk].split(',')[eval(3 - indivo.innerHTML.split(',').length)].replace('-','').substring(0,1) >= '0' && findit[kk].split(',')[eval(3 - indivo.innerHTML.split(',').length)].replace('-','').substring(0,1) <= '9') {
if (findit[kk].split(',')[eval(4 - indivo.innerHTML.split(',').length)].replace('-','').substring(0,1) >= '0' && findit[kk].split(',')[eval(4 - indivo.innerHTML.split(',').length)].replace('-','').substring(0,1) <= '9') {
jj=kk;
document.getElementById(indivo.id.replace('_04','_05')).innerHTML=postargs(('0000' + findit[eval(-1 + kk)].split(';')[eval(-1 + findit[eval(-1 + kk)].split(';').length)] + ii).slice(-4));
if (uul != uul.trim()) {
document.getElementById(indivo.id.replace('_05','_04')).onmousedown=function() { ait(null, eval("'" + uul.trim() + "'")); }
document.getElementById(indivo.id.replace('_05','_04')).ontouchdown=function() { ait(null, eval("'" + uul.trim() + "'")); }
document.getElementById(indivo.id.replace('_05','_04')).style.cursor='pointer';
}
}
}
}
}
}
if (jj < 1) { findit=[]; }
}
}
}
if (findit.length > 1) {
//alert(211);
document.getElementById('setofthree_' + eval(-1 + setofthree) + '_05').title=nearestto(document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04'), document.getElementById('setofthree_' + eval(-1 + setofthree) + '_05'), findit[jj].split(',')[eval(4 - indivo.innerHTML.split(',').length)] + ',' + findit[jj].split(',')[eval(3 - indivo.innerHTML.split(',').length)]);
took=true;
if (fromok && took) {
calcdist();
}
}
}
}
function calcdist() {
document.getElementById('distfrom_' + eval(-1 + setofthree)).innerHTML='(' + great_circle_distance(userlatitude, userlongitude, (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_02').title.split(' ')[0]).split(',')[0], (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_02').title.split(' ')[0]).split(',')[1]).toFixed(1); // + ' kilometres)';
document.getElementById('distfrom_' + eval(-1 + setofthree)).innerHTML+=ksuffix + ')';
ksuffix=' kilometres';
document.getElementById('distto_' + eval(-1 + setofthree)).innerHTML='(' + great_circle_distance(userlatitude, userlongitude, (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_05').title.split(' ')[0]).split(',')[0], (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_05').title.split(' ')[0]).split(',')[1]).toFixed(1); // + ' kilometres)';
document.getElementById('distto_' + eval(-1 + setofthree)).innerHTML+=ksuffix + ')';
ksuffix=' kilometres';
document.getElementById('dist_' + eval(-1 + setofthree)).innerHTML='' + great_circle_distance((document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_02').title.split(' ')[0]).split(',')[0], (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_02').title.split(' ')[0]).split(',')[1], (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_05').title.split(' ')[0]).split(',')[0], (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_05').title.split(' ')[0]).split(',')[1]).toFixed(1); // + ' kilometres';
document.getElementById('dist_' + eval(-1 + setofthree)).innerHTML+=ksuffix;
ksuffix=' kilometres';
var murl=geoprefix;
console.log('00:' + murl);
if (document.getElementById('iap_get_ll').src.indexOf(geoprefix.split('?')[0]) == -1) {
document.getElementById('iap_get_ll').style.width='98%';
document.getElementById('iap_get_ll').style.height='1500px';
document.getElementById('iap_get_ll').style.display='inline-block';
document.getElementById('aiap_get_ll').innerHTML='^';
document.getElementById('diap_get_ll').style.display='block';
} else {
murl=document.getElementById('iap_get_ll').src;
console.log('0:' + murl);
}
if (eval((murl + precomma + '[' + (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_02').title.split(' ')[0]).split(',')[0] + comma + (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_02').title.split(' ')[0]).split(',')[1] + comma + '~' + encodeURIComponent(document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').innerHTML) + '~' + postcomma + ']').length) < 700) {
murl+=precomma + '[' + (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_02').title.split(' ')[0]).split(',')[0] + comma + (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_02').title.split(' ')[0]).split(',')[1] + comma + '~' + encodeURIComponent(document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').innerHTML) + '~' + postcomma + ']';
precomma=',';
console.log('1:' + murl);
}
if (eval((murl + ',[' + (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_05').title.split(' ')[0]).split(',')[0] + comma + (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_05').title.split(' ')[0]).split(',')[1] + comma + '~' + encodeURIComponent(document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04').innerHTML) + '~' + postcomma + ']').length) < 700) {
murl+=',[' + (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_05').title.split(' ')[0]).split(',')[0] + comma + (document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04').title.split(' ')[0] + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_05').title.split(' ')[0]).split(',')[1] + comma + '~' + encodeURIComponent(document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04').innerHTML) + '~' + postcomma + ']';
console.log('2:' + murl);
}
if (eval(murl.replace('&peninfo=', http.trim() + '.' + encodeURIComponent(document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').innerHTML + ',http.' + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04').innerHTML) + '&peninfo=').replace('&data=', http.substring(0,1).trim() + encodeURIComponent(document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').innerHTML + ',+' + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04').innerHTML) + '&data=').length) < 700) {
murl=murl.replace('&peninfo=', http.trim() + '.' + encodeURIComponent(document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').innerHTML + ',http.' + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04').innerHTML) + '&peninfo=').replace('&data=', http.substring(0,1).trim() + encodeURIComponent(document.getElementById('setofthree_' + eval(-1 + setofthree) + '_01').innerHTML + ',+' + document.getElementById('setofthree_' + eval(-1 + setofthree) + '_04').innerHTML) + '&data=');
console.log('3:' + murl);
}
http=',http';
document.getElementById('iap_get_ll').src=murl;
fromok=false;
took=false;
newthree();
}
function afterprogress() {
if (document.getElementById('apll')) {
document.getElementById('ourcanvas').cursor='pointer'; //document.getElementById('xbody').cursor='pointer';
} else {
setTimeout(afterprogress, 1000);
}
}
function couldbeinteresting(iois) {
if (iois != null && iois.src.indexOf('geo_chart.php') != -1) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
}
}
}
function placetopretz(iois) {
}
function ait(sio, sioih) {
if (sioih.trim() != '') {
window.open('//en.wikipedia.org/wiki/' + sioih.trim().replace(/\+/g, '_').replace(/\ /g, '_'), '_blank', 'top=50,left=50,width=600,height=600');
} else if (sio.innerHTML.trim() != '') {
window.open('//en.wikipedia.org/wiki/' + sio.innerHTML.trim().replace(/\+/g, '_').replace(/\ /g, '_'), '_blank', 'top=50,left=50,width=600,height=600');
}
}
</script>
</head>
<body style='width:100%;height:100vh;' id='ourcanvas' onload="this.cursor='progress'; document.getElementById('ipostcode').click(); afterprogress(); getLocation();">
<h1 id=myh1>Australia Place Crowfly Distances</h1>
<h3 id=myh3>RJM Programming - April, 2019</h3>
<h4 id=myh4>Thanks to <a target=_blank title='https://www.matthewproctor.com/australian_postcodes' href='//www.matthewproctor.com/australian_postcodes'>https://www.matthewproctor.com/australian_postcodes</a> and <a target=_blank title='Wikipedia, thanks' href='https://en.wikipedia.org/'>Wikipedia</a></h4>
<table border=10 style='width:95%;margin-top:152px;' id=mytable>
<thead>
<tr><th><span class=bw title='Eg. Newtown,NSW'>Australian Placename or ...</span></th><th><span class=bw>Australian Postcode</span></th><th>Show <span style='cursor:pointer;' id=sdesc title='Thanks to Wikipedia, and click/tap takes you to its webpage used, whether relevant or not' onclick="ait(this,'');"></span>Images <input type=checkbox id=imageson checked></input></th><th></th><th></th></tr>
<tr><th></th><th></th><th><span class=bw>Crowfly Distance</span> (kilometres from <span id=you>you</span>)</th><th></th><th></th></tr>
<tr><th></th><th></th><th></th><th><span class=bw title='Eg. Canberra'>Australian Placename or ...</span></th><th><span class=bw>Australian Postcode</span></th></tr>
</thead>
<tbody id=mytbody>
</tbody>
</table>
<form target='iap_get_ll' style='display:none;' method='POST' action='apgetll.php'>
<input type='hidden' name='inlat' id='inlat' value=''></input><input type='hidden' name='inlong' id='inlong' value=''></input>
<input type='hidden' name='spantodo' id='spantodo' value=''></input>
<input type='text' name='password' id='password' value='/apgetll.php'></input>
<input type='submit' style='display:none;' value='Postcode Distance' id='ipostcode'></input>
</form>
<div id='divapll' style='display:none;'></div>
<div style="width:100%;height:1800px;-webkit-overflow-scrolling:touch;overflow:scroll;display:none;" id='diap_get_ll'><a id=aiap_get_ll title='Back to top' href='#myh1' style='display:inline-block;width:10px;vertical-align:top;'></a><iframe onload='couldbeinteresting(this);' id='iap_get_ll' name='iap_get_ll' style='display:none;' src='apgetll.php'></iframe></div>
<input type=text style='position:absolute;top:-200px;left:-200px;' value=''></input>
<div id=mypopup class=popup style="display:none;"><div class=popup-inner id=mypopup-inner><a title="Close" id="alertclose" class="popup-close" data-popup-close="popup-alert" onclick=" if (wois) { woistwo=wois; setTimeout(woisclose,60000); wois=null; } event.stopPropagation(); document.getElementById('mypopup').style.display='none';" href="#">❌</a><br><iframe onclick=" event.stopPropagation(); " src="//www.rjmprogramming.com.au/PHP/Map/map.php?title=&onclick=y&label=%5b%27Lat%27,&value=%27Lon%27,%20%27Name%27%5d&data=" id=myiframe style="z-index:98;width:500px;height:500px;"></iframe></div></div>
<iframe onload='placetopretz(this);' style='display:none;' id=tzi src='../PHP/fgc/?tzlist=y&ccodetoo=y'></iframe>
<div id=stz style="display:none;"></div>
</body>
</html>