13693261870
2024-04-02 2a1b873b4b78b508d5d53c57992e734c56619df8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <title>ToolTitle</title>
    <link REL=StyleSheet HREF="../css/Style.css" TYPE="text/css">
 
    <script language="javascript">
 
        function llDispChanged(newVal) {
            if (newVal == "DecDeg") {
                latLonMode = LATLONMODE_D;
            }
            else if (newVal == "DegDecMin") {
                latLonMode = LATLONMODE_DM;
            }
            else if (newVal == "DegMinDecSec") {
                latLonMode = LATLONMODE_DMS;
            }
        }
 
        function PutSpanText(Span, text) {
            if (Span.innerHTML != text) {
                return Span.innerHTML = text;
            }
        }
    </script>
    <style>
        html,body {
            height:99%;
            width:99%;
        background-color:#151515;
        border:solid 1px #0094ff;
        }
    </style>
</head>
 
 
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px" id="Body" class="hideUntillTranslated scrollbar-dark" onload="Init()" style="overflow-x:hidden">
 
        <table border="0" width="100%" cellspacing="0" cellpadding="2"></table>
 
    <object id="SGWorld" classid="CLSID:3a4f9197-65a8-11d5-85c1-0001023952c1" style="visibility:hidden;height:0 "></object>
 
    <script language="javascript" src="../tooljs/ToolsCommon65.js"></script>
    <script language="JAVASCRIPT">
        var LATLONMODE_DMS = 0, LATLONMODE_DM = 1, LATLONMODE_D = 2;
        var SGWorld = document.getElementById("SGWorld");
        var feetPerMeter = 3.2808399;
        var defaultMetersLookFrom = 5000;
        var latLonMode = LATLONMODE_D;
 
        function EmbedSeperator(SpanName) {
            var html = "";
            html += '<a onclick="pop2(' + SpanName + ',document.getElementById(\'' + SpanName + 'LeftImg\'),document.getElementById(\'' + SpanName + 'RightImg\'))" >';
            html += '<table border=0 cellspacing=0 cellpadding=0 width=255 style=\'margin-left:5px;\'>';
            html += '<tr onmouseover="HighlightSep(1,' + SpanName + ',document.getElementById(\'' + SpanName + 'LeftImg\'),' + SpanName + 'CenterTD,document.getElementById(\'' + SpanName + 'RightImg\'))" ';
            html += 'onmouseout="HighlightSep(0,' + SpanName + ',document.getElementById(\'' + SpanName + 'LeftImg\'),' + SpanName + 'CenterTD,document.getElementById(\'' + SpanName + 'RightImg\'))">';
            html += '<td style="line-height:5px;"><img id="' + SpanName + 'LeftImg" src="../img/down-left-reg.gif" style="border:0px;"></td>';
            html += '<td valign=top id="' + SpanName + 'CenterTD" style="background-image:url(../img/sep-reg.gif);height:15px; " width=100% class="s8w" align=center valign=top><span id="' + SpanName + 'SectionName">' + SGLang.i18n('Text1') + '</span></td>';
            html += '<td style="line-height:5px;"><img id="' + SpanName + 'RightImg" src="../img/down-right-reg.gif" style="border:0px;"></td>';
            html += '</tr>';
            html += '<tr>';
            html += '<td colspan=3><img src="../img/empty.gif" width=1 Height=3 border=0></td>';
            html += '</tr>';
            html += '</table></a>';
            document.write(html);
        }
 
        function EmbedCSSection(SpanName) {
            document.write('<span id="' + SpanName + '" style="display: none">');
            document.write('<table border=0 cellspacing=0 cellpadding=0  class="s9" style="width:100%">');
 
            if (SpanName != "MGRS" && SpanName != "LatLong") {
                document.write('    <tr align=center>');
                document.write('    <td align=left class="s8b" ><INPUT type=button value="Text2" class="MenuButton i18n" style="width:90px;height:25px; margin:5px;" name="' + SpanName + 'ChooseCSName" onclick="ChooseCS(' + SpanName + 'SectionName, ' + SpanName + 'GroupKey, ' + SpanName + 'CSKey, ' + SpanName + 'DatumKey, ' + SpanName + 'UnitKey)"></td>');
                document.write('    </tr>');
            }
            document.write('<tr class="s9">');
            document.write('<td>');
            document.write(' <table border=1 bgcolor="#ffffff"  width="255" cellspacing=0 cellpadding=1 class="s9" style=\'margin-left:5px;\'> ');
            document.write('    <tr align=center  style="display:none" > ');
            document.write('        <td class="s8b"><span id="' + SpanName + 'GroupKey">  </span></td>');
            document.write('        <td><span id="' + SpanName + 'CSKey">  </span></td>');
            document.write('        <td><span id="' + SpanName + 'DatumKey">  </span></td>');
            document.write('        <td><span id="' + SpanName + 'UnitKey" width="15%">  </span></td>');
            document.write('    </tr>');
 
            if (SpanName == "LatLong") {
                document.write('<tr  class="s9">');
                document.write('<td>');
                document.write(SGLang.i18n('Text3') + ' </td>');
                document.write('<td colspan=3>');
                document.write('<SELECT id="selLatLongModeId" name="selLatLongMode" onchange="llDispChanged(selLatLongMode.value)" >');
                document.write('<OPTION class="i18n" VALUE="DecDeg">Text4</OPTION>');
                document.write('<OPTION class="i18n" VALUE="DegDecMin">Text5</OPTION>');
                document.write('<OPTION class="i18n" VALUE="DegMinDecSec">Text6</OPTION>');
                //    document.write('<OPTION VALUE=""></OPTION>');
                document.write('</SELECT>');
                document.write('</td>');
                document.write('</tr>');
            }
            document.write('    <tr class="TableOtherLine">');
            document.write('    <td NOWRAP><span class="i18n">Text7</span></td><td Colspan=3><span id="' + SpanName + 'ProjectedCoords"></span></td>');
            document.write('    </tr>');
            document.write('    <tr>');
            document.write('    <td NOWRAP><span class="i18n">Text8</span></td><td Colspan=3><span id="' + SpanName + 'CursorCoords"></span></td>');
            document.write('    </tr>');
 
            document.write('    <tr class="TableOtherLine">');
 
            if (SpanName == "MGRS") {
                document.write('    <td Colspan=1><INPUT name="' + SpanName + 'InX" type="text"  style="width:80px;" value="" SIZE="17"></td>');
                document.write('    <td Colspan=3 align=let class="s8b" ><INPUT type=button value="Text9" class="MenuButton i18n" style="width:80px; height:25px;" onclick="JumpLookToMGRS(' + SpanName + 'InX.value, defaultMetersLookFrom)"></td>');
 
            }
            else {
                document.write('    <td ColSpan=2 NOWRAP>' + SGLang.i18n("Text20") + '<INPUT name="' + SpanName + 'InX" type="text" style="width:60px;" value="" SIZE="6"><br/>');
                document.write(SGLang.i18n("Text21") + '<INPUT name="' + SpanName + 'InY" type="text"  style="width:60px;"  value="" SIZE="6"></td>');
                document.write('    <td Colspan=2 align=left class="s8b" ><INPUT type=button  value="Text9" style="width:80px;height:25px" class="MenuButton i18n" onclick="JumpLookTo(' + SpanName + 'GroupKey,' + SpanName + 'CSKey,' + SpanName + 'DatumKey,' + SpanName + 'UnitKey,' + SpanName + 'InX.value,' + SpanName + 'InY.value, defaultMetersLookFrom)"></td>');
            }
 
            document.write('    </tr>');
 
            document.write(' </table>');
            document.write('</td>');
            document.write('</tr>');
            document.write('</table>');
            document.write('<br>');
            document.write('</span>');
        }
 
 
        function EmbedPrefSection(SpanName) {
            document.write('<span id="' + SpanName + '" style="display: none">');
            document.write('<table border=0 cellspacing=0 cellpadding=0  class="s9">');
 
            document.write('<tr  class="s9">');
            document.write('<td>');
            document.write('Distance from location:');
            document.write('</td>');
            document.write('<td>');
            document.write('<INPUT name="MetersDistanceLook" type="text"  style="width:80px;" value="' + defaultMetersLookFrom + '" SIZE="17">');
            document.write('</td>');
            document.write('</tr>');
 
 
            document.write('</table>');
            document.write('<br>');
            document.write('</span>');
        }
 
        function EmbedPrefs(SpanName) {
            EmbedSeperator(SpanName)
            EmbedPrefSection(SpanName)
        }
 
        function EmbedCoordSys(SpanName) {
            EmbedSeperator(SpanName)
            EmbedCSSection(SpanName)
        }
    </script>
 
    <SCRIPT Language="JavaScript">
        var pos;
        var pos1;
        // -------------------------------------------------------------
        // Init
        // -------------------------------------------------------------
 
        function Init() {
            InitHead();
            LatLongGroupKey.innerHTML = "GEOGCS['WGS84 Coordinate System',DATUM['WGS 1984',SPHEROID['WGS 1984',6378137,298.257223563],TOWGS84[0,0,0,0,0,0,0],AUTHORITY['EPSG','6326']],PRIMEM['Greenwich',0],UNIT['degree',0.0174532925199433],AUTHORITY['EPSG','4326'],AUTHORITY['SBMG','LAT-LONG,LAT-LONG,WGS84,METERS']]";
            LatLongCSKey.innerHTML = "LAT-LONG";
            StartListening();
        }
 
        function Deinit() {
            StopListening();
        }
 
        //--------------
        // Init
        function InitHead() {
            if (GetParamValue("inSG", "") == "1") {
                document.getElementById("TopAreaTD").style.height = "57";
                document.getElementById("TitleTD").align = "left";
                document.getElementById("CloseHelpTd").style.display = "none";
            }
 
        }
 
        function StartListening() {         // Done
            SGWorld.AttachEvent("OnFrame", jsOnFrame);
        }
 
        function StopListening() {          // Done
            SGWorld.DetachEvent("OnFrame", jsOnFrame);
        }
 
        // -------------------------------------------------------------
        // jsOnFrame
        // -------------------------------------------------------------
        function jsOnFrame() {              // Done
 
 
            pos = SGWorld.Navigate.GetPosition(0);
 
            var CurrGroundH = SGWorld.Terrain.GetGroundHeightInfo(pos.X, pos.Y, 0, true);
 
            pos.Altitude = pos.Altitude + CurrGroundH.Position.Altitude;
 
            var hLLCS;
            var hCurrCS;
 
            ReprojectAll(pos.X, pos.Y, pos.Altitude);
 
            // ************ MGRS **************** //
 
            var sMGRS = SGWorld.CoordServices.ConvertCoordinateToMGRS(pos.X, pos.Y);
            PutSpanText(MGRSProjectedCoords, FormatMGRS(sMGRS));
 
            // cursor position
 
            var ObjectType, WorldX, WorldH, WorldY, ObjectID;
            var rect = SGWorld.Window.Rect;
            var mouseInfo = SGWorld.Window.GetMouseInfo();
            var pointInfo;
 
            var bCursorInSky = false;
 
            if (mouseInfo.X >= rect.Width || mouseInfo.Y >= rect.Height || mouseInfo.X < 0 || mouseInfo.Y < 0) {
                bCursorInSky = true;
            }
            else {
                pointInfo = SGWorld.Window.PixelToWorld(mouseInfo.X, mouseInfo.Y, 63);
                if (pointInfo.Type == WorldPointType.WPT_SKY)
                    bCursorInSky = true;
            }
 
            if (bCursorInSky)
                PutSpanText(MGRSCursorCoords, SGLang.i18n("Text19"));
            else {
                sMGRS = SGWorld.CoordServices.ConvertCoordinateToMGRS(pointInfo.Position.X, pointInfo.Position.Y);
                sMGRSCoords = FormatMGRS(sMGRS);
                PutSpanText(MGRSCursorCoords, sMGRSCoords);
            }
        }
 
        function FormatMGRS(str) {
            var FormatMGRS;
            if (str.length != 15)
                return FormatMGRS = str;
            else {
                FormatMGRS = LeftString(str, 3) + " " + str.substr(3, 2) + " " + str.substr(5, 5) + " " + RightString(str, 5);
                return FormatMGRS;
            }
        }
 
        function GetParamValue(findParam, defaultValue) {
            var arr = document.location.href.split("?");
            if (arr.length <= 1) return defaultValue;
            arr = arr[1].split("&");
            for (var i = 0; i < arr.length; i++) {
                if (arr[i].indexOf(findParam) == 0 && arr[i].indexOf("=") == findParam.length) {
                    arr = arr[i].split("=");
                    return arr[1];
                }
            }
            return defaultValue;
        }
 
        function RightString(str, n) {
            if (n <= 0)
                return "";
            else if (n > String(str).length)
                return str;
            else {
                var intLen = String(str).length;
                return String(str).substring(intLen, intLen - n);
            }
        }
 
 
        function LeftString(str, n) {
            if (n <= 0)
                return "";
            else if (n > String(str).length)
                return str;
            else
                return String(str).substring(0, n);
        }
 
        var sToolConfigurationGroupName = "CoordSysToolConfiguration";
 
        function JumpLookToMGRS(MGRSCoords, MetersLookDistance) {       // Done
            var Coords = "";
            var fromMGRS;
            var i;
            if (MGRSCoords != "") {
                for (i = 0; i < MGRSCoords.length; i++) {
                    if (MGRSCoords.substr(i, 1) != " ") {
                        Coords = Coords + MGRSCoords.substr(i, 1);
                    }
                }
            }
 
            if (Coords.length < 14 || Coords.length > 15) {
                alert(SGLang.i18n("Text10"));
                return;
            }
 
            if (Coords.length == 14)
                Coords = " " + Coords;
 
            try {
                fromMGRS = SGWorld.CoordServices.ConvertMGRSToCoordinate(Coords);
            }
            catch (Err) {
                alert(SGLang.i18n("Text10"));
                return;
            }
            try {
                var metersDist = parseFloat(MetersLookDistance);
                var posForMouseInfo = SGWorld.Creator.CreatePosition(fromMGRS.X, fromMGRS.Y, 0, 3, 180, 45, 0, 0);
                SGWorld.CoordServices.MoveCoordEx(posForMouseInfo, metersDist, 0, 0);
 
                var posSetPosition = SGWorld.Creator.CreatePosition(posForMouseInfo.X, posForMouseInfo.Y, posForMouseInfo.Altitude, 0, 0, 315, 0, 0);
                SGWorld.Navigate.SetPosition(posSetPosition);
            }
            catch (Err) {
                alert(SGLang.i18n("Text11"));
            }
        }       // End of JumpLookToMGRS function
 
        function JumpLookTo(GroupKeySpan, CSKeySpan, DatumKeySpan, UnitKeySpan, InX, InY, MetersLookDistance) {
            var pos = SGWorld.Navigate.GetPosition(3);
 
            var hCurrCS = SGWorld.CoordServices.SourceCoordinateSystem;
            var hCS = SGWorld.CoordServices.CreateCoordinateSystem(GroupKeySpan.innerHTML);
            InX = validateNumber(InX);
            InY = validateNumber(InY);
 
            if (CSKeySpan.innerHTML == "LAT-LONG") {
                if (InX > 180 || InX < -180 || InY > 90 || InY < -90) {
                    alert(SGLang.i18n("Text22"));
                    return;
                }
                else if (isNaN(InX) || isNaN(InY)) {
                    alert(SGLang.i18n("Text23"));
                    return;
                }
            }
            else
                if (isNaN(InX) || isNaN(InY)) {
                    alert(SGLang.i18n("Text23"));
                    return;
                }
 
            var nX = parseFloat(InX);
            var nY = parseFloat(InY);
 
            var projected = SGWorld.CoordServices.Reproject(hCS, hCurrCS, nX, nY);
 
            nX = projected.X;
            nY = projected.Y;
 
            try {
                var metersDist = parseFloat(MetersLookDistance);
                var posForMouseInfo = SGWorld.Creator.CreatePosition(nX, nY, 0, 3, 180, 45, 0, 0);
                SGWorld.CoordServices.MoveCoordEx(posForMouseInfo, metersDist, 0, 0);
                var posSetPosition = SGWorld.Creator.CreatePosition(posForMouseInfo.X, posForMouseInfo.Y, posForMouseInfo.Altitude, 0, 0, 315, 0, 0);
                SGWorld.Navigate.SetPosition(posSetPosition);
            }
            catch (Err) {
                alert(SGLang.i18n("Text12"));
            }
        }       // End of JumpLookTo function
 
        function GetStrLatLon(degLon, degLat) {
            var strLatLon;
            if (latLonMode == LATLONMODE_D)
                strLatLon = SGLang.i18n("Text15") + FormatNumber(degLon, 5, -1) + String.fromCharCode(176) + "\r\n" + SGLang.i18n("Text14") + FormatNumber(degLat, 5, -1) + String.fromCharCode(176);
            if (latLonMode == LATLONMODE_DM) {
                wholeLon = parseInt(degLon);
                wholeLat = parseInt(degLat);
 
                minLon = (degLon - wholeLon) * 60;
                minLat = (degLat - wholeLat) * 60;
 
                strLatLon = SGLang.i18n("Text15") + wholeLon + String.fromCharCode(176) + FormatNumber(minLon, 5, -1) + "'" + "\r\n" + SGLang.i18n("Text14") + wholeLat + String.fromCharCode(176) + FormatNumber(minLat, 5, -1) + "'";
            }
            if (latLonMode == LATLONMODE_DMS) {
                wholeLon = parseInt(degLon);
                wholeLat = parseInt(degLat);
 
                minLon = (degLon - wholeLon) * 60;
                minLat = (degLat - wholeLat) * 60;
 
                wholeMinLon = parseInt(minLon);
                wholeMinLat = parseInt(minLat);
 
                secLon = (minLon - wholeMinLon) * 60;
                secLat = (minLat - wholeMinLat) * 60;
 
                strLatLon = SGLang.i18n("Text15") + wholeLon + String.fromCharCode(176) + wholeMinLon + "'" + FormatNumber(secLon, 5, -1) + "\"" + "\r\n" + SGLang.i18n("Text14") + wholeLat + String.fromCharCode(176) + wholeMinLat + "'" + FormatNumber(secLat, 5, -1) + "\"";
            }
 
            return strLatLon;
        }       // End of GetStrLatLon function
 
        /* *********************************************************************
        IN:
        NUM - the number to format
        decimalNum - the number of decimal places to format the number to
        bolLeadingZero - true / false - display a leading zero for
        numbers between -1 and 1
        bolParens - true / false - use parenthesis around negative numbers
        bolCommas - put commas as number separators.
 
        RETVAL:
        The formatted number!
        ********************************************************************* */
        function FormatNumber(num, decimalNum, bolLeadingZero, bolParens, bolCommas) {
            if (isNaN(parseInt(num))) return "NaN";
 
            var tmpNum = num;
            var iSign = num < 0 ? -1 : 1;     // Get sign of number
 
            // Adjust number so only the specified number of numbers after
            // the decimal point are shown.
            tmpNum *= Math.pow(10, decimalNum);
            tmpNum = Math.round(Math.abs(tmpNum))
            tmpNum /= Math.pow(10, decimalNum);
            tmpNum *= iSign;                 // Readjust for sign
 
 
            // Create a string object to do our formatting on
            var tmpNumStr = new String(tmpNum);
 
            // See if we need to strip out the leading zero or not.
            if (!bolLeadingZero && num < 1 && num > -1 && num != 0)
                if (num > 0)
                    tmpNumStr = tmpNumStr.substring(1, tmpNumStr.length);
                else
                    tmpNumStr = "-" + tmpNumStr.substring(2, tmpNumStr.length);
 
            // See if we need to put in the commas
            if (bolCommas && (num >= 1000 || num <= -1000)) {
                var iStart = tmpNumStr.indexOf(".");
                if (iStart < 0)
                    iStart = tmpNumStr.length;
 
                iStart -= 3;
                while (iStart >= 1) {
                    tmpNumStr = tmpNumStr.substring(0, iStart) + "," + tmpNumStr.substring(iStart, tmpNumStr.length)
                    iStart -= 3;
                }
            }
 
            // See if we need to use parenthesis
            if (bolParens && num < 0)
                tmpNumStr = "(" + tmpNumStr.substring(1, tmpNumStr.length) + ")";
 
            return tmpNumStr;     // Return our formatted string!
        }
 
    </SCRIPT>
 
    <SCRIPT language="JAVASCRIPT">
        EmbedCoordSys("LatLong");
        LatLongSectionName.innerHTML = "Lat Long";
        EmbedCoordSys("MGRS");
        MGRSSectionName.innerHTML = "MGRS";
        EmbedCoordSys("CoordSys3");
        EmbedCoordSys("CoordSys4");
 
 
        function ChooseCS(SectionSpan, wktSpan) {
            var wkt = wktSpan.innerText;
            wkt = SGWorld.CoordServices.ChooseCSDialog(SGLang.i18n("Text13"), wkt);
 
            if (wkt != "") {
                try {
                    SectionSpan.innerText = SGWorld.CoordServices.CreateCoordinateSystem(wkt).WktDescription;
                    wktSpan.innerText = wkt;
                }
                catch (e) {
                    // invalid well known text. do nothing
                }
            }
        }
 
        function Reproject(X, Y, Height, targetWKT, DisplayCoordsSpan, DisplayCursorSpan, formatOutput) {
            if (targetWKT == "")
                return;
 
            var targetCS = SGWorld.CoordServices.CreateCoordinateSystem(targetWKT);
 
            ReprojectPoint(X, Y, Height, targetCS, DisplayCoordsSpan, formatOutput);
 
            var bCursorInSky = false;
            var rect = SGWorld.Window.Rect;
            var mouseInfo = SGWorld.Window.GetMouseInfo();
            var pointInfo;
 
            if (mouseInfo.X >= rect.Width || mouseInfo.Y >= rect.Height || mouseInfo.X < 0 || mouseInfo.Y < 0) {
                bCursorInSky = true;
            }
            else {
                pointInfo = SGWorld.Window.PixelToWorld(mouseInfo.X, mouseInfo.Y, 63);
                if (pointInfo.Type == WorldPointType.WPT_SKY)
                    bCursorInSky = true;
            }
 
            if (bCursorInSky) {
                DisplayCursorSpan.innerText = "\r\n" + SGLang.i18n("Text19") + "\r\n\r\n";
            }
            else {
                ReprojectPoint(pointInfo.Position.X, pointInfo.Position.Y, pointInfo.Position.Altitude, targetCS, DisplayCursorSpan, formatOutput);
            }
        }
 
        function ReprojectPoint(x, y, height, targetCS, targetSpan, formatOutput) {
            var projected = { X: SGLang.i18n("Text19"), Y: SGLang.i18n("Text19") };
            try {
                projected = SGWorld.CoordServices.Reproject(SGWorld.CoordServices.SourceCoordinateSystem, targetCS, x, y);
            }
            catch (e) {
                targetSpan.innerText = "\r\n" + SGLang.i18n("Text19") + "\r\n\r\n";
                return;
            }
 
            if (SGWorld.GetOptionParam("AltitudeAndDistance") == 1) {
                height = height * feetPerMeter;
                targetSpan.innerText = formatOutput(projected, height, SGLang.i18n("Text17"));
            }
            else {
                targetSpan.innerText = formatOutput(projected, height, SGLang.i18n("Text18"));
            }
 
        }
 
        function ReprojectAll(x, y, height) {
            Reproject(x, y, height, LatLongGroupKey.innerText, LatLongProjectedCoords, LatLongCursorCoords, function (point, h, units) {
                var latlon = GetStrLatLon(point.X, point.Y)
                return latlon + "\r\n" + SGLang.i18n("Text16") + h.toFixed(0) + units;
            });
            Reproject(x, y, height, CoordSys3GroupKey.innerText, CoordSys3ProjectedCoords, CoordSys3CursorCoords, function (point, h, units) {
                return SGLang.i18n("Text20") + point.X.toFixed(5) + "\r\n" +
                        SGLang.i18n("Text21") + point.Y.toFixed(5) + "\r\n" +
                        SGLang.i18n("Text16") + h.toFixed(0) + units
            });
 
            Reproject(x, y, height, CoordSys4GroupKey.innerText, CoordSys4ProjectedCoords, CoordSys4CursorCoords, function (point, h, units) {
                return SGLang.i18n("Text20") + point.X.toFixed(5) + "\r\n" +
                        SGLang.i18n("Text21") + point.Y.toFixed(5) + "\r\n" +
                        SGLang.i18n("Text16") + h.toFixed(0) + units
            });
        }
 
        function pop2(id, imageLeft, imageRight) {
            if (id.style.display == "inline") {
                id.style.display = "none";
                imageLeft.src = "../img/down-left-Hi.gif";
                imageRight.src = "../img/down-right-Hi.gif";
            }
            else {
                id.style.display = "inline";
                imageLeft.src = "../img/up-left-Hi.gif";
                imageRight.src = "../img/up-right-Hi.gif";
            }
        }
 
 
        function HighlightSep(Mode, id, LeftImg, CenterTD, RightImg) {
            if (id.style.display == "inline") {
                if (Mode == 0) {
                    LeftImg.src = "../img/up-left-reg.gif";
                    CenterTD.style.backgroundImage = "url(../img/sep-reg.gif)";
                    RightImg.src = "../img/up-right-reg.gif";
                }
                else {
                    LeftImg.src = "../img/up-left-Hi.gif";
                    CenterTD.style.backgroundImage = "url(../img/sep-Hi.gif)";
                    RightImg.src = "../img/up-right-Hi.gif";
                }
            }
            else {
                if (Mode == 0) {
                    LeftImg.src = "../img/down-left-reg.gif";
                    CenterTD.style.backgroundImage = "url(../img/sep-reg.gif)";
                    RightImg.src = "../img/down-right-reg.gif";
                }
                else {
                    LeftImg.src = "../img/down-left-Hi.gif";
                    CenterTD.style.backgroundImage = "url(../img/sep-Hi.gif)";
                    RightImg.src = "../img/down-right-Hi.gif";
                }
            }
        }
    </SCRIPT>
    </FORM>
</body>
 
</html>
<!--Sig:00000040i.#K90wY1Hcvvo7FZnDsrNshOSJG82mSV5celwRmOWxQJLjtH.6TNO0cdOHt2w1ey05uuaSFsWfK1q8pqD4yGfJJ-->
<!--Sig:000000405KOWExzewLiYvqHGtuQxDf2AN0I.Pz4QzxPN02B0SBhPQPFWdBKcMNIaiZ4QZ9OjhURY120MpKBz.uKeW.3TGCJJ-->
<!--Sig:00000040WOzLi2nAFWvyYJBa6UhUQUwYirXlH5A3hy.3iK4QWFfrn1iTwbLTko3AYDmlso6Fv1GUQhR8ol78dgyJrugwXTJJ-->
<!--Sig:00000040ELw4fYPyDjhvqEKbGOtLaXLLxYb6OFBX2ziGWIOyHdQ7IANX2rbFzHYET8jYG0qnS9qbUpH9u8sowz1KoHGaMzJJ-->