forked from MattWoelk/shmotg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbwim.html
793 lines (630 loc) · 27.6 KB
/
bwim.html
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
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scaleable=no" />
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="description" content="bwim" />
<title>Manitoba BWIM Event Viewer</title>
<!--<link href="http://cdn.syncfusion.com/js/web/ej.widgets.core-latest.min.css" rel="stylesheet" />-->
<link href="syncfusion/assets/css/web/ej.widgets.core.min.css" rel="stylesheet" />
<!-- <link href="http://cdn.syncfusion.com/js/web/flat-azure/ej.web.all-latest.min.css" rel="stylesheet" />-->
<link href="syncfusion/assets/css/web/bootstrap-theme/ej.web.all.css" rel="stylesheet" />
<style type="text/css">
#chart-options {
border: 1px solid black;
};
</style>
<script type="text/javascript" src="socket.io-1.1.0.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/globalize/0.1.1/globalize.min.js"></script>
<script type="text/javascript" src="http://borismoore.github.io/jsrender/jsrender.min.js"></script>
<script type="text/javascript" src="syncfusion/assets/scripts/web/ej.web.all.min.js"></script>
<script type="text/javascript" src="underscore.js"></script>
<script type="text/javascript" src="sammy.js"></script>
</head>
<body>
<!-- AppView declaration -->
<div id="appview" data-role="appview">BWIM Event Viewer
<div><select id="year">
<option value="2014">2014</option>
</select>
<select id="month">
<option value="6">06 (JUN)</option>
<option value="7">07 (JUL)</option>
<option value="8">08 (AUG)</option>
<option selected value="9">09 (SEP)</option>
</select>
</div>
<div id="mobgrid" style="width: 100%;"></div>
</div>
<script type="text/javascript">
/*$(function() {
// TODO figure out if you want to continue in this direction (I don't know that you do.
var app = $.sammy('#main', function() {
this.route('get', '#/', function() {
console.log("In here");
});
});
app.run('#/');
<!-- this script block defines the routes that are being used in the application. -->
});*/
</script>
<!-- this should be moved to a separate script file -->
<script type="text/javascript">
$(function() {
// TODO maybe move the configuration to another object/definition.
var socket = io.connect("fbsd.mathewgrabau.ca:8888/");
var firstTime = true;
// This is the one getting bound to my events of the data now.
var bridgeEvents = [];
var requestId = 0;
function nextRequestId() {
return (requestId++);
}
socket.on("news", function(data) {
if (!firstTime) {
return;
}
firstTime = false;
// Initialize the grid now, start getting the data better
var dataRequest = {
sensorType: "bwimEvents",
date: 20140901,
id: nextRequestId()
};
socket.emit("req", JSON.stringify(dataRequest));
});
$("#month").change(function() {
// TODO we need to get the values for the day in there as well.
var month = parseInt($(this).val());
// Then the parsing of the requested values must be sent out.
var d = parseInt($("#year").val()) * 10000 + parseInt($("#month").val()) * 100 + 01;
var request = {
sensorType: "bwimEvents",
date: d,
id: nextRequestId()
};
// Send the request to the proper values.
socket.emit("req", JSON.stringify(request));
});
var dataManager = null;
var receivedData = [];
var firstEventSelection = true;
//var currrentEventData = null;
window.currentEventData = null;
socket.on("section_data", function(data) {
// Get the data back from the parsing of the values that are attempting to be created.
var received = JSON.parse(data);
currentEventData = received;
// Determine if the values exists yet.
if (firstEventSelection) {
firstEventSelection = false;
//$(".appview").append("<div id='section-selector'></div>");
$("#appview").append("<div id='section-selector'></div>");
$("#section-selector").append("<input type='button' id='show-aa' value='AA' />");
$("#section-selector").append("<input type='button' id='show-cc' value='CC' />");
$("#section-selector").append("<input type='button' id='show-dd' value='DD' />");
}
var buttonElement = $("#show-aa");
if (buttonElement.size()) {
$(buttonElement).ejButton({
click: sectionGroupTouchEnd
});
} else {
console.log("we have not found the element that should have been created");
}
buttonElement = $("#show-cc");
if (buttonElement.size()) {
$(buttonElement).ejButton({
click: sectionGroupTouchEnd
});
} else {
alert("show-cc not found");
}
buttonElement = $("#show-dd");
if (buttonElement.size()) {
$(buttonElement).ejButton({
click: sectionGroupTouchEnd
});
}
// Create the tabs that will be used there.
});
function sectionGroupTouchEnd(args) {
console.log("sectionGroupTouchEnd");
var sectionText = args.model.text;
updateSectionChart(sectionText);
}
// The response for the server posting the event data back.
socket.on("req_data", function(data) {
var received = JSON.parse(data);
// TODO implement the requesting queue already, so in otherwords add ot the data manager.
// TODO we need to customize these implementations soon, allowing
if (dataManager == null) {
receivedData = received.events;
// Generating the DataManager instance
dataManager = ej.DataManager(receivedData);
$("#mobgrid").ejGrid({
dataSource: dataManager,
allowSelection: true,
allowColumnSelector: true,
allowPaging: true,
allowScrolling: true,
//scrollSettings: {enableColumnScrolling: true},
width: 1000,
actionComplete: gridActionComplete,
rowSelected: gridRowSelected,
columns: [
{ field: "StartTime_DD", width: 200, headerText: "S/DD"},
{ field: "EndTime_DD", width: 200 , headerText: "E/DD"},
{ field: "StartTime_CC", width: 200, headerText: "S/CC" },
{ field: "EndTime_CC", width: 200, headerText: "E/CC" },
{ field: "StartTime_AA", width: 200, headerText: "S/AA" },
{ field: "EndTime_AA", width: 200, headerText: "E/AA" }
]
});
} else {
// Apparently this is the most efficient way to do this.
// Clearning the array that is.
while (receivedData.length) {
receivedData.pop();
}
// NOTE: I may need a specific value to insert properly.
received.events.forEach(function(element, index) {
dataManager.insert(element);
});
var grid = $("#mobgrid").data("ejGrid");
grid.refreshContent();
}
});
// This is just checking for a first (loaded) event.
var gridFirstEvent = true;
function gridActionComplete() {
console.log("gridActionComplete");
console.log(arguments);
if (gridFirstEvent) {
}
}
function gridRowSelected(e) {
console.log(e);
// Then we need to make sure that things are working out well for the appication
// by closing/hiding the grid, and showing the rendering.
// We need to emit a socket request, that will get the values of the sectional data.
// Get the year and properly format that date.
var MILLISECONDS_SIZE = 1000;
var SECONDS_SIZE = 100;
var SECONDS_SHIFT = MILLISECONDS_SIZE;
var MINUTES_SIZE = 100;
var MINUTES_SHIFT = SECONDS_SHIFT * SECONDS_SIZE;
var HOURS_SHIFT = MINUTES_SHIFT * MINUTES_SIZE;
var HOURS_SIZE = 100;
var DAY_SHIFT = HOURS_SIZE * HOURS_SHIFT;
var DAY_SIZE = 100;
var MONTH_SHIFT = DAY_SHIFT * DAY_SIZE;
var MONTH_SIZE = 100;
var YEAR_SHIFT = MONTH_SHIFT * MONTH_SIZE;
// Create the proper date now
var year = parseInt($("#year").val()) * YEAR_SHIFT;
var addYear = function(x) {
return year + x;
}
// Encoding the request for the events into the values there.
var eventRequest = {
id: requestId,
sensorType: "eventdata",
StartTime_AA: addYear(e.data.StartTime_AA),
EndTime_AA: addYear(e.data.EndTime_AA),
StartTime_CC: addYear(e.data.StartTime_CC),
EndTime_CC: addYear(e.data.EndTime_CC),
StartTime_DD: addYear(e.data.StartTime_DD),
EndTime_DD: addYear(e.data.EndTime_DD)
};
socket.emit("req", JSON.stringify(eventRequest));
}
var chartReady = false;
// Two viewing types
var VIEW_SECTION = 0;
var VIEW_EVENT = 1;
var activeView = VIEW_SECTION;
var GIRDERS = {
"AA": ["G25", "G26", "G27", "G28", "G29", "G30", "G31", "G32", "G33", "G34", "G35", "G36", "G37", "G38", "G39", "G40", "G41", "G42", "G43", "G44", "G45", "G46", "G47", "G48"],
"CC": ["G9", "G10", "G11", "G12", "G13", "G14", "G15", "G16", "G17", "G18", "G19", "G20", "G21", "G22", "G23", "G24"],
"DD": ["G1", "G2", "G3", "G4", "G5", "G6", "G7", "G8"]
};
// Implements the viewing that allows for showing an event in a given section.
function createEventViewer() {
if (activeView == VIEW_EVENT) {
// Need to prepare the series for the current step now.
$("<div><div id='event-slider'></div></div>").insertAfter("#chart-container");
var girders = GIRDERS[currentSection];
var chartData = _.map(girders, function(element, index) {
return {
x: index + 1,
y: currentChartSource[0][element]
};
});
// Inserting a dummy point,
// And should also insert one after.
chartData = [{x:0,y:0}].concat(chartData);
// TODO use the onAxesLabelRendering to label the values that are passed there.
function onToolTipInitialize(sender) {
console.log(sender);
// Just one of the series in this particular chart.
if (sender.data.pointIndex > 0 && sender.data.pointIndex <= GIRDERS[currentSection].length) {
// Rendering in the label with the value.
sender.data.currentText = GIRDERS[currentSection][sender.data.pointIndex - 1] + " = " + sender.model.series[sender.data.seriesIndex].points[sender.data.pointIndex].y;
}
}
// Rendering the new Syncfusion chart now (showing a spline to capture the data effectively)
// TODO investigate the custom labelling (so that we could have proper "G1", etc shown
// TODO this could also be a diagram underlayed there (perhaps just use the image and render it on there
$("#chart-container").ejChart({
commonSeriesOptions: {
type: "spline",
enableAnimation: true,
marker:
{
shape: 'circle',
size:
{
height: 10, width: 10
},
visible: true
},
},
title: "Section " + currentSection + " Event " + 0,
series: [{
points: chartData,
opacity: 0.5, border :{color: 'transparent'}, fill: '#6A4B82',
name: currentSection,
tooltip: {
visible: true
}
}],
toolTipInitialize: onToolTipInitialize
});
// Maybe having this at the global namespace will help
eventSliderStopped = function(args) {
// Then get the new value for rendering the chart
console.log(args);
}
$("#event-slider").ejSlider({
start: function(args) {
console.log("Slider start");
return true;
},
slide: function(args) {
console.log("Slide");
return true;
},
// Stop only called on the sliding events, whereas change is called each time.
stop: function(args) {
console.log("Inside the slider");
},
change: function(args) {
// Rendering the new set of series data.
if (args.value >= 0 && args.value < currentChartSource.length) {
var chartObject = $("#chart-container").data("ejChart");
var dataIndex = args.value;
// Pluck the new value and change the series update
var updatedSeries = _.map(girders, function(element, index) {
return {
x: index + 1,
y: currentChartSource[dataIndex][element]
};
});
updatedSeries = [{x:0,y:0}].concat(updatedSeries);
var chartSeries = chartObject.model.series[0];
_.each(updatedSeries, function(element, index) {
// console.log(chartSeries.points);
//console.log(element);
// Assign in the new values there now.
chartSeries.points[element.x].y = element.y;
});
chartObject.redraw();
}
return true;
},
height: 16,
incrementStep: 1,
minValue: 0,
value: 0,
maxValue: currentChartSource.length,
// TODO consider using a start event to make some waiting rendering or something.
});
} else {
throw "Invalid selection of the event viewer type";
}
}
// Event handler for when the section type is changed (making it
// easier to handle the changes in the application)
function sectionTypeChanged(args) {
if (args.isChecked) {
console.log("changing to ");
console.log(args.model);
if (args.model.id == "chartType-event") {
console.log("Rendering the event chart now");
activeView = VIEW_EVENT;
createEventViewer();
} else if (args.model.id == "chartType-section") {
console.log("Rendering the section chart now");
activeView = VIEW_SECTION;
}
} else {
// Remove the chart and start rendering it again.
if (chartObject) {
chartObject.destroy();
chartReady = false;
chartObject = null;
}
}
};
function ensureChartReady() {
console.log("ensureChartReady");
if (!chartReady) {
$("#appview").append("<div id='chart-container'></div>");
$("<div id='chart-options'></div>").insertBefore("#chart-container");
$("#chart-options").append("<div><div>Chart Type</div><table><tr><td><td><input type='radio' name='charttype' id='chartType-section' /><label for='chartType-section'>Section</label></td><td><input type='radio' name='charttype' id='chartType-event' /><label for='chartType-event'>Event</label></td></tr></table></div>");
// Append the east bound, west bound toggles
$("#chart-options").append("<div><div>Side Selection</div><table><tr><td><input type='checkbox' id='eastBoundCheckBox' /><label for='eastBoundCheckBox'>East Bound</label></td><td><input type='checkbox' id='westBoundCheckBox' /><label for='westBoundCheckBox'>West Bound</label></td></tr></div>");
// Initialize the radio buttons now
$("#chartType-section").ejRadioButton({checked: true, size: "large", change: sectionTypeChanged});
$("#chartType-event").ejRadioButton({size: "large", change: sectionTypeChanged});
$("#eastBoundCheckBox").ejCheckBox({
checked: true,
change: eastBoundCheckChanged
});
$("#westBoundCheckBox").ejCheckBox({
checked: true,
change: westBoundCheckChanged
});
chartReady = true;
}
}
// These two objects are used to manage the showing/hiding of the columns.
window.eastBoundColumns = {
"DD": ["G1", "G2", "G3", "G4"]
};
window.westBoundColumns = {
"DD": ["G5", "G6", "G7", "G8"]
}
function showEastBoundColumns() {
var series = $("#chart-container").data("ejChart").model.series;
for (var i = 0; i < series.length; i++) {
for (var j = 0; j < window.eastBoundColumns[window.currentSection].length; j++) {
if (window.eastBoundColumns[window.currentSection][j] == series[i].name) {
series[i].visibility = "visible";
}
}
}
$("#chart-container").ejChart("redraw");
}
// Apply the hiding to the east bound columns in the chart.
function hideEastBoundColumns() {
var series = $("#chart-container").data("ejChart").model.series;
for (var i = 0; i < series.length; i++) {
for (var j = 0; j < window.eastBoundColumns[window.currentSection].length; j++) {
if (window.eastBoundColumns[window.currentSection][j] == series[i].name) {
series[i].visibility = "hidden";
}
}
}
$("#chart-container").ejChart("redraw");
}
function showWestBoundColumns() {
var series = $("#chart-container").data("ejChart").model.series;
for (var i = 0; i < series.length; i++) {
for (var j = 0; j < window.westBoundColumns[window.currentSection].length; j++) {
if (window.westBoundColumns[window.currentSection][j] == series[i].name) {
series[i].visibility = "visible";
}
}
}
$("#chart-container").ejChart("redraw");
}
function hideWestBoundColumns() {
var series = $("#chart-container").data("ejChart").model.series;
for (var i = 0; i < series.length; i++) {
for (var j = 0; j < window.westBoundColumns[window.currentSection].length; j++) {
if (window.westBoundColumns[window.currentSection][j] == series[i].name) {
series[i].visibility = "hidden";
}
}
}
$("#chart-container").ejChart("redraw");
}
// Event handler for the check box that is on the chart that allows for
// updating the chart properly
function eastBoundCheckChanged(args) {
console.log(args);
if (args.isChecked) {
showEastBoundColumns();
} else {
hideEastBoundColumns();
}
}
function westBoundCheckChanged(args) {
// Show/hide depending on what we need.
if (args.isChecked) {
showWestBoundColumns();
} else {
hideWestBoundColumns();
}
}
function addColumnSelectors(girders) {
_.each(girders, function(element) {
$("#chart-options").append("<input type='checkbox' value='" + element + "' />");
});
$("#chart-options").apppend("<input type='checbox' value='sum' />");
}
// Prepare the data for the source events.
// @param girders the names of the griders (to determine a sum)
// @return Value of the implementations for the description.
function prepareSeriesSource(girders) {
var dataGaps = false;
var lastTimestamp = null;
_.each(currentChartSource, function(element) {
element.d = new Date(element.ms);
var currentTimestamp = element.d;
// Take a sum of each of the elements (seeing it across the entire bridge).
element.sum = 0;
// Sum at the current timestamp
_.each(girders, function(girder) {
element.sum += element[girder];
});
if (lastTimestamp != null) {
if ((currentTimestamp.getTime() - lastTimestamp.getTime()) > 5) {
dataGaps = true;
}
}
lastTimestamp = currentTimestamp;
});
return dataGaps;
}
var zoomingOptions = {
enable: true,
enableMouseWheel: true
};
var chartRendered = false;
function updateSectionChart(section) {
console.log("updateSectionChart(" + section +")");
// The currently displayed section.
window.currentSection = section;
switch (section) {
case "AA":
if (currentEventData.aa !== undefined) {
ensureChartReady();
currentChartSource = currentEventData.aa;
var girders = ["G25", "G26", "G27", "G28", "G29", "G30", "G31", "G32", "G33", "G34", "G35", "G36", "G37", "G38", "G39", "G40", "G41", "G42", "G43", "G44", "G45", "G46", "G47", "G48"];
// TODO needs the recognition of whether or not there are data gaps in the loaded section/set.
prepareSeriesSource(girders);
var seriesObjects = _.map(girders, function(girder) {
return {
type: "line",
xName: "d",
yName: girder,
dataSource: currentChartSource,
name: girder
};
});
seriesObjects.push({
type: "line",
xName: "d",
yName: "sum",
dataSource: currentChartSource,
name: "Sum"
});
if (chartRendered) {
var chartObject = $("#chart-container").data("ejChart");
chartObject.model.series = seriesObjects;
chartObject.redraw();
}
}
break;
case "CC":
if (currentEventData.cc !== undefined) {
ensureChartReady();
currentChartSource = currentEventData.cc;
var girders = ["G9", "G10", "G11", "G12", "G13", "G14", "G15", "G16", "G17", "G18", "G19", "G20", "G21", "G22", "G23", "G24"];
prepareSeriesSource(girders);
// Sum the section data now.
var seriesObjects = _.map(girders, function(girder) {
return {
type: "line",
xName: "d",
yName: girder,
dataSource: currentChartSource,
name: girder
};
});
seriesObjects.push({
type: "line",
xName: "d",
yName: "sum",
dataSource: currentChartSource,
name: "Sum"
});
if (chartRendered) {
// Convert the reference to contain the new series, then just redraw it with the current objects.
if (!window.chartObject) {
window.chartObject = $("#chart-container").data("ejChart");
}
window.chartObject.model.series = seriesObjects;
window.chartObject.redraw();
}
} // if (currentEventData.cc !== undefined)
break;
case "DD":
if (currentEventData.dd !== undefined) {
ensureChartReady();
// TODO update the chart method here (should support something better for naming the series here.)
currentChartSource = currentEventData.dd;
var girders = ["G1", "G2", "G3", "G4", "G5", "G6", "G7", "G8"];
var dataGaps = prepareSeriesSource(girders);
if (dataGaps) {
alert("Selected data has time gaps");
} else {
console.log("Data is good for the time gaps.");
}
var seriesObjects = _.map(girders, function(girder) {
return {
type: "line",
xName: "d",
yName: girder,
dataSource: currentChartSource,
name: girder
};
});
seriesObjects.push({
type: "line",
xName: "d",
yName: "sum",
dataSource: currentChartSource,
name: "Sum"
});
if (!chartRendered) {
$("#chart-container").ejChart({
commonSeriesOptions: {
tooltip: {visible: true}
},
zooming: zoomingOptions,
// Implementing all 8 at once.
series: seriesObjects,
primaryXAxis: {
title: { text: "ms" },
valueType: 'datetime',
intervalType: 'Milliseconds'
},
primaryYAxis: {
title: { text: "ustrain" }
},
crosshair: {
visible: true,
type: 'trackball',
marker: {
shape: 'circle',
size: {
height: 9, width: 9
},
visible: true
}
}
});
// Get the reference for later.
window.chartObject = $("#chart-container").data("ejChart");
chartRendered = true;
} else {
// Then since the chart has already been rendered, we just need to enable the new data and re-render it.
} // (chartRendered)
} // if (currentEventData.dd !==undefined)
break;
default:
throw "Invalid section " + section;
}
}
});
</script>
</body>
</html>