<html>
<title>Survey Traverse Calculation - RJM Programming - Copyright © 2013 rjmprogramming.com.au all rights reserved.</title>
<head>
<meta charset="utf-8">
<link href='//www.rjmprogramming.com.au/PHP/emboss_h1.css' rel='stylesheet' type='text/css'>
<style>
table {
border: 1px solid black;
}
.lightgray {
background-color: lightgray;
}
.lightblue {
background-color: lightblue;
}
.white {
background-color: white;
}
.lightgreen {
background-color: lightgreen;
}
.yellow {
background-color: yellow;
}
.cyellow {
color: yellow;
}
.pink {
background-color: pink;
}
#Eall {
background-color: pink;
}
#Nall {
background-color: pink;
}
.fatd {
color: blue;
}
</style>
<script>
var eesuffix="", nnsuffix="";
var edone=false, ndone=false;
var maxe=-1.0, mine=-1.0, maxn=-1.0, minn=-1.0;
var justen=-1;
var numlegs=0;
var firstidatac='';
var firstipen='';
var firstBearing=0;
var currb = 0.0;
var currx = 0.0;
var curry = 0.0;
var lastBearing="-0";
var hashsuff="";
var adjust=0;
var canvscale=1.0;
var lbbit = "";
var lbval = "";
var ballval = "";
var prmstr = window.location.search.substr(1).replace('numlegs=','');
var prmarr = prmstr.split ("&");
var params = {};
var parambits = {};
var enarr = {};
var enarrstr = "";
var eoff=0.0;
var noff=0.0;
var envials=[];
var pmb='127938';
var altpmb='';
var pvials=[];
var cnumlegs = location.search.split('numlegs=')[1] ? decodeURIComponent(location.search.split('numlegs=')[1].split('&')[0]) : '';
var wval='1112';
var hval='692';
var _escape_overrides = { 0x00:'\uFFFD',0x80:'\u20AC',0x82:'\u201A',0x83:'\u0192',0x84:'\u201E',0x85:'\u2026',0x86:'\u2020',0x87:'\u2021',0x88:'\u02C6',0x89:'\u2030',0x8A:'\u0160',0x8B:'\u2039',0x8C:'\u0152',0x8E:'\u017D',0x91:'\u2018',0x92:'\u2019',0x93:'\u201C',0x94:'\u201D',0x95:'\u2022',0x96:'\u2013',0x97:'\u2014',0x98:'\u02DC',0x99:'\u2122',0x9A:'\u0161',0x9B:'\u203A',0x9C:'\u0153',0x9E:'\u017E',0x9F:'\u0178' };
var locationhash=('' + location.hash);
if (locationhash != '') { if (('' + locationhash + ' ').substring(0,1) == '#') { locationhash=locationhash.replace('#',''); } }
var lhss=locationhash.split('#');
locationhash=lhss[0];
if (eval('' + lhss.length) >= 3) {
wval='' + lhss[1];
hval='' + lhss[2];
setTimeout(checkwh, 2000);
} else if (eval('' + lhss.length) == 2) {
wval='' + lhss[0];
hval='' + lhss[1];
locationhash='';
setTimeout(checkwh, 2000);
}
/**
* Convert a string to HTML entities ... thanks to https://stackoverflow.com/questions/18749591/encode-html-entities-in-javascript
*/
String.prototype.toHtmlEntities = function() {
return this.replace(/./gm, function(s) {
// return "" + s.charCodeAt(0) + ";";
return (s.match(/[a-z0-9\s]+/i)) ? s : "" + s.charCodeAt(0) + ";";
});
};
/**
* Create string from HTML entities
*/
String.fromHtmlEntities = function(string) {
return (string+"").replace(/\d+;/gm,function(s) {
return String.fromCharCode(s.match(/\d+/gm)[0]);
})
};
if (window.localStorage) {
// 34,56,78,45 ... ,
// 34,56,"One",78,45,"Two" ... ,"
// "One",34,56,"Two",78,45 ... ",
var acontt=decodeURIComponent(('' + localStorage.getItem('en_st')).replace(/^null$/g,'')).replace(/\+/g,' ');
if ((acontt + '~!@~').indexOf(' ~!@~') != -1) { eesuffix=" (Longitude)"; nnsuffix=" (Latitude)"; acontt=acontt.trim(); setTimeout(doazimuthgcd,3000); }
if (acontt != '') { localStorage.removeItem('en_st'); }
//alert(acontt);
var minicom=[];
var endelim=',';
if (acontt.indexOf(',"') != -1 && acontt.indexOf('",') != -1) {
if (eval('' + acontt.indexOf('",')) < eval('' + acontt.indexOf(',"'))) {
endelim='",';
} else {
endelim=',"';
}
} else if (acontt.indexOf(',"') != -1) {
endelim=',"';
} else if (acontt.indexOf('",') != -1) {
endelim='",';
}
var pfirst=true;
var pyoullneverfindthis='';
var jxv=0;
var xenvials=acontt.split(endelim);
xenvials.push('');
for (var ixv=0; ixv<xenvials.length; ixv++) {
if (xenvials[ixv] != '') {
if (endelim == ',"') {
pvials.push(xenvials[eval(1 + ixv)].split('"')[0]);
if (xenvials[ixv].indexOf('",') != -1) { xenvials[ixv]=xenvials[ixv].replace(xenvials[ixv].split('",')[0] + '",',''); }
minicom=xenvials[ixv].split(',');
for (jxv=0; jxv<minicom.length; jxv++) {
envials.push(minicom[jxv]);
}
} else if (endelim == '",') {
pvials.push(xenvials[ixv].split('"')[0]);
if (xenvials[eval(1 + ixv)].indexOf(',"') != -1) { xenvials[eval(1 + ixv)]=xenvials[eval(1 + ixv)].replace(',"' + xenvials[eval(1 + ixv)].split(',"')[0],''); }
minicom=xenvials[eval(1 + ixv)].split(',');
for (jxv=0; jxv<minicom.length; jxv++) {
envials.push(minicom[jxv]);
}
} else if (('' + xenvials[ixv]).trim() != '' && ('' + xenvials[ixv]).replace(/\ /g,'').replace(/\-/g,'').replace(/\./g,'').replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') {
//alert('envials.push(' + xenvials[ixv] + ');');
envials.push(xenvials[ixv]);
} else if (('' + xenvials[ixv]).replace(/\ /g,'').replace(/\-/g,'').replace(/\./g,'').replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') != pyoullneverfindthis) {
//alert('pvials.push(' + xenvials[ixv].replace(/\&\;/g,"&").replace(/\&apos\;/g,"'").replace(/\"\;/g,'"') + ')');
pvials.push(xenvials[ixv].replace(/\&\;/g,"&").replace(/\&apos\;/g,"'").replace(/\"\;/g,'"'));
if (pfirst) {
pfirst=false;
pyoullneverfindthis='youllnever_find_this';
}
} else {
//alert('envials.push(' + xenvials[ixv] + ')');
envials.push(xenvials[ixv]);
}
pfirst=false;
}
}
}
if (prmstr.replace('?numlegs=','').indexOf("=") != (0 - 1)) {
for ( var i = 0; i < prmarr.length; i++) {
var tmparr = prmarr[i].split("=");
params[tmparr[0]] = tmparr[1];
//alert(tmparr[1]);
numlegs = -1;
parambits = tmparr[1].split(",");
}
}
if (!String.fromCodePoint) { // thanks to http://xahlee.info/js/js_unicode_code_point.html
// ES6 Unicode Shims 0.1 , © 2012 Steven Levithan , MIT License
String.fromCodePoint = function fromCodePoint () {
var chars = [], point, offset, units, i;
for (i = 0; i < arguments.length; ++i) {
point = arguments[i];
offset = point - 0x10000;
units = point > 0xFFFF ? [0xD800 + (offset >> 10), 0xDC00 + (offset & 0x3FF)] : [point];
chars.push(String.fromCharCode.apply(null, units));
}
return chars.join("");
}
}
function escapeHtml(str) { // thanks to https://stackoverflow.com/questions/1354064/how-to-convert-characters-to-html-entities-using-plain-javascript
return str.replace(/([\u0000-\uD799]|[\uD800-\uDBFF][\uDC00-\uFFFF])/g, function(c) {
var c1 = c.charCodeAt(0);
// ascii character, use override or escape
if (c1 <= 0xFF) { return (c1=_escape_overrides[c1])?c1:escape(c).replace(/%(..)/g,'$1;'); }
// utf8/16 character
if (c.length == 1) { return '' + c1 + ';'; }
// surrogate pair
if (c.length == 2 && c1 >= 0xD800 && c1 <= 0xDBFF ) { return '' + ((c1-0xD800)*0x400 + c.charCodeAt(1) - 0xDC00 + 0x10000) + ';'; }
// no clue ..
return '';
});
}
function hexdec(hexString) { // thanks to https://locutus.io/php/math/hexdec/
// discuss at: https://locutus.io/php/hexdec/
// original by: Philippe Baumann
// example 1: hexdec('that')
// returns 1: 10
// example 2: hexdec('a0')
// returns 2: 160
hexString = (hexString + '').replace(/[^a-f0-9]/gi, '');
return parseInt(hexString, 16);
}
function emc(iho) {
var iv, newih='', newvalis='', ptsa=[], ipt=0, emsuf='', rbs='', elordstodo=[]; //, ihg, ihgs=[];
var ehv=iho.value;
var vsehv=escapeHtml(ehv); //.replace(/\&\#x20\;/g,' ').replace(/\&\#x28\;/g,'(').replace(/\&\#x29\;/g,')');
var vsehvs=vsehv.split('');
var proposedtitle='';
if (('' + iho.id + ' ').substring(0,1) == 'P') {
if (eval('' + vsehvs.length) > 1) {
for (iv=1; iv<vsehvs.length; iv++) {
elordstodo.push(vsehvs[iv].split(';')[0]);
}
for (iv=0; iv<elordstodo.length; iv++) {
vsehv=vsehv.replace('' + elordstodo[iv] + ';', String.fromCharCode(hexdec(elordstodo[iv])));
}
}
//console.log('vsehv=' + vsehv + ' and ehv=' + ehv);
if (ehv != vsehv || vsehv.indexOf('') != -1) {
ptsa=vsehv.split('');
newvalis=ptsa[0];
//newih='';
for (ipt=1; ipt<ptsa.length; ipt++) {
if (rbs == '') {
rbs=' (' + ptsa[ipt].split(';')[0].replace(/0/g,'zero').replace(/1/g,'one').replace(/2/g,'two').replace(/3/g,'three').replace(/4/g,'four').replace(/5/g,'five').replace(/6/g,'six').replace(/7/g,'seven').replace(/8/g,'eight').replace(/9/g,'nine') + ')';
} else {
rbs=rbs.replace(')', 'dot' + ptsa[ipt].split(';')[0].replace(/0/g,'zero').replace(/1/g,'one').replace(/2/g,'two').replace(/3/g,'three').replace(/4/g,'four').replace(/5/g,'five').replace(/6/g,'six').replace(/7/g,'seven').replace(/8/g,'eight').replace(/9/g,'nine') + ')');
}
proposedtitle+=' + String.fromCodePoint(' + ptsa[ipt].split(';')[0] + ')';
emsuf=ptsa[ipt].split(';')[0] + ';';
newih+='' + emsuf;
if (('' + ptsa[ipt]).split(emsuf)[1].trim() == '') {
newih+=('' + ptsa[ipt]).split(emsuf)[1];
} else {
newvalis+=('' + ptsa[ipt]).split(emsuf)[1];
}
}
iho.value=newvalis + rbs;
if (newih != '') {
document.getElementById('Q' + ('' + iho.id).substring(1)).innerHTML=newih;
//console.log(proposedtitle);
document.getElementById('Q' + ('' + iho.id).substring(1)).title=proposedtitle;
}
}
}
}
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 //en.wikipedia.org/wiki/Great-circle_distance ... thanks
//ourdist = eval(Math.round((Math.acos(acof) * 6371000.0) + 0.00001) * 100) / 100;
ourdist = eval((Math.acos(acof) * 6371000.0) + 0.00001);
return ourdist;
}
function doazimuthgcd() { // thanks to https://www.movable-type.co.uk/scripts/latlong.html
// dE0 (has E0 longitude and N0 latitude),dE1 etc dN0,dN1 etc
// Formula: θ = atan2( sin Δλ ⋅ cos φ2 , cos φ1 ⋅ sin φ2 − sin φ1 ⋅ cos φ2 ⋅ cos Δλ )
// where φ1,λ1 is the start point, φ2,λ2 the end point (Δλ is the difference in longitude)
//
// Formula: a = sin((1−f)⋅δ) / sin δ
// b = sin(f⋅δ) / sin δ
// x = a ⋅ cos φ1 ⋅ cos λ1 + b ⋅ cos φ2 ⋅ cos λ2
// y = a ⋅ cos φ1 ⋅ sin λ1 + b ⋅ cos φ2 ⋅ sin λ2
// z = a ⋅ sin φ1 + b ⋅ sin φ2
// φi = atan2(z, √x² + y²)
// λi = atan2(y, x)
// where f is fraction along great circle route (f=0 is point 1, f=1 is point 2), δ is the angular distance d/R between the two points.
var kjw=0, kkjw=1;
var thisaz=0.0, deltalong;
var thisazr=0.0, deltalongr;
var sparec=document.getElementById('tde').innerHTML;
if (document.getElementById('tde').innerHTML.indexOf('itude') != -1 && document.getElementById('tde').innerHTML.indexOf(' (') != -1) {
document.getElementById('tde').innerHTML=sparec.replace(' (',' (<font color=blue>').replace(')',')</font>');
sparec=document.getElementById('tdn').innerHTML;
document.getElementById('tdn').innerHTML=sparec.replace(' (',' (<font color=blue>').replace(')',')</font>');
sparec=document.getElementById('diffe').innerHTML;
document.getElementById('diffe').innerHTML='<font color=blue>First Azimuth </font><font color=blue size=1>(Last Azimuth)</font><font color=blue> / </font>' + sparec;
sparec=document.getElementById('diffn').innerHTML;
document.getElementById('diffn').innerHTML='<font color=blue>Great Circle Distance / </font>' + sparec;
while (document.getElementById('dE' + kjw)) {
deltalong=eval(eval(eval('' + document.getElementById('E' + kkjw).value) - eval('' + document.getElementById('E' + kjw).value)) * eval(Math.PI / 180.0));
deltalongr=eval(eval(eval('' + document.getElementById('E' + kjw).value) - eval('' + document.getElementById('E' + kkjw).value)) * eval(Math.PI / 180.0));
// Formula: θ = atan2( sin Δλ ⋅ cos φ2 , cos φ1 ⋅ sin φ2 − sin φ1 ⋅ cos φ2 ⋅ cos Δλ )
thisaz=
eval('' +
Math.atan2(
eval(
Math.sin(deltalong) *
Math.cos(eval(eval('' + document.getElementById('N' + kkjw).value) * eval(Math.PI / 180.0)))
),
eval(
eval(
Math.cos(eval(eval('' + document.getElementById('N' + kjw).value) * eval(Math.PI / 180.0))) *
Math.sin(eval(eval('' + document.getElementById('N' + kkjw).value) * eval(Math.PI / 180.0)))) -
eval(
Math.sin(eval(eval('' + document.getElementById('N' + kjw).value) * eval(Math.PI / 180.0))) *
Math.cos(eval(eval('' + document.getElementById('N' + kkjw).value) * eval(Math.PI / 180.0))) *
Math.cos(deltalong))
)
)) * eval(180.0 / Math.PI);
if (thisaz < 0.0) { thisaz+=360.0; }
thisazr=
eval('' +
Math.atan2(
eval(
Math.sin(deltalongr) *
Math.cos(eval(eval('' + document.getElementById('N' + kjw).value) * eval(Math.PI / 180.0)))
),
eval(
eval(
Math.cos(eval(eval('' + document.getElementById('N' + kkjw).value) * eval(Math.PI / 180.0))) *
Math.sin(eval(eval('' + document.getElementById('N' + kjw).value) * eval(Math.PI / 180.0)))) -
eval(
Math.sin(eval(eval('' + document.getElementById('N' + kkjw).value) * eval(Math.PI / 180.0))) *
Math.cos(eval(eval('' + document.getElementById('N' + kjw).value) * eval(Math.PI / 180.0))) *
Math.cos(deltalongr))
)
)) * eval(180.0 / Math.PI);
thisazr+=180.0;
if (thisazr < 0.0) { thisazr+=360.0; } else if (thisazr >= 360.0) { thisazr-=360.0; }
document.getElementById('dE' + kjw).className='fatd';
document.getElementById('dE' + kjw).innerHTML='' + thisaz + ' <font size=1>(' + thisazr + ')</font>';
document.getElementById('dE' + kjw).title=dechange(document.getElementById('dE' + kjw).innerHTML.split('<')[0].trim(), kjw, numlegs) + ' (' + dechange(document.getElementById('dE' + kjw).innerHTML.split('>(')[1].split(')<')[0], kjw, numlegs) + ')';
document.getElementById('dN' + kjw).innerHTML='<font color=blue>' + great_circle_distance(eval('' + document.getElementById('E' + kjw).value), eval('' + document.getElementById('N' + kjw).value), eval('' + document.getElementById('E' + kkjw).value), eval('' + document.getElementById('N' + kkjw).value)) + '</font>';
kjw++;
kkjw++;
}
//document.title+=' ... ' + kjw;
}
}
function ifzeromakezero(innum,e_or_n) {
var cinnum = innum.toString();
if (cinnum.indexOf("e-") != (0 - 1)) {
if (e_or_n == 1) {
if (!edone) {
mine=0.0;
maxe=0.0;
} else {
if (mine > 0.0) { mine=0.0; }
if (maxe < 0.0) { maxe=0.0; }
}
edone=true;
} else if (e_or_n == 2) {
if (!ndone) {
minn=0.0;
maxn=0.0;
} else {
if (minn > 0.0) { minn=0.0; }
if (maxn < 0.0) { maxn=0.0; }
}
ndone=true;
}
return 0.000;
}
if (e_or_n == 1) {
if (!edone) {
mine=innum;
maxe=innum;
} else {
if (mine > innum) { mine=innum; }
if (maxe < innum) { maxe=innum; }
}
edone=true;
} else if (e_or_n == 2) {
if (!ndone) {
minn=innum;
maxn=innum;
} else {
if (minn > innum) { minn=innum; }
if (maxn < innum) { maxn=innum; }
}
ndone=true;
}
return innum;
}
function postspanscheck() {
var eles=document.getElementsByTagName('span');
for (var ieles=0; ieles<eles.length; ieles++) {
if (('' + eles[ieles].style.zIndex) != '') {
if (('' + eles[ieles].style.zIndex).indexOf('-') != -1) {
eles[ieles].style.zIndex=('' + eles[ieles].style.zIndex).replace('-','');
eles[ieles].style.opacity='1.0';
document.getElementById(eles[ieles].id.replace('S','')).style.opacity='0.0';
} else {
eles[ieles].style.zIndex=('-' + eles[ieles].style.zIndex);
eles[ieles].style.opacity='0.0';
document.getElementById(eles[ieles].id.replace('S','')).style.opacity='1.0';
}
}
}
setTimeout(postspanscheck, 15000);
}
function docan() {
var sofart='';
//canvscale='0.1';
document.getElementById('dcanvas').innerHTML='<canvas style="transform-origin:0 0;transform:scale(' + canvscale + ');background-color:#f0f0f0;border:2px dashed red;" height=' + eval(500 + eval('' + maxn) - eval('' + minn)) + ' width=' + eval(700 + eval('' + maxe) - eval('' + mine)) + ' id=mycanvas></canvas>';
setTimeout(postspanscheck, 5000);
var ele=document.getElementById('mycanvas');
var context=document.getElementById('mycanvas').getContext('2d');
var iz=0, mto=true, grad;
// Red Orange Yellow Green Cyan Blue Violet
var pts = [[0, 0, "red"], [0, 0, "orange"], [0, 0, "yellow"], [0, 0, "green"], [0, 0, "cyan"], [0, 0, "blue"], [0, 0, "violet"]];
//var pts = [[0, 0, "red"], [0, 0, "green"], [0, 0, "blue"], [0, 0, "purple"], [0, 0, "olive"], [0, 0, "magenta"], [0, 0, "cyan"], [0, 0, "brown"], [0, 0, "black"], [0, 0, "pink"], [0, 0, "darkgreen"], [0, 0, "darkblue"], [0, 0, "darkorange"]];
var begin = pts[0];
var end = pts[1];
var sparec='';
while (document.getElementById('E' + iz)) {
if (document.getElementById('E' + iz).value != '') {
if (mto) {
context.lineWidth = 6;
context.lineJoin = "round";
context.lineCap = "round";
//context.strokeStyle = "black";
context.beginPath();
begin=pts[eval(iz % pts.length)];
begin[0] = eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine));
begin[1] = eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn));
context.moveTo(eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
if ((document.getElementById('P' + iz).value + document.getElementById('Q' + iz).innerHTML).trim() != '' && sofart.indexOf(document.getElementById('P' + iz).value + "," + eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)) + "," + eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn))) == -1) {
sofart+=document.getElementById('P' + iz).value + "," + eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)) + "," + eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn));
context.strokeStyle='blue'; //element.colour;
if (document.getElementById('Q' + iz).title == '') {
context.font = "48px Verdana";
context.strokeText(document.getElementById('P' + iz).value,eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
} else {
context.font = "48px Impact"; //Verdana";
if (document.getElementById('P' + iz).value.indexOf(' (') != -1) {
document.getElementById('P' + iz).value=document.getElementById('P' + iz).value.split('(zero')[0].split('(one')[0].split('(two')[0].split('(three')[0].split('(four')[0].split('(five')[0].split('(six')[0].split('(seven')[0].split('(eight')[0].split('(nine')[0].split('(dot')[0];
}
context.font = "48px Verdana";
context.strokeText(document.getElementById('P' + iz).value,eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
//eval("sparec='" + document.getElementById('P' + iz).value + "'" + document.getElementById('Q' + iz).title + ';');
eval("sparec=''" + document.getElementById('Q' + iz).title + ';');
context.font = "48px Impact"; //Verdana";
context.strokeText(sparec,eval(150 + (30 * eval('' + (' ' + document.getElementById('P' + iz).value).length)) + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
}
}
} else {
end=pts[eval(1 + eval(iz % 5))];
end[0] = eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine));
end[1] = eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn));
grad = context.createLinearGradient(begin[0], begin[1], end[0], end[1]);
grad.addColorStop(0, begin[2]);
grad.addColorStop(1, end[2]);
context.strokeStyle = grad;
context.lineTo(eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
context.stroke();
if ((document.getElementById('P' + iz).value + document.getElementById('Q' + iz).innerHTML).trim() != '' && sofart.indexOf(document.getElementById('P' + iz).value + "," + eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)) + "," + eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn))) == -1) {
sofart+=document.getElementById('P' + iz).value + "," + eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)) + "," + eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn));
context.strokeStyle='blue'; //element.colour;
if (document.getElementById('Q' + iz).title == '') {
context.font = "48px Verdana";
context.strokeText(document.getElementById('P' + iz).value,eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
} else {
context.font = "48px Impact"; //Verdana";
if (document.getElementById('P' + iz).value.indexOf(' (') != -1) {
document.getElementById('P' + iz).value=document.getElementById('P' + iz).value.split('(zero')[0].split('(one')[0].split('(two')[0].split('(three')[0].split('(four')[0].split('(five')[0].split('(six')[0].split('(seven')[0].split('(eight')[0].split('(nine')[0].split('(dot')[0];
}
context.font = "48px Verdana";
context.strokeText(document.getElementById('P' + iz).value,eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
//eval("sparec='" + document.getElementById('P' + iz).value + "'" + document.getElementById('Q' + iz).title + ';');
eval("sparec=''" + document.getElementById('Q' + iz).title + ';');
context.font = "48px Impact"; //Verdana";
context.strokeText(sparec,eval(150 + (30 * eval('' + (' ' + document.getElementById('P' + iz).value).length)) + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
}
}
//context.strokeStyle = "black";
context.beginPath();
context.moveTo(eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
begin=pts[eval(iz % pts.length)];
begin[0] = eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine));
begin[1] = eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn));
}
mto=false;
}
iz++;
}
}
function scaleit(sbyo) {
var sby='' + sbyo.value;
if (sby != '') {
document.getElementById('mycanvas').style.transformOrigin="0 0;";
if (sby.indexOf('/') != -1) {
eval("canvscale=eval(" + canvscale + " " + sby + ");");
} else if (sby.indexOf('x') != -1 || sby.indexOf('*') != -1) {
eval("canvscale=eval(" + canvscale + " " + sby.replace('x','*') + ");");
} else {
canvscale=eval('' + sby);
}
document.getElementById('mycanvas').style.transform="scale(" + canvscale + ");";
}
document.getElementById('scaleopt').innerHTML='Scale ' + canvscale;
sbyo.value='';
docan();
}
function reduceit(izit, gdisgsisi) {
var jjj,jjjj;
var newnum='';
var xnewnum='';
var xclass='';
var dclass='', dinterim='', xinterim='';
var allnum=true;
var iu;
var zerofind=-1;
var eqs=0;
var classesare=['wmrl','wmlr','wmtb','border','bcoly','cglow','glow','xxsmall','xsmall','xx-small','x-small','smaller','small','xxlarge','xlarge','xx-large','x-large','larger','large','tenp','twentyp','onefiftyp','fiftyp','twohundredp','threehundredp','fourhundredp','fivehundredp','sixhundredp','zero','one','two','three','four','five','six','seven','eight','nine','dot'];
var ju=eval(1 + eval('' + classesare.length));
var proposedtitle='', jpr=0;
altpmb='';
for (jjjj=0; jjjj<classesare.length; jjjj++) {
if (classesare[jjjj] == 'zero') { ju=jjjj; }
}
// , [64.04|-18.15|~Lakagigar Volcano~,2
if (('' + gdisgsisi + '~,').indexOf(')~,') != -1 && ('' + gdisgsisi).indexOf('(') != -1) {
//alert(gdis[gsisi]);
if (eval(('' + gdisgsisi + '~,').indexOf(')~,')) > eval(('' + gdisgsisi).indexOf('('))) {
dinterim=('' + gdisgsisi + '~,').split(')~,')[0].split('(')[eval(-1 + ('' + gdisgsisi + '~,').split(')~,')[0].split('(').length)];
//alert(dinterim + ' ... ' + gdis[gsisi]);
xinterim=dinterim;
zerofind=0;
while (zerofind != -1) {
zerofind=-1;
for (jjjj=0; jjjj<classesare.length; jjjj++) {
if (classesare[jjjj] == 'zero') { ju=jjjj; if (1 == 7) { alert('ju=' + ju + ' eqs=' + eqs + ' dinterim=' + dinterim + ' xnewnum=' + xnewnum); } }
if (dinterim.indexOf(classesare[jjjj]) == eqs) {
if (jjjj >= ju) {
eqs=dinterim.indexOf(classesare[jjjj]);
//console.log('eqs=' + eqs);
zerofind=0;
while (zerofind != -1) {
zerofind=-1;
for (jjj=ju; jjj<classesare.length; jjj++) {
if (dinterim.indexOf(classesare[jjj]) == eqs) {
xnewnum+='' + ('' + eval(jjj - eval('' + ju))).replace('10','.').replace('11','.');
dinterim=dinterim.replace(classesare[jjj], '');
zerofind=0;
//console.log('Ju=' + ju + ' eqs=' + eqs + ' dinterim=' + dinterim + ' xnewnum=' + xnewnum);
if (dinterim == '') {
//console.log(54);
xclass=dclass;
//console.log(154);
//console.log(document.getElementById('P' + izit).value + ' Ju=' + ju + ' eqs=' + eqs + ' xinterim=(' + xinterim + ') xnewnum=' + xnewnum);
document.getElementById('P' + izit).value=document.getElementById('P' + izit).value.replace('(' + xinterim + ')','');
//console.log(document.getElementById('P' + izit).value);
pmb=xnewnum.split('.')[0];
for (jpr=1; jpr<xnewnum.split('.').length; jpr++) {
pmb+='.' + xnewnum.split('.')[jpr];
}
console.log('Pmb=' + pmb);
//locationhash=pmb;
if (document.getElementById('Q' + ('' + izit).substring(0)).innerHTML == '' && xnewnum.replace(/\./g,';') != '') {
document.getElementById('Q' + ('' + izit).substring(0)).innerHTML='' + xnewnum.replace(/\./g,';') + ';';
proposedtitle=' + String.fromCodePoint(' + xnewnum.split('.')[0] + ')';
for (jpr=1; jpr<xnewnum.split('.').length; jpr++) {
console.log('This needs to be number ... ' + xnewnum.split('.')[jpr]);
proposedtitle+=' + String.fromCodePoint(' + xnewnum.split('.')[jpr] + ')';
}
document.getElementById('Q' + ('' + izit).substring(0)).title=proposedtitle;
}
//console.log(254);
//console.log(dclass + ' .... '); // + gdis[gsisi]);
}
}
}
}
//console.log('xnewnum=' + xnewnum);
} else if (dclass != '') {
dclass=xclass.replace('"' + "'", '' + classesare[jjjj].replace('-','') + '"' + "'");
altpmb+=classesare[jjjj].replace('-','');
} else {
dclass=' class="' + classesare[jjjj].replace('-','') + '"';
altpmb+=classesare[jjjj].replace('-','');
}
zerofind=0;
dinterim=dinterim.replace(classesare[jjjj], '');
}
}
}
if (dinterim == '') {
xclass=dclass;
document.getElementById('P' + izit).value=document.getElementById('P' + izit).value.replace('(' + xinterim + ')','');
pmb=xnewnum.split('.')[0];
for (jpr=1; jpr<xnewnum.split('.').length; jpr++) {
pmb+='.' + xnewnum.split('.')[jpr];
}
console.log('pmB=' + pmb);
//locationhash=pmb;
if (document.getElementById('Q' + ('' + izit).substring(0)).innerHTML == '' && xnewnum.replace(/\./g,';') != '') {
document.getElementById('Q' + ('' + izit).substring(0)).innerHTML='' + xnewnum.replace(/\./g,';') + ';';
proposedtitle=' + String.fromCodePoint(' + xnewnum.split('.')[0] + ')';
for (jpr=1; jpr<xnewnum.split('.').length; jpr++) {
//console.log('this needs to be number ... ' + xnewnum.split('.')[jpr]);
proposedtitle+=' + String.fromCodePoint(' + xnewnum.split('.')[jpr] + ')';
}
document.getElementById('Q' + ('' + izit).substring(0)).title=proposedtitle;
}
//console.log(dclass + ' ... '); // + gdis[gsisi]);
} else {
//console.log('dinterim=' + dinterim);
xnewnum='';
dclass='';
}
}
}
return gdisgsisi;
}
function postcheck() {
var sofart='';
var rectis, dothis=false, ieles=0;
var eles=document.getElementsByTagName('td');
for (ieles=0; ieles<eles.length; ieles++) {
if (('' + eles[ieles].getAttribute('data-title')).replace(/^null$/g,'') != '') {
rectis=eles[ieles].getBoundingClientRect();
if (document.getElementById('overlays')) {
dothis=true;
document.getElementById('overlays').innerHTML+='<span id=S' + eles[ieles].id + ' style="overflow:hidden;position:absolute;z-index:-78;opacity:0.3;top:' + rectis.top + 'px;left:' + rectis.left + 'px;width:' + rectis.width + 'px;height:' + rectis.height + 'px;">' + (('' + eles[ieles].getAttribute('data-title')).replace(':','°').replace(":","'") + '"') + '</span>';
}
}
}
eles=document.getElementsByTagName('input');
for (ieles=0; ieles<eles.length; ieles++) {
if (('' + eles[ieles].getAttribute('data-title')).replace(/^null$/g,'') != '') {
rectis=eles[ieles].getBoundingClientRect();
if (document.getElementById('overlays')) {
dothis=true;
document.getElementById('overlays').innerHTML+='<span id=S' + eles[ieles].id + ' style="overflow:hidden;position:absolute;z-index:-78;opacity:0.3;top:' + rectis.top + 'px;left:' + rectis.left + 'px;width:' + rectis.width + 'px;height:' + rectis.height + 'px;">' + (('' + eles[ieles].getAttribute('data-title')).replace(':','°').replace(":","'") + '"') + '</span>';
}
}
}
if (dothis) {
//alert('mine=' + mine + ' and maxe=' + maxe + ' and minn=' + minn + ' and maxn=' + maxn + ' <canvas height=' + eval(150 + eval('' + maxn) - eval('' + minn)) + ' width=' + eval(150 + eval('' + maxe) - eval('' + mine)) + ' id=mycanvas></canvas>');
var aregeographicals=true;
var penmiddle='xxlarge';
var lastipen='youllneverfindthis';
var iz=0;
var egt=90.0;
var ngt=180.0;
//var pmb='127938';
var isdms=true;
var jdatac='', idatac='', idatacd='', ipeninfoc='', ipeninfocd='', iaregeographicalsc='', iaregeographicalscd='';
pmb='127938';
if (document.getElementById('tde').innerHTML.indexOf('itude') != -1 || 1 == 1) {
ngt=90.0;
egt=180.0;
}
while (document.getElementById('E' + iz)) {
if (document.getElementById('E' + iz).value != '') {
if ((document.getElementById('E' + iz).value + '0000').indexOf('.') == -1) {
if (isNumeric(document.getElementById('E' + iz).value)) {
document.getElementById('E' + iz).value=document.getElementById('E' + iz).value + '.000';
}
}
if (Math.abs(eval('' + document.getElementById('E' + iz).value)) > egt) {
aregeographicals=false;
document.getElementById('P' + iz).value=reduceit(iz,document.getElementById('P' + iz).value);
} else if ((document.getElementById('E' + iz).value + '0000').indexOf('.') != -1) {
if ((document.getElementById('E' + iz).value + '0000').split('.')[1].substring(0,1) >= '6') { isdms=false; }
if ((document.getElementById('E' + iz).value + '0000').split('.')[1].substring(2).substring(0,1) >= '6') { isdms=false; }
}
}
if (document.getElementById('N' + iz).value != '') {
if ((document.getElementById('N' + iz).value + '0000').indexOf('.') == -1) {
if (isNumeric(document.getElementById('N' + iz).value)) {
document.getElementById('N' + iz).value=document.getElementById('N' + iz).value + '.000';
}
}
if (Math.abs(eval('' + document.getElementById('N' + iz).value)) > ngt) {
aregeographicals=false;
} else if ((document.getElementById('N' + iz).value + '0000').indexOf('.') != -1) {
if ((document.getElementById('N' + iz).value + '0000').split('.')[1].substring(0,1) >= '6') { isdms=false; }
if ((document.getElementById('N' + iz).value + '0000').split('.')[1].substring(2).substring(0,1) >= '6') { isdms=false; }
//idatac+=idatacd + ' [' + document.getElementById('E' + iz).value + "|" + document.getElementById('N' + iz).value + '|~' + reduceit(iz,document.getElementById('P' + iz).value.replace(/\'/g,'`').replace(/\,/g,';')) + '~,2]';
//if (('' + location.hash) != '') {
//idatac+=idatacd + ' [' + document.getElementById('N' + iz).value + "|" + document.getElementById('E' + iz).value + '|~' + reduceit(iz,document.getElementById('P' + iz).value.replace(/\'/g,'`').replace(/\,/g,';')) + '~,7]';
//} else {
idatac+=idatacd + ' [' + document.getElementById('N' + iz).value + "|" + document.getElementById('E' + iz).value + '|~' + reduceit(iz,document.getElementById('P' + iz).value.replace(/\'/g,'`').replace(/\,/g,';')).split('(zero')[0].split('(one')[0].split('(two')[0].split('(three')[0].split('(four')[0].split('(five')[0].split('(six')[0].split('(seven')[0].split('(eight')[0].split('(nine')[0].split('(dot')[0].trim() + '~,2]';
console.log(idatac);
//}
idatacd=',';
//jdatac+=',[' + document.getElementById('E' + iz).value + "," + document.getElementById('N' + iz).value + ',~' + document.getElementById('P' + iz).value.replace(/\'/g,'`') + '~]';
jdatac+=',[' + document.getElementById('N' + iz).value + "," + document.getElementById('E' + iz).value + ',~' + document.getElementById('P' + iz).value.replace(/\'/g,'`') + '~]';
//lastipen=ipeninfocd + '' + document.getElementById('E' + iz).value + "|" + document.getElementById('N' + iz).value + '|127' + penmiddle + '938_' + document.getElementById('P' + iz).value.replace(/\ /g,'_').replace(/\'/g,'`').replace(/\,/g,';').replace(/\,/g,';') + '';
console.log('here' + iz + ' locationhash=' + locationhash);
if (('' + locationhash) != '') {
if (('' + locationhash).replace(/0/g,'').replace('#','') == '') {
lastipen=ipeninfocd + '' + document.getElementById('N' + iz).value + "|" + document.getElementById('E' + iz).value + ('|' + penmiddle + altpmb + '_').replace('|_','|') + document.getElementById('P' + iz).value.replace(/\ /g,'_').replace(/\'/g,'`').replace(/\,/g,';').replace(/\,/g,';') + '';
console.log('LastiPen' + iz + '=' + lastipen);
} else if (pmb != locationhash.replace('#','')) {
//lastipen=ipeninfocd + '' + document.getElementById('N' + iz).value + "|" + document.getElementById('E' + iz).value + '|' + ('#' + pmb).replace('##','#').replace('#','') + penmiddle + '_' + document.getElementById('P' + iz).value.replace(/\ /g,'_').replace(/\'/g,'`').replace(/\,/g,';').replace(/\,/g,';') + '';
lastipen=ipeninfocd + '' + document.getElementById('N' + iz).value + "|" + document.getElementById('E' + iz).value + '|' + ('#' + locationhash).replace('##','#').replace('#','') + penmiddle + altpmb + '_' + document.getElementById('P' + iz).value.replace(/\ /g,'_').replace(/\'/g,'`').replace(/\,/g,';').replace(/\,/g,';') + '';
console.log('Lastipen' + iz + '=' + lastipen + ' pmb=' + pmb + ' versus ' + locationhash.replace('#',''));
} else {
pmb=locationhash.replace('#','');
lastipen=ipeninfocd + '' + document.getElementById('N' + iz).value + "|" + document.getElementById('E' + iz).value + '|' + ('' + locationhash).replace('#','') + penmiddle + altpmb + '_' + document.getElementById('P' + iz).value.replace(/\ /g,'_').replace(/\'/g,'`').replace(/\,/g,';').replace(/\,/g,';') + '';
console.log('LastiPeN' + iz + '=' + lastipen);
}
} else if (pmb != locationhash.replace('#','')) {
//lastipen=ipeninfocd + '' + document.getElementById('N' + iz).value + "|" + document.getElementById('E' + iz).value + '|' + ('#' + pmb).replace('##','#').replace('#','') + penmiddle + '_' + document.getElementById('P' + iz).value.replace(/\ /g,'_').replace(/\'/g,'`').replace(/\,/g,';').replace(/\,/g,';') + '';
lastipen=ipeninfocd + '' + document.getElementById('N' + iz).value + "|" + document.getElementById('E' + iz).value + '|' + ('#' + pmb).replace('##','#').replace('#','') + penmiddle + altpmb + '_' + document.getElementById('P' + iz).value.replace(/\ /g,'_').replace(/\'/g,'`').replace(/\,/g,';').replace(/\,/g,';') + '';
console.log('lastipen ' + iz + '=' + lastipen);
} else {
//lastipen=ipeninfocd + '' + document.getElementById('N' + iz).value + "|" + document.getElementById('E' + iz).value + '|127938' + penmiddle + altpmb + '_' + document.getElementById('P' + iz).value.replace(/\ /g,'_').replace(/\'/g,'`').replace(/\,/g,';').replace(/\,/g,';') + '';
if (pmb == '') {
lastipen=ipeninfocd + '' + document.getElementById('N' + iz).value + "|" + document.getElementById('E' + iz).value + '|127938' + penmiddle + altpmb + '_' + document.getElementById('P' + iz).value.replace(/\ /g,'_').replace(/\'/g,'`').replace(/\,/g,';').replace(/\,/g,';') + '';
} else {
lastipen=ipeninfocd + '' + document.getElementById('N' + iz).value + "|" + document.getElementById('E' + iz).value + '|' + pmb + penmiddle + altpmb + '_' + document.getElementById('P' + iz).value.replace(/\ /g,'_').replace(/\'/g,'`').replace(/\,/g,';').replace(/\,/g,';') + '';
}
console.log('lastipen' + iz + '=' + lastipen);
}
ipeninfoc+=lastipen; //ipeninfocd + '' + document.getElementById('E' + iz).value + "|" + document.getElementById('N' + iz).value + '|127' + penmiddle + '938_' + document.getElementById('P' + iz).value.replace(/\ /g,'_').replace(/\'/g,'`').replace(/\,/g,';').replace(/\,/g,';') + '';
penmiddle='';
altpmb='';
ipeninfocd=',+';
if (locationhash.trim().indexOf('000000') != -1 && pmb.replace('127938','000000').trim().indexOf('000000') != -1) {
//console.log('Locationhash=' + locationhash + ' and pmb=' + pmb);
iaregeographicalsc+=iaregeographicalscd + 'http.' + document.getElementById('P' + iz).value.replace(/\ /g,'_').replace(/\'/g,'`').replace(/\,/g,';') + '';
} else if (pmb.replace('127938','').trim() == '' && locationhash.trim() == '') {
//console.log('LocationHash=' + locationhash + ' and pmb=' + pmb);
iaregeographicalsc+=iaregeographicalscd + 'http.JNK' + document.getElementById('P' + iz).value.replace(/\ /g,'_').replace(/\'/g,'`').replace(/\,/g,';') + '';
} else {
//console.log('locationhash=' + locationhash + ' and pmb=' + pmb);
iaregeographicalsc+=iaregeographicalscd + 'http.JUNK' + document.getElementById('P' + iz).value.replace(/\ /g,'_').replace(/\'/g,'`').replace(/\,/g,';') + '';
}
iaregeographicalscd=',';
pmb=locationhash.replace('#','');
}
}
iz++;
}
if (aregeographicals) {
var legit=false;
//<input type=hidden id=iaregeographicals name=aregeographicals value='http.Ice,http.Lakagigar_Volcano,http.Bora_Bora'></input>
//<input type=hidden id=ipeninfo name=peninfo value='75.57|-92.28|127938_Ice,64.04|-18.15|127755_Lakagigar_Volcano,-16.30|151.44|127958.65039_Bora_Bora'></input>
//<input type=hidden id=idata name=data value=' [75.57|-92.28|~Ice~,2] , [64.04|-18.15|~Lakagigar Volcano~,2] , [-16.30|151.44|~Bora Bora~,2]'></input>
//<input type=hidden id=jdata name=data value=',[75.57,-92.28,~Ice~],[64.04,-18.15,~Lakagigar Volcano~],[-16.30,151.44,~Bora Bora~]'></input>
document.getElementById('iaregeographicals').value=iaregeographicalsc;
//alert(ipeninfoc.replace(lastipen,lastipen.replace('|127938_','|127xlarge938_')));
pmb=lastipen.split('|')[eval(-1 + lastipen.split('|').length)].split('_')[0];
console.log('was lastipen=' + lastipen + ' and could be lastipen=' + lastipen.replace('|' + pmb + '_','|' + pmb + 'xlarge_') + ' and pmb=' + pmb);
if (pmb.indexOf('wm') != -1) {
document.getElementById('ipeninfo').value=ipeninfoc.replace(lastipen,lastipen.replace('|' + pmb + '_','|' + pmb.replace('wm','xlargewm') + '_'));
} else {
document.getElementById('ipeninfo').value=ipeninfoc.replace(lastipen,lastipen.replace('|' + pmb + '_','|' + pmb + 'xlarge_'));
}
console.log(document.getElementById('ipeninfo').value);
if (firstidatac != '') {
document.getElementById('idata').value=firstidatac;
document.getElementById('ipeninfo').value=firstipen;
} else {
legit=true;
document.getElementById('idata').value=idatac;
firstidatac=idatac;
firstipen=document.getElementById('ipeninfo').value;
}
//document.title+=(' 2:' + document.getElementById('idata').value);
document.getElementById('jdata').value=jdatac;
//document.getElementById('overlays').innerHTML+='<br><br><iframe src=//www.rjmprogramming.com.au/About_Us.html id=mygeoframe name=mygeoframe height=900 width=1200></iframe>';
document.getElementById('overlays').innerHTML+='<br><br><iframe src=//www.rjmprogramming.com.au/PHP/fgc id=mygeoframe name=mygeoframe height=900 width=1200></iframe>';
if (eval(0 + eval('' + maxn) - eval('' + minn)) > 5 || eval(0 + eval('' + maxe) - eval('' + mine)) > 5) {
//alert(document.getElementById('geoform').outerHTML);
//alert(document.getElementById('idata').value);
if (document.getElementById('tde').innerHTML.indexOf('itude') == -1) {
document.getElementById('tde').innerHTML=document.getElementById('tde').innerHTML + '<font color=blue> (Longitude)</font>';
document.getElementById('tdn').innerHTML=document.getElementById('tdn').innerHTML + '<font color=blue> (Latitude)</font>';
doazimuthgcd();
}
checkwh();
if (legit || 1 == 1) { document.getElementById('geosb').click(); }
} else {
//alert(jdatac);
if (document.getElementById('tde').innerHTML.indexOf('itude') == -1) {
document.getElementById('tde').innerHTML=document.getElementById('tde').innerHTML + '<font color=blue> (Longitude)</font>';
document.getElementById('tdn').innerHTML=document.getElementById('tdn').innerHTML + '<font color=blue> (Latitude)</font>';
doazimuthgcd();
}
if (legit || 1 == 1) { document.getElementById('mapsb').click(); }
}
} else {
document.getElementById('overlays').innerHTML+='<br><br><select onchange=scaleit(this);><option value=1.0>Scale 1.0</option><option value=" / 2.0">Scale / 2.0</option><option value=" x 2.0">Scale x 2.0</option><option value=" / 5.0">Scale / 5.0</option><option value=" x 5.0">Scale x 5.0</option><option value=" / 10.0">Scale / 10.0</option><option value=" x 10.0">Scale x 10.0</option><option value=" / 100.0">Scale / 100.0</option><option value=" x 100.0">Scale x 100.0</option><option id=scaleopt value="">Scale</option></select><br><br><div id=dcanvas><canvas style="transform-origin:0 0;transform:scale(1.0);background-color:#f0f0f0;border:2px dashed red;" height=' + eval(500 + eval('' + maxn) - eval('' + minn)) + ' width=' + eval(700 + eval('' + maxe) - eval('' + mine)) + ' id=mycanvas></canvas></div>';
setTimeout(postspanscheck, 5000);
var ele=document.getElementById('mycanvas');
var context=document.getElementById('mycanvas').getContext('2d');
var mto=true, grad;
// Red Orange Yellow Green Cyan Blue Violet
var pts = [[0, 0, "red"], [0, 0, "orange"], [0, 0, "yellow"], [0, 0, "green"], [0, 0, "cyan"], [0, 0, "blue"], [0, 0, "violet"]];
//var pts = [[0, 0, "red"], [0, 0, "green"], [0, 0, "blue"], [0, 0, "purple"], [0, 0, "olive"], [0, 0, "magenta"], [0, 0, "cyan"], [0, 0, "brown"], [0, 0, "black"], [0, 0, "pink"], [0, 0, "darkgreen"], [0, 0, "darkblue"], [0, 0, "darkorange"]];
var begin = pts[0];
var end = pts[1];
iz=0;
while (document.getElementById('E' + iz)) {
if (document.getElementById('E' + iz).value != '') {
if (mto) {
context.lineWidth = 6;
context.lineJoin = "round";
context.lineCap = "round";
//context.strokeStyle = "black";
context.beginPath();
begin=pts[eval(iz % pts.length)];
begin[0] = eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine));
begin[1] = eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn));
context.moveTo(eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
if (document.getElementById('P' + iz).value.trim() != '' && sofart.indexOf(document.getElementById('P' + iz).value + "," + eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)) + "," + eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn))) == -1) {
sofart+=document.getElementById('P' + iz).value + "," + eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)) + "," + eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn));
context.strokeStyle='blue'; //element.colour;
if (document.getElementById('Q' + iz).title == '') {
context.font = "48px Verdana";
context.strokeText(document.getElementById('P' + iz).value,eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
} else {
context.font = "48px Impact"; //Verdana";
if (document.getElementById('P' + iz).value.indexOf(' (') != -1) {
document.getElementById('P' + iz).value=document.getElementById('P' + iz).value.split(' (')[0];
}
eval("sparec='" + document.getElementById('P' + iz).value + "'" + document.getElementById('Q' + iz).title + ';');
context.strokeText(sparec,eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
}
}
} else {
end=pts[eval(1 + eval(iz % 5))];
end[0] = eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine));
end[1] = eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn));
grad = context.createLinearGradient(begin[0], begin[1], end[0], end[1]);
grad.addColorStop(0, begin[2]);
grad.addColorStop(1, end[2]);
context.strokeStyle = grad;
context.lineTo(eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
context.stroke();
//context.strokeStyle = "black";
if (document.getElementById('P' + iz).value.trim() != '' && sofart.indexOf(document.getElementById('P' + iz).value + "," + eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)) + "," + eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn))) == -1) {
sofart+=document.getElementById('P' + iz).value + "," + eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)) + "," + eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn));
context.strokeStyle='blue'; //element.colour;
if (document.getElementById('Q' + iz).title == '') {
context.font = "48px Verdana";
context.strokeText(document.getElementById('P' + iz).value,eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
} else {
context.font = "48px Impact"; //Verdana";
if (document.getElementById('P' + iz).value.indexOf(' (') != -1) {
document.getElementById('P' + iz).value=document.getElementById('P' + iz).value.split(' (')[0];
}
eval("sparec='" + document.getElementById('P' + iz).value + "'" + document.getElementById('Q' + iz).title + ';');
context.strokeText(sparec,eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
}
}
context.beginPath();
context.moveTo(eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine)), eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn)));
begin=pts[eval(iz % pts.length)];
begin[0] = eval(150 + eval('' + document.getElementById('E' + iz).value) - eval('' + mine));
begin[1] = eval(eval('' + maxn) + 150 - eval('' + document.getElementById('N' + iz).value) + 0 * eval('' + minn));
}
mto=false;
}
iz++;
}
}
}
}
function checkwh() {
if (document.getElementById('iwidth')) {
//alert('xx:' + wval + ' ' + hval);
if (('' + document.getElementById('iwidth').value) != wval) {
document.getElementById('iwidth').value=wval;
//alert('' + wval + ' ' + hval);
}
if (('' + document.getElementById('iheight').value) != hval) {
document.getElementById('iheight').value=hval;
}
}
}
function precheckAtStart() {
document.body.style.background="URL('SurveyTraverse.png')";
document.body.style.backgroundSize='100% 100%';
document.body.style.backgroundRepeat='no-repeat';
document.body.style.backgroundPosition='0 -100';
}
function checkAtStart() { // check query string
// wval and hval
var sparew='', hbits=[], ihb=0, hst='';
checkwh();
if (numlegs != 0) {
//alert(params['traverse']);
processTraverse(params['traverse']);
} else {
if (cnumlegs != '') {
numlegs = '' + cnumlegs;
} else {
numlegs = prompt("Please tell me how many Traverse legs you have. If you have a set of co-ordinates number of Traverse legs is one less than this number of co-ordinate sets. If you are specifying a CSV filename to use for a set of co-ordinates that is allowed too. Hashtag # separate an optional CodePoint suffix for Geo Chart emoji plotting (where (hash # then) 000000 means no emoji (whereas default one is " + String.fromCodePoint(127938) + ") and further optional suffix values are #1112 width and #692 height of Geo Chart). ", "0");
}
if (('' + numlegs).indexOf('#') != -1) {
sparew=('' + numlegs);
numlegs=('' + numlegs).split('#')[0];
hashsuff=('#' + sparew.replace(('' + numlegs), '')).replace('##','#');
hbits=hashsuff.substring(1).split('#');
if (eval('' + hbits.length) == 1 || eval('' + hbits.length) == 3) {
if (hbits[0].trim() == '') {
hashsuff=hashsuff.replace('#' + hbits[0],'#127938');
} else if (hbits[0].substring(0,1) >= '0' && hbits[0].substring(0,1) <= '9') {
hashsuff=hashsuff;
} else {
sparew=('' + escapeHtml(hbits[0])).replace('&','').replace('#','').replace(/\;\&\#/g,'.').replace(';','');
//alert('sparew=' + sparew);
hst='';
for (ihb=0; ihb<sparew.length; ihb++) {
if ((sparew.substring(ihb).substring(0,1) >= '0' && sparew.substring(ihb).substring(0,1) <= '9') || sparew.substring(ihb).substring(0,1) == '.') {
hst+=sparew.substring(ihb).substring(0,1);
}
}
if (eval('' + hbits.length) == 1) {
hashsuff='#' + hst;
//alert('Numlegs=' + numlegs + ' and hashsuff=' + hashsuff + '?');
} else {
hashsuff=hashsuff.replace('#' + hbits[0],'#' + hst);
//alert('numlegs=' + numlegs + ' and hashsuff=' + hashsuff + '?');
}
}
}
}
if (('' + numlegs + '~').toLowerCase().indexOf('.csv~') != -1) {
document.getElementById('preifcsv').src='./SurveyTraverse.php?csvfile=' + encodeURIComponent(numlegs); // + hashsuff;
} else if (numlegs != "0" && numlegs != null) {
if (('' + location.hash) != '') {
//alert('2:' + location.hash);
window.location = window.location + "?traverse=" + numlegs + ",0" + location.hash;
} else {
window.location = window.location + "?traverse=" + numlegs + ",0" + hashsuff;
}
}
}
}
function fixthis(afix) {
var areal = 0.0;
var breal = 0.0;
var creal = 0.0;
var ien = 0;
areal = eval(afix);
//alert(enarrstr);
enarr = enarrstr.split(",");
for ( var j = 0; j <= numlegs; j++) {
document.getElementById('E' + j).value = ifzeromakezero(enarr[ien],1);
ien += 1;
document.getElementById('N' + j).value = ifzeromakezero(enarr[ien],2);
ien += 1;
breal = eval(document.getElementById('A' + j).value);
creal = eval(areal+breal);
while (creal >= 360.0) {
creal = eval(creal-360.0);
}
while (creal < 0.0) {
creal = eval(creal+360.0);
}
document.getElementById('A' + j).value = ifzeromakezero(creal,0);
var deg = eval(creal);
document.getElementById('A' + j).title = document.getElementById('A' + j).title + " ... DMS " + Math.floor(deg) + "°";
deg = deg - Math.floor(deg);
if (Math.floor((deg * 60.0)) < 10.0) document.getElementById('A' + j).title = document.getElementById('A' + j).title + "0";
document.getElementById('A' + j).title = document.getElementById('A' + j).title + Math.floor((deg * 60.0)) + "'";
deg = (deg * 60.0 - Math.floor((deg * 60.0))) * 60.0;
if (deg < 10) document.getElementById('A' + j).title = document.getElementById('A' + j).title + "0";
document.getElementById('A' + j).title = document.getElementById('A' + j).title + deg + '"';
}
//alert(afix + " " + areal);
adjust = -1;
document.getElementById('Ball').innerHTML = ""; //lbbit;
document.getElementById('lastBearing').value = ifzeromakezero(lbval,0);
analyze(document.getElementById('adjust'));
document.getElementById('adjust').value = 'Bowditch Adjust';
}
function analyze(but) {
justen=1;
var kjw=0, thisdiste=0.0, thisdistn=0.0, thisbrgis=0.0, lastb=0.0;
// alert(1);
if (adjust <= 0) {
// alert('' + Math.atan2(10.0,10.0) * (180.0 / Math.PI));
if (adjust == 0) {
// alert(3);
var kk;
enarrstr = "";
lbbit = document.getElementById('Ball').innerHTML;
lbval = document.getElementById('lastBearing').value;
for ( var jj = 0; jj < numlegs; jj++) {
kk = jj+1;
if (adjust == 0) {
if (document.getElementById('E' + jj).value.replace(/\./g,'').replace(/\-/g,'').replace(/0/g,'') == '') { justen--; }
if (document.getElementById('N' + jj).value.replace(/\./g,'').replace(/\-/g,'').replace(/0/g,'') == '') { justen--; }
enarrstr = enarrstr + document.getElementById('E' + jj).value + ",";
enarrstr = enarrstr + document.getElementById('N' + jj).value + ",";
if (kk == numlegs) {
if (adjust == 0) {
if (document.getElementById('E' + numlegs).value.replace(/\./g,'').replace(/\-/g,'').replace(/0/g,'') == '') { justen--; }
if (document.getElementById('N' + numlegs).value.replace(/\./g,'').replace(/\-/g,'').replace(/0/g,'') == '') { justen--; }
enarrstr = enarrstr + document.getElementById('E' + numlegs).value + ",";
enarrstr = enarrstr + document.getElementById('N' + numlegs).value + ",";
}
}
}
}
}
if (document.getElementById('firstBearing').value.replace(/\./g,'').replace(/\-/g,'').replace(/0/g,'') != '') { justen--; }
if (document.getElementById('lastBearing').value.replace(/\./g,'').replace(/\-/g,'').replace(/0/g,'') != '') { justen--; }
//alert('justen=' + justen);
document.getElementById('adjust').title = 'Bowditch Adjust';
document.getElementById('adjust').value = 'Adjust';
//alert(79);
if (eval('' + justen) > 0) {
//alert(89);
kjw=0;
for (jw = 0; jw < numlegs; jw++) {
kjw++;
thisdiste=eval('' + document.getElementById('E' + jw).value);
//alert('01 thisdiste=' + thisdiste + ' thisdistn=' + thisdistn + ' ' + document.getElementById('E' + jw).value + ' then ' + document.getElementById('E' + kjw).value);
thisdiste-=eval('' + document.getElementById('E' + kjw).value);
//alert('02 thisdiste=' + thisdiste + ' thisdistn=' + thisdistn);
thisdiste*=thisdiste;
//alert('03 thisdiste=' + thisdiste + ' thisdistn=' + thisdistn);
thisdistn=eval('' + document.getElementById('N' + jw).value);
//alert('04 thisdiste=' + thisdiste + ' thisdistn=' + thisdistn + ' ' + kjw + ':' + document.getElementById('N' + kjw).value);
thisdistn-=eval('' + document.getElementById('N' + kjw).value);
//alert('05 thisdiste=' + thisdiste + ' thisdistn=' + thisdistn);
thisdistn*=thisdistn;
//alert('06 thisdiste=' + thisdiste + ' thisdistn=' + thisdistn);
//document.getElementById('L' + jw).value='' + Math.pow( ( ((eval('' + document.getElementById('E' + jw).value)) - (eval('' + document.getElementById('E' + kjw).value))) * ((eval('' + document.getElementById('E' + jw).value)) - (eval('' + document.getElementById('E' + kjw).value))) + ((eval('' + document.getElementById('N' + jw).value)) - (eval('' + document.getElementById('N' + kjw).value))) * ((eval('' + document.getElementById('N' + jw).value)) - (eval('' + document.getElementById('N' + kjw).value))) ),0.5);
//document.getElementById('L' + jw).value='' + Math.pow( eval(thisdiste + thisdistn), 0.5);
document.getElementById('L' + jw).title='' + Math.pow( eval(thisdiste + thisdistn), 0.5);
thisbrgis=eval('' + Math.atan2(eval(eval('' + document.getElementById('E' + kjw).value) - eval('' + document.getElementById('E' + jw).value)), eval(eval('' + document.getElementById('N' + kjw).value) - eval('' + document.getElementById('N' + jw).value))) * (180.0 / Math.PI));
if (thisbrgis < 0) { thisbrgis+=360.0; }
//document.getElementById('B' + jw).innerHTML='' + thisbrgis;
document.getElementById('B' + jw).title='' + thisbrgis;
if (jw == 0) {
if (('' + thisbrgis).indexOf('.') == -1) {
document.getElementById('A' + jw).setAttribute('data-title', '' + '' + thisbrgis + '.00');
} else {
document.getElementById('A' + jw).setAttribute('data-title', '' + '' + thisbrgis);
}
lastb=eval('' + thisbrgis);
} else {
if (eval('' + thisbrgis) > eval('' + lastb)) {
//alert('thisbrgis=' + eval('' + thisbrgis) + ' and lastb=' + eval('' + lastb) + ' results in ' + eval(eval(180.0 + eval(eval('' + thisbrgis) - eval('' + lastb))) % 360.0));
lastb=eval(eval(180.0 + eval(eval('' + thisbrgis) - eval('' + lastb))) % 360.0);
} else {
lastb=eval(eval(540.0 + eval(eval('' + thisbrgis) - eval('' + lastb))) % 360.0);
}
if (('' + lastb).indexOf('.') == -1) {
document.getElementById('A' + jw).setAttribute('data-title', '' + lastb + '.00');
} else {
document.getElementById('A' + jw).setAttribute('data-title', '' + lastb);
}
}
lastb=eval('' + thisbrgis);
document.getElementById('E' + jw).title='' + '' + document.getElementById('E' + jw).value;
document.getElementById('N' + jw).title='' + '' + document.getElementById('N' + jw).value;
if (eval(1 + jw) == numlegs) {
document.getElementById('E' + kjw).title='' + document.getElementById('E' + kjw).value;
document.getElementById('N' + kjw).title='' + document.getElementById('N' + kjw).value;
if (('' + eval(eval(540.0 + eval(eval('0.000') - eval('' + thisbrgis))) % 360.0)).indexOf('.') != -1) {
document.getElementById('A' + kjw).setAttribute('data-title', '' + eval(eval(540.0 + eval(eval('0.000') - eval('' + thisbrgis))) % 360.0));
} else {
document.getElementById('A' + kjw).setAttribute('data-title', '' + eval(eval(540.0 + eval(eval('0.000') - eval('' + thisbrgis))) % 360.0) + '.00');
}
}
}
// alert(99);
}
var x360 = 0.0;
var areal = 0.0;
var breal = 0.0;
var deltae = 0.0;
var deltan = 0.0;
var badj = 0.0;
var thise="", thisn="", laste="", lastn="", lastb="", lpre=".0", vareal="", k;
laste = document.getElementById('E' + numlegs).value;
lastn = document.getElementById('N' + numlegs).value;
currb = eval(document.getElementById('firstBearing').value);
currx = eval(document.getElementById('E0').value);
curry = eval(document.getElementById('N0').value);
for ( var j = 0; j < numlegs; j++) {
k = j+1;
thise = document.getElementById('E' + k).value;
thisn = document.getElementById('N' + k).value;
areal = eval(currb);
//if (document.getElementById('A' + j).value.replace(/\./g,'').replace(/\-/g,'').replace(/0/g,'') != '') { justen--; alert('Ajusten=' + justen); }
//if (document.getElementById('L' + j).value.replace(/\./g,'').replace(/\-/g,'').replace(/0/g,'') != '') { justen--; alert('Ljusten=' + justen); }
breal = eval(document.getElementById('A' + j).value);
areal += breal;
currb = eval(areal);
x360 = eval(currb);
while (x360 >= 360.0) {
x360 = eval(x360-360.0);
}
document.getElementById('B' + j).innerHTML = ifzeromakezero(x360,0);
deltae = eval(Math.sin(currb * Math.PI / 180.0) * document.getElementById('L' + j).value);
deltan = eval(Math.cos(currb * Math.PI / 180.0) * document.getElementById('L' + j).value);
document.getElementById('dE' + j).innerHTML = ifzeromakezero(deltae,0);
document.getElementById('dN' + j).innerHTML = ifzeromakezero(deltan,0);
currx += deltae;
curry += deltan;
//alert(j);
document.getElementById('E' + k).value = ifzeromakezero(currx,1);
document.getElementById('N' + k).value = ifzeromakezero(curry,2);
//alert("k");
if (k == numlegs) {
eoff = ifzeromakezero(eval(-currx/numlegs),0);
noff = ifzeromakezero(eval(-curry/numlegs),0);
//alert("Eoff=" + eoff);
}
if (thise.replace("-0.000","").length != 0 && thisn.replace("-0.000","").length != 0) {
if (k == numlegs) {
if (adjust == 0) {
enarrstr = enarrstr + document.getElementById('E' + numlegs).value + ",";
enarrstr = enarrstr + document.getElementById('N' + numlegs).value + ",";
}
document.getElementById('Eall').innerHTML = ifzeromakezero(eval(thise-currx),0);
document.getElementById('Nall').innerHTML = ifzeromakezero(eval(thisn-curry),0);
} else {
document.getElementById('eE' + k).innerHTML = ifzeromakezero(eval(thise-currx),0);
document.getElementById('eN' + k).innerHTML = ifzeromakezero(eval(thisn-curry),0);
}
}
//alert(j);
areal = eval(currb);
areal += 180.0;
currb = eval(areal);
//alert("j");
}
//alert(currx + " " + curry);
//thise = laste;
//thisn = lastn;
//alert(laste + " " + lastn);
if (laste.replace("-0.000","").length != 0 && lastn.replace("-0.000","").length != 0) {
//alert(' ' + justen);
document.getElementById('Eall').innerHTML = ifzeromakezero(eval(laste-currx),0);
document.getElementById('Nall').innerHTML = ifzeromakezero(eval(lastn-curry),0);
}
//alert('+' + justen);
//if (adjust == 0) {
if (document.getElementById('A' + numlegs).value.replace("-0").length > 0) {
//alert(8);
if (document.getElementById('lastBearing').value.replace("-0").length > 0) {
//alert(9);
if (eval('' + justen) > 0) {
//alert(29);
kjw=0;
for (jw = 0; jw < numlegs; jw++) {
kjw++;
//alert('title');
if (eval(1 + jw) == numlegs) {
document.getElementById('E' + kjw).value=ifzeromakezero('' + document.getElementById('E' + kjw).title,1);
document.getElementById('N' + kjw).value=ifzeromakezero('' + document.getElementById('N' + kjw).title,2);
document.getElementById('A' + kjw).value='' + document.getElementById('A' + kjw).getAttribute('data-title');
document.getElementById('adjust').style.display='none';
}
document.getElementById('L' + jw).value='' + document.getElementById('L' + jw).title;
document.getElementById('A' + jw).value='' + document.getElementById('A' + jw).getAttribute('data-title');
document.getElementById('B' + jw).innerHTML='' + document.getElementById('B' + jw).title;
document.getElementById('B' + jw).title=bchange(document.getElementById('B' + jw).title, jw, numlegs);
if (document.getElementById('dE' + jw).innerHTML != '0') {
document.getElementById('dE' + jw).innerHTML='' + document.getElementById('dE' + jw).title;
document.getElementById('dE' + jw).title=dechange(document.getElementById('dE' + jw).title, jw, numlegs);
}
document.getElementById('E' + jw).value=ifzeromakezero('' + document.getElementById('E' + jw).title,1);
document.getElementById('N' + jw).value=ifzeromakezero('' + document.getElementById('N' + jw).title,2);
}
//alert(39);
} else {
lastb = eval(document.getElementById('lastBearing').value);
areal = eval(currb);
breal = eval(document.getElementById('A' + numlegs).value);
areal -= breal;
//areal -= 180.0;
currb = eval(areal);
x360 = eval(currb);
while (x360 >= 360.0) {
x360 = eval(x360-360.0);
}
areal = eval(lastb-x360);
while (areal > 180.0) {
areal = eval(areal-360.0);
}
while (areal <= -180.0) {
areal = eval(areal+360.0);
}
badj = eval(numlegs);
var xoffp='';
var yoffp='';
if (document.getElementById('Eall').innerHTML.trim() == '') { xoffp='0'; }
if (document.getElementById('Nall').innerHTML.trim() == '') { yoffp='0'; }
var xoff = eval(xoffp + document.getElementById('Eall').innerHTML);
var yoff = eval(yoffp + document.getElementById('Nall').innerHTML);
if (xoff.length > 0 && yoff.length > 0) {
eoff = eval(xoff/badj);
noff = eval(yoff/badj);
}
badj = eval(badj+1);
vareal = areal.toString();
//alert("Vareal=" + vareal + " badj=" + badj);
if (vareal.indexOf(".") == (0 - 1)) vareal = vareal + ".0";
badj = eval(areal/badj);
vareal = badj.toString();
if (vareal.indexOf(".") == (0 - 1)) vareal = vareal + ".0";
//alert("vareal=" + vareal + " badj=" + badj);
if (adjust == 0) {
document.getElementById('Ball').innerHTML = ifzeromakezero(areal,0);
document.getElementById('Ball').innerHTML += " <input type='button' onclick='fixthis(" + '"' + vareal + '"' + ");' value='Adjust Angles'></input>";
document.getElementById('lastBearing').value = ifzeromakezero(areal,0);
}
}
}
//}
}
if (eval('' + justen) < 0) { adjust = 1; }
} else {
// alert("eoff=" + eoff + " noFF=" + noff);
//alert(10);
but.style.display = 'none';
var xxoff = eval(eoff);
var yyoff = eval(noff);
var eis=0.0, nis=0.0;
for ( var jj = 1; jj <= numlegs; jj++) {
eis = eval(document.getElementById('E' + jj).value);
nis = eval(document.getElementById('N' + jj).value);
document.getElementById('E' + jj).value = ifzeromakezero(eval(xxoff + eis),1);
if (document.getElementById('E' + jj).value.indexOf("e-") != (0 - 1)) document.getElementById('E' + jj).value = "0.000";
document.getElementById('N' + jj).value = ifzeromakezero(eval(yyoff + nis),2);
if (document.getElementById('N' + jj).value.indexOf("e-") != (0 - 1)) document.getElementById('N' + jj).value = "0.000";
//alert("xxoff=" + xxoff + " yyoff=" + yyoff);
xxoff += eval(eoff);
yyoff += eval(noff);
}
}
}
function dechange(inf, thisi, nlegs) {
var retval='';
var zz='';
var secsare=eval(eval('' + inf) * 3600.0);
var degsare=eval('' + Math.floor(secsare / 3600.0));
secsare=eval('' + inf);
secsare-=eval(degsare * 1.0); // -3.5
//alert(inf + ' interim secsare=' + secsare);
secsare=Math.abs(secsare);
var minsare=Math.floor(eval(secsare * 60.0));
secsare=eval('' + inf);
secsare-=eval(degsare * 1.0); // -3.5
secsare-=eval(minsare / 60.0); // -3.5
//alert(inf + ' final secsare=' + eval(secsare * 3600.0));
if (eval('' + eval(secsare * 3600.0)) < 10.0) { zz='0'; }
retval='' + degsare + ':' + ('0' + minsare).substring(eval(-2 + ('0' + minsare).length)) + ':' + zz + eval(secsare * 3600.0);
document.getElementById('dE' + thisi).setAttribute('data-title','' + degsare + ':' + ('0' + minsare).substring(eval(-2 + ('0' + minsare).length)) + ':' + zz + eval(secsare * 3600.0));
return '' + degsare + ':' + ('0' + minsare).substring(eval(-2 + ('0' + minsare).length)) + ':' + zz + eval(secsare * 3600.0);
}
function bchange(inf, thisi, nlegs) {
var retval='';
var zz='';
var secsare=eval(eval('' + inf) * 3600.0);
var degsare=eval('' + Math.floor(secsare / 3600.0));
secsare=eval('' + inf);
secsare-=eval(degsare * 1.0); // -3.5
//alert(inf + ' interim secsare=' + secsare);
secsare=Math.abs(secsare);
var minsare=Math.floor(eval(secsare * 60.0));
secsare=eval('' + inf);
secsare-=eval(degsare * 1.0); // -3.5
secsare-=eval(minsare / 60.0); // -3.5
//alert(inf + ' final secsare=' + eval(secsare * 3600.0));
if (eval('' + eval(secsare * 3600.0)) < 10.0) { zz='0'; }
retval='' + degsare + ':' + ('0' + minsare).substring(eval(-2 + ('0' + minsare).length)) + ':' + zz + eval(secsare * 3600.0);
document.getElementById('B' + thisi).setAttribute('data-title','' + degsare + ':' + ('0' + minsare).substring(eval(-2 + ('0' + minsare).length)) + ':' + zz + eval(secsare * 3600.0));
if (thisi == 0) {
inf=document.getElementById('firstBearing').value;
secsare=eval(eval('' + inf) * 3600.0);
degsare=eval('' + Math.floor(secsare / 3600.0));
secsare=eval('' + inf);
secsare-=eval(degsare * 1.0); // -3.5
//alert(inf + ' interim secsare=' + secsare);
secsare=Math.abs(secsare);
minsare=Math.floor(eval(secsare * 60.0));
secsare=eval('' + inf);
secsare-=eval(degsare * 1.0); // -3.5
secsare-=eval(minsare / 60.0); // -3.5
//alert(inf + ' final secsare=' + eval(secsare * 3600.0));
zz='';
if (eval('' + eval(secsare * 3600.0)) < 10.0) { zz='0'; }
document.getElementById('firstBearing').setAttribute('data-title','' + degsare + ':' + ('0' + minsare).substring(eval(-2 + ('0' + minsare).length)) + ':' + zz + eval(secsare * 3600.0));
inf=document.getElementById('lastBearing').value;
secsare=eval(eval('' + inf) * 3600.0);
degsare=eval('' + Math.floor(secsare / 3600.0));
secsare=eval('' + inf);
secsare-=eval(degsare * 1.0); // -3.5
//alert(inf + ' interim secsare=' + secsare);
secsare=Math.abs(secsare);
minsare=Math.floor(eval(secsare * 60.0));
secsare=eval('' + inf);
secsare-=eval(degsare * 1.0); // -3.5
secsare-=eval(minsare / 60.0); // -3.5
//alert(inf + ' final secsare=' + eval(secsare * 3600.0));
zz='';
if (eval('' + eval(secsare * 3600.0)) < 10.0) { zz='0'; }
document.getElementById('lastBearing').setAttribute('data-title','' + degsare + ':' + ('0' + minsare).substring(eval(-2 + ('0' + minsare).length)) + ':' + zz + eval(secsare * 3600.0));
}
if (1 == 1) {
inf=document.getElementById('A' + thisi).value;
secsare=eval(eval('' + inf) * 3600.0);
degsare=eval('' + Math.floor(secsare / 3600.0));
secsare=eval('' + inf);
secsare-=eval(degsare * 1.0); // -3.5
//alert(inf + ' interim secsare=' + secsare);
secsare=Math.abs(secsare);
minsare=Math.floor(eval(secsare * 60.0));
secsare=eval('' + inf);
secsare-=eval(degsare * 1.0); // -3.5
secsare-=eval(minsare / 60.0); // -3.5
//alert(inf + ' final secsare=' + eval(secsare * 3600.0));
zz='';
if (eval('' + eval(secsare * 3600.0)) < 10.0) { zz='0'; }
document.getElementById('A' + thisi).setAttribute('data-title','' + degsare + ':' + ('0' + minsare).substring(eval(-2 + ('0' + minsare).length)) + ':' + zz + eval(secsare * 3600.0));
}
if (eval(eval('' + thisi) + 1) == eval('' + nlegs)) {
thisi++;
inf=document.getElementById('A' + thisi).value;
secsare=eval(eval('' + inf) * 3600.0);
degsare=eval('' + Math.floor(secsare / 3600.0));
secsare=eval('' + inf);
secsare-=eval(degsare * 1.0); // -3.5
//alert(inf + ' interim secsare=' + secsare);
secsare=Math.abs(secsare);
minsare=Math.floor(eval(secsare * 60.0));
secsare=eval('' + inf);
secsare-=eval(degsare * 1.0); // -3.5
secsare-=eval(minsare / 60.0); // -3.5
//alert(inf + ' final secsare=' + eval(secsare * 3600.0));
zz='';
if (eval('' + eval(secsare * 3600.0)) < 10.0) { zz='0'; }
document.getElementById('A' + thisi).setAttribute('data-title','' + degsare + ':' + ('0' + minsare).substring(eval(-2 + ('0' + minsare).length)) + ':' + zz + eval(secsare * 3600.0));
setTimeout(postcheck, 3700); // 500
}
return retval; //'' + degsare + ':' + ('0' + minsare).substring(eval(-2 + ('0' + minsare).length)) + ':' + zz + eval(secsare * 3600.0);
}
function anglechange(ame) {
var deg=0.0;
var mn=0;
var secs=0;
if (ame.value.indexOf(".") == (0 - 1)) {
mn = prompt("Enter the minutes value of your " + ame.value + " degree angle/bearing", "0");
if (mn == null) mn = "0";
if (mn.length == 1) mn = "0" + mn;
secs = prompt("Enter the seconds value of your " + ame.value + " degree, " + mn + " minutes angle/bearing", "0");
if (secs == null) secs = "0";
if (secs.indexOf(".") == 0) secs = "00" + secs;
if (secs.length == 1 || secs.indexOf(".") == 1) secs = "0" + secs;
if (secs.indexOf(".") == (0 - 1)) secs = secs + ".0";
if (ame.value.indexOf("-") == (0 - 1)) {
deg = eval(ame.value);
if (deg >= 360) {
while (deg >= 360) {
deg = deg - 360;
}
}
deg = eval(deg + (mn / 60.0));
deg = eval(deg + (secs / 3600.0));
ame.value = deg;
ame.title = ame.title + " ... DMS " + Math.floor(deg) + "°";
deg = deg - Math.floor(deg);
if (Math.floor((deg * 60.0)) < 10.0) ame.title = ame.title + "0";
ame.title = ame.title + Math.floor((deg * 60.0)) + "'";
deg = (deg * 60.0 - Math.floor((deg * 60.0))) * 60.0;
if (deg < 10) ame.title = ame.title + "0";
ame.title = ame.title + deg + '"';
} else {
deg = eval(ame.value);
//alert(ame.value + " " + deg);
deg = -deg;
//alert(ame.value + "+" + deg);
if (deg >= 360) {
while (deg >= 360) {
deg = deg - 360;
//alert(ame.value + ":" + deg);
}
}
deg = eval(deg + (mn / 60.0));
deg = eval(deg + (secs / 3600.0));
//deg = -deg;
deg = eval(360.0 - deg);
ame.value = deg;
ame.title = ame.title + " ... DMS " + Math.floor(deg) + "°";
deg = deg - Math.floor(deg);
if (Math.floor((deg * 60.0)) < 10.0) ame.title = ame.title + "0";
ame.title = ame.title + Math.floor((deg * 60.0)) + "'";
deg = (deg * 60.0 - Math.floor((deg * 60.0))) * 60.0;
if (deg < 10) ame.title = ame.title + "0";
ame.title = ame.title + deg + '"';
}
} else {
if (ame.value.indexOf("-") == (0 - 1)) {
deg = eval(ame.value);
if (deg >= 360) {
while (deg >= 360) {
deg = deg - 360;
}
ame.value = deg;
ame.title = ame.title + " ... DMS " + Math.floor(deg) + "°";
deg = deg - Math.floor(deg);
if (Math.floor((deg * 60.0)) < 10.0) ame.title = ame.title + "0";
ame.title = ame.title + Math.floor((deg * 60.0)) + "'";
deg = deg * 60.0 - Math.floor((deg * 60.0));
if (deg < 10) ame.title = ame.title + "0";
ame.title = ame.title + deg + '"';
} else {
deg = ame.value;
ame.title = ame.title + " " + Math.floor(deg) + "°";
deg = deg - Math.floor(deg);
if (Math.floor((deg * 60.0)) < 10.0) ame.title = ame.title + "0";
ame.title = ame.title + Math.floor((deg * 60.0)) + "'";
deg = (deg * 60.0 - Math.floor((deg * 60.0))) * 60.0;
if (deg < 10) ame.title = ame.title + "0";
ame.title = ame.title + deg + '"';
}
} else {
deg = eval(ame.value);
deg = -deg;
if (deg >= 360) {
while (deg >= 360) {
deg = deg - 360;
}
}
ame.value = eval(360.0 - deg);
deg = ame.value;
ame.title = ame.title + " ... DMS " + Math.floor(deg) + "°";
deg = deg - Math.floor(deg);
if (Math.floor((deg * 60.0)) < 10.0) ame.title = ame.title + "0";
ame.title = ame.title + Math.floor((deg * 60.0)) + "'";
deg = (deg * 60.0 - Math.floor((deg * 60.0))) * 60.0;
if (deg < 10) ame.title = ame.title + "0";
ame.title = ame.title + deg + '"';
}
}
}
function achange() {
}
function isNumeric(str) { // thanks to https://stackoverflow.com/questions/175739/built-in-way-in-javascript-to-check-if-a-string-is-a-valid-number
if (typeof str != "string") return false // we only process strings!
return !isNaN(str) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)...
!isNaN(parseFloat(str)) // ...and ensure strings of whitespace fail
}
function getthis(iois) {
var ik=0;
var reversethis=false;
var totco=0;
var ccomma=',';
var legcnt=-1;
var lsst='', lsstd='';
var miniarr=[], minirec='', ethere=false, nthere=false, pthere=false, psuff='', psuffdef=' ', marrxy=[];
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
var acontobodyinnerHTML=aconto.body.innerHTML;
if (acontobodyinnerHTML.toLowerCase().indexOf('<pre></pre>') > 0 || (acontobodyinnerHTML.indexOf('<PRE>') == 0 && acontobodyinnerHTML.indexOf('<pre>') == -1)) {
reversethis=true;
acontobodyinnerHTML=acontobodyinnerHTML.replace(/\<PRE\>/g,'<pre>').replace(/\<\/PRE\>/g,'</pre>').split('</pre>')[0];
if (parent.document.getElementById('tde')) {
parent.document.getElementById('tde').innerHTML+=' (Longitude)';
parent.document.getElementById('tdn').innerHTML+=' (Latitude)';
} else {
eesuffix=' (Longitude)';
nnsuffix=' (Latitude)';
}
} else if (acontobodyinnerHTML.indexOf('<br><br><br><br>') != -1) {
if (parent.document.getElementById('tde')) {
parent.document.getElementById('tde').innerHTML+=' (Longitude)';
parent.document.getElementById('tdn').innerHTML+=' (Latitude)';
} else {
eesuffix=' (Longitude)';
nnsuffix=' (Latitude)';
}
}
if (acontobodyinnerHTML.indexOf('<pre>') == 0 && aconto.body.innerHTML.indexOf(',') != -1) {
//alert('0:' + aconto.body.innerHTML);
var reclines=acontobodyinnerHTML.replace('<pre>','').replace('</pre>','').split('<br>');
for (var irecs=0; irecs<reclines.length; irecs++) {
miniarr=reclines[irecs].split(',');
minirec='';
ethere=false;
nthere=false;
pthere=false;
ccomma=',';
psuff=psuffdef.trim();
if (miniarr.length >= 2) {
if (!pthere && ('' + miniarr[0]).trim() != '' && !isNumeric('' + miniarr[0].replace(/\"/g,'').replace(/\'/g,''))) { if (psuffdef == " ") { psuffdef=','; } pthere=true; psuff=',' + miniarr[0]; }
if (!pthere && ('' + miniarr[1]).trim() != '' && !isNumeric('' + miniarr[1].replace(/\"/g,'').replace(/\'/g,''))) { if (psuffdef == " ") { psuffdef=','; } pthere=true; psuff=',' + miniarr[1]; }
if (isNumeric('' + miniarr[0].replace(/\"/g,'').replace(/\'/g,''))) { minirec+= '' + miniarr[0].replace(/\"/g,'').replace(/\'/g,''); ethere=true; }
if (isNumeric('' + miniarr[1].replace(/\"/g,'').replace(/\'/g,''))) {
if (ethere) {
minirec+= ',' + miniarr[1].replace(/\"/g,'').replace(/\'/g,''); nthere=true;
} else {
minirec+= '' + miniarr[1].replace(/\"/g,'').replace(/\'/g,''); ethere=true;
}
}
if (miniarr.length > 2) {
if (!pthere && ('' + miniarr[2]).trim() != '' && !isNumeric('' + miniarr[2].replace(/\"/g,'').replace(/\'/g,''))) { if (psuffdef == " ") { psuffdef=','; } pthere=true; psuff=''; for (ik=2; ik<miniarr.length; ik++) { psuff+=ccomma + miniarr[ik]; ccomma=','; } }
if (miniarr.length > 2 && ethere && !nthere) {
if (isNumeric('' + miniarr[2].replace(/\"/g,'').replace(/\'/g,''))) {
minirec+= ',' + miniarr[2].replace(/\"/g,'').replace(/\'/g,''); nthere=true;
}
}
}
if (nthere) { if (psuffdef.trim() == "") { psuffdef=""; psuff=""; } legcnt++; if (reversethis) { marrxy=minirec.split(','); lsst+=lsstd + marrxy[1] + ',' + marrxy[0] + psuff; } else { lsst+=lsstd + minirec + psuff; } lsstd=','; }
}
}
if (lsst != '' && legcnt > 0) {
//alert(lsst.slice(-100));
if (eesuffix != '') {
localStorage.setItem('en_st', encodeURIComponent(lsst + ' '));
} else {
localStorage.setItem('en_st', encodeURIComponent(lsst));
}
if (('' + location.hash) != '') {
//alert(location.hash);
location.href=document.URL.split('#')[0].split('?')[0] + '?traverse=' + legcnt + ',0' + location.hash;
} else {
location.href=document.URL.split('#')[0].split('?')[0] + '?traverse=' + legcnt + ',0' + hashsuff;
}
}
//alert(aconto.body.innerHTML);
}
}
}
}
}
function cadj() {
document.getElementById('adjust').click();
}
function processTraverse(ininfo) { // data items
for ( var i = 0; i < parambits.length; i++) {
if (numlegs == (0 - 1)) {
numlegs = parambits[i];
if (parambits.length > 1) firstBearing = parambits[i+1];
}
//alert(parambits[i]);
}
var zeroe="0.000";
var zeron="0.000";
var placec="";
var lightblue = "";
var clickadjust=false;
if (numlegs > 0) {
document.write("<h1>Survey Traverse Calculation</h1><input id='adjust' type='button' title='Analyze' onclick='analyze(this);' value='Analyze when Fully (or just E,N) Filled Out Below'></input> <a title='Restart' target='_blank' href='" + document.URL.split('#')[0].split('?')[0] + "'>Restart</a><br><br><table><tbody>");
document.write("<tr class='lightgray'><td title='Please enter Angles in Degrees'>Angles</td><td title='Please enter Bearings in Degrees'>Bearings</td><td>Lengths</td><td id=diffe>Delta E</td><td id=diffn>Delta N</td><td id=tde>E" + eesuffix + "</td><td id=tdn>N" + nnsuffix + "</td><td>Point</td></tr>");
document.write("<tr class='yellow'><td></td><td><input title='Entries with . are assumed as decimal degrees, else enter integer angle Degree value and will prompt for rest' onchange='anglechange(this);' type='text' id='firstBearing' value='" + firstBearing + "'></input></td><td></td><td></td><td></td><td></td><td></td><td><input class='lightgray' onclick='achange();' type='text' id='firstName'></input></td></tr>");
if (pvials.length > 0) { placec='' + pvials[0].replace(/\&\#44\;/g,",").replace(/\&comma\;/g,","); pvials.shift(); }
if (envials.length > 0) { clickadjust=true; zeroe='' + envials[0]; zeron='' + envials[1]; envials.shift(); envials.shift(); }
for ( var j = 0; j < numlegs; j++) {
document.write("<tr class='pink'><td><input title='Entries with . are assumed as decimal degrees, else enter integer angle Degree value and will prompt for rest' onchange='anglechange(this);' type='text' id='A" + j + "' value='0'></input></td><td id='dB" + j + "'></td><td></td><td><p class='cyellow' id='eE" + j + "'></p></td><td><p class='cyellow' id='eN" + j + "'></p></td><td><input " + lightblue + " onclick='achange();' type='text' id='E" + j + "' value='" + zeroe + "'></input></td><td><input " + lightblue + " onclick='achange();' type='text' id='N" + j + "' value='" + zeron + "'></input></td><td><input title='Geo Chart emoji SVG class styling suffixes (wmlr) or (wmrl) or (wmtb) for CSS styling writing-mode:vertical-lr; writing-mode:vertical-rl; writing-mode:horizontal-tb; respectively' class='lightblue' onblur=emc(this); onclick='achange();' type='text' id='P" + j + "' value=\"" + placec + "\" style=display:inline-block;></input><span title='' id='Q" + j + "'></span></td></tr>");
document.write("<tr class='yellow'><td></td><td id='B" + j + "'>0</td><td><input onclick='achange();' type='text' id='L" + j + "' value='0.000'></input></td><td id='dE" + j + "'>0.000</td><td id='dN" + j + "'>0.000</td><td></td><td></td><td></td></tr>");
zeroe = "";
zeron = "";
placec = "";
if (pvials.length > 0) { placec='' + pvials[0].replace(/\&\#44\;/g,",").replace(/\&comma\;/g,","); pvials.shift(); }
if (envials.length > 0) { clickadjust=true; zeroe='' + envials[0]; zeron='' + envials[1]; envials.shift(); envials.shift(); }
lightblue = " class='lightblue'";
}
if (zeroe == "") {
zeroe="-0.000";
}
if (zeron == "") {
zeron="-0.000";
}
document.write("<tr class='pink'><td><input class='lightgray' title='Entries with . are assumed as decimal degrees, else enter integer angle Degree value and will prompt for rest' onchange='anglechange(this);' type='text' id='A" + numlegs + "' value='-0'></input></td><td id='Ball' class='white'></td><td></td><td id='Eall' class='white'></td><td id='Nall' class='white'></td><td><input class='lightgreen' onclick='achange();' type='text' id='E" + numlegs + "' value='" + zeroe + "'></input></td><td><input class='lightgreen' onclick='achange();' type='text' id='N" + numlegs + "' value='" + zeron + "'></input></td><td><input title='Geo Chart emoji SVG class styling suffixes (wmlr) or (wmrl) or (wmtb) for CSS styling writing-mode:vertical-lr; writing-mode:vertical-rl; writing-mode:horizontal-tb; respectively' class='lightblue' onblur=emc(this); onclick='achange();' type='text' id='P" + numlegs + "' value=\"" + placec + "\" style=display:inline-block;></input><span title='' id='Q" + numlegs + "'></span></td></tr>");
document.write("<tr class='yellow'><td></td><td><input class='lightgray' title='Entries with . are assumed as decimal degrees, else enter integer angle Degree value and will prompt for rest' onchange='anglechange(this);' type='text' id='lastBearing' value='" + lastBearing + "'></input></td><td></td><td></td><td></td><td></td><td></td><td><input class='lightgray' onclick='achange();' type='text' id='firstName'></input></td></tr>");
//document.write("</tbody></table><div id=overlays></div><iframe src='//www.rjmprogramming.com.au/About_Us.html' style=display:none; id=preifcsv></iframe><iframe srcdoc='' style=display:none; onload='getthis(this);' id=ifcsv></iframe>");
document.write("</tbody></table><div id=overlays></div><iframe src=//www.rjmprogramming.com.au/PHP/fgc style=display:none; id=preifcsv></iframe><iframe srcdoc='' style=display:none; onload='getthis(this);' id=ifcsv></iframe>");
if (clickadjust) { setTimeout(cadj, 1000); }
setTimeout(postcheck, 2000);
}
}
if (document.URL.replace('?numlegs=','').indexOf('?') != -1) {
checkAtStart();
} else {
if (document.URL.indexOf('?') == -1) { setTimeout(precheckAtStart, 500); }
setTimeout(checkAtStart, 2000);
}
</script>
<body>
<iframe src='//www.rjmprogramming.com.au/About_Us.html' style=display:none; id=preifcsv></iframe>
<iframe srcdoc='' style=display:none; onload='getthis(this);' id=ifcsv></iframe>
<form data-onsubmit="document.getElementById('mygeoframe').style.display='block'; return true;" target=mygeoframe id=geoform action='//www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php' style='display:none;' method='POST'>
<input type=hidden id=ititle name=title value='My Land Survey Traverse'></input>
<input type=hidden name=aregexographicals value=y><input>
<input type=hidden id=iwidth name=width value='1112'></input>
<input type=hidden id=iheight name=height value='692'></input>
<input type=hidden id=icountry name=country value='Places'></input>
<input type=hidden id=ipopularity name=popularity value=''></input>
<input type=hidden id=iaregeographicals name=aregeographicals value='http.Ice,http.Lakagigar_Volcano,http.Bora_Bora'></input>
<input type=hidden id=ipeninfo name=peninfo value='75.57|-92.28|127938_Ice,64.04|-18.15|127755_Lakagigar_Volcano,-16.30|151.44|127958.65039_Bora_Bora'></input>
<input type=hidden id=idata name=data value=' [75.57|-92.28|~Ice~,2] , [64.04|-18.15|~Lakagigar Volcano~,2] , [-16.30|151.44|~Bora Bora~,2]'></input>
<input type=hidden name=wouldlikeyoutoseekpermission value=y></input>
<input type=submit value='Do GeoChart' style='display:none;' id=geosb><input>
</form>
<form data-onsubmit="document.getElementById('mygeoframe').style.display='block';" target=mygeoframe id=mapform action='//www.rjmprogramming.com.au/PHP/Map/map.php' style='display:none;' method='POST'>
<input type=hidden id=jtitle name=title value='My Land Survey Traverse'></input>
<input type=hidden id=jonclick name=onclick value='y'></input>
<input type=hidden id=jlabel name=label value="['Lat',"></input>
<input type=hidden id=jvalue name=value value="'Lon','Name']"></input>
<input type=hidden id=jdata name=data value=',[75.57,-92.28,~Ice~],[64.04,-18.15,~Lakagigar Volcano~],[-16.30,151.44,~Bora Bora~]'></input>
<input type=hidden name=wouldlikeyoutoseekpermission value=y></input>
<input type=submit value='Do Map' style='display:none;' id=mapsb><input>
</form>
</body>
</html>