<%@ page language="C#" autoeventwireup="true" inherits="Forms_AdvancedHistoryPage, App_Web_3ejnptky" enableeventvalidation="false" maintainscrollpositiononpostback="true" validaterequest="false" %>

<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="MKB" %>
<%@ Register Src="~/UserControls/Notification_List.ascx" TagPrefix="uc3" TagName="NotificationsList" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControls/New_Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/New_Footer.ascx" TagName="Footer" TagPrefix="uc2" %>

<%--<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2.Export" Namespace="DevExpress.Web.ASPxGridView.Export"
    TagPrefix="exp" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.v8.2" Namespace="DevExpress.Web.ASPxPopupControl"
    TagPrefix="dxpc" %>--%>

<%@ Register Assembly="DevExpress.Web.v14.2" Namespace="DevExpress.Web" TagPrefix="dxw" %>

<%--********* For Bootstrap Implementation *************--%>
<!DOCTYPE html>
<html lang="en">
<%--********* End of Bootstrap Implementation *************--%>
<head runat="server">
    <title>tSense-IoT Advanced History</title>
    <%--********* For Bootstrap Implementation *************--%>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <%--********* End of Bootstrap Implementation *************--%>
    <style type="text/css">
        .header {
            background: #DFE9F5;
            border-left: 1px solid #99BBE8;
            border-right: 1px solid #99BBE8;
            border-top: 1px solid #99BBE8;
        }

        .content {
            background: #DFE9F5;
            border-left: 1px solid #99BBE8;
            border-right: 1px solid #99BBE8;
            border-bottom: 1px solid #99BBE8;
        }
    </style>
    <style type="text/css">
        .lbltrip {
            display: block;
            text-align: center;
            vertical-align: middle;
            line-height: 20px;
            height: 20px;
            width: 60px;
            font-weight: bold;
            font-stretch: wider;
        }
    </style>
    <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" />
    <link id="reset" runat="server" href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link id="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link id="stylesheet2" runat="server" href="../css/stylesheet2.css" rel="stylesheet"
        type="text/css" />
    <link id="datepicker" runat="server" type="text/css" href="../css/ui.datepicker.css"
        rel="stylesheet" />
    <link id="uicore" runat="server" type="text/css" href="../css/ui.core.css" rel="stylesheet" />
    <link id="uitheme" runat="server" type="text/css" href="../css/ui.theme.css" rel="stylesheet" />
    <link id="ieonly" runat="server" rel="stylesheet" type="text/css" href="" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <%-- <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
    
            <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
    <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
    <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.tabs.js"></script>--%>

    <script src="../js/jquery-1.11.2.min.js" type="text/javascript"></script>

    <script src="../js/bootstrap.js" type="text/javascript"></script>

    <script src="../js/myformvalidations.js" type="text/javascript"></script>

    <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.3.2.js"></script>--%>

    <script type="text/javascript" src="../js/jquery-1.5.1.min.js"></script>

    <script type="text/javascript" src="../js/ui.datepicker.js"></script>

    <script type="text/javascript" src="../js/JQQueryDatePicker.js"></script>

    <%--Custom Theme for DevEx 14.2--%>
    <link type="text/css" href="../App_Themes/Office2003Blue/GridView/grid.css" rel="stylesheet" />
    <link type="text/css" href="../App_Themes/Office2003Blue/Editors/styles.css" rel="stylesheet" />
    <%--********* For Bootstrap Implementation *************--%>
    <link id="BootStrapCss" href="../css/bootstrap.css" runat="server" rel="stylesheet" type="text/css" />
    <link id="mainstyle" runat="server" href="../css/mainstyle.css" rel="stylesheet" type="text/css" />
    <%--********* End of Bootstrap Implementation *************--%>
    <script src="../js/wow.min.js"></script>
