-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathWU-radar-inc.php.bak
1116 lines (929 loc) · 64.7 KB
/
WU-radar-inc.php.bak
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
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/*------------------------------------------------
// This script is for use in USA as it retrieves information from Weather Underground
// for NOAA Radar sites and USA National and regional weather maps.
//
// According to John Celenza, Director of Weather Technology at Wunderground.
//
// Please feel free to use Wunderground images and data on personal sites,
// as long as you link those images to Wunderground or give direct credit.
// Something like "This image courtesy of Weather Underground" is appropriate.
//
// Be sure to give credit where credit is due.
//
// Original script by Tom at http://www.carterlake.org/
// Modifications and enhancements by Jim at http://jcweather.us/
//
// Additional modifications by Ken True at http://saratoga-weather.org/ for use
// in the Carterlake/AJAX/PHP website template and allowing easy setup using
// settings area (using built-in javascript functions).
//
// the script does NOT generate a complete HTML page and is intended for use
// ONLY by being included in an existing webpage on your site by:
// <?php include("WU-radar-inc.php"); ?>
// */
// Version 1.00 - 07-Jan-2008 - Initial beta release with settings customization features
// and XHTML 1.0-Transitional valid code.
// Version 1.01 - 08-Jan-2008 - Regional map fixed, color option on legend, zoom radar corrections
// Version 1.02 - 08-Jan-2008 - Fixed problem with Safari browser, new Regional Advisory map and $CityPos9
// Version 1.03 - 09-Jan-2008 - Initial release - tested in IE7, FF2, Opera 9, Safari-Win
// Version 1.04 - 09-Jan-2008 - Fixed missing </a>, moved lower text inside overall table for better format
// using <iframe> include.
// Version 1.05 - 24-Jul-2008 - Fixed legend for severe weather (thanks to Michael at http://www.relayweather.com/ )
// Version 1.06 - 15-Apr-2011 - Fixed wandering animation scale (changed 'type=N1'R to 'type=N0R' for 5 occurrence)
// Version 1.07 - 31-Aug-2012 - Added support for alternate WU radblast servers
// Version 1.08 - 02-Sep-2012 - fixed bug for maps 10-20 display
// Version 1.09 - 06-Dec-2013 - autofix radblast-aa to radblast in WU URL
//
// settings ----------------------------- */
$imagesDir = './ajax-images/'; // directory for ajax-images+radar buttons with trailing slash
$RDR = 'MUX'; // last 3 characters of NOAA Radar Site Name
$Lat = '37.27153397'; //North=positive, South=negative decimal degrees
$Long = '-122.02274323'; //East=positive, West=negative decimal degrees
$City = 'Saratoga'; // Name of city
$WUregion = 'sw'; // WeatherUnderground regional map group name
// 'sw'=SouthWest, 'nw'=NorthWest, 'mw'=Midwest
// 'sp'=South Central, 'ne'=North East, 'se'=South East
$WUname1 = 'City Level'; // tooltip label for mode=1
$WUname2 = 'South SF Bay'; // tooltip label for mode=2
$WUname3 = 'SF Bay Area'; // tooltip label for mode=3
$WUname4 = 'Southwest US'; // tooltip label for mode=4
$WUname5 = 'Entire US'; // tooltip label for mode=5
//
//
// To set $MetroURL (and $CityURL) follow these steps:
// 1) go to www.wunderground.com and search for your city, state, then click on the radar image
// 2) draw a box around your 'metro area' .. the radar image will zoom in.
// 3) right click on 'View/Save this image' and copy URL to clipboard
// 4) paste the url from the clipboard into the $MetroURL = '...'; below.
// 5) draw a box on the WU radar around your 'city area'
// 6) right click on 'View/Save this image' and copy URL to clipboard
// 7) paste the URL from the clipboard into the $CityURL = '...'; below
//
// the $CityPosN variables are used to store the relative position information to
// place a red dot and $City over the map displayed. There are 9 different sizes
// of maps displayed. The $CityColorN variables are for the text color of the
// overlay city name display. '#FFFFFF' (white) should work for most displays,
// You may need to adjust $CityColor4 (advisory map) and/or $CityColor8 (Flu map)
// to a different color since they use white backgrounds.
// Now run the script with ?show=loc to enable the helper app.
// 1) Click on the $CityPos1 link shown on the page, then
// 2) click the cross-hair cursor over the point where the red dot is to appear, and
// the legend will move to that location, and the PHP code will appear in a text box
// for copying new values.
// 3) Highlight the text box on the page displaying $CityPos1 = 'left: nnnpx; top: -mmmpx';
// 4) copy the contents to the clipboard, and paste it to replace the $CityPos1 line
// shown below.
// Repeat the procedure for $CityPos2 through $CityPos9
//
// $CityPos1 - for City Level radar/animation
$CityPos1 = 'left: 389px; top: -254px;';
$CityColor1 = '#FFFFFF'; // color of legend display
// see instructions above to set $CityURL value
$CityURL = 'http://radblast-aa.wunderground.com/cgi-bin/radar/WUNIDS_map?station=MUX&brand=wui&num=1&delay=15&type=N0R&frame=0&scale=0.125&noclutter=0&t=1199816619&lat=37.27153397&lon=-122.02274323&label=Saratoga%2C+CA&showstorms=0&map.x=400&map.y=240¢erx=478¢ery=335&transx=78&transy=95&showlabels=1&severe=0&rainsnow=0&lightning=0';
// $CityPos2 - for Metro Level radar/animation
$CityPos2 = 'left: 394px; top: -260px;';
$CityColor2 = '#FFFFFF'; // color of legend display
// see instructions above to set $MetroURL value
$MetroURL = 'http://radblast-aa.wunderground.com/cgi-bin/radar/WUNIDS_map?station=MUX&brand=wui&num=1&delay=15&type=N0R&frame=0&scale=0.272&noclutter=0&t=1199816502&lat=37.27153397&lon=-122.02274323&label=Saratoga%2C+CA&showstorms=0&map.x=400&map.y=240¢erx=436¢ery=276&transx=36&transy=36&showlabels=1&severe=0&rainsnow=0&lightning=0';
// $CityPos3 - for unzoomed radar/animation
$CityPos3 = 'left: 386px; top: -262px;';
$CityColor3 = '#FFFFFF'; // color of legend display
// $CityPos4 - for US Advisory map
$CityPos4 = 'left: 35px; top: -324px;';
$CityColor4 = '#FFFFFF'; // color of legend display
// $CityPos5 = USA Radar/animation
$CityPos5 = 'left: 50px; top: -345px;';
$CityColor5 = '#FFFFFF'; // color of legend display
// $CityPos6 - for USA Radar Map
$CityPos6 = 'left: 29px; top: -319px;';
$CityColor6 = '#FFFFFF'; // color of legend display
// $CityPos7 - Regional maps (Fronts, Satellite, Wind, Jet Stream, Snow Depth, etc)
$CityPos7 = 'left: 51px; top: -345px;';
$CityColor7 = '#FFFFFF'; // color of legend display
// $CityPos8 - for USA Flu map
$CityPos8 = 'left: 34px; top: -318px;';
$CityColor8 = '#0000FF'; // color of legend display
// $CityPos9 - for Regional Advisories map
$CityPos9 = 'left: 49px; top: -326px;';
$CityColor9 = '#FFFFFF'; // color of legend display
// end of settings
//------------------------------------------------
if (isset($_REQUEST['sce']) && strtolower($_REQUEST['sce']) == 'view' ) {
//--self downloader --
$filenameReal = __FILE__;
$download_size = filesize($filenameReal);
header('Pragma: public');
header('Cache-Control: private');
header('Cache-Control: no-cache, must-revalidate');
header("Content-type: text/plain");
header("Accept-Ranges: bytes");
header("Content-Length: $download_size");
header('Connection: close');
readfile($filenameReal);
exit;
}
?><!-- WU-radar-inc.php - Version 1.09 - 06-Dec-2013 - http://saratoga-weather.org/scripts.php --><?php
//------------------------------------------------
// overrides from Settings.php if available
global $SITE;
if (isset($SITE['imagesDir'])) {$imagesDir = $SITE['imagesDir'];}
if (isset($SITE['noaaradar'])) {$RDR = $SITE['noaaradar'];}
if (isset($SITE['latitude'])) {$Lat = $SITE['latitude'];}
if (isset($SITE['longitude'])) {$Long = $SITE['longitude'];}
if (isset($SITE['cityname'])) {$City = $SITE['cityname'];}
if (isset($SITE['WUregion'])) {$WUregion = $SITE['WUregion']; }
if (isset($SITE['timeFormat'])) {$timeFormat = $SITE['timeFormat'];}
if (isset($SITE['tz'])) {$ourTZ = $SITE['tz'];}
if (isset($SITE['WUname1'])) {$WUname1 = $SITE['WUname1'];} // tooltip label for mode=1
if (isset($SITE['WUname2'])) {$WUname2 = $SITE['WUname2'];} // tooltip label for mode=2
if (isset($SITE['WUname3'])) {$WUname3 = $SITE['WUname3'];} // tooltip label for mode=3
if (isset($SITE['WUname4'])) {$WUname4 = $SITE['WUname4'];} // tooltip label for mode=4
if (isset($SITE['WUname5'])) {$WUname5 = $SITE['WUname5'];} // tooltip label for mode=5
// end of overrides from Settings.php if available
$UTCtime = time(); // not random, but needed for URL fetches.
$WU = parse_url($MetroURL);
$WUhost = $WU['host'];
$WUhost = preg_replace('|radblast-aa|i','radblast',$WUhost); //
print "\n<!-- using '$WUhost' for City, Metro, and Full radar images -->\n";
//------------------------------------------------
//Get values from web - set as default if nothing
//------------------------------------------------
$PHP_SELF = $_SERVER['PHP_SELF'];
if ( empty($_REQUEST['mode']) )
$_REQUEST['mode']="3";
if ( empty($_REQUEST['animated']) )
$_REQUEST['animated']="0";
if ( empty($_REQUEST['advisories']) )
$_REQUEST['advisories']="0";
if ( empty($_REQUEST['track']) )
$_REQUEST['track']="0";
if ( empty($_REQUEST['lightning']) )
$_REQUEST['lightning']="0";
//------------------------------------------------
//------------------------------------------------
//Pass into PHP variables with caution
//------------------------------------------------
$Mode = preg_replace('|[^\d]+|','',$_REQUEST['mode']);
if($Mode < 1 or $Mode > 20) {$Mode = '3'; }
$Animated = preg_replace('/[^0|1]+/','',$_REQUEST['animated']);
if($Animated == '') {$Animated = '0'; }
$Advisories = preg_replace('/[^0|1]+/','',$_REQUEST['advisories']);
if($Advisories == '') {$Advisories = '0'; }
$Track = preg_replace('/[^0|1]+/','',$_REQUEST['track']);
if($Track == '') {$Track = '0'; }
$Lightning = preg_replace('/[^0|1]+/','',$_REQUEST['lightning']);
if($Lightning == '') {$Lightning = '0'; }
$doShow = '';
if(isset($_REQUEST['show'])) {
$doShow ='show=loc&';
}
//------------------------------------------------
//Set more variables used below based on current value
//------------------------------------------------
if ($Advisories == 0) {
$AdOption = "1";
$AdNotice = "OFF";
$AdText ="&severe=0";
$AdKey = '';
} else {
$AdOption = "0";
$AdNotice = "ON";
$AdText ="&severe=1";
$AdKey ='<br /><img src="'.$imagesDir.'severeKey.gif" width="640" border="1" height="64" alt="Severe Weather Key" /><br /> '; }
if ($Animated == 0) {
$AnOption = "1";
$AnNotice = "OFF";
$AnText = "&num=1&delay=15";
} else {
$AnOption = "0";
$AnNotice = "ON";
$AnText = "&num=6&delay=60"; }
if ($Track == 0) {
$TrOption = "1";
$TrNotice = "OFF";
$TrText ="&showstorms=0";
} else {
$TrOption = "0";
$TrNotice = "ON";
$TrText ="&showstorms=31";
$AdKey =' <span style="font-family: Verdana,Arial,Sans Serif; font-size: 12px; color: #FFFFFF"><img src="' .
$imagesDir . 'clearTriangle.gif" width="15" height="15" alt="" /> Tornado vortex <img src="' .
$imagesDir . 'clearSquare.gif" width="15" height="15" alt="" /> Cloud rotation <img src="' .
$imagesDir . 'clearDiamond.gif" width="15" height="15" alt="" /> Probable hail <img src="' .
$imagesDir . 'blackSquare.gif" width="15" height="15" alt="" /> Storm cell
<br /> </span>'; }
if ($Lightning == 0) {
$LightOption = "1";
$LightNotice = "OFF";
$LightText ="&lightning=0";
} else {
$LightOption = "0";
$LightNotice = "ON";
$LightText ="&lightning=1"; }
//------------------------------------------------
//Set Mode plus and minus info - don't let user select invalid amount
//------------------------------------------------
$ModeMinus = $Mode - 1;
if ($ModeMinus < 1) { $ModeMinus = 1; }
$ModePlus = $Mode + 1;
if ($ModePlus > 5) { $ModePlus = 5; }
//------------------------------------------------
//Set variables for highlighting selected items
//------------------------------------------------
if ($Advisories==0) {$advcolor="#FFFFFF";} else {$advcolor="#FFFF00";}
if ($Animated==0) {$animcolor="#FFFFFF";} else {$animcolor="#FFFF00";}
if ($Track==0) {$trackcolor="#FFFFFF";} else {$trackcolor="#FFFF00";}
if ($Lightning==0) {$lightcolor="#FFFFFF";} else {$lightcolor="#FFFF00";}
if ($Mode==1) {$mode1HL="'${imagesDir}radar2a.gif'";} else {$mode1HL="'${imagesDir}radar2.gif'";}
if ($Mode==2) {$mode2HL="'${imagesDir}radar3a.gif'";} else {$mode2HL="'${imagesDir}radar3.gif'";}
if ($Mode==3) {$mode3HL="'${imagesDir}radar4a.gif'";} else {$mode3HL="'${imagesDir}radar4.gif'";}
if ($Mode==4) {$mode4HL="'${imagesDir}radar5a.gif'";} else {$mode4HL="'${imagesDir}radar5.gif'";}
if ($Mode==5) {$mode5HL="'${imagesDir}radar6a.gif'";} else {$mode5HL="'${imagesDir}radar6.gif'";}
if ($Mode==6) {$mode6HL="#FFFF00";} else {$mode6HL="#FFFFFF";}
if ($Mode==7) {$mode7HL="#FFFF00";} else {$mode7HL="#FFFFFF";}
if ($Mode==8) {$mode8HL="#FFFF00";} else {$mode8HL="#FFFFFF";}
if ($Mode==9) {$mode9HL="#FFFF00";} else {$mode9HL="#FFFFFF";}
if ($Mode==10) {$mode10HL="#FFFF00";} else {$mode10HL="#FFFFFF";}
if ($Mode==11) {$mode11HL="#FFFF00";} else {$mode11HL="#FFFFFF";}
if ($Mode==12) {$mode12HL="#FFFF00";} else {$mode12HL="#FFFFFF";}
if ($Mode==13) {$mode13HL="#FFFF00";} else {$mode13HL="#FFFFFF";}
if ($Mode==14) {$mode14HL="#FFFF00";} else {$mode14HL="#FFFFFF";}
if ($Mode==15) {$mode15HL="#FFFF00";} else {$mode15HL="#FFFFFF";}
if ($Mode==16) {$mode16HL="#FFFF00";} else {$mode16HL="#FFFFFF";}
if ($Mode==17) {$mode17HL="#FFFF00";} else {$mode17HL="#FFFFFF";}
if ($Mode==18) {$mode18HL="#FFFF00";} else {$mode18HL="#FFFFFF";}
if ($Mode==19) {$mode19HL="#FFFF00";} else {$mode19HL="#FFFFFF";}
if ($Mode==20) {$mode20HL="#FFFF00";} else {$mode20HL="#FFFFFF";}
//------------------------------------------------
//You need to download some graphics for this html. Pull them from...
//Do not link directly to them!
// NOTE: all the graphics needed are in the ./ajax-images/ directory
// in the distribution .zip file
//------------------------------------------------
//http://www.carterlake.org/radar1.gif
//http://www.carterlake.org/radar1a.gif
//http://www.carterlake.org/radar2.gif
//http://www.carterlake.org/radar2a.gif
//http://www.carterlake.org/radar3.gif
//http://www.carterlake.org/radar3a.gif
//http://www.carterlake.org/radar4.gif
//http://www.carterlake.org/radar4a.gif
//http://www.carterlake.org/radar5.gif
//http://www.carterlake.org/radar5a.gif
//http://www.carterlake.org/radar6.gif
//http://www.carterlake.org/radar6a.gif
//http://www.carterlake.org/radar7.gif
//http://www.carterlake.org/radar7a.gif
//http://www.carterlake.org/radar7a.gif
//http://www.carterlake.org/severeKey.gif
//http://www.carterlake.org/clearTriangle.gif
//http://www.carterlake.org/clearSquare.gif
//http://www.carterlake.org/clearDiamond.gif
//http://www.carterlake.org/blackSquare.gif
?>
<script type="text/javascript">
<!-- This script is the rollover script for graphics -->
function rollThis(whichImage,whichPic){
document.images[whichImage].src = whichPic;
}
</script>
<a name="WUtop" id="WUtop"></a>
<table width="640" cellpadding="0" cellspacing="0" style="background-color:#000000; border: none;">
<tr>
<td style="background-color:#000000"><span style="font-family: Arial, Helvetica, sans-serif; font-size:12px; color:#FFFFFF">Zoom: </span>
<a href="<?php echo $PHP_SELF; ?>?<?php echo $doShow; ?>mode=<?php echo $ModeMinus; ?>&animated=<?php echo $Animated; ?>&track=<?php echo $Track; ?>&advisories=<?php echo $Advisories; ?>&lightning=<?php echo $Lightning; ?>#WUtop" onmouseover="rollThis('pic1','<?php echo $imagesDir; ?>radar1a.gif')" onmouseout="rollThis('pic1','<?php echo $imagesDir; ?>radar1.gif')"><img src="<?php echo $imagesDir; ?>radar1.gif" alt="Zoom In" title="Zoom In" width="24" height="28" name="pic1" border="0"/></a>
<a href="<?php echo $PHP_SELF; ?>?<?php echo $doShow; ?>mode=1&animated=<?php echo $Animated; ?>&track=<?php echo $Track; ?>&advisories=<?php echo $Advisories; ?>&lightning=<?php echo $Lightning; ?>#WUtop" onmouseover="rollThis('pic2','<?php echo $imagesDir; ?>radar2a.gif')" onmouseout="rollThis('pic2',<?php echo $mode1HL;?>)"><img alt="<?php echo $WUname1; ?>" title="<?php echo $WUname1; ?>" src=<?php echo $mode1HL;?> width="24" height="28" name="pic2" border="0"/></a>
<a href="<?php echo $PHP_SELF; ?>?<?php echo $doShow; ?>mode=2&animated=<?php echo $Animated; ?>&track=<?php echo $Track; ?>&advisories=<?php echo $Advisories; ?>&lightning=<?php echo $Lightning; ?>#WUtop" onmouseover="rollThis('pic3','<?php echo $imagesDir; ?>radar3a.gif')" onmouseout="rollThis('pic3',<?php echo $mode2HL;?>)"><img src=<?php echo $mode2HL;?> alt="<?php echo $WUname2; ?>" title="<?php echo $WUname2; ?>" width="24" height="28" name="pic3" border="0"/></a>
<a href="<?php echo $PHP_SELF; ?>?<?php echo $doShow; ?>mode=3&animated=<?php echo $Animated; ?>&track=<?php echo $Track; ?>&advisories=<?php echo $Advisories; ?>&lightning=<?php echo $Lightning; ?>#WUtop" onmouseover="rollThis('pic4','<?php echo $imagesDir; ?>radar4a.gif')" onmouseout="rollThis('pic4',<?php echo $mode3HL;?>)"><img alt="<?php echo $WUname3; ?>" title="<?php echo $WUname3; ?>" src=<?php echo $mode3HL;?> width="24" height="28" name="pic4" border="0"/></a>
<a href="<?php echo $PHP_SELF; ?>?<?php echo $doShow; ?>mode=4&animated=<?php echo $Animated; ?>&track=<?php echo $Track; ?>&advisories=<?php echo $Advisories; ?>&lightning=<?php echo $Lightning; ?>#WUtop" onmouseover="rollThis('pic5','<?php echo $imagesDir; ?>radar5a.gif')" onmouseout="rollThis('pic5',<?php echo $mode4HL;?>)"><img alt="<?php echo $WUname4; ?>" title="<?php echo $WUname4; ?>" src=<?php echo $mode4HL;?> width="24" height="28" name="pic5" border="0"/></a>
<a href="<?php echo $PHP_SELF; ?>?<?php echo $doShow; ?>mode=5&animated=<?php echo $Animated; ?>&track=<?php echo $Track; ?>&advisories=<?php echo $Advisories; ?>&lightning=<?php echo $Lightning; ?>#WUtop" onmouseover="rollThis('pic6','<?php echo $imagesDir; ?>radar6a.gif')" onmouseout="rollThis('pic6',<?php echo $mode5HL;?>)"><img alt="<?php echo $WUname5; ?>" title="<?php echo $WUname5; ?>" src=<?php echo $mode5HL;?> width="24" height="28" name="pic6" border="0"/></a>
<a href="<?php echo $PHP_SELF; ?>?<?php echo $doShow; ?>mode=<?php echo $ModePlus; ?>&animated=<?php echo $Animated; ?>&track=<?php echo $Track; ?>&advisories=<?php echo $Advisories; ?>&lightning=<?php echo $Lightning; ?>#WUtop" onmouseover="rollThis('pic7','<?php echo $imagesDir; ?>radar7a.gif')" onmouseout="rollThis('pic7','<?php echo $imagesDir; ?>radar7.gif')"><img alt="Zoom Out" title="Zoom Out" src="<?php echo $imagesDir; ?>radar7.gif" width="29" height="28" name="pic7" border="0"/></a>
<a href="<?php echo $PHP_SELF; ?>?<?php echo $doShow; ?>mode=<?php echo $Mode; ?>&animated=<?php echo $AnOption; ?>&advisories=<?php echo $Advisories; ?>&track=<?php echo $Track; ?>&lightning=<?php echo $Lightning; ?>#WUtop" style="text-decoration:none"><span style="font-size: 12px; font-family: Arial, Helvetica, sans-serif; color:<?php echo $animcolor;?>" onmouseover="this.style.color = '#FFFF00'" onmouseout="this.style.color = '<?php echo $animcolor;?>'">Animated: <?php echo $AnNotice; ?></span></a>
<a href="<?php echo $PHP_SELF; ?>?<?php echo $doShow; ?>mode=<?php echo $Mode; ?>&animated=<?php echo $Animated; ?>&advisories=<?php echo $AdOption; ?>&track=<?php echo $Track; ?>&lightning=<?php echo $Lightning; ?>#WUtop" style="text-decoration:none"><span style="font-size: 12px; font-family: Arial, Helvetica, sans-serif; color:<?php echo $advcolor;?>" onmouseover="this.style.color = '#FFFF00'" onmouseout="this.style.color = '<?php echo $advcolor;?>'">Advisories: <?php echo $AdNotice; ?></span></a>
<a href="<?php echo $PHP_SELF; ?>?<?php echo $doShow; ?>mode=<?php echo $Mode; ?>&animated=<?php echo $Animated; ?>&advisories=<?php echo $Advisories; ?>&track=<?php echo $TrOption; ?>&lightning=<?php echo $Lightning; ?>#WUtop" style="text-decoration:none"><span style="font-size: 12px; font-family: Arial, Helvetica, sans-serif; color:<?php echo $trackcolor;?>" onmouseover="this.style.color = '#FFFF00'" onmouseout="this.style.color = '<?php echo $trackcolor;?>'">Track: <?php echo $TrNotice; ?></span></a>
<a href="<?php echo $PHP_SELF; ?>?<?php echo $doShow; ?>mode=<?php echo $Mode; ?>&animated=<?php echo $Animated; ?>&advisories=<?php echo $Advisories; ?>&track=<?php echo $Track; ?>&lightning=<?php echo $LightOption; ?>" style="text-decoration:none"><span style="font-size: 12px; font-family: Arial, Helvetica, sans-serif; color:<?php echo $lightcolor;?>" onmouseover="this.style.color = '#FFFF00'" onmouseout="this.style.color = '<?php echo $lightcolor;?>'">Lightning: <?php echo $LightNotice; ?></span></a><br />
<?php
if (isset($_REQUEST['show']) and strtolower($_REQUEST['show']) == 'loc') {
?>
<!-- code for setup of city location -->
<form name="Show" action="getNada();">
<?php
}
if ($Mode == "1") {
//-------------------------------------------------------------------------------
// Code for radar map 1 (Close Zoom)
//-------------------------------------------------------------------------------
$MapScale = 1;
$CityParms = getParmsFromURL($CityURL);
echo "<!-- CityParms='$CityParms' -->\n";
?>
<span style="position: relative; left: 0px; top: 0px; border: none;"><img id="WUimage" src="http://<?php echo $WUhost; ?>/cgi-bin/radar/WUNIDS_map?station=<?php echo $RDR; ?>&brand=wui<?php echo $AnText; ?>&type=N0R&frame=0&noclutter=0&t=<?php echo $UTCtime; ?>&lat=<?php echo $Lat; ?>&lon=<?php echo $Long; ?>&label=<?php echo urlencode($City); ?><?php echo $TrText; ?>&map.x=400&map.y=240<?php echo $CityParms; ?>&showlabels=1<?php echo $AdText; ?>&rainsnow=1<?php echo $LightText; ?>" width="640" height="480" alt="" /></span>
<span id="cityloc" style="position: relative; <?php echo $CityPos1; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor1; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span><?php echo $AdKey; ?>
<?php
}
if ($Mode == "2") {
//-------------------------------------------------------------------------------
// Code for radar map 2 (Medium Zoom) Done!!
//-------------------------------------------------------------------------------
$MapScale = 2;
$MetroParms = getParmsFromURL($MetroURL);
echo "<!-- MetroParms='$MetroParms' -->\n";
?>
<span style="position: relative; left: 0px; top: 0px; border: none;"><img id="WUimage" src="http://<?php echo $WUhost; ?>/cgi-bin/radar/WUNIDS_map?station=<?php echo $RDR; ?>&brand=wui<?php echo $AnText; ?>&type=N0R&frame=0&noclutter=0&t=<?php echo $UTCtime; ?><?php echo $TrText; ?>&map.x=400&map.y=240<?php echo $MetroParms; ?>&showlabels=1<?php echo $AdText; ?>&rainsnow=1<?php echo $LightText; ?>&lat=<?php echo $Lat; ?>&lon=<?php echo $Long; ?>&label=<?php echo urlencode($City); ?>" width="640" height="480" alt="" /></span>
<span id="cityloc" style="position: relative; <?php echo $CityPos2; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor2; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span><?php echo $AdKey; ?>
<?php
}
if ($Mode == "3") {
//-------------------------------------------------------------------------------
// Code for radar map 3 (No Zoom) done!!
//-------------------------------------------------------------------------------
$MapScale = 3;
?>
<span style="position: relative; left: 0px; top: 0px; border: none;"><img id="WUimage" src="http://<?php echo $WUhost; ?>/cgi-bin/radar/WUNIDS_map?station=<?php echo $RDR; ?>&brand=wui<?php echo $AnText; ?>&type=N0R&frame=0&scale=0.999&noclutter=0&t=<?php echo $UTCtime; ?><?php echo $TrText; ?>&map.x=400&map.y=240&centerx=400&centery=240&transx=0&transy=0&showlabels=1<?php echo $AdText; ?>&rainsnow=1<?php echo $LightText; ?>&lat=<?php echo $Lat; ?>&lon=<?php echo $Long; ?>&label=<?php echo urlencode($City); ?>" width="640" height="480" alt="" /></span>
<span id="cityloc" style="position: relative; <?php echo $CityPos3; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor3; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span><?php echo $AdKey; ?>
<?php
}
if ($Mode == "4" && $Advisories == "1") {
//-------------------------------------------------------------------------------
// Code for radar map 4 with advisories selected (Advisories) done!!
//-------------------------------------------------------------------------------
$MapScale = 9;
?>
<span style="position: relative; left: 0px; top: 0px; border: none;"><img id="WUimage" src="http://icons.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_severe.gif?id=<?php echo $UTCtime; ?>" width="640" height="480" alt=" " /></span>
<span id="cityloc" style="position: relative; <?php echo $CityPos9; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor9; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<img src="<?php echo $imagesDir; ?>severeKey.gif" alt="Severe weather key" height="64" width="640" />
<?php
}
if ($Mode == "4" && $Animated == "0" && $Advisories == "0") {
//-------------------------------------------------------------------------------
// Code for radar map 4 with no animation or advisories (regional map) done!!!
//-------------------------------------------------------------------------------
$MapScale = 5;
?>
<span style="position: relative; left: 0px; top: 0px; border: none;"><img id="WUimage" src="http://icons.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_rd.gif?id=<?php echo $UTCtime; ?>" width="640" height="480" alt="" /></span>
<span id="cityloc" style="position: relative; <?php echo $CityPos5; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor5; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "4" && $Animated == "1" && $Advisories == "0") {
//-------------------------------------------------------------------------------
// Code for radar map 4 with animation but no advisories (Animated Regional) DONE!! 223 -270
//-------------------------------------------------------------------------------
$MapScale = 5;
?>
<span style="position: relative; left: 0px; top: 0px; border: none;"><img id="WUimage" src="http://icons.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_rd_anim.gif?id=<?php echo $UTCtime; ?>" width="640" height="480" alt=""/></span>
<span id="cityloc" style="position: relative; <?php echo $CityPos5; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor5; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "5" && $Advisories == "1") {
//-------------------------------------------------------------------------------
// Code for radar map 5 with advisories selected
//-------------------------------------------------------------------------------
$MapScale = 4;
?>
<span style="position: relative; left: 0px; top: 0px; border: none;"><img id="WUimage" src="http://maps.wunderground.com/data/severe/current_severe_nostatefarm.gif?id=<?php echo $UTCtime; ?>" width="640" height="480" alt="" /></span>
<span id="cityloc" style="position: relative; <?php echo $CityPos4; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor4; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "5" && $Animated == "0" && $Advisories == "0") {
//-------------------------------------------------------------------------------
// Code for radar map 5 with no animation or advisories (National) done!!
//-------------------------------------------------------------------------------
$MapScale = 6;
?>
<span style="position: relative; left: 0px; top: 0px; border: none;"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2xus_rd.gif?id=<?php echo $UTCtime; ?>" width="640" height="480" alt="" /></span>
<span id="cityloc" style="position: relative; <?php echo $CityPos6; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor6; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "5" && $Animated == "1" && $Advisories == "0") {
//-------------------------------------------------------------------------------
// Code for radar map 4 with animation but no advisories (National Animated) done!!
//-------------------------------------------------------------------------------
$MapScale = 6;
?>
<span style="position: relative; left: 0px; top: 0px; border: none;"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2xus_rd_anim.gif?id=<?php echo $UTCtime; ?>" width="640" height="480" alt="" /></span>
<span id="cityloc" style="position: relative; <?php echo $CityPos6; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor6; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "6" && $Animated == "0") {
//-------------------------------------------------------------------------------
// Fronts
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px; border: none;"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_sf.gif?id=<?php echo $UTCtime; ?>" width="640" height="480" alt="" /></span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "6" && $Animated == "1") {
//-------------------------------------------------------------------------------
// Fronts Animated
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px; border: none;"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_sf_anim.gif?id=<?php echo $UTCtime; ?>" width="640" height="480" alt="" /></span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "7" && $Animated == "0") {
//-------------------------------------------------------------------------------
// Jet Stream
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_jt.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "7" && $Animated == "1") {
//-------------------------------------------------------------------------------
// Jet Stream
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_jt_anim.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "8" && $Animated == "0") {
//-------------------------------------------------------------------------------
// Vis Satellite
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_vi.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "8" && $Animated == "1") {
//-------------------------------------------------------------------------------
// Vis Satellite
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_vi_anim.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "9" && $Animated == "0") {
//-------------------------------------------------------------------------------
// IR Satellite done!!
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_ir.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "9" && $Animated == "1") {
//-------------------------------------------------------------------------------
// IR Satellite animated done!!
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_ir_anim.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "10" && $Animated == "0") {
//-------------------------------------------------------------------------------
// Wind done!!
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_ws.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "10" && $Animated == "1") {
//-------------------------------------------------------------------------------
// Wind animated done!!
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_ws_anim.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "11" && $Animated == "0") {
//-------------------------------------------------------------------------------
// Temperatures
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_st.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "11" && $Animated == "1") {
//-------------------------------------------------------------------------------
// Temperatures animated
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_st_anim.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "12" && $Animated == "0") {
//-------------------------------------------------------------------------------
// Humidity
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_rh.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "12" && $Animated == "1") {
//-------------------------------------------------------------------------------
// Humidity Animated
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_rh_anim.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "13" && $Animated == "0") {
//-------------------------------------------------------------------------------
// Dew Point
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_dp.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "13" && $Animated == "1") {
//-------------------------------------------------------------------------------
// Dew Point Animated
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_dp_anim.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "14" && $Animated == "0") {
//-------------------------------------------------------------------------------
// Heat Index
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_hi.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "14" && $Animated == "1") {
//-------------------------------------------------------------------------------
// Heat Index
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_hi_anim.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "15" && $Animated == "0") {
//-------------------------------------------------------------------------------
// Wind Chill
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_wc.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "15" && $Animated == "1") {
//-------------------------------------------------------------------------------
// Wind Chill
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_wc_anim.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "16" && $Animated == "0") {
//-------------------------------------------------------------------------------
// Snow done!!
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_snow.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "16" && $Animated == "1") {
//-------------------------------------------------------------------------------
// Snow animated done!!
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2x<?php echo $WUregion; ?>_snow_anim.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "17" && $Animated == "0") {
//-------------------------------------------------------------------------------
// Visibility
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://icons.wunderground.com/data/640x480/<?php echo $WUregion; ?>_vs.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "17" && $Animated == "1") {
//-------------------------------------------------------------------------------
// Visibility Animated
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://icons.wunderground.com/data/640x480/<?php echo $WUregion; ?>_vs_anim.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "18" && $Animated == "0") {
//-------------------------------------------------------------------------------
// Air Quality
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://icons.wunderground.com/data/640x480/<?php echo $WUregion; ?>_ozone.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "18" && $Animated == "1") {
//-------------------------------------------------------------------------------
// Air Quality Animated
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://icons.wunderground.com/data/640x480/<?php echo $WUregion; ?>_ozone_anim.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "19" && $Animated == "0") {
//-------------------------------------------------------------------------------
// UV
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://icons.wunderground.com/data/640x480/<?php echo $WUregion; ?>_uv.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "19" && $Animated == "1") {
//-------------------------------------------------------------------------------
// UV Animated
//-------------------------------------------------------------------------------
$MapScale = 7;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://icons.wunderground.com/data/640x480/<?php echo $WUregion; ?>_uv_anim.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos7; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor7; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "20" && $Animated == "0") {
//-------------------------------------------------------------------------------
// Flue done!!
//-------------------------------------------------------------------------------
$MapScale = 8;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2xus_flu.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos8; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor8; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
if ($Mode == "20" && $Animated == "1") {
//-------------------------------------------------------------------------------
// Flue animated done!!
//-------------------------------------------------------------------------------
$MapScale = 8;
?>
<span style="position: relative; left: 0px; top: 0px"><img id="WUimage" src="http://maps.wunderground.com/data/640x480/2xus_flu_anim.gif?id=<?php echo($UTCtime); ?>" width="640" height="480" border="0" alt="WU Map"/> </span>
<span id="cityloc" style="position: relative; <?php echo $CityPos8; ?> font-size: 10pt; color:#FF0000">• <span style="color:<?php echo $CityColor8; ?>; font-size: 9pt;"><b><?php echo $City; ?></b></span></span>
<?php
}
//-------------------------------------------------------------------------------
// End of all pages
//-------------------------------------------------------------------------------
?>
<?php
if (isset($_REQUEST['show']) and strtolower($_REQUEST['show']) == 'loc') {
?>
<!-- setting location code follows -->
<div style="border: 1px dashed #0000FF; padding: 5px; background-color:#FFFF99; color:#000000; font-family:Arial, Helvetica, sans-serif; font-size: 10pt;">
Check position of city legend red dot {<span style="color:red; font-size:11pt;"><b>•</b></span>)with these links:<br/><span style="font-size: 9pt;">
<a href="?show=loc&mode=1&advisories=0#WUtop"><b>$CityPos1</b></a> |
<a href="?show=loc&mode=2&advisories=0#WUtop"><b>$CityPos2</b></a> |
<a href="?show=loc&mode=3&advisories=0#WUtop"><b>$CityPos3</b></a> |
<a href="?show=loc&mode=5&advisories=1#WUtop"><b>$CityPos4</b></a> |
<a href="?show=loc&mode=4&advisories=0#WUtop"><b>$CityPos5</b></a> |
<a href="?show=loc&mode=5&advisories=0#WUtop"><b>$CityPos6</b></a> |
<a href="?show=loc&mode=6&advisories=0#WUtop"><b>$CityPos7</b></a> |
<a href="?show=loc&mode=20&advisories=0#WUtop"><b>$CityPos8</b></a> |
<a href="?show=loc&mode=4&advisories=1#WUtop"><b>$CityPos9</b></a></span>
<br/>
Click on radar image where city legend red dot {<span style="color:red; font-size:11pt;"><b>•</b></span>) should appear to see offset and copy code to use in the script settings. When clicked, the legend will move to the designated spot over the map image.
<br/>
Copy PHP code for $CityPos<?php echo $MapScale;?> is <input type="text" name="CopyCode" value="" size="45"/><br/>
Select the text, copy to clipboard and paste into top of script to replace the existing $CityPos<?php echo $MapScale; ?> line.
<br/> <br/>
Mouse cursor at: Left <input type="text" name="MouseX" value="0" size="4"/>
Top <input type="text" name="MouseY" value="0" size="4"/>
, Computed offset to use:
Left <input type="text" name="OffsetLeft" value="0" size="4"/>
Top <input type="text" name="OffsetTop" value="0" size="4"/>
</div>
</form>
<script type="text/javascript">
// <![CDATA[
<!-- Original: CodeLifter.com (support@codelifter.com) -->
<!-- Web Site: http://www.codelifter.com -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
var IE = document.all?true:false;
//if (!IE) {document.captureEvents(Event.MOUSEMOVE); }
var SAF=navigator.userAgent.indexOf('Safari')!=-1;
var Opera=navigator.userAgent.indexOf('Opera')!=-1;
if (SAF) {IE=false;}
//if (SAF) {alert('Safari Detected -- sorry, this script works only in IE, Firefox or Opera browsers.'); }
document.onmousemove = getMouseXY;
var doDebug = false;
// debugging variables
var cX = 0;
var cY = 0;
var wX = 0;
var wY = 0;
var eX = 0;
var eY = 0;
//-------------------
var tempX = 0;
var tempY = 0;
var WUimageH = 0;
var WUimageW = 0;
var WUimageT = 0;
var WUimageL = 0;
var OffsetT = 0;
var OffsetL = 0;
var CityLocL = 0;
var CityLocT = 0;
var CityLocOffY = -8; // for display of city name (FF)
var CityLocOffX = -2; // fudge factors to position bullet point correctly
if (IE) {
CityLocOffY = -61; // for display of city name (IE)
CityLocOffX = -4; // fudge factors to position bullet point correctly
}
if (SAF) {
CityLocOffY = 459; // for display of city name (Safari Win)
CityLocOffX = -1; // fudge factors to position bullet point correctly
}
if (Opera) {
CityLocOffY = -8; // for display of city name (Opera)
CityLocOffX = -1; // fudge factors to position bullet point correctly
}
var temparr = new Array();
var element = document.getElementById("WUimage");
if (element) { // get size of WUimage and left, top coordinates
WUimageH = element.height;
WUimageW = element.width;
if(IE && ! WUimageH && ! WUimageW) {
WUimageH = 480;
WUimageW = 640;
}
temparr = findPos(element);
WUimageL = temparr[0];
WUimageT = temparr[1];
element.onclick = captureOffset;
element.style.cursor = "crosshair";
}
element = document.getElementById("cityloc");
if (element) { // find left, top position of current cityloc span (lable for city)
temparr = findPos(element);
CityLocL = temparr[0];
CityLocT = temparr[1];
element.onclick = captureOffset;
element.style.cursor = "crosshair";
}
function captureOffset() { // runs to reset the left, top relative location of cityloc span
var lval = (tempX - WUimageL + CityLocOffX) + 'px';
var tval = - (WUimageT + WUimageH - tempY - CityLocOffY) + 'px';
document.Show.OffsetLeft.value = lval;
document.Show.OffsetTop.value = tval;
document.Show.CopyCode.value = '$CityPos<?php echo $MapScale; ?> = \'left: ' + lval + '; top: ' + tval + ';\';';
element = document.getElementById("cityloc");
if (element) {
element.style.left = lval;
element.style.top = tval;
}
if(doDebug) {
var msg='tempX='+tempX+' tempY=' + tempY +
"\nWUimageL="+WUimageL+" WUimageT="+WUimageT+" WUimageH="+WUimageH+" WUimageW="+WUimageW+
"\nCityLocL="+CityLocL+" CityLocT="+CityLocT+
"\nCityLocOffX="+CityLocOffX+" CityLocOffY="+CityLocOffY+
"\n IE="+IE+" SAF="+SAF+ " Opera="+Opera +
"\n cX="+cX+" cY="+cY+" wX="+wX+" wY="+wY+" eX="+eX+" eY="+eY;
alert(msg); // for debugging
}
return;
}
function findPos(obj) {
var curleft = 0;
var curtop = 0;