<%@ page language="C#" autoeventwireup="true" inherits="Forms_MapPage_Old, App_Web_h0wv500x" enableeventvalidation="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/Notification_List.ascx" TagPrefix="uc3" TagName="NotificationsList" %>
<%@ Register Src="~/UserControls/New_Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/New_Footer.ascx" TagName="Footer" TagPrefix="uc2" %>
<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web" TagPrefix="dxw" %>
<!DOCTYPE html>
<html lang="en">
<head id="Head1" runat="server">
    <title>tSense-IoT Monitor</title>
    <meta content="charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <meta content="charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <link id="stylesheet2" runat="server" href="../css/stylesheet2.css" rel="stylesheet" type="text/css" />
    <link id="GridView" type="text/css" href="~/App_Themes/Office2003Blue/GridView/grid.css" rel="stylesheet" />
    <link id="Editors" type="text/css" href="~/App_Themes/Office2003Blue/Editors/styles.css" rel="stylesheet" />
    <link id="mainstyle" runat="server" href="../css/mainstyle.css" rel="stylesheet" type="text/css" />
    <link rel="icon" href="../NewDesign/img/favicon.png" type="image/x-icon">
    <link href="../NewDesign/css/bootstrap.css" rel="stylesheet" />
    <link href="../NewDesign/css/font-awesome.css" rel="stylesheet" />
    <link href="../NewDesign/css/responsive.css" rel="stylesheet" />
    <link href="../NewDesign/css/style.css" rel="stylesheet" />
    <link id="jcarousel" runat="server" rel="stylesheet" type="text/css" href="../css/jquery.jcarousel.css" />
    <script src="../NewDesign/js/jquery.js"></script>
    <script src="../NewDesign/js/script.js"></script>
    <link href="../NewDesign/font-awesome-4.7.0/css/font-awesome.css" rel="stylesheet" />
    <link href="../NewDesign/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet" />
    <link href="../fontawesome-free-5.10.1-web/css/all.min.css" rel="stylesheet" />
    <script src="../js/jquery-1.11.2.min.js" type="text/javascript"></script>
    <link href="../css/CustomeAlert/demos.css" rel="stylesheet" type="text/css" />
    <link href="../css/CustomeAlert/themes/jquery.ui.all.css" rel="stylesheet" type="text/css" />
    <script src="../js/CustomAlert/jquery.min.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/CustomAlert.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/jquery-1.2.3.pack.js"></script>
    <script type="text/javascript" src="../js/MonitorCollapseJScript.js"></script>
    <script lang="javascript" type="text/javascript" src="../js/jquery-1.11.2.min.js"></script>
    <script src="../js/jquery.circlechart.js"></script>
    <script src="../js/here.js"></script>
    <script type="text/javascript">
        function doToggle() {
            var cpe = $find("cpe");
            //cpe._toggle();
            if (cpe.get_Collapsed()) {
                cpe._doOpen();
                //document.getElementById("ToggleButton").value = '-';
                document.ToggleButton.src = "../images/gvExpandedButton.png";
                document.getElementById("hdnAlarmVisibility").value = '0';
                document.getElementById('map-dsply').style.height = (document.body.clientHeight / 2) + 'px';
            } else {
                cpe._doClose();
                //document.getElementById("ToggleButton").value = '+';                
                document.ToggleButton.src = "../images/gvCollapsedButton.png";
                document.getElementById("hdnAlarmVisibility").value = '1';
                document.getElementById('map-dsply').style.height = (document.body.clientHeight / 1.66) + 'px';
            }
            // Code to fix the carousel issue.
            //ScrollJCarousel();
        }
    </script>
    <script language="javascript" type="text/javascript">
        var x = -1;
        var y = -1;
        function grid_ContextMenu(s, e) {
            if (e.objectType == "row") {
                x = ASPxClientUtils.GetEventX(e.htmlEvent);
                y = ASPxClientUtils.GetEventY(e.htmlEvent);
                setContextMenu(e.index);
            }
        }
        function setContextMenu(rowindex) {
            grid.GetRowValues(rowindex, 'Description', setContextMenuEnable);
        }
        function setContextMenuEnable(value) {
            if (value == 'N')
                pmRowMenu.GetItemByName('CreateNew').SetEnabled(false);
            else {
                pmRowMenu.GetItemByName('CreateNew').SetEnabled(true);
                pmRowMenu.GetItemByName('Preview').SetEnabled(true);
            }
            pmRowMenu.ShowAtPos(x, y);
        }
        function ContextItemClick(s, e) {
            ExportContextMenu.Hide();
            switch (e.item.name) {
                case 'MapIT':
                    var result = MapItValues();
                    if (result == true) {
                        e.processOnServer = false;
                        __doPostBack('btnMap', '');
                    }
                    else {
                        e.processOnServer = false;
                    }
                    break;
                case 'UpdatePosition':
                    ShowPopUp();
                    e.processOnServer = false;
                    __doPostBack('btnUpdate', '');
                    break;
                case 'AdvancedSearch':
                    ShowPopUp();
                    e.processOnServer = false;
                    __doPostBack('btnSearch', '');
                    break;
                case 'SearchByLandmark':
                    valandmark(); ShowPopUp();
                    e.processOnServer = false;
                    __doPostBack('lnkSearchbyland', '');
                    break;
                case 'FullScreenGrid':
                    e.processOnServer = false;
                    __doPostBack('btnFullGrid', '');
                    break;
                case 'FullScreenMap':
                    FullscreenMap();
                    e.processOnServer = false;
                    __doPostBack('btnFullMap', '');
                    break;
                case 'FullScreenMapAdv':
                    var result = MapItValues();
                    if (result == true) {
                        e.processOnServer = false;
                        __doPostBack('btnFullMap_Adv', '');
                    }
                    else {
                        e.processOnServer = false;
                    }
                    break;
                case 'Refresh':
                    ShowPopUp();
                    e.processOnServer = false;
                    __doPostBack('ibtnReferesh', '');
                    break;
                case 'SaveFilterExpression':
                    ShowPopUp();
                    e.processOnServer = false;
                    __doPostBack('lbtnSaveFilterExpression', '');
                    break;
            }
        }
    </script>
    <script type="text/javascript">
        var PanelVisibleCtrl = 0;
        jQuery(document).ready(function () {
            if (jQuery(".contentHeader").hide()) {
                jQuery(".contentHeader").show();
            }
            //toggle the componenet with class msg_body
            jQuery(".heading").click(function () {
                jQuery(this).next(".contentHeader").slideToggle(300);
                if (PanelVisibleCtrl == 0) {
                    document.ToggleButton.src = "../images/navigate-down.png";
                    document.getElementById('map-dsply').style.height = (document.body.clientHeight / 1.6) + 'px';
                    //$("#map-dsply").closest("canvas").height = 458;
                    PanelVisibleCtrl = 1;
                }
                else {
                    document.ToggleButton.src = "../images/navigate-up.png";
                    document.getElementById('map-dsply').style.height = (document.body.clientHeight / 2) + 'px';
                    //$("#map-dsply").closest("div").closest("div").closest("div").closest("canvas").css("height", (document.body.clientHeight / 1.6) + 'px');
                    PanelVisibleCtrl = 0;
                }
                ScrollJCarousel();
            });
        });
    </script>
    <script type="text/javascript">
        $j = jQuery.noConflict();
        $j(document).ready(function () {
            $j('#roundChart').percentcircle();
        });
    </script>
    <script type="text/javascript">
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-36251023-1']);
        _gaq.push(['_setDomainName', 'jqueryscript.net']);
        _gaq.push(['_trackPageview']);
        (function () {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'https://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
    </script>
</head>
<body onload="PerformScrollSetting();if(load()){setTimeout ('ShowAlarms()',2000);}" class="white">
    <div class="page-wrapper">
        <form id="form1" runat="server">
            <asp:HiddenField ID="hdnGuid" runat="server" />
            <asp:Panel ID="pnlLoading" runat="server" Style="display: none;" Font-Bold="true">
            </asp:Panel>
            <cc1:ModalPopupExtender ID="ModalProcess" runat="server" TargetControlID="Button1"
                PopupControlID="pnlLoading" Drag="true" DropShadow="true" X="400" Y="500">
            </cc1:ModalPopupExtender>
            <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"
                AsyncPostBackTimeout="600" EnablePageMethods="true">
            </asp:ScriptManager>
            <asp:HiddenField ID="hdnShowAlarms" runat="server" Value="0" />
            <!-- Header Starts Here -->
            <uc1:Header ID="ucHeader" runat="server" />
            <!-- Header Ends Here -->
            <!-- Content Starts Here -->
            <div class="preloader"></div>
            <div class="vlive-reports-section maintenance">
                <div class="container-fluid">
                    <div class="row clearfix">
                        <div class="col-ks-3">
                            <div class="col-ks-16">
                                <h2 class="pull-left">
                                    <asp:Literal ID="ltMonitor" runat="server"></asp:Literal></h2>
                            </div>
                            <div class="col-ks-16">
                                <asp:SiteMapPath ID="site" runat="server" CssClass="breadcrumb">
                                    <NodeStyle CssClass="active" />
                                </asp:SiteMapPath>
                                <asp:LinkButton ID="lbtnOfflineMap" runat="server" PostBackUrl="~/Forms/OfflineMapPage.aspx" Text="Offline Map"></asp:LinkButton>
                            </div>
                        </div>
                        <div class="col-ks-10">
                            <asp:Panel ID="divNoAlarms" runat="server" Style="padding: 15px" CssClass="ControlHide">
                                <asp:Label ID="lblNoAlarms" Text="" CssClass="label" runat="server" Style="padding-left: 165px; padding-bottom: 10px"></asp:Label>
                            </asp:Panel>
                            <asp:HiddenField ID="HiddenField1" runat="server" Value="0" />
                            <asp:Panel ID="divBoxPanel" runat="server" CssClass="ControlHide">
                                <div id="wrap1">
                                    <asp:UpdatePanel ID="upScrollAlarms" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                                        <ContentTemplate>
                                            <a id="btnjcarouselPrev" class="jcarousel-prev" href="#" runat="server"></a>
                                            <div class="jcarousel col-sm-12" id="divJCarousel" runat="server">
                                                <ul id="mycarousel" class="" runat="server">
                                                </ul>
                                            </div>
                                            <a id="btnjcarouselNext" class="jcarousel-next" href="#" runat="server"></a>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                    <div class="clear clearfix">
                                    </div>
                                </div>
                            </asp:Panel>
                            <div class="clear clearfix"></div>
                        </div>
                        <div class="col-ks-4" style="display: none">
                            <div class="pull-right" id="Round">
                                <div id="roundChart" runat="server"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="clearfix"></div>
            <div class="vlive-filter">
                <div class="container-fluid">
                    <div class="" style="padding-top: 0px;">
                        <div class="row ftop">
                            <div class="col-ks-16">
                                <asp:HiddenField ID="hdnAlarmVisibility" runat="server" />
                                <input type="hidden" name="cpe_ClientState" id="cpe_ClientState" />
                                <div id="map-lang" style="right: 0px; height: auto; position: absolute; z-index: 100; margin-top: 05px; padding-top: 0px; float: right;">
                                    <div class='panel_lng' align='center' id='lnkLegend'>
                                        <div class='panelcontent_lng'>
                                            <table id='tblLegend_lng' align='right' style='direction: ltr;'>
                                                <tr>
                                                    <td align='right' style='padding: 15px 20px 6px 6px;'>
                                                        <asp:Panel ID="pnlH3_legend" runat="server">
                                                            <table cellpadding='2' cellspacing='2' align='right' width='100px' height='25px'>
                                                                <tr>
                                                                    <td align='left'>
                                                                        <span id="eng3" class="H_btn H_rdo_title" title="Switch To English Language" aria-role="label"
                                                                            style="cursor: pointer">ENG</span>
                                                                    </td>
                                                                    <td align='left'>
                                                                        <span id="arb3" class="H_btn H_rdo_title" title="التحول إلى اللغة العربية" aria-role="label"
                                                                            style="cursor: pointer">العربية</span>
                                                                    </td>
                                                                    <td align='left' style="display: none">
                                                                        <span id="hin3" class="H_btn H_rdo_title" title="हिन्दी भाषा के लिए स्विच" aria-role="label"
                                                                            style="cursor: pointer">हिंदी</span>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </asp:Panel>
                                                    </td>
                                                </tr>
                                            </table>
                                            <asp:Panel ID="pnlH2_legend" runat="server">
                                                <ul class="nm_mapSettingsWrap nm_layout_horizontal nm_right" aria-expanded="false" aria-role="menubar">
                                                    <dl aria-haspopup="true" aria-hidden="false" aria-expanded="false" tabindex="0" aria-role="menu"
                                                        class="nm_dropDownMenu  nm_mapSelectorWrap nm_wrap nm_layout_horizontal nm_firstInGroup nm_lastInGroup">
                                                        <dt class="nm_menuItemMapType" aria-role="menuitem"><span id="eng2" class="nm_labelOpen nm_firstBG"
                                                            title="Switch To English Language" aria-role="label" style="cursor: pointer">ENG</span>
                                                        </dt>
                                                    </dl>
                                                </ul>
                                                <ul class="nm_mapSettingsWrap nm_layout_horizontal nm_right" aria-expanded="false" aria-role="menubar">
                                                    <dl aria-haspopup="true" aria-hidden="false" aria-expanded="false" tabindex="0" aria-role="menu"
                                                        class="nm_dropDownMenu  nm_mapSelectorWrap nm_wrap nm_layout_horizontal nm_firstInGroup nm_lastInGroup">
                                                        <dt class="nm_menuItemMapType" aria-role="menuitem"><span id="arb2" class="nm_labelOpen nm_firstBG"
                                                            title="التحول إلى اللغة العربية" aria-role="label" style="cursor: pointer">العربية</span>
                                                        </dt>
                                                    </dl>
                                                </ul>
                                                <ul class="nm_mapSettingsWrap nm_layout_horizontal nm_right" aria-expanded="false" aria-role="menubar">
                                                    <dl aria-haspopup="true" aria-hidden="false" aria-expanded="false" tabindex="0" aria-role="menu"
                                                        class="nm_dropDownMenu  nm_mapSelectorWrap nm_wrap nm_layout_horizontal nm_firstInGroup nm_lastInGroup">
                                                        <dt class="nm_menuItemMapType" aria-role="menuitem"><span id="hin2" class="nm_labelOpen nm_firstBG"
                                                            title="हिन्दी भाषा के लिए स्विच" aria-role="label" style="cursor: pointer">हिंदी</span>
                                                        </dt>
                                                    </dl>
                                                </ul>
                                            </asp:Panel>
                                        </div>
                                    </div>
                                </div>
                                <div id="pnl_lndMark" style="right: 0px; height: auto; position: absolute; z-index: 100; margin-top: 85px; padding-top: 0px; float: left; left: 4em; display: none;" runat="server">
                                    <div class="H_l_bottom H_l_right">
                                        <div class="H_l_anchor H_l_vertical"></div>
                                        <div class="H_l_anchor H_l_horizontal">
                                            <div class="H_ctl">
                                                <div class="H_btn" title="Landmark" id="landmarkButton" onclick="fnEnableLandmarks()">
                                                    <%--<img src="../images/landmarks.png" />--%>
                                                    <i class="fas fa-map-signs-Map"></i>
                                                    <%--   <svg version="1.1" class="H_icon" viewBox="0 0 26 26"><polyline points="3,5 3,21 23,21 23,5 3,5" style="fill:none;stroke:white;stroke-width:3"></polyline></svg>--%>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="pnl_Geo" style="right: 0px; height: auto; position: absolute; z-index: 100; margin-top: 120px; padding-top: 0px; float: left; left: 4em; display: none;" runat="server">
                                    <div class="H_l_bottom H_l_right">
                                        <div class="H_l_anchor H_l_vertical"></div>
                                        <div class="H_l_anchor H_l_horizontal">
                                            <div class="H_ctl">
                                                <div class="H_btn" title="Geozone" id="geozoneButton" onclick="fnEnableGeozones()">
                                                    <i class="fas fa-globe-americas-Map"></i>
                                                    <%--<svg version="1.1" class="H_icon" viewBox="0 0 26 26"><polyline points="3,5 3,21 23,21 23,5 3,5" style="fill:none;stroke:white;stroke-width:3"></polyline></svg>--%>
                                                </div>
                                                <div class="H_overlay H_top H_left" style="top: 0px; margin: 0px 1.2em; left: 28px;" id="geozoneView">
                                                    <div class="H_rdo">
                                                        <div class="H_rdo_title">Choose types</div>
                                                        <div class="H_rdo_buttons">
                                                            <div class="H_btn" id="typRectangle" onclick="fnSetGeoTypes(1);">Rectangle</div>
                                                            <div class="H_btn" id="typPolygon" onclick="fnSetGeoTypes(2);">Polygon</div>
                                                            <div class="H_btn" id="typCircular" onclick="fnSetGeoTypes(3);">Circular</div>
                                                        </div>
                                                    </div>
                                                    <div class="H_btn H_disabled" id="muGeozoneDetails" onclick="ClearGeozoneContents();getlngs_geozone('','');">Create</div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="map-legend" style="right: 0px; height: auto; position: absolute; z-index: 100; margin-top: 90px; padding-top: 0px; float: right;">
                                </div>
                                <div style="right: 15px; height: auto; position: absolute; z-index: 100; margin-top: 40px; padding-top: 200px; float: right;" id="mapFscreen" runat="server">
                                    <div class="H_ui">
                                        <div class="H_l_bottom H_l_right">
                                            <div class="H_l_anchor H_l_vertical"></div>
                                            <div class="H_l_anchor H_l_horizontal">
                                                <img id="imgFS" src="../images/MapFullscreen.png" onclick="mapclicks(1);return false;" class="ControlShow" style="cursor: pointer; z-index: 1000" title="Full Screen" alt="Full Screen" />
                                                <img id="imgNV" src="../images/ExitFullscreen.png" onclick="mapclicks(2);return false;" class="ControlHide" style="cursor: pointer; z-index: 1000" title="Exit Full Screen" alt="Exit Full Screen" />
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="mapTooltib" class="ControlHide" style="right: 5.5em; height: auto; position: absolute; z-index: 100; margin-top: 420px; float: left;">
                                    <div class="H_ui">
                                        <div class="H_l_bottom H_l_right">
                                            <div class="H_l_anchor H_l_vertical"></div>
                                            <div class="H_l_anchor H_l_horizontal">
                                                <div class="H_ctl" id="Tooltibicon">
                                                    <div class="H_overlay H_top H_left" style="top: -6px; margin: 0px 1.2em; right: 28px; min-width: 18em!important" id="Tooltipmenu">
                                                        <div class="H_rdo_title" style="margin-bottom: 0em!important;">Right click to see more option</div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="map-dsply" style="direction: ltr;">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-ks-16">
                                <div class="col-lg-12 vlive-header_VXL">
                                    <asp:UpdatePanel ID="UpdMap" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                                        <ContentTemplate>
                                            <div class="col-ks-9">
                                                <div class="col-ks-1">
                                                    <asp:Label runat="server" ID="lblFleetCaption" Text=""></asp:Label>
                                                </div>
                                                <div class="col-ks-2_5">
                                                    <dxw:ASPxComboBox ID="ddlFleet" runat="server" ValueType="System.String" ShowImageInEditBox="false"
                                                        EnableIncrementalFiltering="true" ClientInstanceName="ddlFleet" SelectedIndex="0" CssClass="form-control"
                                                        AutoPostBack="true" TabIndex="5" AutoResizeWithContainer="true" EnableTheming="true" Theme="Office2003Blue"
                                                        OnSelectedIndexChanged="ddlFleet_SelectedIndexChanged"
                                                        CssFilePath="~/App_Themes/Office2003 Blue/Editors/styles.css" CssPostfix="Office2003_Blue">
                                                        <ClientSideEvents SelectedIndexChanged="function(s, e) { ShowPopUp(); }" />
                                                    </dxw:ASPxComboBox>
                                                </div>
                                                <div class="col-ks-2">
                                                    <asp:Label runat="server" ID="lblGroupBy" Text="Group by"></asp:Label>
                                                </div>
                                                <div class="col-ks-4">
                                                    <dxw:ASPxComboBox ID="ddlGroupBy" runat="server" ValueType="System.String" ShowImageInEditBox="false"
                                                        EnableIncrementalFiltering="true" ClientInstanceName="ddlFleet" SelectedIndex="0" CssClass="form-control"
                                                        TabIndex="5" AutoResizeWithContainer="true" EnableTheming="true" Theme="Office2003Blue"
                                                        CssFilePath="~/App_Themes/Office2003 Blue/Editors/styles.css" CssPostfix="Office2003_Blue">
                                                        <Items>
                                                            <dxw:ListEditItem Text="Status" Value="0" />
                                                            <dxw:ListEditItem Text="Sites" Value="1" />
                                                            <%--<dxw:ListEditItem Text="Module Variant" Value="2" />
                                                            <dxw:ListEditItem Text="Custom Group" Value="3" />
                                                            <dxw:ListEditItem Text="Control Group" Value="3" />--%>
                                                        </Items>
                                                        <ClientSideEvents SelectedIndexChanged="function(s) { gvData.PerformCallback(s.GetValue()) }" />
                                                    </dxw:ASPxComboBox>
                                                    <%--<dxw:ASPxComboBox runat="server" ID="ASPxComboBox1" ShowImageInEditBox="false" ValueType="System.String"
                                                    SelectedIndex="0" ClientInstanceName="ASPxComboBox1" Width="80px" Height="20px" EnableTheming="true" CssClass="form-control"
                                                    CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue" Theme="Office2003Blue">
                                                    <Items>
                                                        <dxw:ListEditItem Text="VehicleName" Value="0" />
                                                        <dxw:ListEditItem Text="BrandName" Value="2" />
                                                    </Items>
                                                    <ClientSideEvents SelectedIndexChanged="function(s) { gvTyre.PerformCallback(s.GetValue()) }" />
                                                </dxw:ASPxComboBox>--%>
                                                </div>
                                                <div class="col-ks-4_5">
                                                    <style>
                                                        .btnpadding {
                                                            margin-left: 5px;
                                                        }

                                                        .blinking {
                                                            animation: fade 1s infinite alternate;
                                                        }
                                                    </style>
                                                    <asp:LinkButton ID="btnMap" runat="server" CssClass="fa-map-pin btnExport btn btn-primary" OnClientClick="return MapItValues();" Style="margin-right: 10px; margin-top: 3px;"
                                                        OnClick="btnMap_Click">
                                                    </asp:LinkButton>
                                                    <asp:LinkButton ID="btnUpdate" runat="server" CssClass="fa-redo btnExport btn btn-primary btnpadding" OnClientClick="ShowPopUp();" Style="margin-right: 10px; margin-top: 3px;"
                                                        OnClick="btnUpdate_Click" Text="&nbsp;Update Position">
                                                    </asp:LinkButton>
                                                    <asp:LinkButton ID="btnSearch" runat="server" CssClass="fa-search-location btnExport btn btn-primary btnpadding" OnClientClick="ShowPopUp();return true;" Style="margin-right: 10px; margin-top: 3px;"
                                                        OnClick="btnSearch_Click" Text="&nbsp;Advanced Search" Visible="false">
                                                    </asp:LinkButton>
                                                    <asp:LinkButton ID="lnkSearchbyland" runat="server" CssClass="fa-search-plus btnExport btn btn-primary btnpadding" OnClick="lnkSearchbyland_Click" Style="margin-right: 10px; margin-top: 3px;"
                                                        OnClientClick="valandmark();ShowPopUp();" Text="&nbsp;Search By Landmark" Visible="false">
                                                    </asp:LinkButton>
                                                    <asp:LinkButton ID="btnFullGrid" runat="server" OnClick="btnFullGrid_Click" ToolTip="Click here to see Full Screen Grid." CssClass="btn btn-primary fa-th" Style="padding-left: 5px; padding-right: 5px; margin-right: 10px; margin-top: 3px;"></asp:LinkButton>
                                                    <asp:LinkButton ID="btnFullMap" runat="server" OnClick="btnFullMap_Click" ToolTip="Full Screen Map" OnClientClick="FullscreenMap();return false;" CssClass="btn btn-primary fa-expand-arrows-alt btnpadding" Style="padding-left: 5px; padding-right: 5px; margin-right: 10px; margin-top: 3px;" Visible="false"></asp:LinkButton>
                                                    <asp:LinkButton ID="btnFullMap_Adv" runat="server" OnClick="btnFullMapAdv_Click" ToolTip="Full screen map advanced" OnClientClick="return MapItValues();" CssClass="btn btn-primary fa-map btnpadding" Style="padding-left: 5px; padding-right: 5px; margin-right: 10px; margin-top: 3px;" Visible="false"></asp:LinkButton>
                                                    <asp:LinkButton ID="btnLive" runat="server" CssClass="btn btn-primary fa-satellite-dish btnpadding" ToolTip="Live Monitoring" OnClientClick="return openLiveTrackingInfo();" Style="padding-left: 5px; padding-right: 5px; margin-right: 10px; margin-top: 3px;"></asp:LinkButton>
                                                    <asp:LinkButton ID="ibtnReferesh" runat="server" CssClass="btn btn-primary fa-sync btnpadding" OnClick="ibtnReferesh_Click" OnClientClick="ShowPopUp();" ToolTip="Refresh Grid/Alarms/Map" Style="padding-left: 5px; padding-right: 5px; margin-right: 10px; margin-top: 3px;"></asp:LinkButton>
                                                </div>
                                            </div>
                                            <div class="col-ks-2">
                                            </div>
                                            <div class="col-ks-1_5" style="text-align: right;">
                                                <asp:Label ID="lblPageCountCaption" runat="server" Text=""></asp:Label>
                                            </div>
                                            <div class="col-ks-1">
                                                <dxw:ASPxComboBox ID="ddlItemsperPage" runat="server" ValueType="System.String" Width="100%"
                                                    ShowImageInEditBox="false" ClientInstanceName="ddlItemsperPage" SelectedIndex="2" EnableTheming="true" Theme="Office2003Blue"
                                                    OnSelectedIndexChanged="ddlItemsperPage_SelectedIndexChanged" CssClass="form-control exportddl" CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue">
                                                    <ClientSideEvents SelectedIndexChanged="function(s, e) { ShowPopUp(); }" />
                                                    <Items>
                                                        <dxw:ListEditItem Text="5" Value="5" />
                                                        <dxw:ListEditItem Text="10" Value="10" />
                                                        <dxw:ListEditItem Text="25" Value="25" />
                                                        <dxw:ListEditItem Text="50" Value="50" />
                                                        <dxw:ListEditItem Text="75" Value="75" />
                                                        <dxw:ListEditItem Text="100" Value="100" />
                                                    </Items>
                                                </dxw:ASPxComboBox>
                                            </div>
                                            <div class="col-ks-1">
                                                <dxw:ASPxComboBox ID="ASPxCboExport" runat="server" ValueType="System.String" SelectedIndex="0" CssClass="form-control exportddl"
                                                    ShowImageInEditBox="false" ItemImage-Height="12px" ClientInstanceName="ASPxCboExport" AutoPostBack="false" EnableTheming="true" Theme="Office2003Blue"
                                                    CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue">
                                                    <Items>
                                                        <dxw:ListEditItem ImageUrl="../images/icn-pdf.jpg" Text="pdf" Value="pdf" />
                                                        <dxw:ListEditItem ImageUrl="../images/icn-excel.jpg" Text="xls" Value="xls" />
                                                        <dxw:ListEditItem ImageUrl="../images/icn-excel-xlsx.png" Text="xlsx" Value="xlsx" />
                                                        <%--<dxw:ListEditItem ImageUrl="../images/icn-word.jpg" Text="rtf" Value="rtf" />--%>
                                                    </Items>
                                                </dxw:ASPxComboBox>
                                            </div>
                                            <div class="col-ks-1_5">
                                                <asp:LinkButton ID="btnExport" runat="server" CssClass="fa-file-export btnExport btn btn-primary" OnClick="btnExport_Click" ToolTip="Export"
                                                    OnClientClick="ShowPopUp();" Style="padding-left: 5px; padding-right: 5px; margin-top: 3px;">
                                                </asp:LinkButton>
                                                <asp:LinkButton ID="lbtnSaveFilterExpression" runat="server" CssClass="fa-save btnExport btn btn-primary" OnClick="lbtnSaveFilterExpression_Click"
                                                    OnClientClick="ShowPopUp();" ToolTip="Save Filter Settings" Style="padding-left: 5px; padding-right: 5px; margin-top: 3px;" Visible="false">
                                                </asp:LinkButton>
                                            </div>

                                            <div class="col-ks-8_5">
                                                <asp:Timer ID="tmrCommand" runat="server" OnTick="tmrCommand_Tick" Enabled="false"
                                                    Interval="1000">
                                                </asp:Timer>
                                                <asp:Timer ID="tmrCommand_lv" runat="server" OnTick="lvtmrCommand_Tick" Enabled="false"
                                                    Interval="1000">
                                                </asp:Timer>
                                                <div class="row">

                                                    <div style="display: none">
                                                        <div class="col-ks-2" style="text-align: right;">
                                                            <asp:Label runat="server" ID="Label1" Text="Selection"></asp:Label>
                                                        </div>
                                                        <div class="col-ks-4">
                                                            <dxw:ASPxComboBox ID="ASPxCboSelectionMode" runat="server" ValueType="System.String" SelectedIndex="0" Width="100%"
                                                                ShowImageInEditBox="false" ClientInstanceName="ASPxCboSelectionMode" CssClass="form-control">
                                                                <Items>
                                                                    <dxw:ListEditItem Text="Deselect All" Value="Deselect" />
                                                                    <dxw:ListEditItem Text="Select All" Value="Select" />
                                                                </Items>
                                                                <ClientSideEvents SelectedIndexChanged="function(s,e) {
                                                                                                     if(ASPxCboSelectionMode.GetSelectedIndex() == 0)
                                                                                                            gvData.UnselectRows();
                                                                                                     else
                                                                                                            gvData.SelectRows();
                                                                              }" />
                                                            </dxw:ASPxComboBox>
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>

                                        </ContentTemplate>
                                        <Triggers>
                                            <asp:PostBackTrigger ControlID="btnUpdate" />
                                            <asp:PostBackTrigger ControlID="btnSend" />
                                        </Triggers>
                                    </asp:UpdatePanel>

                                </div>
                            </div>
                        </div>
                        <div class="tab-pane fade in active" id="maintenance-plan-details">
                            <div class="row">
                                <div class="col-ks-16">
                                    <asp:HiddenField ID="hdnMoveToTop" runat="server" Value="" />
                                    <asp:HiddenField ID="hdnMapType" runat="server" Value="N" />
                                    <asp:HiddenField ID="hdnCanScroll" runat="server" Value="0" />
                                    <asp:HiddenField ID="hdnScrollPosition" runat="server" Value="1" />
                                    <asp:HiddenField ID="hdnInfoBubbleProcessing" runat="server" Value="" />
                                    <asp:HiddenField ID="hdnScrollingAlarmsCount" runat="server" Value="" />
                                    <asp:HiddenField ID="hdnLandmarkEntries" runat="server" Value="" />
                                    <div id="grid-dsply">
                                        <div class="clear clearfix"></div>
                                        <div id="top" style="height: auto;">
                                        </div>
                                    </div>
                                    <%--</div>--%>
                                    <div class="clear clearfix"></div>
                                    <dxw:ASPxPopupMenu ID="ExportContextMenu" runat="server" ClientInstanceName="ExportContextMenu" AutoPostBack="true" AutoSeparators="None"
                                        EnableTheming="true" Theme="Office2003Blue" OnItemClick="ExportContextMenu_ItemClick" Visible="true">
                                        <Items>
                                            <dxw:MenuItem Name="AdvancedSearch" Text="Advanced Search" Image-Url="../imagesButton/btn-advanced-search.png" />
                                            <%--ToolTip="Click to view Advanced search panel" --%>
                                            <dxw:MenuItem Name="SearchByLandmark" Text="Search By Landmark" Image-Url="../imagesButton/btn-advanced-search.png" />
                                            <%--ToolTip="Click to search vehicles by Landmark"--%>
                                            <dxw:MenuItem Name="FullScreenGrid" Text="Full Screen Grid" Image-Url="../images/icn-fullscreen-grid.gif" />
                                            <%--ToolTip="Click here to see Full Screen Grid" --%>
                                            <dxw:MenuItem Name="FullScreenMap" Text="Full Screen Map" Image-Url="~/images/fullscreen.png" />
                                            <%--ToolTip="Click here to see Full Screen Map"--%>
                                            <dxw:MenuItem Name="FullScreenMapAdv" Text="Full Screen Map Advanced" Image-Url="~/images/FullScreenMapAdv.png" />
                                            <%--ToolTip="Click here to see Full Screen Map Advanced" --%>
                                            <%--<dxw:MenuItem Name="Refresh" Text="Refresh" ToolTip="Click to Refresh Grid/Alarms/Map" Image-Url="~/images/Refresh.png" />--%>
                                            <dxw:MenuItem Name="ExportToPDF" Text="Export to PDF" Image-Url="../images/icn-pdf.jpg" />
                                            <%--ToolTip="Click to Export to PDF"--%>
                                            <dxw:MenuItem Name="ExportToXLS" Text="Export to XLS" Image-Url="../images/icn-excel.jpg" />
                                            <%--ToolTip="Click to Export to XLS"--%>
                                            <dxw:MenuItem Name="ExportToXLSX" Text="Export to XLSX" Image-Url="../images/icn-excel-xlsx.png" />
                                            <%--ToolTip="Click to Export to XLSX"--%>
                                            <dxw:MenuItem Name="ExportToRTF" Text="Export to RTF" Image-Url="../images/icn-word.jpg" />
                                            <%--ToolTip="Click to Export to RTF"--%>
                                            <dxw:MenuItem Name="SaveFilterExpression" Text="Save Filter Settings" Image-Url="../imagesButton/btn-devex-filterkey.png" />
                                        </Items>
                                        <ClientSideEvents ItemClick="ContextItemClick" />
                                    </dxw:ASPxPopupMenu>
                                    <asp:HiddenField ID="hdnGridPaging" runat="server" Value="0" />
                                    <asp:UpdatePanel ID="updGrid" runat="server" UpdateMode="Conditional">
                                        <Triggers>
                                            <%--<asp:PostBackTrigger ControlID="btnExport" />--%>
                                            <%--<asp:AsyncPostBackTrigger ControlID="ExportContextMenu" />--%>
                                        </Triggers>
                                        <ContentTemplate>
                                            <input type="hidden" id="hdnAlarmID" name="hdnAlarmID" runat="server" />
                                            <input type="hidden" runat="server" id="hdnSuccesDeviceIds" name="hdnSuccesDeviceIds" />
                                            <input type="hidden" runat="server" id="hdnUnSuccesDeviceIds" name="hdnUnSuccesDeviceIds" />
                                            <input type="hidden" runat="server" id="hdnSuccesDeviceIds_lv" name="hdnSuccesDeviceIds_lv" />
                                            <input type="hidden" runat="server" id="hdnUnSuccesDeviceIds_lv" name="hdnUnSuccesDeviceIds_lv" />
                                            <asp:HiddenField ID="hdnIsSelectionValid" runat="server" Value="1" />
                                            <asp:HiddenField ID="hdnVehicles" runat="server" />
                                            <div class="table-responsive">
                                                <dxw:ASPxGridView ID="gvData" ClientInstanceName="gvData" runat="server" AutoGenerateColumns="false"
                                                    EnableTheming="true" Theme="Office2003Blue" CssFilePath="~/App_Themes/office2003Blue/GridView/grid.css" CssPostfix="office2003_Blue"
                                                    Width="100%" KeyFieldName="DeviceID" OnRowCommand="gvData_RowCommand" Settings-ShowFilterRow="true"
                                                    Settings-ShowFilterRowMenu="true" OnAfterPerformCallback="gvData_AfterPerformCallback"
                                                    OnFillContextMenuItems="gvData_FillContextMenuItems" OnCustomCallback="gvData_CustomCallback">
                                                    <Styles CssFilePath="~/App_Themes/office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                        CssPostfix="office2003_Blue">
                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                        </Header>
                                                        <LoadingPanel ImageSpacing="10px">
                                                        </LoadingPanel>
                                                        <PagerBottomPanel CssClass="PageFooter">
                                                        </PagerBottomPanel>
                                                        <AlternatingRow Enabled="True">
                                                        </AlternatingRow>
                                                        <PagerTopPanel CssClass="PageFooter">
                                                        </PagerTopPanel>
                                                    </Styles>
                                                    <SettingsLoadingPanel Mode="ShowAsPopup" />
                                                    <SettingsPager PrevPageButton-Image-Url="../App_Themes/office2003Blue/GridView/pPrev.gif"
                                                        PrevPageButton-Image-UrlDisabled="../App_Themes/office2003Blue/GridView/pPrevDisabled.gif"
                                                        NextPageButton-Image-UrlDisabled="../App_Themes/office2003Blue/GridView/pNextDisabled.gif"
                                                        NextPageButton-Image-Url="../App_Themes/office2003Blue/GridView/pNext.gif" AlwaysShowPager="true">
                                                        <NextPageButton>
                                                            <Image Url="../App_Themes/office2003Blue/GridView/pNext.gif" UrlDisabled="../App_Themes/office2003Blue/GridView/pNextDisabled.gif" />
                                                        </NextPageButton>
                                                        <PrevPageButton>
                                                            <Image Url="../App_Themes/office2003Blue/GridView/pPrev.gif" UrlDisabled="../App_Themes/office2003Blue/GridView/pPrevDisabled.gif" />
                                                        </PrevPageButton>
                                                    </SettingsPager>
                                                    <SettingsPopup CustomizationWindow-HorizontalAlign="RightSides" CustomizationWindow-VerticalAlign="TopSides" />
                                                    <SettingsBehavior EnableCustomizationWindow="false" ProcessSelectionChangedOnServer="true" />
                                                    <SettingsContextMenu Enabled="true" EnableGroupPanelMenu="False" ColumnMenuItemVisibility-GroupByColumn="false" ColumnMenuItemVisibility-ShowGroupPanel="false"
                                                        EnableFooterMenu="False" ColumnMenuItemVisibility-ShowFooter="false" RowMenuItemVisibility-NewRow="false" RowMenuItemVisibility-EditRow="false"
                                                        RowMenuItemVisibility-DeleteRow="false" EnableRowMenu="false">
                                                    </SettingsContextMenu>
                                                    <%--Ad-hoc query filter--%>
                                                    <%--<Settings ShowFilterBar="Visible" />--%>
                                                   <%--  ContextMenu="function OnContextMenu(s, e) {
                                                                if (e.objectType == 'row') {
                                                                    ExportContextMenu.ShowAtPos(ASPxClientUtils.GetEventX(e.htmlEvent), ASPxClientUtils.GetEventY(e.htmlEvent));
                                                                }
                                                            }"--%>
                                                    <ClientSideEvents ContextMenuItemClick="function(s,e) 
                                                    {                                                         
                                                        switch(e.item.name) {    
                                                               case 'SelectAll':
                                                                    gvData.SelectRows();
                                                                    ASPxCboSelectionMode.SetSelectedIndex(1);
                                                                    break;
                                                               case 'DeselectAll':
                                                                    gvData.UnselectRows();
                                                                    ASPxCboSelectionMode.SetSelectedIndex(0);                                                                    
                                                                    break;}
                                                    }"
                                                       
                                                        SelectionChanged="function(s,e){gvData.GetSelectedFieldValues('DeviceID;BoxMsgInTypeId;VehicleDescription', onGridSelectionComp_Live);}" />
                                                    <Columns>
                                                        <dxw:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Name="Checkbox"
                                                            Width="3%">
                                                            <HeaderTemplate>
                                                                <input id="chkSelectAll" type="checkbox" runat="server" onclick="gvData.SelectAllRowsOnPage(this.checked);"
                                                                    style="vertical-align: middle;" title="Select/Unselect all rows on the page" />
                                                            </HeaderTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" />
                                                        </dxw:GridViewCommandColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="SiteName" VisibleIndex="1" Width="10%" Caption="Site Name">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-broadcast-tower headericonsize" id="imgDeviceID" runat="server"></i>
                                                                </span><span class="label">
                                                                    <asp:Label runat="server" ID="lblSitenameHeading" Text="Site Name"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblDeviceID" runat="server" Text='<%# Eval("SiteName")%>' ForeColor='<%# Convert.ToString(Eval("IsOnline")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Black%>'>
                                                                </asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="DeviceID" VisibleIndex="1" Width="5%" Caption="Device ID">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-broadcast-tower headericonsize" id="imgDeviceID" runat="server"></i>
                                                                </span><span class="label">
                                                                    <asp:Label runat="server" ID="lblDeviceIdHeading" Text="Device ID"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblDeviceID" runat="server" Text='<%# Eval("DeviceID")%>' ForeColor='<%# Convert.ToString(Eval("IsOnline")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Black%>'>
                                                                </asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <%--<dxw:GridViewDataTextColumn FieldName="VehicleDescription" VisibleIndex="2" Caption="Site Name"
                                                            Width="11%">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-building headericonsize" id="imgVehNameIcon" runat="server"></i>
                                                                </span><span class="label">
                                                                    <asp:Label runat="server" ID="lblVehNameHeading" Text="Site Name"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:LinkButton ID="lblVehicleName" runat="server" Text='<%# Eval("VehicleDescription")%>' ForeColor='<%# Convert.ToString(Eval("NonReportingVehicles")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Red%>'
                                                                    CommandName="Command" OnClientClick="ShowPopUp();">
                                                                </asp:LinkButton>
                                                                <asp:HiddenField ID="lblAutoID" runat="server" Value='<%# Eval("VehicleID")%>' />
                                                            </DataItemTemplate>
                                                            <Settings AutoFilterCondition="Contains" />
                                                        </dxw:GridViewDataTextColumn>--%>
                                                        <dxw:GridViewDataTextColumn FieldName="VehicleDescription" VisibleIndex="2" Caption="Device Name"
                                                            Width="11%">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-tablet headericonsize" id="imgVehNameIcon" runat="server"></i>
                                                                </span><span class="label">
                                                                    <asp:Label runat="server" ID="lblVehNameHeading" Text="Device Name"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <a href='Dashboard.aspx?DeviceID=<%# Eval("DeviceID")%>&DeviceName=<%# Eval("VehicleDescription")%>&DeviceType=<%# Eval("VehicleTypeId")%>'>
                                                                    <table>
                                                                        <tr>
                                                                            <td style="vertical-align: middle" width="30px">
                                                                                <asp:Image ID="imgValidity" runat="server" ImageUrl='<%# Convert.ToString(Eval("StatusImg"))%>'
                                                                                    ToolTip='<%# Convert.ToString(Eval("Status"))%>'
                                                                                    AlternateText='<%# Convert.ToString(Eval("Status"))%>' />
                                                                            </td>
                                                                            <td>&nbsp;<asp:Label ID="lblDevicename" runat="server" Text='<%# Eval("VehicleDescription")%>' Style="text-decoration: underline"></asp:Label>
                                                                                <%--<asp:Label ID="lbladdr" runat="server" Text='<%# Eval("Address") %> ' ForeColor='<%# Convert.ToString(Eval("IsOnline")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Black%>'></asp:Label>--%>
                                                                                <%--&nbsp;<a style="text-decoration: underline" href='Dashboard.aspx?DeviceID=<%# Eval("DeviceID")%>&DeviceName=<%# Eval("VehicleDescription")%>&DeviceType=<%# Eval("VehicleTypeId")%>'><%# Eval("VehicleDescription")%></a>--%>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </a>

                                                                <asp:LinkButton ID="lblVehicleName" runat="server" Visible="false" Text='<%# Eval("VehicleDescription")%>' ForeColor='<%# Convert.ToString(Eval("IsOnline")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Black%>'
                                                                    CommandName="Command" OnClientClick="ShowPopUp();">
                                                                </asp:LinkButton>
                                                                <asp:HiddenField ID="lblAutoID" runat="server" Value='<%# Eval("VehicleID")%>' />
                                                            </DataItemTemplate>
                                                            <Settings AutoFilterCondition="Contains" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <%--<dxw:GridViewDataTextColumn FieldName="DriverName" VisibleIndex="3" Caption="Driver Name"
                                                            Width="10%">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-user headericonsize"></i></span><span class="label">
                                                                        <asp:Label runat="server" ID="lblDrName" Text="Driver Name"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblDriverName" runat="server" Text='<%# Eval("DriverName")%>' ForeColor='<%# Convert.ToString(Eval("NonReportingVehicles")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Red%>'>
                                                                </asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AutoFilterCondition="Contains" />
                                                        </dxw:GridViewDataTextColumn>--%>
                                                        <dxw:GridViewDataTextColumn FieldName="Latitude" VisibleIndex="4" Visible="False" ShowInCustomizationForm="false">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblLat" runat="server" Text='<%# Eval("LastLatitude") %> ' ForeColor='<%# Convert.ToString(Eval("IsOnline")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Black
                                                                %>'></asp:Label>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="Longitude" VisibleIndex="5" Visible="False" ShowInCustomizationForm="false">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblLng" runat="server" Text='<%# Eval("LastLongitude") %> ' ForeColor='<%# Convert.ToString(Eval("IsOnline")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Black%>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataDateColumn FieldName="OriginDateTimeSort" VisibleIndex="6" Caption="Date & Time"
                                                            Width="20%">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="far fa-clock headericonsize"></i></span><span class="label">
                                                                        <asp:Label runat="server" ID="lblDateandTimeHeading" Text="Date & Time" /></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <div class="DateStyle">
                                                                    <asp:Label ID="lblOriginDate" runat="server" Text='<%# Eval("OriginDateTime")%>' ForeColor='<%# Convert.ToString(Eval("IsOnline")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Black%>'>
                                                                    </asp:Label>
                                                                </div>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="True" ShowFilterRowMenu="False" />
                                                        </dxw:GridViewDataDateColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="OriginDateTime" VisibleIndex="7" Caption="Date & Time"
                                                            Visible="false" ShowInCustomizationForm="false">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="far fa-clock headericonsize"></i></span><span class="label">
                                                                        <asp:Label runat="server" ID="lblDateandTimeHeading" Text="Date & Time" /></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <div class="DateStyle">
                                                                    <asp:Label ID="lblOriginDate" runat="server" Text='<%# Eval("OriginDateTime")%>' ForeColor='<%# Convert.ToString(Eval("IsOnline")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Black%>'>
                                                                    </asp:Label>
                                                                </div>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="Address" VisibleIndex="8" CellStyle-VerticalAlign="Middle"
                                                            CellStyle-Wrap="True">
                                                            <CellStyle VerticalAlign="Middle" Wrap="True">
                                                            </CellStyle>
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="far fa-address-card headericonsize"></i></span><span class="label">
                                                                        <asp:Label runat="server" ID="lblAddressHeading" Text="Address" /></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <table>
                                                                    <tr>
                                                                        <td style="vertical-align: middle" width="20px">
                                                                            <asp:Image ID="imgValidity" runat="server" ImageUrl='<%# Convert.ToString(Eval("IsCurrent")) == "0" ? "~/Images/icn-address-notvalid.gif" : "~/Images/icn-address-valid.gif"  %>'
                                                                                ToolTip='<%# Convert.ToString(Eval("IsCurrent")) == "0" ? "Not current location" : "Current location"  %>'
                                                                                AlternateText='<%# Convert.ToString(Eval("IsCurrent")) == "0" ? "Not Current Location" : "Current Location"  %>' />
                                                                        </td>
                                                                        <td>
                                                                            <asp:Label ID="lbladdr" runat="server" Text='<%# Eval("Address") %> ' ForeColor='<%# Convert.ToString(Eval("IsOnline")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Black%>'></asp:Label>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </DataItemTemplate>
                                                            <Settings AutoFilterCondition="Contains" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="MessageDetails" VisibleIndex="9" Caption="Message Details"
                                                            Width="16%" CellStyle-Wrap="True">
                                                            <CellStyle Wrap="True">
                                                            </CellStyle>
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-comment-dots headericonsize"></i></span><span class="label">
                                                                        <asp:Label ID="lblMsgDetailsCaption" runat="server" Text="Message Details"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblMsgDetails" runat="server" Text='<%# Eval("MessageDetails") %>' ForeColor='<%# Convert.ToString(Eval("IsOnline")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Black%>'>
                                                                </asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AutoFilterCondition="Contains" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="LastSpeed" Caption="Speed" VisibleIndex="10"
                                                            Width="5%" CellStyle-HorizontalAlign="Center" HeaderStyle-Wrap="True" Visible="false">
                                                            <CellStyle HorizontalAlign="Center">
                                                            </CellStyle>
                                                            <HeaderCaptionTemplate>
                                                                <table cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td style="vertical-align: middle">
                                                                            <i class="fas fa-tachometer-alt headericonsize"></i>
                                                                        </td>
                                                                        <td>&nbsp;<asp:Label ID="lblSpeedHeading" runat="server" Font-Bold="false" CssClass="label"
                                                                            Text="Speed"></asp:Label>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblSpeed" runat="server" Text='<%# Eval("LastSpeed") %> ' ForeColor='<%# Convert.ToString(Eval("IsOnline")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Black%>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="RoadSpeedLimit" Caption="Road Speed" VisibleIndex="10" CellStyle-HorizontalAlign="Center" Width="5%" HeaderStyle-Wrap="True" Visible="false">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-road headericonsize"></i>
                                                                </span><span class="label">
                                                                    <asp:Label ID="lblgvSpeedHeading" runat="server" Text="Road Speed"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblRoadSpeed" runat="server" Text='<%# Eval("RoadSpeedLimit") %>' ForeColor='<%# Convert.ToString(Eval("IsOnline")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Black%>'></asp:Label>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="TotDuration" VisibleIndex="11" Caption="Tot Distance" Visible="false"
                                                            Width="7%" CellStyle-Wrap="True" CellStyle-HorizontalAlign="Center">
                                                            <CellStyle Wrap="True">
                                                            </CellStyle>
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-route headericonsize"></i></span><span class="label">
                                                                        <asp:Label ID="lbltotdistanceCaption" runat="server" Text="Tot Distance"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblTotDist" runat="server" Text='<%# Eval("TotDuration") %> ' ForeColor='<%# Convert.ToString(Eval("IsOnline")) == "1"?System.Drawing.ColorTranslator.FromHtml("#166337"):System.Drawing.Color.Black%>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="OdometerValues" VisibleIndex="11" Caption="Odometer" Visible="false"
                                                            Width="7%" CellStyle-Wrap="True" CellStyle-HorizontalAlign="Center">
                                                            <CellStyle Wrap="True">
                                                            </CellStyle>
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-route headericonsize"></i></span><span class="label">
                                                                        <asp:Label ID="Label5" runat="server" Text="Odometer"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:LinkButton ID="lbtMsgDetails" runat="server" Text='<%# Convert.ToString(Eval("OdometerValues"))%>' CssClass="segemntFontDisplay"
                                                                    Visible='<%# (Eval("IsSetOdometer").ToString() == "1") ? true : false %>' CommandName="Command" OnClientClick="ShowPopUp();" CommandArgument="K"
                                                                    ForeColor='<%# (Eval("IsSetOdometer").ToString() == "1") ? System.Drawing.Color.Red:System.Drawing.Color.Black %>'>
                                                                </asp:LinkButton>
                                                                <asp:Label ID="lblOdometer" runat="server" CssClass="segemntFontDisplay" Text='<%# Convert.ToString(Eval("OdometerValues")) %>'
                                                                    Visible='<%# (Eval("IsSetOdometer").ToString() == "0") ? true : false %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="BoxArmed" VisibleIndex="12" Caption="Box Armed Status"
                                                            Width="25px" CellStyle-VerticalAlign="Middle" CellStyle-HorizontalAlign="Center"
                                                            Visible="false" ShowInCustomizationForm="false">
                                                            <CellStyle HorizontalAlign="Center" VerticalAlign="Middle">
                                                            </CellStyle>
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img src="../Images/icn-box-armed.gif" alt="Box Armed Status" title="Box Armed Status"
                                                                        align="top" /></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Image ID="imgBoxArmed" ImageAlign="Middle" runat="server" ImageUrl='<%# Convert.ToString(Eval("BoxArmed")) == "0" ? "~/Images/icn-armed-insecured.gif" : "~/Images/icn-armed-secured.gif"  %>'
                                                                    AlternateText='<%# Convert.ToString(Eval("BoxArmed")) == "0" ? "Disarmed" : "Armed"  %>' />
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="Status" VisibleIndex="7" Caption="Status" CellStyle-Font-Bold="true"
                                                            Width="17%" CellStyle-Wrap="True">
                                                            <CellStyle HorizontalAlign="Left" VerticalAlign="Middle">
                                                            </CellStyle>
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-flag headericonsize" style="color: red;"></i></span><span class="label">
                                                                        <asp:Label runat="server" ID="lblStatusHeading" Text="Status" /></span>
                                                            </HeaderCaptionTemplate>
                                                            <%--<DataItemTemplate>
                                                                <asp:Label ID="lblStatus" runat="server" Text='<%# Eval("Status") %> ' ForeColor='<%# Convert.ToString(Eval("NonReportingVehicles")) == "1"?System.Drawing.ColorTranslator.FromHtml("#006633"):System.Drawing.Color.Red%>'></asp:Label>
                                                            </DataItemTemplate>--%>
                                                            <DataItemTemplate>
                                                                <span class="icon" style="margin: 2px 4px; text-align: right">
                                                                    <asp:LinkButton ID="lnkclr" runat="server" CssClass="fas fa-circle" Style="font-size: small; vertical-align: middle;" ForeColor='<%# (Convert.ToString(Eval("Status")) == "Information") ? System.Drawing.ColorTranslator.FromHtml("#249cee") : (Convert.ToString(Eval("Status")) == "Warning") ? System.Drawing.ColorTranslator.FromHtml("#c7b41d"):(Convert.ToString(Eval("Status")) == "Electrical Trip") ? System.Drawing.ColorTranslator.FromHtml("#AC3DDF"):(Convert.ToString(Eval("Status")) == "Shutdown") ? System.Drawing.ColorTranslator.FromHtml("#C11515"):(Convert.ToString(Eval("Status")) == "Offline") ? System.Drawing.ColorTranslator.FromHtml("#b1b1b1"):(Convert.ToString(Eval("Status")) == "Running") ? System.Drawing.ColorTranslator.FromHtml("#1ad41a"):System.Drawing.Color.Transparent %>'></asp:LinkButton>
                                                                </span>
                                                                <asp:Label ID="lblStatus" runat="server" Text='<%# Eval("Status").ToString() %>'
                                                                    ForeColor='<%# (Convert.ToString(Eval("Status")) == "Information") ? System.Drawing.ColorTranslator.FromHtml("#249cee") : (Convert.ToString(Eval("Status")) == "Warning") ? System.Drawing.ColorTranslator.FromHtml("#c7b41d"):(Convert.ToString(Eval("Status")) == "Electrical Trip") ? System.Drawing.ColorTranslator.FromHtml("#AC3DDF"):(Convert.ToString(Eval("Status")) == "Shutdown") ? System.Drawing.ColorTranslator.FromHtml("#C11515"):(Convert.ToString(Eval("Status")) == "Offline") ? System.Drawing.ColorTranslator.FromHtml("#000"):(Convert.ToString(Eval("Status")) == "Running") ? System.Drawing.ColorTranslator.FromHtml("#1ad41a"):System.Drawing.Color.Transparent %>'></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AutoFilterCondition="Contains" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataColumn FieldName="IsTop" Caption="IsTop" Visible="false" VisibleIndex="14" ShowInCustomizationForm="false">
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="Mapitvalues" Caption="Mapitvalues" Visible="false" VisibleIndex="15" ShowInCustomizationForm="false">
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="BoxMsgInTypeId" Caption="BoxMsgInTypeId" Visible="false" VisibleIndex="15" ShowInCustomizationForm="false">
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataColumn FieldName="Notcurposveh" Caption="Notcurposveh" Visible="false" VisibleIndex="16" ShowInCustomizationForm="false">
                                                        </dxw:GridViewDataColumn>
                                                        <dxw:GridViewDataTextColumn Visible="false" VisibleIndex="17" Width="3%" Caption=""
                                                            Name="Alarms" CellStyle-Wrap="True" CellStyle-HorizontalAlign="Center" CellStyle-VerticalAlign="Middle">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-bell headericonsize"></i></span><span class="label">
                                                                        <asp:Label ID="lblAlarmDescCaption" runat="server" Text=""></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:LinkButton ID="lnkAssign" runat="server" OnClientClick="ShowPopUp();" OnClick="lbtViewAlerts_Click"
                                                                    CommandArgument='<%# Eval("DeviceID")+","+Eval("OriginDateTime")+","+Eval("VehicleDescription")%>'
                                                                    Style="text-decoration: none;">
                                                                <i class="fas fa-bell headericonsize" title="Click here to view 24 hrs Alarm details from last reported time. "></i>
                                                                </asp:LinkButton>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Visible="false" VisibleIndex="18" Width="4%" Caption=""
                                                            Name="History">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-stopwatch Subheadericon"></i></span><span class="label">
                                                                        <asp:Label ID="lblAlarmDescCaption" runat="server" Text=""></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <%--OnClick="lbtViewhstry_Click"--%>
                                                                <asp:LinkButton ID="lnkHstry" runat="server" OnClientClick="ShowPopUp();" CommandArgument='<%# Eval("VehicleID")+","+Eval("OriginDateTime")+","+Eval("VehicleDescription")%>'
                                                                    Style="text-decoration: none;" CssClass="customerRow" CommandName="GridView"
                                                                    OnClick="lbtViewhstry_Click">
                                                                <i class="fas fa-stopwatch headericonsize" title="Click here to view 24 hrs history details from last reported time. "></i>
                                                                </asp:LinkButton>
                                                                <asp:LinkButton ID="lnkHstMap" runat="server" OnClientClick="ShowPopUp();" CommandArgument='<%# Eval("VehicleID")+","+Eval("OriginDateTime")+","+Eval("VehicleDescription")%>'
                                                                    Style="text-decoration: none;" CssClass="customerRow" CommandName="Mapit" OnClick="lbtViewhstry_Click">
                                                                <img src="../images/icn-mapit.gif" align="top" alt="" class="customerRow" title="Click here to view 24 hrs vehicle locations from last reported time. " />
                                                                </asp:LinkButton>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                    </Columns>
                                                    <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="125" />
                                                    <SettingsText EmptyDataRow="No Vehicles under the selected fleet" />
                                                    <SettingsBehavior ColumnResizeMode="NextColumn" ProcessSelectionChangedOnServer="false" />                                                    
                                                    
                                                </dxw:ASPxGridView>
                                                <div class="AlignControl" style="padding-left: 4px; margin-top: -11px; display: none;">
                                                    <br />
                                                    <img src="../images/green.png" />
                                                    <asp:Label ID="lblReportingVehicles" runat="server" Text="Reporting Vehicles"></asp:Label>
                                                    <img src="../images/red.png" />
                                                    <asp:Label ID="lblNonReportingVehicles" runat="server" Text="Non Reporting vehicles"></asp:Label>
                                                </div>
                                            </div>
                                            <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvData" OnRenderBrick="ASPxGridViewExporter1_RenderBrick">
                                                <PageFooter Right="[Page # of Pages #]">
                                                </PageFooter>
                                            </dxw:ASPxGridViewExporter>
                                            <asp:Timer ID="tmr1" runat="server" OnTick="tmr1_Tick" Enabled="false">
                                            </asp:Timer>
                                            <asp:Timer ID="tmrShow" runat="server" OnTick="tmrShow_Tick" Enabled="false">
                                            </asp:Timer>
                                            <asp:HiddenField runat="server" ID="hdnGeozoneValue" />
                                            <asp:HiddenField ID="hdnCoordinates" runat="server" />
                                            <asp:HiddenField ID="hdnGeoCoordinates" runat="server" />
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <asp:HiddenField ID="hdnExport" runat="server" Value="0" />
            <asp:HiddenField ID="hdnAddLandmark" runat="server" />
            <!-- Content Ends Here -->
            <!-- LandMark Panel-->
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                <ContentTemplate>
                    <asp:Panel ID="pnlLandmark" runat="server" CssClass="landmarkPanel col-sm-8 col-md-6 col-lg-4">
                        <span id="spLatlng" style="display: none;">
                            <div class="row">
                                <div class="col-sm-3">
                                    <asp:Label ID="Label24" runat="server" Text="Latitude"></asp:Label>
                                </div>
                                <div class="col-sm-3">
                                    <asp:Label ID="Label25" runat="server" Text="Longitude"></asp:Label>
                                </div>
                                <div class="col-sm-3">
                                    <asp:TextBox ID="txtlat" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                                <div class="col-sm-3">
                                    <asp:TextBox ID="txtlong" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                        </span>
                        <div class="popup">
                            <div class="top">
                                <h1>
                                    <i class="fas fa-map-signs Subheadericon"></i>
                                    <asp:Label ID="lblLandmarkPanel" runat="server" Text="Landmark Panel"></asp:Label>
                                </h1>
                                <div class="close">
                                    <asp:ImageButton ID="ibtClose" runat="server" OnClientClick="return ClearLandmarkContents();"
                                        ImageUrl="~/Images/popup-close.gif" />
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div class="popup-cont">
                                <div class="form-horizontal">
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblLocationName" runat="server" Text="Location Name"></asp:Label>
                                            <span style="color: Red">*</span>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:TextBox ID="txtLocationName" runat="server" CssClass="form-control" MaxLength="100" onpaste="return false"
                                                TabIndex="1" ondrop="return false" onkeypress="return chkAlphaNumericWithSpace(event,this,99);"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblLocationDesc" runat="server" Text="Location Description"></asp:Label>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:TextBox ID="txtLocationDesc" runat="server" CssClass="form-control" Rows="5" TextMode="MultiLine" TabIndex="2"
                                                Height="30px" onblur="return disallowScriptTags(this);" onkeypress="return chkDescription(event,this,249);"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblRadius" runat="server" Text="Radius"></asp:Label><span style="color: Red">*</span>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:TextBox ID="txtRadius" runat="server" CssClass="form-control" onpaste="return false" TabIndex="3" ondrop="return false"
                                                MaxLength="4" onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblStreetAddr" runat="server" Text="Street Address"></asp:Label>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:TextBox ID="txtstreet" Enabled="false" runat="server" CssClass="form-control" TabIndex="4" TextMode="MultiLine"
                                                Height="30px" Rows="5" onblur="return disallowScriptTags(this);"
                                                onkeypress="return chkDescription(event,this,249);"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblCategory" runat="server" Text="Category"></asp:Label>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:DropDownList runat="server" TabIndex="5" ID="ddlCategory" CssClass="form-control select2">
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3"></div>
                                        <div class="col-sm-6">
                                            <asp:ImageButton ID="btnAddNotifictions1" runat="server" TabIndex="6" ImageUrl="~/images/btn-manage-notification.jpg"
                                                OnClick="btnAddNotifictions_Click" OnClientClick="document.getElementById('pnlNotificationsList').style.display = 'block';"
                                                Text="Add Notifications" Visible="false" />
                                            <asp:LinkButton ID="btnAddNotifictions" runat="server" CssClass="fa-envelope-open-text btn btn-primary"
                                                OnClientClick="document.getElementById('pnlNotificationsList').style.display = 'block';"
                                                OnClick="btnAddNotifictions_Click" Text="&nbsp;Manage Notifications">
                                            </asp:LinkButton>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3"></div>
                                        <div class="col-sm-6">
                                            <asp:LinkButton ID="btnLandMark" runat="server" CssClass="fa-save btn btn-primary" OnClientClick="if( ValidateLandmarkFields()) {ShowPopUp(); return true;} else{return false;}"
                                                OnClick="btnLandMark_Click" ValidationGroup="grp" Text="&nbsp;Save">
                                            </asp:LinkButton>&nbsp;&nbsp;
                                        <asp:LinkButton ID="imgCancel" runat="server" CssClass="fa-ban btn btn-primary" OnClientClick="return ClearLandmarkContents();">
                                        </asp:LinkButton>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>
            <!-- Geozone Panel-->
            <asp:UpdatePanel ID="UpdatePanel6" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                <ContentTemplate>
                    <asp:Panel ID="pnlGeozone" runat="server" CssClass="landmarkPanel col-sm-8 col-md-6 col-lg-4">
                        <span id="spLatlng" style="display: none;">
                            <div class="row">
                                <div class="col-sm-3">
                                    <asp:Label ID="Label6" runat="server" Text="Latitude"></asp:Label>
                                </div>
                                <div class="col-sm-3">
                                    <asp:Label ID="Label7" runat="server" Text="Longitude"></asp:Label>
                                </div>
                                <div class="col-sm-3">
                                    <asp:TextBox ID="TextBox1" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                                <div class="col-sm-3">
                                    <asp:TextBox ID="TextBox2" runat="server" CssClass="form-control"></asp:TextBox>
                                </div>
                            </div>
                        </span>
                        <div class="popup">
                            <div class="top">
                                <h1>
                                    <img src="../images/icn-geozone.jpg" alt="" align="middle" />
                                    <asp:Label ID="Label8" runat="server" Text="Geozone Panel"></asp:Label>
                                </h1>
                                <div class="close">
                                    <asp:ImageButton ID="ImageButton2" runat="server" OnClientClick="return ClearGeozoneContents();"
                                        ImageUrl="~/Images/popup-close.gif" />
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div class="popup-cont">
                                <div class="form-horizontal">
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="Label9" runat="server" Text="Geozone Name"></asp:Label>
                                            <span style="color: Red">*</span>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:HiddenField ID="hdnGeozoneType" runat="server" Value="3" />
                                            <asp:TextBox ID="txtGeozoneName" runat="server" CssClass="form-control" MaxLength="100" onpaste="return false"
                                                TabIndex="1" ondrop="return false" onkeypress="return chkAlphaNumericWithSpace(event,this,99);"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="Label10" runat="server" Text="Description"></asp:Label>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:TextBox ID="txtGeozoneDescription" runat="server" CssClass="form-control" Rows="5" TextMode="MultiLine" TabIndex="2"
                                                Height="30px" onblur="return disallowScriptTags(this);" onkeypress="return chkDescription(event,this,249);"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="Label14" runat="server" Text="Severity"></asp:Label>
                                            <span style="color: Red">*</span>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:DropDownList runat="server" TabIndex="5" ID="ddlGeozoneSeverity" CssClass="form-control select2">
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="Label15" runat="server" Text="Direction"></asp:Label>
                                            <span style="color: Red">*</span>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:DropDownList runat="server" TabIndex="5" ID="ddlGeozoneDirection" CssClass="form-control select2">
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="Label13" runat="server" Text="Category"></asp:Label>
                                            <span style="color: Red">*</span>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:DropDownList runat="server" TabIndex="5" ID="ddlGeozoneCategory" CssClass="form-control select2">
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="ControlHide" id="dGeozoneRadiusDiv">
                                        <div class="col-sm-3">
                                            <asp:Label ID="Label11" runat="server" Text="Radius"></asp:Label><span style="color: Red">*</span>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:TextBox ID="txtGeozoneRadius" runat="server" CssClass="form-control" onpaste="return false" TabIndex="3" ondrop="return false"
                                                MaxLength="4" onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3"></div>
                                        <div class="col-sm-6">
                                            <asp:ImageButton ID="ImageButton3" runat="server" TabIndex="6" ImageUrl="~/images/btn-manage-notification.jpg"
                                                OnClick="btnAddNotifictions_Click" OnClientClick="document.getElementById('pnlNotificationsList').style.display = 'block';"
                                                Text="Add Notifications" Visible="false" />
                                            <asp:LinkButton ID="btnAddNotifictions_G" runat="server" CssClass="fa-envelope-open-text btn btn-primary"
                                                OnClientClick="document.getElementById('pnlNotificationsList').style.display = 'block';"
                                                OnClick="btnAddNotifictionsG_Click" Text="&nbsp;Manage Notifications">
                                            </asp:LinkButton>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3"></div>
                                        <div class="col-sm-6">
                                            <asp:LinkButton ID="LinkButton4" runat="server" CssClass="fa-save btn btn-primary" OnClientClick="if(ValidateGeozonePanelEntries()) {ShowPopUp(); return true;} else{return false;}"
                                                OnClick="btnGeozone_Click" ValidationGroup="grp" Text="&nbsp;Save">
                                            </asp:LinkButton>&nbsp;&nbsp;
                                        <asp:LinkButton ID="LinkButton5" runat="server" CssClass="fa-ban btn btn-primary" Text="&nbsp;Cancel" OnClientClick="return ClearGeozoneContents();">
                                        </asp:LinkButton>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>
            <asp:Panel ID="pnlNotificationsList" runat="server" Style="display: none;" CssClass="manageNotificationPanel col-xs-9 nullpadding">
                <asp:UpdatePanel ID="updNotify" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                    <ContentTemplate>
                        <uc3:NotificationsList ID="ucNotificationList" runat="server" NotificationType="3" />
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <asp:HiddenField ID="hdnAlarmIDs" runat="server" Value="" />
            <!-- Message  Panel -->
            <asp:Panel ID="pnlSearch" runat="server" CssClass="landmarkPanel">
                <asp:UpdatePanel ID="updSearch" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                    <ContentTemplate>
                        <div class="popup">
                            <div class="top">
                                <h1>
                                    <asp:Label ID="lblAdvSearchPanelHeading" runat="server" Text="Search Criteria Panel"></asp:Label></h1>
                                <div class="close">
                                    <img id="imgSearch" alt="" runat="server" src="../images/popup-close.gif" border="0"
                                        onclick="document.getElementById('pnlSearch').style.display = 'none';" />
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div class="popup-content">
                                <asp:UpdatePanel ID="UpdatePanel2" runat="server" OnUnload="UpdatePanel_Unload">
                                    <ContentTemplate>
                                        <div class="form-horizontal">
                                            <div class="form-group">
                                                <div class="col-sm-2">
                                                    <asp:Label ID="lblVehicleDescription" runat="server" Text="Vehicle Name"></asp:Label>
                                                </div>
                                                <div class="col-sm-4 form-controllinebreak">
                                                    <asp:TextBox ID="txtVehicleDesc" class="form-control" MaxLength="50" onpaste="return true;" ondrop="return true;"
                                                        TabIndex="1" runat="server" onkeypress="return chkAlphaNumericWithSpace(event,this,49)"></asp:TextBox>
                                                </div>
                                                <div class="col-sm-2">
                                                    <asp:Label ID="lblLandmarkName" runat="server" Text="Landmark Name"></asp:Label>
                                                </div>
                                                <div class="col-sm-4">
                                                    <asp:TextBox ID="txtLandMark" class="form-control" MaxLength="100" runat="server" onpaste="return true;"
                                                        TabIndex="3" ondrop="return true;" onkeypress="return chkAlphaNumericWithSpace(event,this,99)"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div id="trLicPlate" runat="server" class="form-group">
                                                <div class="col-sm-2">
                                                    <asp:Label ID="lblLicensePlate" runat="server" Text="License Plate"></asp:Label>
                                                </div>
                                                <div class="col-sm-4 form-controllinebreak">
                                                    <asp:TextBox ID="txtLicense" class="form-control" MaxLength="20" onpaste="return true;" ondrop="return true;"
                                                        TabIndex="2" onkeypress="return chkAlphaNumericWithSpace(event,this,19)" runat="server"></asp:TextBox>
                                                </div>
                                                <div class="col-sm-2">
                                                    <asp:Label ID="lblStreatAddress" runat="server" Text="Street Address"></asp:Label>
                                                </div>
                                                <div class="col-sm-4">
                                                    <asp:TextBox ID="txtAddress" class="form-control" MaxLength="250" onblur="return disallowScriptTags(this);"
                                                        TabIndex="5" onkeypress="return chkDescription(event,this,249);" runat="server"></asp:TextBox>
                                                </div>
                                            </div>
                                            <div id="trDeviceID" runat="server" class="form-group">
                                                <div class="col-sm-2">
                                                    <asp:Label ID="lblDevice" runat="server" Text="Device ID"></asp:Label>
                                                </div>
                                                <div class="col-sm-4">
                                                    <asp:TextBox ID="txtBox" class="form-control" runat="server" onpaste="return true;" ondrop="return true;"
                                                        TabIndex="4" MaxLength="6" onkeypress="return chkNumeric_only(event)"></asp:TextBox>
                                                </div>
                                                <div class="col-sm-2">
                                                </div>
                                                <div class="col-sm-4">
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-sm-4"></div>
                                                <div class="col-sm-8">
                                                    <asp:LinkButton ID="btnSearchVehicle" runat="server" CssClass="btn btn-primary fa-search" OnClick="btnSearchVehicle_Click" OnClientClick="ShowPopUp();" Text="&nbsp;Search">
                                                    </asp:LinkButton>&nbsp;&nbsp;
                                                        <asp:LinkButton ID="btnClearSearch" runat="server" CssClass="btn btn-primary fa-minus-circle" OnClick="btnClearSearch_Click" OnClientClick="ShowPopUp();" Text="&nbsp;Clear">
                                                        </asp:LinkButton>
                                                </div>
                                            </div>
                                        </div>
                                        <asp:Panel ID="pnlSearchGrid" runat="server">
                                            <div id="grid-dsply">
                                                <div class="table-responsive">
                                                    <dxw:ASPxGridView ID="gvVehicles" ClientInstanceName="gvVehicles" runat="server"
                                                        EnableTheming="true" Theme="Office2003Blue"
                                                        AutoGenerateColumns="False" CssFilePath="~/App_Themes/office2003Blue/GridView/grid.css"
                                                        CssPostfix="office2003_Blue" Width="100%" KeyFieldName="DeviceID" Paddings-Padding="0"
                                                        OnDataBinding="gvVehicles_DataBinding" OnAfterPerformCallback="gvVehicles_AfterPerformCallback">
                                                        <Styles CssFilePath="~/App_Themes/office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                            CssPostfix="office2003_Blue">
                                                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                            </Header>
                                                            <LoadingPanel ImageSpacing="10px">
                                                            </LoadingPanel>
                                                            <PagerBottomPanel CssClass="PageFooter">
                                                            </PagerBottomPanel>
                                                            <PagerTopPanel CssClass="PageFooter">
                                                            </PagerTopPanel>
                                                        </Styles>
                                                        <SettingsLoadingPanel Mode="ShowAsPopup" />
                                                        <SettingsPager PrevPageButton-Image-Url="../App_Themes/office2003Blue/GridView/pPrev.gif"
                                                            PrevPageButton-Image-UrlDisabled="../App_Themes/office2003Blue/GridView/pPrevDisabled.gif"
                                                            NextPageButton-Image-UrlDisabled="../App_Themes/office2003Blue/GridView/pNextDisabled.gif"
                                                            NextPageButton-Image-Url="../App_Themes/office2003Blue/GridView/pNext.gif" AlwaysShowPager="true">
                                                        </SettingsPager>
                                                        <Columns>
                                                            <dxw:GridViewDataTextColumn FieldName="VehicleID" Visible="False">
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblAutoID" runat="server" Text='<%# Eval("VehicleID") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="RowID" Visible="False">
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblRowID" runat="server" Text='<%# Eval("RowID") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Name="Checkbox"
                                                                Width="4%">
                                                                <HeaderTemplate>
                                                                    <input id="chkSelectAll" type="checkbox" runat="server" onclick="gvVehicles.SelectAllRowsOnPage(this.checked);"
                                                                        style="vertical-align: middle;" title="Select/Unselect all rows on the page" />
                                                                </HeaderTemplate>
                                                                <HeaderStyle HorizontalAlign="Center" />
                                                            </dxw:GridViewCommandColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="DeviceID" VisibleIndex="1" Width="10%" Visible="false">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <i class="fas fa-broadcast-tower  headericonsize" id="imgDeviceID" runat="server"></i>
                                                                    </span><span class="label" style="padding-top: 4px">
                                                                        <asp:Label ID="lblgvDeviceIdHeading" runat="server" Text="Device ID"></asp:Label></span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblDeviceID" runat="server" Text='<%# Eval("DeviceID") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="VehicleDescription" VisibleIndex="2" Caption="Vehicle Name"
                                                                Width="13%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <i class="fas fa-car headericonsize" id="imgVehNameIcon" runat="server"></i></span><span class="label" style="padding-top: 4px">
                                                                            <asp:Label ID="lblgvVehNameHeading" runat="server" Text="Vehicle Name"></asp:Label></span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblVehicleName" runat="server" Text='<%# Eval("VehicleDescription") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="DriverName" VisibleIndex="2" Caption="Driver Name"
                                                                Width="12%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <i class="fas fa-user headericonsize"></i></span><span class="label">
                                                                            <asp:Label runat="server" ID="lblDrName" Text="Driver Name"></asp:Label></span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblDriverName" runat="server" Text='<%# Eval("DriverName")%>'>
                                                                    </asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="DateTimeSort" VisibleIndex="3" Caption="DateTime"
                                                                Width="17%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <i class="far fa-clock headericonsize"></i>
                                                                    </span><span class="label" style="padding-top: 5px">
                                                                        <asp:Label ID="lblgvDateTimeHeading" runat="server" Text="Date & Time"></asp:Label></span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <div class="DateStyle">
                                                                        <asp:Label ID="lbldt" runat="server" Text='<%# Eval("DateTime") %>'></asp:Label>
                                                                    </div>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="Address" VisibleIndex="4" Caption="Address"
                                                                CellStyle-Wrap="True">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <i class="far fa-address-card headericonsize"></i></span><span class="label" style="padding-top: 6px">
                                                                            <asp:Label ID="lblgvAddressHeading" runat="server" Text="Address"></asp:Label></span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <table>
                                                                        <tr>
                                                                            <td style="vertical-align: middle" width="20px">
                                                                                <asp:Image ID="imgValidity" runat="server" ImageUrl='<%# Convert.ToString(Eval("IsCurrent")) == "0" ? "~/Images/icn-address-notvalid.gif" : "~/Images/icn-address-valid.gif"  %>'
                                                                                    ToolTip='<%# Convert.ToString(Eval("IsCurrent")) == "0" ? "Not current location" : "Current location"  %>'
                                                                                    AlternateText='<%# Convert.ToString(Eval("IsCurrent")) == "0" ? "Not Current Location" : "Current Location"  %>' />
                                                                            </td>
                                                                            <td>
                                                                                <asp:Label ID="lbladdr1" runat="server" Text='<%# Eval("Address") %>'></asp:Label>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </DataItemTemplate>
                                                                <CellStyle Wrap="True">
                                                                </CellStyle>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="MessageDetails" VisibleIndex="5" Caption="Message Details">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <i class="fas fa-comment-dots headericonsize"></i>
                                                                    </span><span class="label" style="padding-top: 4px">
                                                                        <asp:Label ID="lblMsgDetailsCaption" runat="server" Text="Message Details"></asp:Label></span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblMsgDetails" runat="server" align="left" Text='<%# Eval("MessageDetails") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                                <CellStyle Wrap="True">
                                                                </CellStyle>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="LastSpeed" Caption="Speed" Visible="false">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <i class="fas fa-tachometer-alt headericonsize"></i>
                                                                    </span><span class="label">
                                                                        <asp:Label ID="lblgvSpeedHeading" runat="server" Text="Speed"></asp:Label></span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblSpeed" runat="server" Text='<%# Eval("LastSpeed") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="BoxArmed" VisibleIndex="6" Caption="Box Armed Status"
                                                                Visible="false">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <img src="..\Images\icn-box-armed.gif" title="Box Armed Status" alt="Box Armed Status"
                                                                            align="top" /></span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Image ID="imgBoxArmed" runat="server" ImageUrl='<%# Convert.ToString(Eval("BoxArmed")) == "0" ? "~/Images/icn-armed-insecured.gif" : "~/Images/icn-armed-secured.gif"  %>'
                                                                        AlternateText='<%# Convert.ToString(Eval("BoxArmed")) == "0" ? "Disarmed" : "Armed"  %>' />
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="VehStatusId" VisibleIndex="7" Caption="Status"
                                                                Width="8%">
                                                                <CellStyle HorizontalAlign="Center" VerticalAlign="Middle">
                                                                </CellStyle>
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <i class="fas fa-flag headericonsize" style="color: red;"></i>
                                                                    </span><span class="label" style="padding-top: 4px">
                                                                        <asp:Label ID="lblgvStatusHeading" runat="server" Text="Status"></asp:Label></span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblStatus" runat="server" Text='<%# Eval("Status") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="Latitude" Visible="False">
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblLat" runat="server" Text='<%# Eval("LastLatitude") %>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn FieldName="Longitude" Visible="False">
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblLng" runat="server" Text='<%# Eval("LastLongitude") %> '></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                        </Columns>
                                                        <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="175" />
                                                        <SettingsText EmptyDataRow="No Vehicles under the selected fleet" />
                                                        <ClientSideEvents SelectionChanged="function(s, e) {OnGridSelectionChanged(this); }"
                                                            EndCallback="function(s, e) {SetDivPosition();}" />
                                                        <SettingsBehavior ProcessSelectionChangedOnServer="false" />
                                                    </dxw:ASPxGridView>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                        <table id="tblAdvSearchGrid" runat="server" width="100%" class="form-tbl" cellpadding="0"
                                            cellspacing="0">
                                            <tr>
                                                <td align="center">
                                                    <asp:ImageButton ID="btnMapVehicles1" Visible="false" runat="server" ImageUrl="../images/btn-move-to-top.jpg"
                                                        OnClientClick="OnGridSelectionChanged1();" onkeydown="return setFocus(event,'txtVehicleDesc');"
                                                        OnClick="btnMapVehicles_Click" />
                                                    <asp:LinkButton ID="btnMapVehicles" runat="server" CssClass="MultilingualBtn" Visible="false"
                                                        OnClick="btnMapVehicles_Click" OnClientClick="ShowPopUp();">
                                                        <span id="Span11" runat="server" class="MultilingualBtnspan">
                                                            <div class="MovetoTop">
                                                                <div id="MovetoTopButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Move to Top
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </div>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <asp:Panel ID="pnlGridFiltersSearch" runat="server" CssClass="ControlHide landmarkPanel">
                <asp:UpdatePanel ID="updGridFilter" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                    <ContentTemplate>
                        <div class="popup">
                            <div class="top">
                                <h1>
                                    <asp:Label ID="Label12" runat="server" Text="Grid Filter Criteria Panel"></asp:Label></h1>
                                <div class="close">
                                    <img id="img1" alt="" runat="server" src="../images/popup-close.gif" border="0"
                                        onclick="document.getElementById('pnlGridFiltersSearch').style.display = 'none';" />
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div class="popup-content">
                                <div id="grid-dsply">
                                    <div class="table-responsive">
                                        <dxw:ASPxGridView ID="gvGridFilters" ClientInstanceName="gvGridFilters" runat="server"
                                            EnableTheming="true" Theme="Office2003Blue"
                                            AutoGenerateColumns="False" CssFilePath="~/App_Themes/office2003Blue/GridView/grid.css"
                                            CssPostfix="office2003_Blue" KeyFieldName="FilterSettingsID" Paddings-Padding="0"
                                            OnDataBinding="gvVehicles_DataBinding" OnAfterPerformCallback="gvVehicles_AfterPerformCallback">
                                            <ClientSideEvents SelectionChanged="function(s, e) {OnGridSelectionChanged(this);}" />
                                            <Styles CssFilePath="~/App_Themes/office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                CssPostfix="office2003_Blue">
                                                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                </Header>
                                                <LoadingPanel ImageSpacing="10px">
                                                </LoadingPanel>
                                                <PagerBottomPanel CssClass="PageFooter">
                                                </PagerBottomPanel>
                                                <PagerTopPanel CssClass="PageFooter">
                                                </PagerTopPanel>
                                            </Styles>
                                            <SettingsLoadingPanel Mode="ShowAsPopup" />
                                            <SettingsPager PrevPageButton-Image-Url="../App_Themes/office2003Blue/GridView/pPrev.gif"
                                                PrevPageButton-Image-UrlDisabled="../App_Themes/office2003Blue/GridView/pPrevDisabled.gif"
                                                NextPageButton-Image-UrlDisabled="../App_Themes/office2003Blue/GridView/pNextDisabled.gif"
                                                NextPageButton-Image-Url="../App_Themes/office2003Blue/GridView/pNext.gif" AlwaysShowPager="true">
                                            </SettingsPager>
                                            <Columns>
                                                <dxw:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="1" Width="5%">
                                                    <HeaderTemplate>
                                                        <input type="checkbox" onclick="gvGridFilters.SelectAllRowsOnPage(this.checked);"
                                                            style="vertical-align: middle;" title="Select/Unselect all rows on the page"></input>
                                                    </HeaderTemplate>
                                                    <HeaderStyle Paddings-PaddingTop="1" Paddings-PaddingBottom="1" HorizontalAlign="Center" />
                                                </dxw:GridViewCommandColumn>
                                                <dxw:GridViewDataTextColumn FieldName="FilterSettingsID" VisibleIndex="2" Caption="FilterID"
                                                    Width="2%">
                                                    <HeaderCaptionTemplate>
                                                        <span class="icon">
                                                            <i class="fas fa-car headericonsize" id="imgVehNameIcon" runat="server"></i></span><span class="label" style="padding-top: 4px">
                                                                <asp:Label ID="lblgvVehNameHeading" runat="server" Text="Filter Id"></asp:Label></span>
                                                    </HeaderCaptionTemplate>
                                                    <HeaderStyle Paddings-PaddingTop="1" Paddings-PaddingBottom="1" HorizontalAlign="Center" />
                                                    <DataItemTemplate>
                                                        <asp:Label ID="lblVehicleName" runat="server" Text='<%# Eval("FilterSettingsID") %>'></asp:Label>
                                                    </DataItemTemplate>
                                                </dxw:GridViewDataTextColumn>
                                                <dxw:GridViewDataTextColumn FieldName="FilterExpression" VisibleIndex="2" Caption="Vehicle Name"
                                                    Width="5%">
                                                    <HeaderCaptionTemplate>
                                                        <span class="icon">
                                                            <i class="fas fa-car headericonsize" id="imgVehNameIcon" runat="server"></i></span><span class="label" style="padding-top: 4px">
                                                                <asp:Label ID="lblgvVehNameHeading" runat="server" Text="Filter Expression"></asp:Label></span>
                                                    </HeaderCaptionTemplate>
                                                    <DataItemTemplate>
                                                        <asp:Label ID="lblVehicleName" runat="server" Text='<%# Eval("FilterExpression") %>'></asp:Label>
                                                    </DataItemTemplate>
                                                </dxw:GridViewDataTextColumn>
                                                <dxw:GridViewDataTextColumn FieldName="CreatedDate" VisibleIndex="3" Caption="DateTime"
                                                    Width="2%">
                                                    <HeaderCaptionTemplate>
                                                        <span class="icon">
                                                            <i class="far fa-clock headericonsize"></i>
                                                        </span><span class="label" style="padding-top: 5px">
                                                            <asp:Label ID="lblgvDateTimeHeading" runat="server" Text="Created Date & Time"></asp:Label></span>
                                                    </HeaderCaptionTemplate>
                                                    <DataItemTemplate>
                                                        <div class="DateStyle">
                                                            <asp:Label ID="lbldt" runat="server" Text='<%# Eval("CreatedDate") %>'></asp:Label>
                                                        </div>
                                                    </DataItemTemplate>
                                                </dxw:GridViewDataTextColumn>
                                                <dxw:GridViewDataTextColumn Caption="Delete" Width="1%" VisibleIndex="3">
                                                    <HeaderTemplate></HeaderTemplate>
                                                    <DataItemTemplate>
                                                        <asp:LinkButton ID="btnDeleteFilter" runat="server" CommandArgument='<%# Eval("FilterSettingsID") %>'
                                                            CssClass="fa-GridDelete" ToolTip="Click here to Delete" OnClick="btnDeleteFilter_Click"></asp:LinkButton>
                                                    </DataItemTemplate>
                                                </dxw:GridViewDataTextColumn>
                                            </Columns>
                                            <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="175" />
                                            <SettingsText EmptyDataRow="No Vehicles under the selected fleet" />
                                            <SettingsBehavior ProcessSelectionChangedOnServer="false" />
                                        </dxw:ASPxGridView>
                                    </div>
                                </div>
                                <table id="Table1" runat="server" width="100%" class="form-tbl" cellpadding="0"
                                    cellspacing="0">
                                    <tr>
                                        <td align="center">
                                            <asp:LinkButton ID="btnApplyFilter" runat="server" CssClass="MultilingualBtn" Visible="true"
                                                OnClick="btnApplyFilter_Click">
                                                <span id="Span26" runat="server" class="MultilingualBtnspan">
                                                    <div class="MovetoTop">
                                                        <div id="Div14" runat="server" class="MultilingualBtnTextAlign">
                                                            Apply Fillter
                                                        </div>
                                                    </div>
                                                </span>
                                            </asp:LinkButton>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <asp:Panel ID="pnlAlarm" runat="server" CssClass="alarmPanel col-xs-6">
                <asp:UpdatePanel ID="updLandmark" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                    <ContentTemplate>
                        <div class="popup">
                            <div class="top">
                                <h1>
                                    <asp:Label ID="lblAlarmInfoCaption" runat="server" Text="Alarm Info"></asp:Label>
                                </h1>
                                <div class="close">
                                    <a href="#">
                                        <img id="imgAlarmClose" onclick="popupShowHide('Alarm', 0);" src="../images/popup-close.gif" width="15" height="15" alt="" />
                                    </a>
                                </div>
                                <div class="clear clearfix"></div>
                            </div>
                            <div class="popup-content">
                                <div class="form-horizontal">
                                    <div class="form-group">
                                        <div class="col-sm-12">
                                            <asp:Label ID="lblAlarmID" runat="server"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblVehDescAlarm" runat="server" Text="Vehicle Name: "></asp:Label>
                                        </div>
                                        <div class="col-sm-6">
                                            <asp:Label ID="lblVehicleName" Font-Bold="true" runat="server" Text=""></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group" id="trDeviceIDHolder">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblDeviceID" runat="server" Text="Device ID: "></asp:Label>
                                        </div>
                                        <div class="col-sm-6">
                                            <asp:Label ID="lblBoxID" runat="server" Font-Bold="true"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group" runat="server" id="trDriverName">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblDriverNameCaption" runat="server" Text="Driver Name: "></asp:Label>
                                        </div>
                                        <div class="col-sm-6">
                                            <asp:Label ID="lblDriverName" Font-Bold="true" runat="server" Text=""></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group" runat="server" id="trMobileNo">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblMobileNoCpation" runat="server" Text="Vehicle Name: "></asp:Label>
                                        </div>
                                        <div class="col-sm-6">
                                            <asp:Label ID="lblMobileNo" Font-Bold="true" runat="server" Text=""></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblDateCreated" runat="server" Text="Date & Time: "></asp:Label>
                                        </div>
                                        <div class="col-sm-6">
                                            <asp:Label ID="lblDate" runat="server" Font-Bold="true"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblAlarmSeverity" runat="server" Text="Severity Level: "></asp:Label>
                                        </div>
                                        <div class="col-sm-6">
                                            <asp:Label ID="lblAlarmSeveritySettings" runat="server" Font-Bold="true"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblAlarmStatus" runat="server" Text="Status: "></asp:Label>
                                        </div>
                                        <div class="col-sm-6">
                                            <asp:Label ID="lblAlarmSatusDesc" runat="server" Font-Bold="true"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblDescription" runat="server" Text="Description: "></asp:Label>
                                        </div>
                                        <div class="col-sm-6">
                                            <asp:Label ID="lblAlarmDesc" runat="server" Font-Bold="true"></asp:Label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblComment" runat="server" Text="Comments: "></asp:Label>
                                        </div>
                                        <div class="col-sm-6">
                                            <asp:TextBox ID="txtAlertComments" runat="server" CssClass="form-control" MaxLength="75" Text=""></asp:TextBox>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3"></div>
                                        <div class="col-sm-9">
                                            <div class="col-xs-6 padding-width-sm override-col-width">
                                                <asp:ImageButton ID="btnAccept1" runat="server" ImageUrl="~/images/btn-acknowledge.jpg"
                                                    TabIndex="10" OnClick="btnAccept_Click" OnClientClick="ShowPopUp();" AlternateText="Acknowledge"
                                                    ToolTip="Acknowledge" Visible="false" />
                                                <asp:LinkButton ID="btnAccept" runat="server" CssClass="MultilingualBtn_alrms" OnClientClick="ShowPopUp();"
                                                    OnClick="btnAccept_Click">
                                                    <span id="Span12" runat="server" class="MultilingualBtn_alrmsspan">
                                                        <div class="Acknowledge">
                                                            <div id="AcknowledgeButDiv" runat="server" class="MultilingualBtn_alrmsTextAlign">
                                                                Acknowledge
                                                            </div>
                                                        </div>
                                                    </span>
                                                </asp:LinkButton>
                                            </div>
                                            <div class="col-xs-6 padding-width-sm override-col-width">
                                                <asp:ImageButton ID="btnClose1" AlternateText="Close" ToolTip="Close" OnClientClick="ShowPopUp();"
                                                    runat="server" OnClick="btnClose_Click" TabIndex="11" ImageUrl="~/images/btn-close.jpg"
                                                    Visible="false" />
                                                <asp:LinkButton ID="btnClose" runat="server" CssClass="MultilingualBtn_alrms" OnClientClick="ShowPopUp();"
                                                    OnClick="btnClose_Click">
                                                    <span id="Span13" runat="server" class="MultilingualBtn_alrmsspan">
                                                        <div class="Close">
                                                            <div id="CloseButDiv" runat="server" class="MultilingualBtn_alrmsTextAlign">
                                                                Close
                                                            </div>
                                                        </div>
                                                    </span>
                                                </asp:LinkButton>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <asp:Panel ID="pnlcmdMessage" runat="server" Style="display: none; position: absolute; top: 200px; left: 340px; width: 50%; height: 50%; z-index: 400">
                <div class="popup">
                    <div class="top">
                        <h1>
                            <asp:Label ID="lblCmdStatusPnlCaption" runat="server" Text="Command Status Panel"></asp:Label>&nbsp;&nbsp;
                        </h1>
                        <div class="close">
                            <img id="imgcmdClose" src="../images/popup-close.gif" width="15" height="15" alt=""
                                onclick="document.getElementById('pnlcmdMessage').style.display = 'none';" />
                        </div>
                        <div class="clear clearfix"></div>
                    </div>
                    <div class="popup-cont">
                        <div id="divFailedMsg">
                        </div>
                    </div>
                </div>
            </asp:Panel>
            <asp:Panel ID="pnlLiveTracking" runat="server" CssClass="landmarkPanel col-sm-8 col-md-6 col-lg-4">
                <div class="popup">
                    <div class="top">
                        <h1>
                            <i class="fas fa-map-signs Subheadericon"></i>
                            <asp:Label ID="Label4" runat="server" Text="Live Tracking Settings"></asp:Label>
                        </h1>
                        <div class="close">
                            <asp:ImageButton ID="ImageButton1" runat="server" OnClientClick="return ClearLiveTrackingContents();"
                                ImageUrl="~/Images/popup-close.gif" />&nbsp;&nbsp;
                        </div>
                        <div class="clear clearfix">
                        </div>
                    </div>
                    <div class="popup-cont">
                        <div class="form-horizontal">
                            <div class="form-group">
                                <div class="col-sm-3">
                                    <asp:Label ID="lblRptOperation" runat="server" Text="Operation"></asp:Label><span style="color: Red">*</span>
                                </div>
                                <div class="col-sm-4">
                                    <asp:DropDownList ID="ddlRptOperation" runat="server" CssClass="ddllAlign" onchange="enableDisableLT();">
                                        <asp:ListItem Text="- Select -" Value="-1"></asp:ListItem>
                                        <asp:ListItem Text="Enable" Value="1"></asp:ListItem>
                                        <asp:ListItem Text="Disable" Value="0"></asp:ListItem>
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-3">
                                    <asp:Label ID="lblRptInterval" runat="server" Text="Reporting Interval (meters)"></asp:Label>
                                    <span style="color: Red">*</span>
                                </div>
                                <div class="col-sm-4">
                                    <asp:DropDownList ID="ddlRptInterval" runat="server" CssClass="ddllAlign">
                                        <asp:ListItem Text="- Select -" Value="-1"></asp:ListItem>
                                        <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                        <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                        <asp:ListItem Text="15" Value="15"></asp:ListItem>
                                        <asp:ListItem Text="30" Value="30"></asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:ImageButton ID="lnkAddRptInt" runat="server" ToolTip="Add Report Interval" Style="width: auto;" Visible="true"
                                        ImageUrl="../images/add-icon.gif" CausesValidation="false" OnClientClick="popUpRptIntervalAdd(); return false;"></asp:ImageButton>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-10">
                                    <asp:Panel ID="pnlRptInterval" runat="server" CssClass="ControlHide" GroupingText="Add Reporting Interval">
                                        <div class="col-sm-3">
                                            <asp:Label ID="lblInterval" runat="server" Text="Interval (meters)"></asp:Label>
                                            <span style="color: Red">*</span>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:TextBox ID="txtRptInterval" runat="server" CssClass="form-control" onpaste="return false" TabIndex="3" ondrop="return false"
                                                MaxLength="4" onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:LinkButton ID="lnkSaveInterval" runat="server" CssClass="fa-save btn btn-primary" OnClientClick="return validateRptIntervalDuration(1);" OnClick="btnSaveRptIntervalAndDuration_Click" CommandArgument="I" Text="&nbsp;Save">
                                            </asp:LinkButton>&nbsp;&nbsp;
                                            <asp:LinkButton ID="LinkButton6" runat="server" Text="&nbsp;Cancel" CssClass="fa-ban btn btn-primary" OnClientClick="showAddButton(1);popupShowHide('RptInterval', 0);return false;">
                                            </asp:LinkButton>
                                        </div>
                                    </asp:Panel>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-3">
                                    <asp:Label ID="lblRptDuration" runat="server" Text="Reporting Duration (mins)"></asp:Label>
                                    <span style="color: Red">*</span>
                                </div>
                                <div class="col-sm-4">
                                    <asp:DropDownList ID="ddlRptDuration" runat="server" CssClass="ddllAlign">
                                        <asp:ListItem Text="- Select -" Value="-1"></asp:ListItem>
                                        <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                        <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                        <asp:ListItem Text="15" Value="15"></asp:ListItem>
                                        <asp:ListItem Text="30" Value="30"></asp:ListItem>
                                        <asp:ListItem Text="45" Value="45"></asp:ListItem>
                                        <asp:ListItem Text="60" Value="60"></asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:ImageButton ID="lnkAddRptDur" runat="server" ToolTip="Add Reporting Duration" Style="width: auto;" Visible="true"
                                        ImageUrl="../images/add-icon.gif" CausesValidation="false" OnClientClick="popUpRptDurationAdd(); return false;"></asp:ImageButton>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-10">
                                    <asp:Panel ID="pnlRptDuration" runat="server" CssClass="ControlHide" GroupingText="Add Reporting Duration">
                                        <div class="col-sm-3">
                                            <asp:Label ID="Label2" runat="server" Text="Duration (mins)"></asp:Label>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:TextBox ID="txtRptDuration" runat="server" CssClass="form-control" onpaste="return false" TabIndex="3" ondrop="return false"
                                                MaxLength="4" onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                        </div>
                                        <div class="col-sm-4">
                                            <asp:LinkButton ID="lnkSaveDuration" runat="server" CssClass="fa-save btn btn-primary" OnClientClick="return validateRptIntervalDuration(2);" OnClick="btnSaveRptIntervalAndDuration_Click" CommandArgument="D" Text="&nbsp;Save">
                                            </asp:LinkButton>&nbsp;&nbsp;
                                            <asp:LinkButton ID="LinkButton1" runat="server" CssClass="fa-ban btn btn-primary" Text="&nbsp;Cancel" OnClientClick="showAddButton(2);popupShowHide('RptDuration', 0);return false;">
                                            </asp:LinkButton>
                                        </div>
                                    </asp:Panel>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-3"></div>
                                <div class="col-sm-6">
                                    <asp:LinkButton ID="btnSend" runat="server" CssClass="fa-save btn btn-primary" OnClientClick="return validateLiveTrackParams();"
                                        OnClick="btnSend_Click" Text="&nbsp;Save">
                                    </asp:LinkButton>&nbsp;&nbsp;
                                <asp:LinkButton ID="LinkButton3" runat="server" CssClass="fa-ban btn btn-primary" Text="&nbsp;Cancel" OnClientClick="popupShowHide('Live', 0);return false;">
                                </asp:LinkButton>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="progressPopUp"
                BackgroundCssClass="modalBackground" TargetControlID="btnTesting">
            </cc1:ModalPopupExtender>
            <asp:Button ID="btnTesting" Style="display: none;" runat="server" />
            <asp:Panel ID="progressPopUp" runat="server" CssClass="processMessage" Style="z-index: 10000; display: none;">
                <center>
                    <br />
                    <img id="imgLoad1" runat="server" alt="Please Wait ..." src="../images/47.gif" /><br />
                    <br />
                    <asp:Label ID="lbl_msg12" Text="Processing... Please Wait..." runat="server" CssClass="specialdisplay"></asp:Label>
                    <br />
                    <br />
                    </center>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="mpeMapProgressIndicator" runat="server" PopupControlID="pnlMapPopUp"
                BackgroundCssClass="modalBackground" TargetControlID="btnTesting">
            </cc1:ModalPopupExtender>
            <asp:Panel ID="pnlMapPopUp" runat="server" CssClass="processMessage" Style="z-index: 10000 !important; display: none;">
                <center>
                    <br />
                    <img id="imgLoad" runat="server" alt="Please Wait ..." src="../images/47.gif" /><br />
                    <br />
                    <asp:Label ID="lbl_msg13" Text="Auto Refreshing... Please Wait..." runat="server"
                        CssClass="specialdisplay"></asp:Label>
                    <br />
                    <br />
                </center>
            </asp:Panel>
            <asp:UpdatePanel ID="UpdatePanel3" runat="server" OnUnload="UpdatePanel_Unload">
                <ContentTemplate>
                    <div class="col-sm-6">
                        <dxw:ASPxPopupControl ID="popup" runat="server" Width="0px" Height="0px" AllowDragging="True" Border-BorderColor="#99BBE8"
                            BackColor="#dfe9f5" HeaderText="Vehicle Details" HeaderStyle-Font-Bold="true" HeaderStyle-BackColor="#DFE9F5"
                            EnableDefaultAppearance="False" ShowCloseButton="true" CloseAction="CloseButton" Style="z-index: 10000000;"
                            LoadContentViaCallback="OnFirstShow" PopupAlignCorrection="Auto">
                            <ContentStyle CssClass="content"></ContentStyle>
                            <ClientSideEvents BeginCallback="" />
                            <ContentCollection>
                                <dxw:PopupControlContentControl runat="server">
                                    <div class="popup-content col-sm-12">
                                        <asp:UpdatePanel ID="updGriddtls" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                                            <ContentTemplate>
                                                <asp:Panel ID="pnlTripInfo" GroupingText="Search By Landmark" CssClass="innerTable"
                                                    runat="server" Width="100%">
                                                    <table cellpadding="0" cellspacing="0" width="98%" class="popup" align="center">
                                                        <tr>
                                                            <td style="padding-left: 5px; padding-bottom: 10px; width: 15%" class="label" align="left">
                                                                <i class="fas fa-car-side headericonsize" title="Vehicle Name" id="Image1" runat="server" visible="false"></i>
                                                                <asp:Label runat="server" ID="lblfleetcaptio" Text="Fleet" Font-Bold="true"></asp:Label>
                                                            </td>
                                                            <td width="15%" align="left" style="padding-left: 5px; padding-bottom: 10px;">
                                                                <asp:Label runat="server" ID="lblFleet"></asp:Label>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td class="label" style="padding-left: 5px; padding-bottom: 10px; width: 15%; vertical-align: middle"
                                                                align="left">
                                                                <i class="fas fa-car-side headericonsize" title="Vehicle Name" id="Image6" runat="server" visible="false"></i>
                                                                <asp:Label runat="server" ID="lblCaptionLandmark" Text="Landmark" Font-Bold="true"></asp:Label>
                                                                <span style="color: Red">*</span>
                                                            </td>
                                                            <td width="15%" style="padding-left: 5px; padding-bottom: 10px;" align="left">
                                                                <asp:DropDownList ID="ddlLandmarks" runat="server" CssClass="ddllAlign">
                                                                </asp:DropDownList>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td style="padding-left: 5px; padding-bottom: 10px; width: 15%; vertical-align: middle">
                                                                <asp:Label runat="server" ID="lblRadiuss" Text="Radius (meters)" Font-Bold="true"></asp:Label>
                                                            </td>
                                                            <td style="padding-left: 5px; padding-bottom: 10px;">
                                                                <asp:DropDownList ID="ddlradius" runat="server" CssClass="ddllAlign">
                                                                    <asp:ListItem Text="- Select -" Value="0"></asp:ListItem>
                                                                    <asp:ListItem Text="200" Value="200"></asp:ListItem>
                                                                    <asp:ListItem Text="500" Value="500"></asp:ListItem>
                                                                    <asp:ListItem Text="1000" Value="1000"></asp:ListItem>
                                                                    <asp:ListItem Text="1500" Value="1500"></asp:ListItem>
                                                                    <asp:ListItem Text="2000" Value="2000"></asp:ListItem>
                                                                    <asp:ListItem Text="3000" Value="3000"></asp:ListItem>
                                                                </asp:DropDownList>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td style="padding-left: 25px; padding-bottom: 10px; width: 15%">
                                                                <asp:LinkButton ID="btnSBL" runat="server" CssClass="fa-search-location btnExport btn btn-primary" OnClientClick="ShowPopUp();return ValLandmark(this);"
                                                                    OnClick="btnSBL_Click" ValidationGroup="grp" Text="&nbsp;MapIt">
                                                                </asp:LinkButton>
                                                            </td>
                                                            <td>&nbsp;
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>&nbsp;
                                                            </td>
                                                            <td>&nbsp;
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </asp:Panel>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </div>
                                </dxw:PopupControlContentControl>
                            </ContentCollection>
                            <HeaderStyle CssClass="header">
                                <Border BorderStyle="Solid" />
                            </HeaderStyle>
                            <Border BorderColor="#99BBE8" />
                        </dxw:ASPxPopupControl>
                    </div>
                    <div class="col-sm-12">
                        <asp:Panel runat="server" ID="pnlPopupAlarms" Style="display: none;" CssClass="DevExPopupPanel">
                            <div class="popup">
                                <div class="top">
                                    <h1>
                                        <asp:Label runat="server" ID="lblAlarmPanelCaption" Text="Alarm Details" Font-Bold="true"></asp:Label>
                                    </h1>
                                    <div class="close">
                                        <a href="#">
                                            <img id="imgPopupAlarmClose" onclick="popupShowHide('popupAlarm', 0);" src="../images/popup-close.gif" width="15" height="15" alt="" />
                                        </a>
                                    </div>
                                    <div class="clear clearfix"></div>
                                </div>
                                <div class="popup-content">
                                    <asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                                        <ContentTemplate>
                                            <div class="table-responsive">
                                                <dxw:ASPxGridView ID="gvAlarmData" runat="server" ClientInstanceName="gvAlarmData" KeyFieldName="AlarmId"
                                                    EnableHierarchyRecreation="false" EnableTheming="true" Theme="Office2003Blue"
                                                    CssFilePath="~/App_Themes/office2003Blue/GridView/grid.css" CssPostfix="office2003_Blue"
                                                    AutoGenerateColumns="False" OnHtmlRowCreated="gvAlarmData_HtmlRowCreated">
                                                    <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="300" ShowFilterRow="true"
                                                        ShowFilterRowMenu="true" ShowFooter="false" />
                                                    <Styles CssFilePath="~/App_Themes/office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                        CssPostfix="office2003_Blue">
                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                        </Header>
                                                        <LoadingPanel ImageSpacing="10px">
                                                        </LoadingPanel>
                                                        <PagerBottomPanel CssClass="PageFooter">
                                                        </PagerBottomPanel>
                                                        <PagerTopPanel CssClass="PageFooter">
                                                        </PagerTopPanel>
                                                    </Styles>
                                                    <SettingsPager PrevPageButton-Image-Url="../App_Themes/office2003Blue/GridView/pPrev.gif"
                                                        PrevPageButton-Image-UrlDisabled="../App_Themes/office2003Blue/GridView/pPrevDisabled.gif"
                                                        NextPageButton-Image-UrlDisabled="../App_Themes/office2003Blue/GridView/pNextDisabled.gif"
                                                        NextPageButton-Image-Url="../App_Themes/office2003Blue/GridView/pNext.gif" PageSize="15"
                                                        AlwaysShowPager="true">
                                                    </SettingsPager>
                                                    <Columns>
                                                        <dxw:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Width="3%"
                                                            Name="Checkbox" Visible="false">
                                                            <HeaderTemplate>
                                                                <input id="chkSelectAll" runat="server" type="checkbox" onclick="gvAlarmData.SelectAllRowsOnPage(this.checked);"
                                                                    style="vertical-align: middle;" title="Select / Unselect all rows on the page"></input>
                                                            </HeaderTemplate>
                                                            <HeaderStyle Paddings-PaddingTop="1" Paddings-PaddingBottom="1" HorizontalAlign="Center" />
                                                        </dxw:GridViewCommandColumn>
                                                        <dxw:GridViewDataTextColumn Caption="Status" FieldName="AlarmStatusDesc" VisibleIndex="1"
                                                            Width="3%" CellStyle-HorizontalAlign="Center" Visible="false">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-flag headericonsize" title="Alarm Status"></i></span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AllowSort="True" />
                                                            <DataItemTemplate>
                                                                <asp:Image ID="imgStatus" ImageAlign="Middle" runat="server" AlternateText='<%# Eval("AlarmStatusDesc") %>' />
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Caption="Device ID" FieldName="BoxId" VisibleIndex="2"
                                                            Width="8%" CellStyle-HorizontalAlign="Left" Visible="false">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-broadcast-tower  headericonsize" id="imgDeviceID" runat="server"></i></span><span class="label">
                                                                        <asp:Label ID="lblDeviceIDCaption" runat="server" Text="Device Id"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AutoFilterCondition="Contains" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Width="10%" Caption="Vehicle Name" FieldName="VehicleDescription"
                                                            VisibleIndex="3" Visible="false">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-car headericonsize" id="imgVehicleNameCaption" runat="server"></i>
                                                                </span>
                                                                <span class="label">
                                                                    <asp:Label ID="lblVehicleCaption" runat="server" Text="Vehicle"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <Settings AutoFilterCondition="Contains" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="DriverName" VisibleIndex="3" Caption="Driver Name"
                                                            Width="10%">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-user headericonsize"></i></span><span class="label">
                                                                        <asp:Label runat="server" ID="lblDrName" Text="Driver Name"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblDriverName" runat="server" Text='<%# Eval("DriverName")%>'>
                                                                </asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AutoFilterCondition="Contains" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Width="10%" CellStyle-Wrap="True" Caption="Date &amp; Time"
                                                            FieldName="DateTimeCreatedSort" VisibleIndex="4">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="far fa-clock headericonsize"></i></span><span class="label">
                                                                        <asp:Label ID="lblDateTimeCaption" runat="server" Text="Date Time"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblCreatedDt" runat="server" Text='<%# Eval("DateTimeCreated")%>'>
                                                                </asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowSort="True" />
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Width="1%" Caption="Date &amp; Time" FieldName="DateTimeCreated"
                                                            VisibleIndex="4" Visible="false">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="far fa-clock headericonsize"></i></span><span class="label">
                                                                        <asp:Label ID="lblDateTimeCaption" runat="server" Text="Date Time"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblCreatedDt" runat="server" Text='<%# Eval("DateTimeCreated")%>'>
                                                                </asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowSort="True" />
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Width="3%" Caption="Severity" FieldName="AlarmLevelName"
                                                            VisibleIndex="5" CellStyle-HorizontalAlign="Center">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-shield-alt headericonsize"></i></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Image ID="imgSeveritySatus" ImageAlign="Middle" AlternateText='<%# Eval("AlarmLevelName") %>'
                                                                    runat="server" />
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Caption="Details" FieldName="AlarmDesc" Width="12%"
                                                            VisibleIndex="6">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-bell headericonsize"></i></span><span class="label">
                                                                        <asp:Label ID="lblAlarmDescCaption" runat="server" Text="Details"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <CellStyle Wrap="True">
                                                            </CellStyle>
                                                            <Settings AllowSort="True" />
                                                            <Settings AutoFilterCondition="Contains" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Caption="Address" FieldName="StreetAddress" Width="10%"
                                                            VisibleIndex="7">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="far fa-address-card headericonsize"></i></span><span class="label">
                                                                        <asp:Label ID="lblAddressCaption" runat="server" Text="Street Address"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <CellStyle Wrap="True">
                                                            </CellStyle>
                                                            <Settings AllowSort="True" />
                                                            <Settings AllowAutoFilter="False" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Caption="Acknowledged By" Name="AcknowledgedBy" FieldName="ACKStatus"
                                                            VisibleIndex="8" Width="10%">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img src="../images/icn-accept.gif" align="top" alt="" /></span> <span class="label">
                                                                        <asp:Label ID="lblAckStatusCaption" runat="server" Text="Acknowledged By"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <p>
                                                                    <asp:Label ID="lblAcceptedBy" runat="server" Text='<%# Eval("AcceptedUser") %>'></asp:Label>
                                                                </p>
                                                                <p>
                                                                    <asp:Label ID="lblAcceptedDateTime" runat="server" Text='<%# Eval("DateTimeAccepted") %>'></asp:Label>
                                                                </p>
                                                            </DataItemTemplate>
                                                            <Settings AutoFilterCondition="Contains" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Caption="Closed By" Name="ClosedBy" FieldName="ClosedStatus"
                                                            VisibleIndex="9" Width="10%">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-times headericonsize"></i></span><span class="label">
                                                                        <asp:Label ID="lblClosedByCaption" runat="server" Text="Closed By"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <p>
                                                                    <asp:Label ID="lblClosedBy" runat="server" Text='<%# Eval("ClosedUser") %>'></asp:Label>
                                                                </p>
                                                                <p>
                                                                    <asp:Label ID="lblClosedDateTime" runat="server" Text='<%# Eval("DateTimeClosed") %>'></asp:Label>
                                                                </p>
                                                            </DataItemTemplate>
                                                            <Settings AutoFilterCondition="Contains" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn Caption="AlarmLevelId" FieldName="AlarmLevelId" Visible="false">
                                                        </dxw:GridViewDataTextColumn>
                                                    </Columns>
                                                    <SettingsText EmptyDataRow="No alarms matching to the search criteria" />
                                                </dxw:ASPxGridView>
                                            </div>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </div>
                            </div>
                        </asp:Panel>
                        <asp:Panel runat="server" ID="pnlPopupHistory" Style="display: none" CssClass="DevExPopupPanel">
                            <div class="popup">
                                <div class="top">
                                    <h1>
                                        <asp:Label runat="server" ID="Label3" Text="History Details" Font-Bold="true"></asp:Label>
                                    </h1>
                                    <div class="close">
                                        <a href="#">
                                            <img id="imgPopupHistoryClose" onclick="popupShowHide('popupHistory', 0);" src="../images/popup-close.gif" width="15" height="15" alt="" />
                                        </a>
                                    </div>
                                    <div class="clear clearfix"></div>
                                </div>
                                <div class="popup-content">
                                    <asp:UpdatePanel ID="UpdatePanel5" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                                        <ContentTemplate>
                                            <div class="table-responsive">
                                                <dxw:ASPxGridView ID="gvHistory" ClientInstanceName="gvHistory" runat="server"
                                                    AutoGenerateColumns="False" CssFilePath="~/App_Themes/office2003Blue/GridView/grid.css"
                                                    EnableTheming="true" Theme="Office2003Blue"
                                                    CssPostfix="office2003_Blue" Width="900px" KeyFieldName="MessageInID" OnHtmlRowCreated="gvHistory_OnHtmlRowCreated"
                                                    Settings-ShowFilterRow="true" EnableViewState="true">
                                                    <Settings UseFixedTableLayout="true" />
                                                    <SettingsLoadingPanel Mode="ShowAsPopup" />
                                                    <Styles CssFilePath="~/App_Themes/office2003Blue/{0}/grid.css" AlternatingRow-Enabled="True"
                                                        CssPostfix="office2003_Blue">
                                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                        </Header>
                                                        <LoadingPanel ImageSpacing="10px">
                                                        </LoadingPanel>
                                                        <PagerBottomPanel CssClass="PageFooter">
                                                        </PagerBottomPanel>
                                                        <PagerTopPanel CssClass="PageFooter">
                                                        </PagerTopPanel>
                                                    </Styles>
                                                    <SettingsPager PrevPageButton-Image-Url="../App_Themes/office2003Blue/GridView/pPrev.gif"
                                                        PrevPageButton-Image-UrlDisabled="../App_Themes/office2003Blue/GridView/pPrevDisabled.gif"
                                                        NextPageButton-Image-UrlDisabled="../App_Themes/office2003Blue/GridView/pNextDisabled.gif"
                                                        NextPageButton-Image-Url="../App_Themes/office2003Blue/GridView/pNext.gif" AlwaysShowPager="true">
                                                    </SettingsPager>
                                                    <Columns>
                                                        <dxw:GridViewDataTextColumn FieldName="MessageInID" Caption="AutoID" Visible="false"
                                                            VisibleIndex="0">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblAutoID" runat="server" Text='<%# Eval("MessageInID") %> '></asp:Label>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="DeviceID" VisibleIndex="0" Width="8%" Caption="Device ID"
                                                            Visible="false">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-broadcast-tower  headericonsize" id="imgDeviceID" runat="server"></i></span><span class="label">
                                                                        <asp:Label ID="lblDeviceIDCaption" runat="server" Text="Device Id"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblBoxID" runat="server" Text='<%# Eval("DeviceID") %> '></asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="false" AllowSort="true" ShowFilterRowMenu="false" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="VehicleDescription" VisibleIndex="1" Caption="Name"
                                                            Width="15%" CellStyle-Wrap="True">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-car headericonsize" id="imgVehicleName" runat="server"></i>
                                                                </span><span class="label">
                                                                    <asp:Label ID="lblVehicleNameCaption" runat="server" Text="Vehicle Name"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblVehicleName" runat="server" Text='<%# Eval("VehicleDescription")%>'>
                                                                </asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="false" AllowSort="true" ShowFilterRowMenu="false" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="Latitude" VisibleIndex="0" Visible="False">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblLatitude" runat="server" Text='<%# Eval("Latitude") %> '></asp:Label>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="Longitude" VisibleIndex="0" Visible="False">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblLongitude" runat="server" Text='<%# Eval("Longitude") %> '></asp:Label>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataDateColumn FieldName="TimestampSort" VisibleIndex="2" Caption="Date & Time"
                                                            Width="17%" CellStyle-Wrap="True">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="far fa-clock headericonsize"></i></span><span class="label">
                                                                        <asp:Label ID="lblDateTimeCaption" runat="server" Text="Date Time"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <div class="DateStyle">
                                                                    <asp:Label ID="lblDateTime" runat="server" Text='<%# Eval("TimestampDisp") %> '></asp:Label>
                                                                </div>
                                                            </DataItemTemplate>
                                                            <Settings ShowFilterRowMenu="False" />
                                                        </dxw:GridViewDataDateColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="TimestampDisp" VisibleIndex="3" Caption="Date & Time"
                                                            Width="13%" Visible="false">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="far fa-clock headericonsize"></i></span><span class="label">
                                                                        <asp:Label ID="lblDateTimeCaption" runat="server" Text="Date Time"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <div class="DateStyle">
                                                                    <asp:Label ID="lblDateTime" runat="server" Text='<%# Eval("TimestampDisp") %> '></asp:Label>
                                                                </div>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="Address" VisibleIndex="4" CellStyle-Wrap="True">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <asp:Image ImageUrl="..\Images\address-icon.gif" AlternateText="" ImageAlign="top"
                                                                        runat="server" ID="imgAddressIcon" /></span> <span class="label">
                                                                            <asp:Label ID="lblStreetAddressCaption" runat="server" Text="Address"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblAddress" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Address")%>'></asp:Label>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="Speed" Caption="Speed" VisibleIndex="5"
                                                            Width="12%" CellStyle-HorizontalAlign="Center">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-tachometer-alt headericonsize"></i></span><span class="label">
                                                                        <asp:Label ID="lblSpeedCaption" runat="server" Text="Speed" Width="40px"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblSpeed" runat="server"
                                                                    Text='<%# Convert.ToString(Eval("ValidGPS")) == "" ? 0 : Convert.ToInt32(Convert.ToString(Eval("ValidGPS")))<2? Eval("Speed") : "-" %> '>
                                                                </asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="false" AllowSort="true" ShowFilterRowMenu="false" />
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="Message" VisibleIndex="4" Visible="False">
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblMessage" runat="server" Text='<%# Eval("Message") %>'>
                                                                </asp:Label>
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="MessageDetails" VisibleIndex="4" Caption="Message Details"
                                                            Width="19%" CellStyle-Wrap="True">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-comment-dots headericonsize"></i></span><span class="label">
                                                                        <asp:Label ID="lblMsgDetailsCaption" runat="server" Text="Message Details"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <%--OnClick="lbtMsgDetails_Click"--%>
                                                                <asp:Label ID="lblMsgDetails" runat="server" Text='<%# Eval("MessageDetails") %>'>
                                                                </asp:Label>
                                                                <asp:LinkButton ID="lbtMsgDetails" runat="server" Text='<%# Eval("MessageDetails") %>'
                                                                    CommandArgument='<%# Eval("MessageInID")+","+Eval("ValidGPS")+","+Eval("Acknowledged")+","+Eval("DeviceID")+","+Eval("Timestamp") %>'
                                                                    OnClientClick="ShowPopUp();" Style="width: 50px; word-wrap: break-word" Visible="false">                                                        
                                                                </asp:LinkButton>
                                                                <asp:Label ID="lblImagePacketType" runat="server" Text='<%# Eval("ImagePacketType") %>'
                                                                    Visible='<%# Convert.ToString(Eval("CamData")) == "Null" ? false : true %>'> </asp:Label>
                                                                <asp:ImageButton ID="btnNoCamImaage" runat="server" AlternateText="No Camera Image"
                                                                    ToolTip='Camera Image not available' Style="cursor: not-allowed" Visible='<%# Convert.ToString(Eval("CamData"))== "Null" && Convert.ToString(Eval("ImgStatus")) != "0"  ? true : false %>'
                                                                    ImageUrl='~/images/Img_cameraNo.png' />
                                                                <%--OnClick="btnShowImage_Click"--%>
                                                                <asp:ImageButton ID="btnShowImage" runat="server" AlternateText="Show Image" ToolTip='<%# Convert.ToString(Eval("ImgStatus")) == "0"? "Show Image":"Image not fully loaded"%>'
                                                                    ImageUrl='<%# Convert.ToString(Eval("ImgStatus")) == "0"?"~/images/Img_camera.png":"../Images/Img_camera_Broken.png"%>'
                                                                    CommandName="CameraCommand" CommandArgument='<%# Eval("CamData") %>' Visible='<%# Convert.ToString(Eval("CamData")) == "Null" ? false : true %>'
                                                                    OnClientClick="ShowPopUp();" />
                                                                <asp:ImageButton ID="btnSMSBasedQuery" runat="server" AlternateText="SMS based Query"
                                                                    ToolTip='SMS based Query' Style="cursor: not-allowed" Visible='<%# Convert.ToString(Eval("SMSStatus")) != "0"  ? true : false %>'
                                                                    ImageUrl='~/images/mobile.png' />
                                                            </DataItemTemplate>
                                                        </dxw:GridViewDataTextColumn>
                                                        <dxw:GridViewDataTextColumn FieldName="Direction" VisibleIndex="9" Width="10%"
                                                            CellStyle-HorizontalAlign="Center">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <i class="fas fa-compass headericonsize"></i></span><span class="label">
                                                                        <asp:Label ID="lblDirectionCaption" runat="server" Text="Direction"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblDirection" runat="server" Text='<%# Eval("Direction") %>'>
                                                                </asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AllowAutoFilter="false" AllowSort="true" ShowFilterRowMenu="false" />
                                                        </dxw:GridViewDataTextColumn>
                                                    </Columns>
                                                    <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="150" />
                                                    <SettingsText EmptyDataRow="No data matching to the search criteria" />
                                                    <Settings ShowFilterRow="true" ShowFilterRowMenu="true" />
                                                </dxw:ASPxGridView>
                                            </div>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </div>
                        </asp:Panel>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
            <asp:HiddenField ID="hdnRestriction_L" runat="server" />
            <asp:HiddenField ID="hdnRestriction_G" runat="server" />
            <asp:HiddenField ID="hdnIsMapIt" runat="server" Value="0" />
            <asp:HiddenField ID="hdnRefreshFrequency" runat="server" />
            <asp:HiddenField ID="hdnMapItValues" runat="server" />
            <asp:HiddenField ID="hdnLandmarkvalues" runat="server" />
            <asp:HiddenField ID="hdnNotCurPosVeh" runat="server" />
            <asp:HiddenField ID="hdnlang" runat="server" />
            <asp:HiddenField ID="hdnMapLng" runat="server" />
            <asp:HiddenField ID="hdnCheckedCount" runat="server" Value="0" />
            <asp:Button ID="Button1" runat="server" Style="display: none" />
            <a href="#" id="downloadLink" class="ControlHide">Download the inner html</a>
            <div id="kmlData" class="ControlHide"></div>
            <script type="text/javascript">
                function pageLoad(sender, args) {
                    if (!args.get_isPartialLoad()) {
                        $addHandler(document, "keydown", onKeyDown);
                    }
                }
                $("#eng2").click(function () {
                    mapTypeChoosen();
                    changeTileProvider(maptype, 'En');
                    LoadTime = null;
                });
                $("#arb2").click(function () {
                    mapTypeChoosen();
                    changeTileProvider(maptype, 'Ar');
                    LoadTime = null;
                });
                $("#hin2").click(function () {
                    mapTypeChoosen();
                    changeTileProvider(maptype, 'hin');
                    LoadTime = null;
                });
                $("#eng3").click(function () {
                    mapTypeChoosen();
                    changeTileProvider(maptype, 'En');
                    LoadTime = null;
                });
                $("#arb3").click(function () {
                    mapTypeChoosen();
                    changeTileProvider(maptype, 'Ar');
                    LoadTime = null;
                });
                $("#hin3").click(function () {
                    mapTypeChoosen();
                    changeTileProvider(maptype, 'hin');
                    LoadTime = null;
                });
                function onKeyDown(e) {
                    if (e && e.keyCode == Sys.UI.Key.esc) {
                        // if the key pressed is the escape key, dismiss the dialog              
                    }
                }
                var AlertSelectVehicle = 'Please select one or more vehicles.';
                var AlertNoAutoref = 'Locations that is to be plotted may not be the latest, as Auto Refresh Frequency (Preferences) is not set. Kindly refresh the table by clicking the refresh button whenever needed to view the latest location details of vehicles.';
                function SetAlert(selectvehicle, Norefresh) {
                    AlertSelectVehicle = selectvehicle;
                    AlertNoAutoref = (Norefresh == null || Norefresh == '') ? AlertNoAutoref : Norefresh;
                }
                function gridSelectionValidationAlert() {
                    ClearOverlays();
                    TrinetraCustomAlerts(AlertSelectVehicle);
                }
                function MapItValues() {
                    if (gvData.GetSelectedRowCount() != 0) {
                        //if (document.getElementById('hdnRefreshFrequency').value == 'false') {
                        //    TrinetraCustomAlerts(AlertNoAutoref);
                        //}
                        //document.getElementById('hdnIsMapIt').value = "1";
                        ShowPopUp();
                        return true;
                    }
                    else {
                        gridSelectionValidationAlert();
                        return false;
                    }
                }
                function NoAlarm() {
                    document.getElementById('divNoAlarms').className = "ControlShow";
                    document.getElementById('divBoxPanel').className = "ControlHide";
                }
                function Alarm() {
                    document.getElementById('divNoAlarms').className = "ControlHide";
                    document.getElementById('divBoxPanel').className = "ControlShow";
                }
            </script>
            <script type="text/javascript">
                function CheckOne(obj) {
                    var grid = obj.parentNode.parentNode.parentNode;
                    var inputs = grid.getElementsByTagName("input");
                    for (var i = 0; i < inputs.length; i++) {
                        if (inputs[i].type == "checkbox") {
                            if (obj.checked && inputs[i] != obj && inputs[i].checked) {
                                inputs[i].checked = false;
                            }
                        }
                    }
                }
            </script>
            <script type="text/javascript">
                var keyValue;
                function OnMoreInfoClick(element, popupctrl) {
                    popupctrl.ShowAtElement(element);
                }
                function popup_Shown(s, e) {
                    popup.ShowAtPos(s, e);
                }
                function valandmark() {
                    //document.getElementById('ddlradius').selectedIndex = 0;
                    var ddls = document.getElementById('<%=ddlradius.ClientID %>');
                    if (ddls !== null && ddls != undefined && ddls != "") {
                        //for (var i = 0; i < ddls.length; i++) {
                        //  var ddl = ddls[i];
                        if (ddls.options.length != 0)
                            ddls.options[0].selected = true;
                        //}
                    }
                }
                function ValLandmark(btn) {
                    var btnid = btn.id;
                    if (document.getElementById(btnid).selectedIndex == 0) {
                        alert('Please select the Landmark.');
                        return false;
                    }
                }
                var FullMapWindow;
                function FullscreenHistory() {
                    FullMapWindow = window.open("HistoryFullScreen.aspx", 'HistoryFullScreen', 'scrollbars=yes,resizable=no,width=' + screen.width + ',height=' + screen.height, false);
                    FullMapWindow.moveTo(0, 0);
                    FullMapWindow.focus();
                }
                var openLiveTrackingInfo = function () {
                    var hdnValid = document.getElementById('hdnIsSelectionValid');
                    var hdnVeh = document.getElementById('hdnVehicles');
                    if (hdnValid != null && hdnValid.value == '0') {
                        TrinetraCustomAlerts('Live tracking cannot be enabled for the following vehicles as the vehicles are not travelling currently.' + '\r\n' + hdnVeh.value); return false;
                    }
                    else if (gvData.GetSelectedRowCount() != 0 && gvData.GetSelectedRowCount() <= 25) {
                        popupShowHide('Live', 1);
                        //window.open('LiveDemo.aspx?reqId=999980,999981');
                        return false;
                    }
                    else if (gvData.GetSelectedRowCount() > 25)
                    { TrinetraCustomAlerts('Selected vehicles have exceeded the max. limit of 25 for live monitoring'); return false; }
                    else { TrinetraCustomAlerts('Please select one or more vehicle'); return false; }
                }
                function onGridSelectionComp_Live(values) {
                    var hdnValid = document.getElementById('hdnIsSelectionValid');
                    var hdnVeh = document.getElementById('hdnVehicles');
                    hdnValid.value = '1';
                    hdnVeh.value = '';
                    for (var l = 0; l < values.length; l++) {
                        if (values[l][1] != null && (values[l][1] == '12' || values[l][1] == '3' || values[l][1] == '121')) {
                            hdnValid.value = '0';
                            hdnVeh.value += values[l][2] + '\n';
                        }
                    }
                    HidePopUp();
                }
                var liveMapWindow;
                var FullScreenLive = function (param, isGoogle) {
                    if (isGoogle) {
                        liveMapWindow = window.open("GLive.aspx?q=" + param, 'Live', 'scrollbars=yes,resizable=no,width=' + screen.width + ',height=' + screen.height, false);
                    }
                    else {
                        liveMapWindow = window.open("Live.aspx?q=" + param, 'Live', 'scrollbars=yes,resizable=no,width=' + screen.width + ',height=' + screen.height, false);
                    }
                    liveMapWindow.moveTo(0, 0);
                    liveMapWindow.focus();
                }
                var validateLiveTrackParams = function () {
                    var rptInterval = document.getElementById('ddlRptInterval');
                    var rptDuration = document.getElementById('ddlRptDuration');
                    var rptOperation = document.getElementById('ddlRptOperation');
                    var isError = false;
                    var alertMessage = '';
                    if (rptOperation != null && rptOperation.value == '-1') {
                        isError = true;
                        alertMessage += 'Please select operation';
                    }
                    if (rptInterval != null && rptInterval.value == '-1' && rptOperation != null && rptOperation.value == '1') {
                        isError = true;
                        alertMessage += 'Please select reporting interval</br>';
                    }
                    if (rptDuration != null && rptDuration.value == '-1' && rptOperation != null && rptOperation.value == '1') {
                        isError = true;
                        alertMessage += 'Please select reporting duration</br>';
                    }
                    if (isError == true) { TrinetraCustomAlerts(alertMessage); return false; }
                    else { ShowPopUp(); return true; }
                }
                var validateRptIntervalDuration = function (type) {
                    var rptInterval = document.getElementById('txtRptInterval');
                    var rptDuration = document.getElementById('txtRptDuration');
                    var isError = false;
                    var alertMessage = '';
                    if (rptInterval != null && rptInterval.value == '' && type == '1') {
                        isError = true;
                        alertMessage += 'Please enter reporting interval in meters</br>';
                    }
                    else if (type == '1' && isValidValue(rptInterval.value) == false) {
                        isError = true;
                        alertMessage += 'Please enter valid reporting interval in meters. It should be 5(x) or 10(x).</br>';
                    }
                    else if (type == '1' && (parseInt(rptInterval.value) <= 30 || parseInt(rptInterval.value) > 3000)) {
                        isError = true;
                        alertMessage += 'Please enter valid reporting interval in meters. It should be in the range between 35 to 3000 meters.</br>';
                    }
                    if (rptDuration != null && rptDuration.value == '' && type == '2') {
                        isError = true;
                        alertMessage += 'Please enter reporting duration in minutes</br>';
                    }
                    else if (type == '2' && isValidValue(rptDuration.value) == false) {
                        isError = true;
                        alertMessage += 'Please enter valid reporting duration in minutes. It should be 5(x) or 10(x).</br>';
                    }
                    else if (type == '2' && (parseInt(rptDuration.value) <= 60 || parseInt(rptDuration.value) > 240)) {
                        isError = true;
                        alertMessage += 'Please enter valid reporting duration in minutes. It should be in the range between 65 to 240 minutes.</br>';
                    }
                    if (isError == true) { TrinetraCustomAlerts(alertMessage); return false; }
                    else { ShowPopUp(); return true; }
                }
                var isValidValue = function (value) {
                    var bool = false;
                    if (value % 5 == 0 || value % 10 == 0) {
                        bool = true;
                    }
                    return bool;
                }
                var enableDisableLT = function () {
                    var ddlOperation = document.getElementById('ddlRptOperation');
                    if (ddlOperation != null && ddlOperation.value == '0')  //it depends on which value Selection do u want to hide or show your textbox 
                    {
                        document.getElementById('ddlRptInterval').disabled = true;
                        document.getElementById('ddlRptDuration').disabled = true;
                        if (document.getElementById('lnkAddRptInt') != null) { document.getElementById('lnkAddRptInt').style.display = "none"; }
                        if (document.getElementById('lnkAddRptDur') != null) { document.getElementById('lnkAddRptDur').style.display = "none"; }
                        popupShowHide('RptInterval', 0);
                        popupShowHide('RptDuration', 0);
                    }
                    else {
                        document.getElementById('ddlRptInterval').disabled = false;
                        document.getElementById('ddlRptDuration').disabled = false;
                        if (document.getElementById('lnkAddRptInt') != null) { document.getElementById('lnkAddRptInt').style.display = "inline-block"; }
                        if (document.getElementById('lnkAddRptDur') != null) { document.getElementById('lnkAddRptDur').style.display = "inline-block"; }
                    }
                }
                function popUpRptIntervalAdd() {
                    var rptInterval = document.getElementById('txtRptInterval');
                    if (rptInterval != null) { rptInterval.value = ''; }
                    if (document.getElementById('lnkAddRptInt') != null) { document.getElementById('lnkAddRptInt').style.display = "none"; }
                    popupShowHide('RptInterval', 0);
                    if (document.getElementById('pnlRptInterval') != null) { document.getElementById('pnlRptInterval').style.display = "none"; }
                    popupShowHide('RptInterval', 1);
                }
                function popUpRptDurationAdd() {
                    var rptDuration = document.getElementById('txtRptDuration');
                    if (rptDuration != null) { rptDuration.value = ''; }
                    if (document.getElementById('lnkAddRptDur') != null) { document.getElementById('lnkAddRptDur').style.display = "none"; }
                    popupShowHide('RptDuration', 0);
                    if (document.getElementById('pnlRptDuration') != null) { document.getElementById('pnlRptDuration').style.display = "none"; }
                    popupShowHide('RptDuration', 1);
                }
                function showAddButton(val) {
                    if (val == 1)
                    { if (document.getElementById('lnkAddRptInt') != null) { document.getElementById('lnkAddRptInt').style.display = "inline-block"; } }
                    else { if (document.getElementById('lnkAddRptDur') != null) { document.getElementById('lnkAddRptDur').style.display = "inline-block"; } }
                }

                $(window).bind("load", function () {
                    __doPostBack('btnMap', '');

                });
            </script>
            <script lang="javascript" type="text/javascript" src="../js/MapPageScript.js"></script>
            <script lang="javascript" type="text/javascript" src="../js/jquery.jcarousel.min.js"></script>
            <script src="../js/myformvalidations.js" type="text/javascript"></script>
            <script type="text/javascript" src="../js/GridCheckBoxMaintaining.js"></script>
            <script src="../js/Formvalidations.js" type="text/javascript"></script>
            <link href="../css/CustomeAlert/demos.css" rel="stylesheet" type="text/css" />
            <link href="../css/CustomeAlert/themes/jquery.ui.all.css" rel="stylesheet" type="text/css" />
            <script src="../js/CustomAlert/jquery.min.js" type="text/javascript"></script>
            <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
            <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>
            <script src="../js/CustomAlert/CustomAlert.js" type="text/javascript"></script>
        </form>
    </div>
    <!-- Content Ends Here -->
    <uc2:Footer ID="ucFooter" runat="server" />
</body>
</html>