</head>
<body onload="PerformScrollSetting();">
    <div class="pageContainer">
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="360000"
                EnablePartialRendering="true">
            </asp:ScriptManager>
            <!-- Header Starts Here -->
            <uc1:Header ID="ucHeader" runat="server" />
            <!-- Nav Ends Here -->
            <!-- Content Starts Here -->
            <div id="outer">
                <div id="inner">
                    <div id="float-wrap">
                        <!-- Main Content Starts Here -->
                        <div id="content">
                            <div class="content-wrap">
                                <div id="top-content" class="head-part">
                                    <div id="heading" class="col-sm-4 col-md-3 col-lg-3">
                                        <div id="headingHistory">
                                            <img class="icon col-Geozone" src="../images/history-icon.jpg" alt="" />
                                            <h1>
                                                <asp:Literal ID="ltHistory" runat="server"></asp:Literal></h1>
                                            <asp:LinkButton ID="lnkHomeCaption" runat="server"></asp:LinkButton>
                                            <span>&gt;</span><a href="HistoryPage.aspx"><asp:Label ID="lblHistoryCaption" runat="server"></asp:Label></a>
                                            <span>&gt;</span><a href="AdvancedHistoryPage.aspx"><asp:Label ID="lblAdvancedHistoryPage" runat="server"></asp:Label></a>
                                        </div>
                                    </div>

                                    <div id="" class="col-sm-8 col-md-9 col-md-9">
                                        <asp:UpdatePanel UpdateMode="Conditional" ID="updPanel" runat="server" OnUnload="UpdatePanel_Unload">
                                            <ContentTemplate>
                                                <asp:HiddenField ID="hdnAlarmIDs" runat="server" Value="" />
                                                <asp:Button ID="Button1" Style="display: none;" runat="server" />
                                                <asp:HiddenField ID="hdnMapItCheckBoxes" runat="server" />
                                                <asp:HiddenField ID="hdnInfoBubbleProcessing" runat="server" Value="" />
                                                <asp:HiddenField ID="hdnScrollPosition" runat="server" Value="" />
                                                <asp:HiddenField ID="hdnMapType" runat="server" Value="N" />
                                                <asp:HiddenField ID="hdnLandmarkEntries" runat="server" Value="" />
                                                <asp:HiddenField ID="hdnRouteDetails" runat="server" />
                                                <asp:HiddenField ID="hdnRoute" runat="server" />
                                                <asp:HiddenField ID="hdnlang" runat="server" />
                                                <asp:HiddenField ID="hdnMapLng" runat="server" />
                                                <div class="topIconControl">
                                                    <div class="col-sm-12 nullpadding">
                                                        <div class="col-sm-3 col-md-3 col-lg-3 topControlAlign controllinebreak">
                                                            <div class="col-xs-1 col-sm-2 col-md-2 col-lg-1 padding-width-sm-right">
                                                                <asp:Image ID="imgFleetIcon" ImageUrl="../images/fleet-icon.gif" AlternateText="Fleet Name"
                                                                    runat="server" class="icon" />
                                                            </div>
                                                            <div class="col-xs-11 col-sm-9 col-md-10 col-lg-11 padding-width-sm">
                                                                <dxw:ASPxComboBox ID="ddlFleet" runat="server" ValueType="System.Int32" CssClass="form-control"
                                                                    EnableIncrementalFiltering="true" ShowImageInEditBox="false" ClientInstanceName="ddlFleet"
                                                                    SelectedIndex="0" OnSelectedIndexChanged="ddlFleet_SelectedIndexChanged" EnableTheming="true" Theme="Office2003Blue"
                                                                    CssFilePath="~/App_Themes/office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue" AutoPostBack="true">
                                                                </dxw:ASPxComboBox>
                                                            </div>

                                                        </div>
                                                        <div class="col-sm-3 col-md-3 col-lg-3 topControlAlign controllinebreak">
                                                            <div class="col-xs-1 col-sm-2 col-md-2 col-lg-1 padding-width-sm-right">
                                                                <asp:Image ID="imgVehicleIcon" runat="server" class="icon" ImageUrl="../images/vehicle-icon.gif"
                                                                    AlternateText="Vehicle" />
                                                            </div>
                                                            <div class="col-xs-11 col-sm-9 col-md-10 col-lg-11 padding-width-sm">
                                                                <dxw:ASPxComboBox ID="ddlVehicle" runat="server" ValueType="System.Int32" CssClass="form-control"
                                                                    ShowImageInEditBox="false" ClientInstanceName="ddlVehicle" SelectedIndex="0"
                                                                    EnableIncrementalFiltering="true" CssFilePath="~/App_Themes/office2003Blue/Editors/styles.css"
                                                                    CssPostfix="Office2003_Blue" AutoPostBack="false" EnableTheming="true" Theme="Office2003Blue">
                                                                </dxw:ASPxComboBox>

                                                            </div>
                                                        </div>
                                                        <div class="col-sm-3 col-md-3 col-lg-2 topControlAlign controllinebreak">
                                                            <div class="col-xs-1 col-sm-2 col-md-2 col-lg-2 padding-width-sm-right">
                                                                <asp:Image ID="imgDurationFrom" class="icon" runat="server" ImageUrl="../images/calendar-rht-icon.gif"
                                                                    AlternateText="Duration From" /><asp:HiddenField runat="server" ID="hdnDateFormat"
                                                                        Value="dd-MMM-yyyy" />
                                                            </div>
                                                            <div class="col-xs-11 col-sm-9 col-md-10 col-lg-10 padding-width-sm">
                                                                <asp:TextBox ID="txtStartDate" runat="server" oncopy="return false" oncut="return false"
                                                                    onkeydown="doCheckBackSpaceOrDelete()" onkeypress="return false" onpaste="return false"
                                                                    CssClass="form-control" ToolTip="dd-MMM-yyyy"></asp:TextBox>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-3 col-md-3 col-lg-3 topControlAlign controllinebreak">
                                                            <div class="col-xs-1 col-sm-offset-2 topVehicle"></div>
                                                            <div class="col-xs-11 topVehicle">
                                                                <div class="time1 Responsivetime">
                                                                    <MKB:TimeSelector ID="tsFromHrs" runat="server" AmPm="AM" DisplaySeconds="False" Hour="10" Font-Size="10pt" Height="21px" SelectedTimeFormat="Twelve">
                                                                    </MKB:TimeSelector>
                                                                </div>

                                                                <dxw:ASPxTimeEdit ID="tsFromHrs1" runat="server" Visible="false" DateTime="2009/11/01 15:31:34" CssClass="form-control"
                                                                    EnableTheming="true" Theme="Office2003Blue">
                                                                    <ValidationSettings ErrorDisplayMode="None" />
                                                                </dxw:ASPxTimeEdit>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="lft-bor" id="tdPolyCaption" runat="server" style="display: none">
                                                        <asp:Label ID="lblPolyline" runat="server" Text="Polyline Style"></asp:Label>
                                                    </div>

                                                    <div class="col-sm-12 nullpadding">

                                                        <div class="col-sm-3 col-md-3 col-lg-2 topControlAlign controllinebreak">
                                                            <div class="col-xs-1 col-sm-2 col-md-2 col-lg-2 padding-width-sm-right">
                                                                <asp:Image ID="imgDurationTo" runat="server" class="icon" ImageUrl="../images/calendar-lft-icon.gif"
                                                                    AlternateText="Duration To" />
                                                            </div>
                                                            <div class="col-xs-11 col-sm-9 col-md-10 col-lg-10 padding-width-sm">
                                                                <asp:TextBox ID="txtEndDate" runat="server" oncopy="return false" oncut="return false"
                                                                    CssClass="form-control" onkeydown="doCheckBackSpaceOrDelete()" onkeypress="return false"
                                                                    onpaste="return false" ToolTip="dd-MMM-yyyy"></asp:TextBox>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-3 col-md-2 col-lg-2 topControlAlign controllinebreak">
                                                            <div class="col-xs-1 col-sm-offset-2 topVehicle"></div>
                                                            <div class="col-xs-11 topVehicle">
                                                                <div class="time1 Responsivetime">
                                                                    <MKB:TimeSelector ID="tsToHours" runat="server" AmPm="AM" DisplaySeconds="False" Hour="10" Font-Size="10pt" Height="21px" SelectedTimeFormat="Twelve">
                                                                    </MKB:TimeSelector>
                                                                </div>
                                                                <dxw:ASPxTimeEdit ID="tsToHours1" runat="server" Visible="false" DateTime="2009/11/01 15:31:34" CssClass="form-control"
                                                                    EnableTheming="true" Theme="Office2003Blue">
                                                                    <ValidationSettings ErrorDisplayMode="None" />
                                                                </dxw:ASPxTimeEdit>
                                                            </div>
                                                        </div>

                                                        <div class="col-sm-4 col-md-3 col-lg-2 topControlAlign">
                                                            <div class="col-xs-1 col-sm-2 topVehicle"></div>
                                                            <div class="col-xs-11 topVehicle">
                                                                <asp:ImageButton ID="btnView1" ImageUrl="~/images/btn-update-results.jpg" runat="server"
                                                                    OnClick="btnView_Click" OnClientClick="try{if( Validate('V')){ShowPopUp(); return true;} else return false;} catch(Error){return false};"
                                                                    Visible="false" />
                                                                <asp:LinkButton ID="btnView" runat="server" CssClass="MultilingualBtn" OnClientClick="try{if( Validate('V')){ShowPopUp(); return true;} else return false;} catch(Error){return false};"
                                                                    OnClick="btnView_Click">
                                                                    <span runat="server" class="MultilingualBtnspan">
                                                                        <div class="Search">
                                                                            <div id="UpdateResultsButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                Update Results
                                                                            </div>
                                                                        </div>
                                                                    </span>
                                                                </asp:LinkButton>&nbsp;
                                                     
                                                
                                                        <asp:ImageButton ID="btnCommand1" ImageUrl="~/images/btn-send-command.jpg" runat="server"
                                                            OnClientClick="try{if(  Validate('C')){ShowPopUp(); return true;} else{return false;};} catch(Error){return false};"
                                                            OnClick="btnCommand_Click" Visible="false" />&nbsp;
                                                                    <asp:LinkButton ID="btnCommand" runat="server" CssClass="MultilingualBtn" OnClientClick="try{if(  Validate('C')){ShowPopUp(); return true;} else{return false;};} catch(Error){return false};"
                                                                        OnClick="btnCommand_Click" Visible="false">
                                                                        <span runat="server" class="MultilingualBtnspan">
                                                                            <div class="SendCommands">
                                                                                <div id="SendCommandButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                    Send Command
                                                                                </div>
                                                                            </div>
                                                                        </span>
                                                                    </asp:LinkButton>

                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="lft-bor" align="left" id="tdPolyButtons" runat="server" style="display: none">
                                                        <p style="white-space: nowrap">
                                                            <img id="solid" src="../images/btn-solid-over.jpg" alt="" onclick="try{Draw('solid');}catch(Error){}"
                                                                style="cursor: hand;" />&nbsp;&nbsp;&nbsp;
                                                                        <img id="dot" src="../images/btn-dot.jpg" alt="" onclick="try{Draw('dot');}catch(Error){}"
                                                                            style="cursor: not-allowed;" />&nbsp;&nbsp;&nbsp;
                                                                        <img id="dash" src="../images/btn-dash.jpg" alt="" onclick="try{Draw('dash');}catch(Error){}"
                                                                            style="cursor: not-allowed;" />
                                                        </p>
                                                    </div>

                                                </div>

                                            </ContentTemplate>
                                        </asp:UpdatePanel>

                                    </div>
                                    <div class="clear clearfix">
                                    </div>
                                    <div class="row-Geozone"></div>
                                </div>



                                <style type="text/css">
                                    .nm_buttonPair {
                                        right: 96%;
                                    }

                                    @media screen and (-webkit-min-device-pixel-ratio:0) {
                                        .nm_zoomWrap {
                                            margin-right: 96%;
                                        }
                                    }

                                    .nm_mapSettingsWrap {
                                        display: inline-block !important;
                                        position: relative;
                                        /*z-index: 10000000;*/
                                    }

                                    .nm_right[aria-role="menubar"] {
                                        float: left;
                                        margin-left: 3px; /*margin-right: 94%;*/
                                    }

                                    .nm_dropDownMenu {
                                        float: left !important;
                                        margin-left: 1px !important;
                                    }

                                    .nm_menuItemMapType {
                                        float: left !important;
                                        margin-left: 1px !important;
                                    }
                                </style>

                                <div class="row">
                                    <div class="col-sm-4 gridHistory">
                                        <div id="grid-dsply" style="width: 100%;">
                                            <div>
                                                <div class="clear clearfix">
                                                </div>
                                                <asp:UpdatePanel ID="updExport" UpdateMode="Conditional" runat="server" OnUnload="UpdatePanel_Unload">
                                                    <ContentTemplate>
                                                        <div id="top">
                                                            <div class="left-col">
                                                                &nbsp;<span class="label">
                                                                    <asp:LinkButton ID="btnMap" runat="server" CssClass="MultilingualBtn" OnClientClick="return MapItValues();"
                                                                        OnClick="btnMap_Click">
                                                                        <span id="Span1" runat="server" class="MultilingualBtnspan">
                                                                            <div class="Mapit">
                                                                                <div id="MapitButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                    MapIT
                                                                                </div>
                                                                            </div>
                                                                        </span>
                                                                    </asp:LinkButton></span>
                                                            </div>
                                                            <div style="float: right; padding-right: 5px; !important;">
                                                                <%--<div id="divExportPDFAlerts" runat="server" class="pdf-icn" style="cursor: pointer;
                                                        float: right; padding-top: 3px">--%>
                                                                <div style="float: right">
                                                                    <dxw:ASPxButton ID="abtExcelExportGrid" runat="server" Width="19px" Image-Url="~/images/icn-excel.gif"
                                                                        Text="" AutoPostBack="False" Image-Width="19px" Wrap="False" EnableTheming="False"
                                                                        OnClick="btnExport_Click" CommandArgument="xls" ToolTip="Export to Excel" TabIndex="6"
                                                                        Cursor="pointer" RenderMode="Link">
                                                                        <Image Url="~/images/icn-excel.gif" Width="19px" />
                                                                        <%--<ClientSideEvents Click="function(s,e){ShowPopUp();}" />--%>
                                                                    </dxw:ASPxButton>
                                                                </div>
                                                                <div style="float: left">
                                                                    <dxw:ASPxButton ID="abtPDFExportGrid" runat="server" Width="19px" Image-Url="~/images/icn-pdf.gif"
                                                                        Text="" AutoPostBack="False" Image-Width="19px" Wrap="False" EnableTheming="False"
                                                                        OnClick="btnExport_Click" CommandArgument="pdf" ToolTip="Export to PDF" TabIndex="4"
                                                                        Cursor="pointer" RenderMode="Link">

                                                                        <Image Url="~/images/icn-pdf.gif" Width="19px" />

                                                                        <%--<ClientSideEvents Click="function(s,e){ShowPopUp();}" />--%>
                                                                    </dxw:ASPxButton>
                                                                </div>
                                                                <span class="ControlHide">
                                                                    <asp:Label ID="lblPgCount" runat="server" Text="Page Count"></asp:Label></span>
                                                                <span class="ControlHide">
                                                                    <dxw:ASPxComboBox ID="ddlItemsperPage" runat="server" ValueType="System.String" Width="60px" Height="20px"
                                                                        ShowImageInEditBox="false" ClientInstanceName="ddlItemsperPage" SelectedIndex="5"
                                                                        EnableIncrementalFiltering="true" OnSelectedIndexChanged="ddlItemsperPage_SelectedIndexChanged"
                                                                        CssFilePath="~/App_Themes/office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                        EnableTheming="true" Theme="Office2003Blue" AutoPostBack="true">
                                                                        <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>
                                                                </span><span class="ControlHide">
                                                                    <dxw:ASPxComboBox ID="ASPxCboExport" runat="server" ValueType="System.String" Width="80px" Height="20px"
                                                                        ShowImageInEditBox="false" ItemImage-Height="12px" ClientInstanceName="ASPxCboExport" SelectedIndex="0"
                                                                        EnableIncrementalFiltering="true" CssFilePath="~/App_Themes/office2003Blue/Editors/styles.css"
                                                                        CssPostfix="Office2003_Blue" EnableTheming="true" Theme="Office2003Blue" Visible="false">
                                                                        <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-word.jpg" Text="rtf" Value="rtf" />
                                                                            <%--<dxw:ListEditItem ImageUrl="../images/icn-csv.gif" Text="csv" Value="csv" />--%>
                                                                        </Items>
                                                                    </dxw:ASPxComboBox>
                                                                </span><span class="ControlHide">
                                                                    <asp:LinkButton ID="btnExport" runat="server" CssClass="MultilingualBtn" OnClick="btnExport_Click"
                                                                        OnClientClick="ShowPopUp();SetExportHiddenValue();" Visible="false">
                                                                        <span runat="server" class="MultilingualBtnspan">
                                                                            <div class="Export">
                                                                                <div id="ExportButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                    Export
                                                                                </div>
                                                                            </div>
                                                                        </span>
                                                                    </asp:LinkButton>
                                                                </span>
                                                            </div>
                                                            <div class="clear clearfix">
                                                            </div>
                                                            <asp:UpdatePanel ID="updGrid" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                                                                <ContentTemplate>
                                                                    <dxw:ASPxPopupMenu ID="ExportContextMenuHistory" runat="server" ClientInstanceName="ExportContextMenuHistory"
                                                                        EnableTheming="true" Theme="Office2003Blue" OnItemClick="ExportContextMenuHistory_ItemClick" Visible="false">
                                                                        <Items>
                                                                            <dxw:MenuItem Name="ExportToPDF" Text="Export to PDF" ToolTip="Click to Export to PDF" />
                                                                            <dxw:MenuItem Name="ExportToXLS" Text="Export to XLS" ToolTip="Click to Export to XLS" />
                                                                        </Items>
                                                                        <ClientSideEvents ItemClick="function(s, e) { ExportContextMenuHistory.Hide(); }" />
                                                                    </dxw:ASPxPopupMenu>
                                                                    <asp:HiddenField ID="hdnGridPaging" runat="server" Value="0" />
                                                                    <div style="vertical-align: top; overflow: auto; height: 100%; width: 100%">

                                                                        <div class="table-responsive">

                                                                            <dxw:ASPxGridView ID="gvHistory" ClientInstanceName="gvHistory" runat="server"
                                                                                AutoGenerateColumns="False" EnableTheming="true" Theme="Office2003Blue"
                                                                                CssFilePath="~/App_Themes/office2003Blue/GridView/grid.css" CssPostfix="Office2003_Blue"
                                                                                Width="600px" OnHtmlRowCreated="gvHistory_OnHtmlRowCreated" OnFillContextMenuItems="gvData_FillContextMenuItems"
                                                                                Settings-ShowFilterRow="true" EnableViewState="true" KeyFieldName="TripId">
                                                                                <Settings UseFixedTableLayout="false" />
                                                                                <%--<Images ImageFolder="~/App_Themes/office2003Blue/GridView/">
                                                                    <CollapsedButton Height="12px" Url="~/App_Themes/office2003Blue/GridView/gvCollapsedButton.png"
                                                                        Width="11px" />
                                                                    <ExpandedButton Height="12px" Url="~/App_Themes/office2003Blue/GridView/gvExpandedButton.png"
                                                                        Width="11px" />
                                                                    <DetailCollapsedButton Height="12px" Url="~/App_Themes/office2003Blue/GridView/gvCollapsedButton.png"
                                                                        Width="11px" />
                                                                    <DetailExpandedButton Height="12px" Url="~/App_Themes/office2003Blue/GridView/gvExpandedButton.png"
                                                                        Width="11px" />
                                                                </Images>--%>
                                                                                <%--<ClientSideEvents BeginCallback="function(s, e) {document.getElementById('hdnGridPaging').value='1';}"
                                                    EndCallback="function(s, e) {document.getElementById('hdnGridPaging').value='0';}" />
                                                <SettingsLoadingPanel Mode="ShowAsPopup" />--%>
                                                                                <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" AlwaysShowPager="true">
                                                                                </SettingsPager>
                                                                                <SettingsContextMenu Enabled="false" 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>
                                                                                <ClientSideEvents ContextMenuItemClick="
                                                                            function(s,e) {                                                         
                                                                                switch(e.item.name) {    
                                                                                        case 'SelectAll':
                                                                                            gvHistory.SelectAllRowsOnPage();
                                                                                            break;
                                                                                        case 'DeselectAll':
                                                                                            gvHistory.UnselectAllRowsOnPage();
                                                                                            break;}
                                                                            }" />
                                                                                <%--ContextMenu="function OnContextMenu(s, e) {
                                                                                    if (e.objectType == 'row') {
                                                                                        ExportContextMenuHistory.ShowAtPos(ASPxClientUtils.GetEventX(e.htmlEvent), ASPxClientUtils.GetEventY(e.htmlEvent));
                                                                                    }
                                                                                }" />--%>
                                                                                <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 VisibleIndex="1" Width="4%" Caption="Device" HeaderStyle-HorizontalAlign="Center"
                                                                                        CellStyle-HorizontalAlign="Center" Visible="false">
                                                                                        <DataItemTemplate>
                                                                                            <asp:CheckBox ID="chkMapit" runat="server" OnClick="testchk(this);" />
                                                                                            <asp:HiddenField ID="hdntrip" runat="server" Value='<%# Eval("Trip") %> ' />
                                                                                        </DataItemTemplate>
                                                                                    </dxw:GridViewDataTextColumn>
                                                                                    <dxw:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Name="Checkbox"
                                                                                        Width="4%">
                                                                                        <HeaderTemplate>
                                                                                            <input id="chkSelectAll" type="checkbox" runat="server" onclick="gvHistory.SelectAllRowsOnPage(this.checked);"
                                                                                                style="vertical-align: middle;" title="Select/Unselect all rows on the page"
                                                                                                visible="false" />
                                                                                        </HeaderTemplate>
                                                                                        <HeaderStyle HorizontalAlign="Center" />
                                                                                    </dxw:GridViewCommandColumn>
                                                                                    <dxw:GridViewDataTextColumn FieldName="DeviceID" VisibleIndex="1" Width="8%" Caption="Device ID"
                                                                                        HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center" Visible="false">
                                                                                        <HeaderCaptionTemplate>
                                                                                            <span class="icon">
                                                                                                <asp:Image ID="imgDeviceID" runat="server" ImageUrl="../images/device-icon.gif" ImageAlign="top"
                                                                                                    AlternateText="" /></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="2" Caption="Vehicle Name"
                                                                                        Width="20%" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Left"
                                                                                        Visible="false">
                                                                                        <HeaderCaptionTemplate>
                                                                                            <span class="icon">
                                                                                                <asp:Image ID="imgVehicleName" runat="server" ImageUrl="..\Images\icn-vehicle-name.gif"
                                                                                                    AlternateText="" align="top" /></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="AdvTripId" VisibleIndex="3" Caption="Trip"
                                                                                        Width="10%" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center">
                                                                                        <HeaderCaptionTemplate>
                                                                                            <span class="icon">
                                                                                                <asp:Image ID="imgTrip" runat="server" ImageUrl="..\Images\icn-vehicle-name.gif"
                                                                                                    AlternateText="" align="top" /></span> <span class="label">
                                                                                                        <asp:Label ID="lblVehicleNameCaption" runat="server" Text="Trip"></asp:Label></span>
                                                                                        </HeaderCaptionTemplate>
                                                                                        <DataItemTemplate>
                                                                                            <asp:LinkButton ID="lbtTrip" runat="server" Text='<%# Eval("AdvTripId") %>' OnClick="lbtTrip_Click"
                                                                                                CommandArgument='<%# Eval("VehicleId")+","+Eval("StartDate")+","+Eval("EndDate")+","+Eval("DeviceID")+","+Eval("VehicleDescription")+","+Eval("IdlingDuration")+","+Eval("Distance") %>'
                                                                                                OnClientClick="try{if( Validate('V')){ShowPopUp();return true;} else return false;} catch(Error){return false};"
                                                                                                Style="width: 50px; word-wrap: break-word">                                                        
                                                                                            </asp:LinkButton>
                                                                                            <%-- <asp:Label ID="lblTrip" runat="server" Text='<%# Eval("TripId")%>'>
                                                            </asp:Label>--%>
                                                                                        </DataItemTemplate>
                                                                                        <Settings AllowAutoFilter="false" AllowSort="true" ShowFilterRowMenu="false" />
                                                                                    </dxw:GridViewDataTextColumn>
                                                                                    <dxw:GridViewDataDateColumn FieldName="Departure" VisibleIndex="4" Caption="Departure"
                                                                                        Width="25%" CellStyle-Wrap="True" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Left"
                                                                                        Visible="true">
                                                                                        <HeaderCaptionTemplate>
                                                                                            <span class="icon">
                                                                                                <asp:Image runat="server" ID="imgDateTimeIcon" ImageUrl="..\Images\icn-date-time.gif"
                                                                                                    AlternateText="" ImageAlign="top" /></span> <span class="label">
                                                                                                        <asp:Label ID="lblDepartureCaption" runat="server" Text="Departure"></asp:Label></span>
                                                                                        </HeaderCaptionTemplate>
                                                                                        <DataItemTemplate>
                                                                                            <div class="DateStyle">
                                                                                                <asp:Label ID="lblDeparture" runat="server" Text='<%# Eval("Departure") %> '></asp:Label>
                                                                                            </div>
                                                                                        </DataItemTemplate>
                                                                                        <Settings ShowFilterRowMenu="False" AllowAutoFilter="false" />
                                                                                    </dxw:GridViewDataDateColumn>
                                                                                    <dxw:GridViewDataDateColumn FieldName="Arrival" VisibleIndex="5" Caption="Arrival"
                                                                                        Width="25%" CellStyle-Wrap="True" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Left"
                                                                                        Visible="true">
                                                                                        <HeaderCaptionTemplate>
                                                                                            <span class="icon">
                                                                                                <asp:Image runat="server" ID="imgDateTimeIcon" ImageUrl="..\Images\icn-date-time.gif"
                                                                                                    AlternateText="" ImageAlign="top" /></span> <span class="label">
                                                                                                        <asp:Label ID="lblDateTimeCaption" runat="server" Text="Arrival"></asp:Label></span>
                                                                                        </HeaderCaptionTemplate>
                                                                                        <DataItemTemplate>
                                                                                            <div class="DateStyle">
                                                                                                <asp:Label ID="lblDateTime" runat="server" Text='<%# Eval("Arrival") %> '></asp:Label>
                                                                                            </div>
                                                                                        </DataItemTemplate>
                                                                                        <Settings ShowFilterRowMenu="False" AllowAutoFilter="false" />
                                                                                    </dxw:GridViewDataDateColumn>
                                                                                    <dxw:GridViewDataTextColumn FieldName="Distance" VisibleIndex="6" CellStyle-Wrap="True"
                                                                                        Caption="Distance" Width="8%" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center"
                                                                                        Visible="false">
                                                                                        <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="Distance"></asp:Label></span>
                                                                                        </HeaderCaptionTemplate>
                                                                                        <DataItemTemplate>
                                                                                            <asp:Label ID="lblAddress" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Distance")%>'></asp:Label>
                                                                                        </DataItemTemplate>
                                                                                        <Settings ShowFilterRowMenu="False" AllowAutoFilter="false" />
                                                                                    </dxw:GridViewDataTextColumn>
                                                                                    <dxw:GridViewDataTextColumn FieldName="Speed" Caption="Max Speed" VisibleIndex="7"
                                                                                        Width="10%" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center"
                                                                                        CellStyle-Wrap="True" Visible="false">
                                                                                        <HeaderCaptionTemplate>
                                                                                            <span class="icon">
                                                                                                <asp:Image ID="imgSpeedIcon" runat="server" ImageUrl="..\Images\icn-speed.gif" AlternateText=""
                                                                                                    ImageAlign="top" /></span> <span class="label">
                                                                                                        <asp:Label ID="lblSpeedCaption" runat="server" Text="Max Speed"></asp:Label></span>
                                                                                        </HeaderCaptionTemplate>
                                                                                        <DataItemTemplate>
                                                                                            <asp:Label ID="lblSpeed" runat="server" Text='<%# Eval("Speed") %>'></asp:Label>
                                                                                        </DataItemTemplate>
                                                                                        <Settings AllowAutoFilter="false" AllowSort="False" ShowFilterRowMenu="false" />
                                                                                    </dxw:GridViewDataTextColumn>
                                                                                    <dxw:GridViewDataTextColumn FieldName="Duration" VisibleIndex="8" Caption="Duration"
                                                                                        Width="15%" CellStyle-Wrap="True" HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center"
                                                                                        Visible="true">
                                                                                        <HeaderCaptionTemplate>
                                                                                            <span class="icon">
                                                                                                <asp:Image ID="imgMessageIcon" ImageUrl="..\Images\icn-message-details.gif" AlternateText=""
                                                                                                    align="top" runat="server" /></span> <span class="label">
                                                                                                        <asp:Label ID="lblMsgDetailsCaption" runat="server" Text="Duration"></asp:Label></span>
                                                                                        </HeaderCaptionTemplate>
                                                                                        <DataItemTemplate>
                                                                                            <asp:Label ID="lblDuration" runat="server" Text='<%# Eval("Duration") %>'>
                                                                                            </asp:Label>
                                                                                            <%--<asp:LinkButton ID="lbtMsgDetails" runat="server" Text='<%# Eval("Duration") %>'
                                                                OnClick="lbtMsgDetails_Click" CommandArgument='<%# Eval("MessageInID")+","+Eval("ValidGPS")+","+Eval("Acknowledged")+","+Eval("DeviceID")+","+Eval("Timestamp") %>'
                                                                OnClientClick="ShowPopUp();" Style="width: 50px; word-wrap: break-word">                                                        
                                                            </asp:LinkButton>--%>
                                                                                        </DataItemTemplate>
                                                                                        <Settings ShowFilterRowMenu="False" AllowAutoFilter="false" />
                                                                                    </dxw:GridViewDataTextColumn>
                                                                                    <dxw:GridViewDataTextColumn FieldName="IdlingDuration" VisibleIndex="9" Width="15%"
                                                                                        HeaderStyle-HorizontalAlign="Center" CellStyle-HorizontalAlign="Center" Visible="false">
                                                                                        <HeaderCaptionTemplate>
                                                                                            <span class="icon">
                                                                                                <asp:Image ID="imgDirectionIcon" runat="server" ImageUrl="..\Images\compass.png"
                                                                                                    AlternateText="" ImageAlign="middle" /></span> <span class="label">
                                                                                                        <asp:Label ID="lblDirectionCaption" runat="server" Text="Idling Duration"></asp:Label></span>
                                                                                        </HeaderCaptionTemplate>
                                                                                        <DataItemTemplate>
                                                                                            <asp:Label ID="lblIdlingDuration" runat="server" Text='<%# Eval("IdlingDuration") %>'>
                                                                                            </asp:Label>
                                                                                        </DataItemTemplate>
                                                                                        <Settings AllowAutoFilter="false" AllowSort="true" ShowFilterRowMenu="false" />
                                                                                    </dxw:GridViewDataTextColumn>
                                                                                    <dxw:GridViewDataColumn FieldName="VehicleId" Caption="VehicleId" Visible="false">
                                                                                    </dxw:GridViewDataColumn>
                                                                                    <dxw:GridViewDataColumn FieldName="StartDate" Caption="StartDate" Visible="false">
                                                                                    </dxw:GridViewDataColumn>
                                                                                    <dxw:GridViewDataColumn FieldName="EndDate" Caption="EndDate" Visible="false">
                                                                                    </dxw:GridViewDataColumn>
                                                                                    <%--<dxw:GridViewDataColumn FieldName="TripId" Caption="TripId" Visible="false">
                                                                    </dxw:GridViewDataColumn>--%>
                                                                                </Columns>
                                                                                <Settings ShowVerticalScrollBar="true" />
                                                                                <SettingsText EmptyDataRow="No data matching to the search criteria" />
                                                                                <%--<ClientSideEvents SelectionChanged="function(s, e) { SelChanged(s, e); }" />--%>
                                                                                <%-- <ClientSideEvents SelectionChanged="function(s, e) {OnGridSelectionChanged(); }"
                                                                                EndCallback="function(s, e) { CheckMapItBoxes();SetDivPosition();}" />--%>
                                                                                <Settings ShowFilterRow="true" ShowFilterRowMenu="true" />
                                                                                <SettingsBehavior ProcessSelectionChangedOnServer="false" />
                                                                            </dxw:ASPxGridView>

                                                                        </div>

                                                                        <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvHistory"
                                                                            ReportHeader="{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}}
\viewkind4\uc1\pard\qc\b\fs28 History Details    \par
\pard\par
\par
}
"
                                                                            OnDataBinding="ASPxGridViewExporter1_DataBinding" OnPreRender="ASPxGridViewExporter1_PreRender" OnRenderBrick="ASPxGridViewExporter1_RenderBrick">
                                                                            <PageFooter Right="[Page # of Pages #]">
                                                                            </PageFooter>
                                                                        </dxw:ASPxGridViewExporter>
                                                                    </div>
                                                                    <asp:Panel ID="PanelCamera" runat="server" class="DashboardNewsPanel">
                                                                    </asp:Panel>
                                                                    <style>
                                                                        .DashboardNewsPanel {
                                                                            width: auto !important;
                                                                        }
                                                                    </style>

                                                                    <script type="text/javascript">
                                                                        var keyValue;
                                                                        function OnMoreInfoImageClick(element, CameraImg) {
                                                                            //var base64Data = toBase64(CameraImg);
                                                                            //document.getElementById("tImg").src = "data:image/jpg;base64," + base64Data;                                      
                                                                            document.getElementById("CameraImg").src = CameraImg;
                                                                            var pnlCamera = document.getElementById("PanelCamera");
                                                                            pnlCamera.style.display = "block";
                                                                        }
                                                                        function CloseCategoryPopup() {
                                                                            var pnlCamera = document.getElementById("PanelCamera");
                                                                            pnlCamera.style.display = "none";
                                                                        }

                                                                    </script>

                                                                    <div class="clear clearfix">
                                                                    </div>
                                                                    <div style="vertical-align: bottom" align="center">
                                                                        <asp:Panel runat="server" ID="pnllegends" Style="width: 90%; padding-left: 5px" GroupingText="Trip Legends"
                                                                            CssClass="innerTable" Visible="false">
                                                                            <table border="0" cellpadding="0" cellspacing="0" style="padding: 20px 0 20px 0">
                                                                                <tr>
                                                                                    <td style="padding: 10px 0 0px 10px">
                                                                                        <asp:Label ID="lblTrip1" runat="server" CssClass="lbltrip"></asp:Label>
                                                                                    </td>
                                                                                    <td style="padding: 10px 0 0px 10px">
                                                                                        <asp:Label ID="lblTrip2" runat="server" CssClass="lbltrip"></asp:Label>
                                                                                    </td>
                                                                                    <td style="padding: 10px 0 5px 10px">
                                                                                        <asp:Label ID="lblTrip3" runat="server" CssClass="lbltrip"></asp:Label>
                                                                                    </td>
                                                                                </tr>
                                                                            </table>
                                                                        </asp:Panel>
                                                                    </div>
                                                                </ContentTemplate>
                                                                <Triggers>
                                                                    <asp:PostBackTrigger ControlID="abtPDFExportGrid" />
                                                                    <asp:PostBackTrigger ControlID="abtExcelExportGrid" />
                                                                </Triggers>
                                                            </asp:UpdatePanel>
                                                            <table border="0" cellpadding="0" cellspacing="0" style="padding: 20px 0 20px 0"
                                                                align="left">
                                                                <tr>
                                                                    <td>&nbsp;
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td style="padding: 10px 0 0px 10px; font-style: italic; color: Navy" align="left" runat="server" id="tdNote">Note : Maximum of 3 trips can able to view by MapIt.
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>&nbsp;
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </div>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </div>
                                            <%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server" OnUnload="UpdatePanel_Unload">
                                                <ContentTemplate>--%>
                                            <%-- <dxw:ASPxPopupControl ID="popup" runat="server" Height="80px" AllowDragging="True"
                                                        Border-BorderColor="#99BBE8" BackColor="#dfe9f5" HeaderText="Trip Details" HeaderStyle-BackColor="#dfe9f5"
                                                        EnableDefaultAppearance="False" ShowCloseButton="true" CloseAction="CloseButton" PopupHorizontalAlign="OutsideLeft"
                                                        Top="250" Style="z-index: 10000000;">
                                                        <ContentStyle CssClass="content">
                                                        </ContentStyle>
                                                        <ContentCollection>
                                                            <dxw:PopupControlContentControl runat="server"> --%>


                                            <asp:HiddenField runat="server" ID="hdnShowHideControls"></asp:HiddenField>

                                            <%--</dxw:PopupControlContentControl>
                                                        </ContentCollection>
                                                        <HeaderStyle CssClass="header">
                                                            <Border BorderStyle="Solid" />
                                                        </HeaderStyle>
                                                        <Border BorderColor="#99BBE8" />
                                                    </dxw:ASPxPopupControl>--%>
                                            <%-- </ContentTemplate>
                                            </asp:UpdatePanel>--%>
                                        </div>
                                        <!-- Grid Display-->

                                    </div>
                                    <asp:UpdatePanel ID="UpdatePanel1" runat="server" OnUnload="UpdatePanel_Unload">
                                        <ContentTemplate>

                                            <asp:Panel runat="server" CssClass="searchPanel" Style="display: none;" ID="pnlTripWindow">
                                                <div class="popup">
                                                    <%--<tr>
                                                                    <td id="NotificationPnltopl" runat="server" class="top-l">&nbsp;
                                                                    </td>
                                                                    <td class="top-m">&nbsp;
                                                                    </td>
                                                                    <td id="NotificationPnltopr" runat="server" class="top-r">&nbsp;
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td id="NotificationPnlLeft" runat="server" class="left">&nbsp;
                                                                    </td>
                                                                    <td>--%>
                                                    <div class="top">
                                                        <h1>
                                                            <asp:Label runat="server" ID="lblinfopnl" Text="Trip Details"></asp:Label>
                                                        </h1>
                                                        <div class="close">
                                                            <asp:ImageButton ID="ibtnClose" OnClientClick="popUpAdvancedSearch(0);HidePopUp();return false;"
                                                                CausesValidation="false" ImageUrl="~/images/popup-close.gif" Visible="true" runat="server" />
                                                        </div>
                                                        <div class="clear clearfix">
                                                        </div>
                                                    </div>
                                                    <div class="popup-content">
                                                        <asp:Panel runat="server" class="">
                                                            <asp:UpdatePanel ID="updGriddtls" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                                                                <ContentTemplate>
                                                                    <asp:Panel ID="pnlTripInfo" GroupingText="Vehicle Information" CssClass="innerTable"
                                                                        runat="server">
                                                                        <div class="popup">
                                                                            <div class="col-sm-12 nullpadding row-Geozone">
                                                                                <div class="col-sm-4 col-md-3 col-lg-4 nullpadding">
                                                                                    <div class="col-sm-6 col-lg-6 nullpadding icon-img">
                                                                                        <asp:Image ID="Image1" runat="server" ImageUrl="../images/vehicle-icon.gif" AlternateText="Vehicle"
                                                                                            Visible="false" />

                                                                                        <asp:Label runat="server" ID="lblcaptionTrip" Text="Trip" Font-Bold="true"></asp:Label>
                                                                                    </div>
                                                                                    <div class="col-sm-6 col-lg-4 nullpadding icon-img">
                                                                                        <asp:Label runat="server" ID="lbldtlsTrip"></asp:Label>

                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-sm-4 col-lg-4 padding-width-lg-right">
                                                                                    <div class="col-sm-6 col-lg-6 nullpadding icon-img">
                                                                                        <asp:Image ID="Image4" runat="server" ImageUrl="../images/calendar-rht-icon.gif"
                                                                                            AlternateText="Duration From" Visible="false" />

                                                                                        <asp:Label runat="server" ID="lblcaptionstartdate" Text="Start Date & Time" Font-Bold="true"></asp:Label>
                                                                                    </div>
                                                                                    <div class="col-sm-6 col-lg-6 nullpadding icon-img">
                                                                                        <asp:Label runat="server" ID="lbldtlsStartdate"></asp:Label>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-sm-4 col-lg-4 nullpadding">
                                                                                    <div class="col-sm-6 col-lg-6 nullpadding icon-img">
                                                                                        <asp:Image ID="Image5" runat="server" ImageUrl="../images/vehicle-icon.gif" AlternateText="Vehicle"
                                                                                            Visible="false" />
                                                                                        <asp:Label runat="server" ID="lblcaptionDist" Text="Distance Traveled" Font-Bold="true"></asp:Label>
                                                                                    </div>
                                                                                    <div class="col-sm-6 nullpadding icon-img">
                                                                                        <asp:Label runat="server" ID="lblDistance"></asp:Label>
                                                                                    </div>
                                                                                </div>
                                                                            </div>

                                                                            <div class="col-sm-12 nullpadding row-Geozone">
                                                                                <div class="col-sm-4 col-md-3 col-lg-4 nullpadding icon-img">
                                                                                    <div class="col-sm-6 col-lg-6 nullpadding">
                                                                                        <asp:Image ID="Image6" runat="server" ImageUrl="../images/vehicle-icon.gif" AlternateText="Vehicle"
                                                                                            Visible="false" />
                                                                                        <asp:Label runat="server" ID="lblCaptionVehicle" Text="Vehicle Name" Font-Bold="true"></asp:Label>
                                                                                    </div>
                                                                                    <div class="col-sm-6 col-lg-4 nullpadding icon-img">
                                                                                        <asp:Label runat="server" ID="lbldtlsVehicle"></asp:Label>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-sm-4 col-lg-4 padding-width-lg-right">
                                                                                    <div class="col-sm-6 col-lg-6 nullpadding icon-img">
                                                                                        <asp:Image ID="Image3" runat="server" ImageUrl="../images/calendar-rht-icon.gif"
                                                                                            AlternateText="Duration From" Visible="false" />
                                                                                        <asp:Label runat="server" ID="lblcaptionenddate" Text="End Date & Time" Font-Bold="true"></asp:Label>
                                                                                    </div>
                                                                                    <div class="col-sm-6 col-lg-6 nullpadding icon-img">
                                                                                        <asp:Label runat="server" ID="lbldtlsEnddate"></asp:Label>
                                                                                    </div>
                                                                                </div>
                                                                                <div class="col-sm-4 col-lg-4 nullpadding">
                                                                                    <div class="col-sm-6 col-lg-6 nullpadding icon-img">
                                                                                        <asp:Image ID="Image9" runat="server" ImageUrl="../images/vehicle-icon.gif" AlternateText="Vehicle"
                                                                                            Visible="false" />
                                                                                        <asp:Label runat="server" ID="lblCaptionIldling" Text="Idling Duration (hh:mm:ss)" Font-Bold="true"></asp:Label>
                                                                                    </div>
                                                                                    <div class="col-sm-6 nullpadding icon-img">
                                                                                        <asp:Label runat="server" ID="lblidling"></asp:Label>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </asp:Panel>
                                                                    <div style="vertical-align: top" class="form-box">
                                                                        <h1>
                                                                            <div class="right-col">

                                                                                <div style="float: right" class="iconTopAlign">
                                                                                    <dxw:ASPxButton ID="abtExcelExportDetailsGrid" runat="server" Width="19px" Image-Url="~/images/icn-excel.gif"
                                                                                        Text="" AutoPostBack="False" Image-Width="19px" Wrap="False" EnableDefaultAppearance="False"
                                                                                        OnClick="btnExport1_Click" CommandArgument="xls" ToolTip="Export to Excel" TabIndex="6"
                                                                                        Cursor="pointer" RenderMode="Link">
                                                                                        <Image Url="~/images/icn-excel.gif" Width="19px" />
                                                                                    </dxw:ASPxButton>
                                                                                </div>
                                                                                <div style="float: right" class="iconTopAlign nullpaddingRight">
                                                                                    <dxw:ASPxButton ID="abtPDFExportDetailsGrid" runat="server" Width="19px" Image-Url="~/images/icn-pdf.gif"
                                                                                        Text="" AutoPostBack="False" Image-Width="19px" Wrap="False" EnableDefaultAppearance="False"
                                                                                        OnClick="btnExport1_Click" CommandArgument="pdf" ToolTip="Export to PDF" TabIndex="4"
                                                                                        Cursor="pointer" RenderMode="Link">
                                                                                        <Image Url="~/images/icn-pdf.gif" Width="19px" />
                                                                                    </dxw:ASPxButton>
                                                                                </div>

                                                                                <div>
                                                                                    <span class="dropdown">
                                                                                        <dxw:ASPxComboBox ID="ASPxComboBox1" runat="server" ValueType="System.String" Width="80px" Height="20px"
                                                                                            ShowImageInEditBox="false" ItemImage-Height="12px" ClientInstanceName="ASPxCboExport" SelectedIndex="0"
                                                                                            EnableIncrementalFiltering="true" CssFilePath="~/App_Themes/office2003Blue/Editors/styles.css"
                                                                                            CssPostfix="Office2003_Blue" EnableTheming="true" Theme="Office2003Blue" Visible="false">
                                                                                            <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-word.jpg" Text="rtf" Value="rtf" />
                                                                                                <%--<dxw:ListEditItem ImageUrl="../images/icn-csv.gif" Text="csv" Value="csv" />--%>
                                                                                            </Items>
                                                                                        </dxw:ASPxComboBox>
                                                                                    </span>
                                                                                </div>
                                                                                <div>
                                                                                    <span class="txt">
                                                                                        <asp:LinkButton ID="btnExport2" runat="server" CssClass="MultilingualBtn" OnClick="btnExport1_Click"
                                                                                            OnClientClick="ShowPopUp();SetExportHiddenValue();" Visible="false">
                                                                                            <span id="Span2" runat="server" class="MultilingualBtnspan">
                                                                                                <div class="Export">
                                                                                                    <div id="Div1" runat="server" class="MultilingualBtnTextAlign">
                                                                                                        Export
                                                                                                    </div>
                                                                                                </div>
                                                                                            </span>
                                                                                        </asp:LinkButton>
                                                                                    </span>
                                                                                </div>
                                                                            </div>
                                                                        </h1>
                                                                        <dxw:ASPxPopupMenu ID="ExportContextMenuHistoryDtls" runat="server" ClientInstanceName="ExportContextMenuHistoryDtls"
                                                                            EnableTheming="true" Theme="Office2003Blue" OnItemClick="ExportContextMenuHistoryDtls_ItemClick" Visible="false">
                                                                            <Items>
                                                                                <dxw:MenuItem Name="ExportToPDF" Text="Export to PDF" ToolTip="Click to Export to PDF" />
                                                                                <dxw:MenuItem Name="ExportToXLS" Text="Export to XLS" ToolTip="Click to Export to XLS" />
                                                                            </Items>
                                                                            <ClientSideEvents ItemClick="function(s, e) { ExportContextMenuHistoryDtls.Hide(); }" />
                                                                        </dxw:ASPxPopupMenu>
                                                                        <div class="clear clearfix"></div>
                                                                        <div class="table-responsive">
                                                                            <dxw:ASPxGridView ID="gvHistorydtls" ClientInstanceName="gvHistorydtls" runat="server" KeyFieldName="MessageInID"
                                                                                Settings-ShowFilterRow="true" EnableViewState="true" AutoGenerateColumns="False" EnableTheming="true" Theme="Office2003Blue"
                                                                                CssFilePath="~/App_Themes/office2003Blue/GridView/grid.css" CssPostfix="Office2003_Blue"
                                                                                OnHtmlRowCreated="gvHistorydtls_HtmlRowCreated" OnFillContextMenuItems="gvData_FillContextMenuItems">
                                                                                <Settings UseFixedTableLayout="true" />
                                                                                <%--<Images ImageFolder="~/App_Themes/office2003Blue/GridView/">
                                                                                            <CollapsedButton Height="12px" Url="~/App_Themes/office2003Blue/GridView/gvCollapsedButton.png"
                                                                                                Width="11px" />
                                                                                            <ExpandedButton Height="12px" Url="~/App_Themes/office2003Blue/GridView/gvExpandedButton.png"
                                                                                                Width="11px" />
                                                                                            <DetailCollapsedButton Height="12px" Url="~/App_Themes/office2003Blue/GridView/gvCollapsedButton.png"
                                                                                                Width="11px" />
                                                                                            <DetailExpandedButton Height="12px" Url="~/App_Themes/office2003Blue/GridView/gvExpandedButton.png"
                                                                                                Width="11px" />
                                                                                        </Images>--%>
                                                                                <SettingsLoadingPanel Mode="ShowAsPopup" />
                                                                                <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" AlwaysShowPager="true">
                                                                                </SettingsPager>
                                                                                <SettingsContextMenu Enabled="false" 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>
                                                                                <ClientSideEvents ContextMenuItemClick="
                                                                                                                        function(s,e) {                                                         
                                                                                                                            switch(e.item.name) {    
                                                                                                                                    case 'SelectAll':
                                                                                                                                        gvHistorydtls.SelectAllRowsOnPage();
                                                                                                                                        break;
                                                                                                                                    case 'DeselectAll':
                                                                                                                                        gvHistorydtls.UnselectAllRowsOnPage();
                                                                                                                                        break;}
                                                                                                                        }" />
                                                                                <%--ContextMenu="function OnContextMenu(s, e) {
                                                                                                                        if (e.objectType == 'row') {
                                                                                                                            ExportContextMenuHistoryDtls.ShowAtPos(ASPxClientUtils.GetEventX(e.htmlEvent), ASPxClientUtils.GetEventY(e.htmlEvent));
                                                                                                                        }
                                                                                                                        }" />--%>
                                                                                <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="">
                                                                                                <asp:Image ID="imgDeviceID" runat="server" ImageUrl="../images/device-icon.gif" ImageAlign="top"
                                                                                                    AlternateText="" /></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"
                                                                                        Visible="false" Width="14%">
                                                                                        <HeaderCaptionTemplate>
                                                                                            <span class="">
                                                                                                <asp:Image ID="imgVehicleName" runat="server" ImageUrl="..\Images\icn-vehicle-name.gif"
                                                                                                    AlternateText="" align="top" /></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="false" 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="TimestampDisp" VisibleIndex="2" Caption="Date & Time"
                                                                                        Width="17%">
                                                                                        <HeaderCaptionTemplate>
                                                                                            <span class="">
                                                                                                <asp:Image runat="server" ID="imgDateTimeIcon" ImageUrl="..\Images\icn-date-time.gif"
                                                                                                    AlternateText="" ImageAlign="top" /></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="TimestampSort" VisibleIndex="3" Caption="Date & Time"
                                                                                        Width="13%" Visible="false">
                                                                                        <HeaderCaptionTemplate>
                                                                                            <span class="">
                                                                                                <asp:Image runat="server" ID="imgDateTimeIcon" ImageUrl="..\Images\icn-date-time.gif"
                                                                                                    AlternateText="" ImageAlign="top" /></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"
                                                                                        Width="30%">
                                                                                        <HeaderCaptionTemplate>
                                                                                            <span class="">
                                                                                                <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="10%" CellStyle-HorizontalAlign="Center">
                                                                                        <HeaderCaptionTemplate>
                                                                                            <span class="">
                                                                                                <asp:Image ID="imgSpeedIcon" runat="server" ImageUrl="..\Images\icn-speed.gif" AlternateText=""
                                                                                                    ImageAlign="top" /></span> <span class="label">
                                                                                                        <asp:Label ID="lblSpeedCaption" runat="server" Text="Speed"></asp:Label></span>
                                                                                        </HeaderCaptionTemplate>
                                                                                        <DataItemTemplate>
                                                                                            <asp:Label ID="lblSpeed" runat="server" Text='<%# Convert.ToInt32(Eval("ValidGPS").ToString())<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="">
                                                                                                <asp:Image ID="imgMessageIcon" ImageUrl="..\Images\icn-message-details.gif" AlternateText=""
                                                                                                    align="top" runat="server" /></span> <span class="label">
                                                                                                        <asp:Label ID="lblMsgDetailsCaption" runat="server" Text="Message Details"></asp:Label></span>
                                                                                        </HeaderCaptionTemplate>
                                                                                        <DataItemTemplate>
                                                                                            <%--"OnClick="lbtMsgDetails_Click"--%>
                                                                                            <asp:LinkButton ID="lbtMsgDetails" runat="server" Text='<%# Eval("MessageDetails") %>'
                                                                                                CommandArgument='<%# Eval("MessageInID")+","+Eval("ValidGPS")+","+Eval("Acknowledged")+","+Eval("DeviceID")+","+Eval("Timestamp") %>'
                                                                                                OnClientClick="javascript:return false;" Style="width: 50px; text-decoration: none; cursor: move; word-wrap: break-word">                                                        
                                                                                            </asp:LinkButton>
                                                                                            <asp:Label ID="lblImagePacketType" runat="server" Text='<%# Eval("ImagePacketType") %>'
                                                                                                Visible='<%# Eval("CamData").ToString() == "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='<%# Eval("CamData").ToString()== "Null" && Eval("ImgStatus").ToString() != "0"  ? true : false %>'
                                                                                                ImageUrl='~/images/Img_cameraNo.png' />
                                                                                            <asp:ImageButton ID="btnShowImage" runat="server" AlternateText="Show Image" ToolTip='<%# Eval("ImgStatus").ToString() == "0"? "Show Image":"Image not fully loaded"%>'
                                                                                                ImageUrl='<%# Eval("ImgStatus").ToString() == "0"?"~/images/Img_camera.png":"../Images/Img_camera_Broken.png"%>'
                                                                                                CommandName="CameraCommand" CommandArgument='<%# Eval("CamData") %>' Visible='<%# Eval("CamData").ToString() == "Null" ? false : true %>' />
                                                                                            <%--OnClientClick="ShowPopUp();"OnClick="btnShowImage_Click"--%>
                                                                                        </DataItemTemplate>
                                                                                    </dxw:GridViewDataTextColumn>
                                                                                    <dxw:GridViewDataTextColumn FieldName="Direction" VisibleIndex="9" Width="10%"
                                                                                        CellStyle-HorizontalAlign="Center">
                                                                                        <HeaderCaptionTemplate>
                                                                                            <span class="">
                                                                                                <asp:Image ID="imgDirectionIcon" runat="server" ImageUrl="..\Images\compass.png"
                                                                                                    AlternateText="" ImageAlign="middle" /></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" />
                                                                                <%-- <ClientSideEvents SelectionChanged="function(s, e) {OnGridSelectionChanged(); }"
                                                    EndCallback="function(s, e) { CheckMapItBoxes();SetDivPosition();}" />--%>
                                                                                <Settings ShowFilterRow="true" ShowFilterRowMenu="true" />
                                                                            </dxw:ASPxGridView>
                                                                        </div>
                                                                        <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter2" runat="server" GridViewID="gvHistorydtls"
                                                                            ReportHeader="{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}}
                                                                                                            \viewkind4\uc1\pard\qc\b\fs28 History Details    \par
                                                                                                            \pard\par
                                                                                                            \par
                                                                                                            }
                                                                                                            "
                                                                            OnDataBinding="ASPxGridViewExporter1_DataBinding" OnPreRender="ASPxGridViewExporter1_PreRender" OnRenderBrick="ASPxGridViewExporter1_RenderBrick">
                                                                            <PageFooter Right="[Page # of Pages #]">
                                                                            </PageFooter>
                                                                        </dxw:ASPxGridViewExporter>
                                                                    </div>
                                                                </ContentTemplate>
                                                                <Triggers>
                                                                    <asp:PostBackTrigger ControlID="abtPDFExportDetailsGrid" />
                                                                    <asp:PostBackTrigger ControlID="abtExcelExportDetailsGrid" />
                                                                </Triggers>
                                                            </asp:UpdatePanel>
                                                        </asp:Panel>
                                                    </div>
                                                </div>

                                            </asp:Panel>
                                            </asp:Panel>
                                                                <asp:HiddenField runat="server" ID="HiddenField1"></asp:HiddenField>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                    <div id="map-legend" class="mapLegendSplitScreen"
                                        style="right: 0px; height: auto; position: absolute; z-index: 100; margin-top: 90px; padding-top: 0px; float: right;">
                                    </div>
                                    <div class="col-sm-8 mapHistory">
                                        <div style="width: 100%;">
                                            <div id="map-dsply" style="width: 100%;" dir="ltr">
                                            </div>
                                        </div>
                                        <!-- Map Display -->

                                    </div>

                                </div>
                                <!-- row -->

                            </div>
                        </div>
                    </div>
                    <!-- Main Content Ends Here -->
                    <div id="left">
                    </div>
                    <div class="clear clearfix">
                    </div>
                </div>
                <div id="right">
                    <div class="clear clearfix">
                    </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="updLandmark" 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">
                            <%--<tr>
                            <td id="NotificationPnltopl" runat="server" class="top-l">&nbsp;
                            </td>
                            <td class="top-m">&nbsp;
                            </td>
                            <td id="NotificationPnltopr" runat="server" class="top-r">&nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td id="NotificationPnlLeft" runat="server" class="left">&nbsp;
                            </td>
                            <td>--%>
                            <div class="top">
                                <h1>
                                    <img src="../images/icn-landmark-name.gif" alt="" align="middle" />
                                    <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-content">
                                <div class="form-horizontal padding-width-lg-left">
                                    <div class="form-group">
                                        <div class="col-sm-3 col-lg-2">
                                            <asp:Label ID="lblLocationName" runat="server" Text="Location Name"></asp:Label>
                                            <span style="color: Red">*</span>
                                        </div>
                                        <div class="col-sm-5">
                                            <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 col-lg-2">
                                            <asp:Label ID="lblLocationDesc" runat="server" Text="Location Description"></asp:Label>
                                        </div>
                                        <div class="col-sm-5">
                                            <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 col-lg-2">
                                            <asp:Label ID="lblRadius" runat="server" Text="Radius"></asp:Label><span style="color: Red">*</span>
                                        </div>
                                        <div class="col-sm-5">
                                            <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 col-lg-2">
                                            <asp:Label ID="lblStreetAddr" runat="server" Text="Street Address"></asp:Label>
                                        </div>
                                        <div class="col-sm-5">
                                            <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 col-lg-2">
                                            <asp:Label ID="lblCategory" runat="server" Text="Category"></asp:Label>
                                        </div>
                                        <div class="col-sm-5">
                                            <asp:DropDownList runat="server" TabIndex="5" ID="ddlCategory" CssClass="form-control">
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3 col-lg-2"></div>
                                        <div class="col-sm-5">
                                            <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="MultilingualBtn"
                                                OnClientClick="document.getElementById('pnlNotificationsList').style.display = 'block';"
                                                OnClick="btnAddNotifictions_Click">
                                                <span id="Span6" runat="server" class="MultilingualBtnspan">
                                                    <div class="ManageNotification">
                                                        <div id="AddNotifictionsButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                            Manage Notifications
                                                        </div>
                                                    </div>
                                                </span>
                                            </asp:LinkButton>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-3 col-lg-2"></div>
                                        <div class="col-sm-5">
                                            <asp:ImageButton ID="btnLandMark1" runat="server" TabIndex="7" ImageUrl="~/images/btn-save.jpg"
                                                OnClientClick="if( ValidateLandmarkFields()) {ShowPopUp(); return true;} else{return false;}"
                                                OnClick="btnLandMark_Click" Text="Save" ValidationGroup="grp" Visible="false" />&nbsp;&nbsp;
                                        <asp:ImageButton runat="server" Text="Cancel" ID="imgCancel1" OnClientClick="return ClearLandmarkContents();"
                                            TabIndex="8" onkeydown="return setFocus(event,'txtLocationName');" ImageUrl="~/images/btn-cancel.jpg"
                                            Visible="false" />
                                            <asp:LinkButton ID="btnLandMark" runat="server" CssClass="MultilingualBtn" OnClientClick="if( ValidateLandmarkFields()) {ShowPopUp(); return true;} else{return false;}"
                                                OnClick="btnLandMark_Click" ValidationGroup="grp">
                                                <span id="Span7" runat="server" class="MultilingualBtnspan">
                                                    <div class="Save">
                                                        <div id="SaveButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                            Save
                                                        </div>
                                                    </div>
                                                </span>
                                            </asp:LinkButton>&nbsp;&nbsp;
                                        <asp:LinkButton ID="imgCancel" runat="server" CssClass="MultilingualBtn" OnClientClick="return ClearLandmarkContents();">
                                            <span id="Span8" runat="server" class="MultilingualBtnspan">
                                                <div class="Cancel">
                                                    <div id="CancelButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                        Cancel
                                                    </div>
                                                </div>
                                            </span>
                                        </asp:LinkButton>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <%--</td>
                            <td id="NotificationPnlRight" runat="server" class="right">&nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td id="NotificationPnlbottoml" runat="server" class="bottom-l">&nbsp;
                            </td>
                            <td class="bottom-m">&nbsp;
                            </td>
                            <td id="NotificationPnlbottomr" runat="server" class="bottom-r">&nbsp;
                            </td>
                        </tr>--%>
                        </div>
                    </asp:Panel>
                    <asp:Button ID="btn" runat="server" OnClick="DrawRoute" Style="visibility: hidden" />
                </ContentTemplate>
            </asp:UpdatePanel>

            <asp:UpdatePanel ID="updNotify" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Panel ID="pnlNotificationsList" runat="server" CssClass="notifyManagePanel col-xs-9">
                        <uc3:NotificationsList ID="ucNotificationList" runat="server" NotificationType="3" />
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>

            <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="progressPopUp"
                TargetControlID="btnTesting">
            </cc1:ModalPopupExtender>
            <asp:Button ID="btnTesting" Style="display: none;" runat="server" />
            <asp:Panel ID="progressPopUp" runat="server" CssClass="processMessage" Style="z-index: 1000; display: none;">
                <center>
                    <br />
                    <img id="imgLoad" 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>
            <input type="hidden" id="hdnInput" name="hdnInput" style="display: none" />
            <input type="hidden" id="hdnMapItValue" name="hdnMapItValue" runat="server" style="display: none" />
            <asp:HiddenField ID="hdnIsMapIt" runat="server" />
            <asp:HiddenField ID="hdnRefreshFrequency" runat="server" />

            <script type="text/javascript">

                var keyValue;
                function OnMoreInfoClick(element) {
                    //popup.ShowAtElement(element);
                    var pnlCategory = document.getElementById("pnlTripWindow");
                    pnlCategory.style.display = "block";

                }
                function popup_Shown(s, e) {
                    //popup.ShowAtPos(s, e);
                    var pnlCategory = document.getElementById("pnlTripWindow");
                    pnlCategory.style.display = "none";
                }

                //To openMap in Fullscreen Mode
                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 AlertSelectVehicle = 'Please select one or more vehicles.';
                function SetAlert(selectvehicle, Norefresh) {
                    AlertSelectVehicle = selectvehicle;
                    AlertNoAutoref = (Norefresh == null || Norefresh == '') ? AlertNoAutoref : Norefresh;
                }
                function gridSelectionValidationAlert() {
                    ClearOverlays();
                    TrinetraCustomAlerts(AlertSelectVehicle);
                }

                function MapItValues() {
                    //  alert(gvHistory.GetSelectedRowCount());
                    if (gvHistory.GetSelectedRowCount() != 0) {
                        if (gvHistory.GetSelectedRowCount() > 3) {
                            //TrinetraCustomAlerts("Please choose Maximum of 3 trips to MapIt.");
                            TrinetraCustomAlerts(Alert_MaximumTrips);
                            return false;
                        }
                    }
                    else {
                        //TrinetraCustomAlerts("Please choose atleast 1 trip to MapIt.");
                        TrinetraCustomAlerts(Alert_AtleastOneTrip);
                        return false;
                    }
                    ShowPopUp();

                }

                function popUpAdvancedSearch(PanelStatus) {
                    if (document.getElementById('pnlTripWindow') != null) {
                        if (PanelStatus == 1)
                            document.getElementById('pnlTripWindow').style.display = "inline-block";
                        else
                            document.getElementById('pnlTripWindow').style.display = "none";
                    }
                }
            </script>

            <script type="text/javascript">
                var str;
                function SelChanged(s, e) {
                    if (!e.isSelected) {
                        alert("The record was unselected");
                    } else {

                        gvHistory.GetRowValues(e.visibleIndex, 'DeviceID', OnGridSelectionComplete);

                    }
                }
                function OnGridSelectionComplete(values) {
                    str = "Customer Id: " + values[0];
                    document.getElementById('hdnAlarmIDs').value = str;
                }
            </script>

            <script src="../js/FormValidations.js" type="text/javascript"></script>

            <%-- <script src="http://jsapi.lbsp.navteq.com/v1/jsl.js" type="text/javascript" charset="utf-8"></script>

        <script language="javascript" type="text/javascript" src="../js/Map_NavTeq1.js"></script>--%>

            <script type="text/javascript" language="javascript" src="../js/HistoryScript.js"></script>

            <script type="text/javascript" src="../js/GridCheckBoxMaintaining.js"></script>

            <%--  <script language="javascript" type="text/javascript" src="../js/Map_Google.js"></script>

        <script type="text/javascript" src="../js/Elabel.js"></script>

        <script type="text/javascript" src="../js/HtmlControl.js"></script>--%>

            <script language="javascript" type="text/javascript" src="../js/Threading.js"></script>

            <%--  <script language="javascript" type="text/javascript" src="../js/Clusterer2.js"></script>

        <script language="javascript" type="text/javascript" src="../js/BDCCPolyline.js"></script>--%>

            <%--   <script language="javascript" type="text/javascript" src="../js/DateValidations.js"></script>--%>

            <asp:HiddenField ID="hdnLogout" runat="server" />

        </form>
    </div>
    <uc2:Footer ID="ucFooter" runat="server" />
</body>
</html>
