<%@ page language="C#" autoeventwireup="true" inherits="Forms_GarminMaster, App_Web_4uopfcmr" %>

<%@ OutputCache Duration="20" VaryByParam="None" Location="Client" NoStore="true" %>
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="MKB" %>
<%@ 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.v8.2" Namespace="DevExpress.Web.ASPxPopupControl"
    TagPrefix="dxpc" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxTreeList.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1"
    Namespace="DevExpress.Web.ASPxTreeList" TagPrefix="dxwtl" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dxwgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dxgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2.Export" Namespace="DevExpress.Web.ASPxGridView.Export"
    TagPrefix="exp" %>--%>

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>tSense-IoT Manage Garmin</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0)" />
    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0)" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <link runat="server" id="multiselect" href="../css/jquery.multiselect.css" rel="stylesheet"
        type="text/css" />
    <link runat="server" id="multifilter" href="../css/jquery.multiselect.filter.css"
        rel="stylesheet" type="text/css" />
    <link runat="server" id="JQ" href="../css/jquery-ui.css" rel="stylesheet" type="text/css" />

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

    <script type="text/javascript" src="../js/jquery-ui.min_MultiSelectDrpLst.js"></script>

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

    <script type="text/javascript" src="../js/jquery.multiselect.filter.js"></script>

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

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

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

    <script type="text/javascript" src="../js/jquery-ui-1.8.13.custom.min.js"></script>

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

    <link id="reset" runat="server" href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link id="stylesheet2" runat="server" href="../css/stylesheet2.css" rel="stylesheet"
        type="text/css" />
    <link id="updatedcss" runat="server" href="../css/Updated_css.css" rel="stylesheet"
        type="text/css" />
    <link id="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link id="uidatepicker" 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" />

    <%--Custom Theme for DevEx 14.2--%>
    <link id="GridView" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/GridView/grid.css" rel="stylesheet" />
    <link id="Editors" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/Editors/styles.css" rel="stylesheet" />

    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <style type="text/css">
        .style1 {
            height: 30px;
        }
    </style>
    <%--********* 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>
    <div id="container" style="direction: ltr">
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScmMDT" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel ID="UpMDT" runat="server">
                <ContentTemplate>
                    <!-- 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 -->
                                <!-- Main Content Starts Here -->
                                <div id="content">
                                    <div class="content-wrap">
                                        <div id="top-content">
                                            <div id="heading">
                                                <img class="icon" src="../images/configuration-icon.jpg" alt="" />
                                                <h1>
                                                    <asp:Literal ID="lblConfigurationSetupCaption" Text="Configuration" runat="server"></asp:Literal>
                                                </h1>
                                                <asp:LinkButton ID="lnkHomeCaption" runat="server" Text="Home"></asp:LinkButton><span>&gt;</span><span><a
                                                    href="GarminMaster.aspx"><asp:Label ID="lblManageGarmin" Text="Manage Garmin" runat="server"></asp:Label></a></span>
                                            </div>
                                            <div id="control-box">
                                                <table border="0" cellpadding="0" cellspacing="0" id="control-tbl" width="100%">
                                                    <tr>
                                                        <td>
                                                            <div id="control-btn">
                                                                <table>
                                                                    <tr>
                                                                        <td colspan="4"></td>
                                                                        <td>
                                                                            <asp:ImageButton ID="ibtnBackToConfig" runat="server" CausesValidation="false" ImageUrl="~/images/btn-back-to-configuration.jpg"
                                                                                PostBackUrl="~/Forms/ConfigurationSetup.aspx" />
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div class="clear clearfix">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="clear clearfix">
                                    </div>
                                    <asp:Panel ID="pnlPlanInfo" runat="server" CssClass="ControlShow">
                                        <div class="form-box">
                                            <h1>
                                                <span class="icon">
                                                    <img src="../images/icn-maintenanceplan.png" alt="" /></span>Manage Garmin
                                            </h1>
                                            <div style="padding-left: 10px; padding-right: 10px; padding-top: 5px; padding-bottom: 5px;">
                                                <table border="0" cellpadding="0" cellspacing="0" class="form-tbl">
                                                    <tr>
                                                        <td>
                                                            <%-- <asp:Image ID="imgFleetIcon" runat="server" ImageUrl="../images/fleet-icon.gif" AlternateText="Fleet Name" />--%>
                                                            <asp:Label ID="lblFleet" Text="Fleet" runat="server"></asp:Label>
                                                            <asp:Label ID="lblFleetReq" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="ddlFleet" runat="server" AutoPostBack="true" onchange="ShowPopUp()"
                                                                Width="175px" OnSelectedIndexChanged="ddlFleet_SelectedIndexChanged">
                                                                <asp:ListItem Selected="True">- Select -</asp:ListItem>
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td></td>
                                                        <td valign="middle">
                                                            <%--<asp:Image ID="imgVehicleIcon" runat="server" ImageUrl="../images/vehicle-icon.gif" AlternateText="Vehicle" />--%>
                                                            <asp:Label ID="lblVehicle" runat="server" Text="Vehicle"></asp:Label>
                                                            <asp:Label ID="lblVehicleReq" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="ddlVehicle" AutoPostBack="true" runat="server" Width="175px"
                                                                OnSelectedIndexChanged="ddlVehicle_SelectedIndexChanged">
                                                                <asp:ListItem Selected="True" Value="-1">- Select -</asp:ListItem>
                                                            </asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr id="trCurrentVersion" runat="server">
                                                        <td valign="middle">
                                                            <asp:Label ID="lblSelectCmd" runat="server" Text="Command"></asp:Label>
                                                            <asp:Label ID="lblCommandReq" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList runat="server" ID="ddlCommands" OnSelectedIndexChanged="ddlCommands_SelectedIndexChanged"
                                                                Width="175px" DropDownStyle="DropDownList" AutoPostBack="true">
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td></td>
                                                        <td id="tdActionLabel" runat="server">
                                                            <asp:Label ID="lblAction" runat="server" Text="Action"></asp:Label>
                                                            <asp:Label ID="lblActionReq" runat="server" Text="*" ForeColor="Red"></asp:Label>
                                                        </td>
                                                        <td id="tdActionAddDelete" runat="server">
                                                            <asp:RadioButton ID="rdbAdd" runat="server" Text="Add" AutoPostBack="true" Checked="true"
                                                                onclick="ShowPopUp();" GroupName="Action" OnCheckedChanged="rdbAdd_CheckedChanged" />
                                                            <asp:RadioButton ID="rdbDelete" runat="server" Text="Delete" AutoPostBack="true"
                                                                onclick="ShowPopUp();" GroupName="Action" OnCheckedChanged="rdbDelete_CheckedChanged" />
                                                            <asp:RadioButton ID="rdbDeleteAll" runat="server" Text="Delete All" AutoPostBack="true"
                                                                onclick="ShowPopUp();" GroupName="Action" OnCheckedChanged="rdbDeleteAll_CheckedChanged"
                                                                Visible="false" />
                                                        </td>
                                                    </tr>
                                                    <tr id="trRouteorLandmark" runat="server" visible="false">
                                                        <td>Choose Route or Landmark
                                                        </td>
                                                        <td>
                                                            <asp:RadioButton ID="rdbRoute" runat="server" Text="Route" AutoPostBack="true" Checked="true"
                                                                onclick="ShowPopUp();" GroupName="Route" OnCheckedChanged="rdbRoute_CheckedChanged" Visible="false" />
                                                            <asp:RadioButton ID="rdbLandmark" runat="server" Text="Landmark" AutoPostBack="true"
                                                                onclick="ShowPopUp();" GroupName="Route" OnCheckedChanged="rdbLandmark_CheckedChanged" Visible="false" />
                                                        </td>
                                                        <td></td>
                                                        <td></td>
                                                        <td></td>
                                                    </tr>
                                                    <tr id="trLandmarks" runat="server">
                                                        <td>
                                                            <asp:Label ID="lblLandmark" runat="server" Text="Landmarks"></asp:Label>
                                                            <asp:Label ID="lblLandmarkReq" runat="server" Text="*" ForeColor="Red"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="ddlLandmarks" AutoPostBack="true" runat="server" Width="175px"
                                                                OnSelectedIndexChanged="ddlLandmarks_SelectedIndexChanged">
                                                            </asp:DropDownList>
                                                            <asp:ImageButton ID="lnkAdd" runat="server" ToolTip="Add LandMark" ImageUrl="../images/add-icon.gif"
                                                                CausesValidation="false" OnClick="lnkAdd_Click"></asp:ImageButton>
                                                        </td>
                                                        <td class="ControlHide">
                                                            <asp:Label ID="lblOr" runat="server" Text="[ Or ]" CssClass="ControlHide"></asp:Label>
                                                        </td>
                                                        <td valign="middle" class="ControlHide">
                                                            <asp:Label ID="lblAddressCaption" runat="server" Text="Street Address <span style='color:red'>*</span>"></asp:Label>
                                                        </td>
                                                        <td class="ControlHide">
                                                            <asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine" Width="200px" Height="50px"
                                                                onchange="getEmpLatLong(this.value);"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr id="trStopGarminAction" runat="server">
                                                        <td valign="middle">
                                                            <asp:Label ID="lblStopGarminAction" runat="server" Text="Stop Action"></asp:Label>
                                                            <asp:Label ID="lblStopGarminReq" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="ddlStopGarminAction" runat="server" align="Left" cellpadding="2"
                                                                Width="175px">
                                                            </asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr id="trSymbolComments" runat="server">
                                                        <td>
                                                            <asp:Label ID="lblSymbol" runat="server" Text="Symbol"></asp:Label>
                                                            <asp:Label ID="lblVehReq" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="ddlSymbol" runat="server" Width="175px">
                                                                <asp:ListItem Selected="True" Text="<- Select ->" Value="-1"></asp:ListItem>
                                                                <asp:ListItem Text="Hospital" Value="1"></asp:ListItem>
                                                                <asp:ListItem Text="School" Value="2"></asp:ListItem>
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td></td>
                                                        <td valign="middle" id="tdCommentLabel" runat="server">
                                                            <asp:Label ID="lblComments" runat="server" Text="Comments"></asp:Label>
                                                        </td>
                                                        <td width="50%" id="tdComments" runat="server">
                                                            <asp:TextBox ID="txtComments" runat="server" MaxLength="195" onpaste="return false;"
                                                                ondrop="return false;" TextMode="MultiLine" Width="200px" Height="50px" onblur="return disallowScriptTags(this);"
                                                                onkeypress="return chkAlphaNumericWithSpace(event,this,194);"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr id="trGarminMessage" runat="server">
                                                        <td>
                                                            <asp:Label ID="lblMsgType" runat="server" Text="Alert Message"></asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:RadioButtonList ID="rdbMsgType" runat="server" RepeatDirection="Horizontal">
                                                                <asp:ListItem Text="Yes" Value="1"></asp:ListItem>
                                                                <asp:ListItem Selected="True" Text="No" Value="0"></asp:ListItem>
                                                            </asp:RadioButtonList>
                                                        </td>
                                                        <td></td>
                                                        <td valign="middle" id="tdMessagesLabel" runat="server">
                                                            <asp:Label ID="lblMessages" runat="server" Text="Message"></asp:Label>
                                                        </td>
                                                        <td width="50%" id="tdMessages" runat="server">
                                                            <asp:TextBox ID="txtGarminMessage" runat="server" MaxLength="160" onpaste="return false;"
                                                                ondrop="return false;" TextMode="MultiLine" Width="250px" Height="50px" onblur="return disallowScriptTags(this);"
                                                                onkeypress="return chkAlphaNumericWithSpace(event,this,159);"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr id="trMDTMsgTable" runat="server">
                                                        <td class="label">
                                                            <asp:Label ID="lblMsgTableType" CssClass="MDTfont" runat="server" Text="Message Type"></asp:Label>
                                                        </td>
                                                        <td class="dropdown">
                                                            <asp:RadioButton ID="rbtServerMsg" CssClass="MDTfont" runat="server" Text="Server to Device"
                                                                GroupName="gpMDTMsgTableType" Checked="true" onclick="ShowPopUp();" OnCheckedChanged="rbtServerMsg_CheckedChanged"
                                                                AutoPostBack="true"></asp:RadioButton>
                                                            <asp:RadioButton ID="rbtDeviceMsg" CssClass="MDTfont" runat="server" Text="Device to Server"
                                                                GroupName="gpMDTMsgTableType" onclick="ShowPopUp();" OnCheckedChanged="rbtDeviceMsg_CheckedChanged"
                                                                AutoPostBack="true"></asp:RadioButton>
                                                        </td>
                                                    </tr>
                                                    <tr id="trMDTMsgTableOpr" runat="server">
                                                        <td class="label">
                                                            <asp:Label ID="lblMDTMsgTableOpr" CssClass="MDTfont" runat="server" Text="Operation"></asp:Label>
                                                        </td>
                                                        <td class="dropdown">
                                                            <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                                <tr>
                                                                    <td>
                                                                        <asp:RadioButton ID="rbtAddMDTMsg" CssClass="MDTfont" runat="server" Text="Add" GroupName="gpMDTMsgTableOpr"
                                                                            Checked="true" OnCheckedChanged="rbtAddMDTMsg_CheckedChanged" AutoPostBack="true"></asp:RadioButton>
                                                                    </td>
                                                                    <td>
                                                                        <asp:RadioButton ID="rbtDeleteMDTMsg" CssClass="MDTfont" runat="server" Text="Delete"
                                                                            GroupName="gpMDTMsgTableOpr" OnCheckedChanged="rbtDeleteMDTMsg_CheckedChanged"
                                                                            AutoPostBack="true"></asp:RadioButton>
                                                                    </td>
                                                                    <td>
                                                                        <asp:RadioButton ID="rbtDeleteMDTMsgTable" CssClass="MDTfont" runat="server" Text="Delete All"
                                                                            GroupName="gpMDTMsgTableOpr" AutoPostBack="true" OnCheckedChanged="rbtDeleteMDTMsgTable_CheckedChanged"></asp:RadioButton>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr id="trRoute" runat="server" visible="false">
                                                        <td>
                                                            <asp:Label ID="lblroute" runat="server" Text="Routes"></asp:Label>
                                                            <asp:Label ID="lblroutereq" runat="server" Text="*" ForeColor="Red"></asp:Label>
                                                        </td>
                                                        <td colspan="4">
                                                            <%--<asp:DropDownList ID="DropDownList1" AutoPostBack="true" runat="server" Width="175px"
                                                            OnSelectedIndexChanged="ddlLandmarks_SelectedIndexChanged">
                                                        </asp:DropDownList>--%>
                                                            <asp:ListBox ID="ddlRouteName" runat="server" SelectionMode="Multiple" onchange="return GetSelectedVehicles();" Width="200px"></asp:ListBox>
                                                            <%--<asp:DropDownList ID="ddlRouteName" runat="server">
                                                        </asp:DropDownList>--%>
                                                            <asp:ImageButton ID="imageroute" runat="server" ToolTip="Add Route" ImageUrl="../images/add-icon.gif"
                                                                CausesValidation="false" OnClick="lnkAddRoutes_Click"></asp:ImageButton>
                                                        </td>
                                                        <%--<td>
                                                        &nbsp;
                                                    </td>
                                                    <td valign="middle">
                                                        &nbsp;
                                                    </td>
                                                    <td>
                                                        &nbsp;
                                                    </td>--%>
                                                    </tr>

                                                    <script type="text/javascript">

                                                        function GetSelectedVehicles() {

                                                            document.getElementById('hdnCondition').value = '';
                                                            document.getElementById('HdnEnterkey').value = '';

                                                            var array_of_checked_values = $("select").multiselect("getChecked").map(function () {
                                                                return this.value;
                                                            }).get();
                                                            for (var i = 0; i < $("select").multiselect("getChecked").length; i++) {
                                                                if (document.getElementById('HdnEnterkey').value == '')
                                                                    document.getElementById('HdnEnterkey').value = $("select").multiselect("getChecked")[i].title;
                                                                else
                                                                    document.getElementById('HdnEnterkey').value = document.getElementById('HdnEnterkey').value + "," + $("select").multiselect("getChecked")[i].title;
                                                            }
                                                            document.getElementById('hdnCondition').value = array_of_checked_values;
                                                        }

                                                        function retainSelectedVehicles() {
                                                            if (document.getElementById("hdnIsRefresh") != null) {
                                                                document.getElementById("hdnIsRefresh").value = "1";
                                                            }
                                                        }

                                                        //Initial bind
                                                        $(document).ready(function () {
                                                            //BindEvents();
                                                            for (var i = 0; i < $("select").length; i++) {
                                                                if ($("select")[i].id == 'ddlRouteName')
                                                                    $($("select")[i]).multiselect().multiselectfilter();
                                                            }
                                                            // //Re-bind for callbacks
                                                            var prm = Sys.WebForms.PageRequestManager.getInstance();
                                                            prm.add_endRequest(function () {
                                                                for (var i = 0; i < $("select").length; i++) {
                                                                    if ($("select")[i].id == 'ddlRouteName') {
                                                                        $($("select")[i]).multiselect().multiselectfilter();
                                                                        //document.getElementById('hdnCountCheck').value = '0';
                                                                    }
                                                                }
                                                            });
                                                        });

                                                    </script>

                                                    <tr id="trMDTMsg" runat="server">
                                                        <td colspan="10">
                                                            <asp:Panel ID="pnlSendMsgcmd" runat="server">
                                                                <div id="grid-dsply">
                                                                    <div id="top">
                                                                        <div class="left-col">
                                                                            <h1>
                                                                                <span class="icon">
                                                                                    <img src="../images/Icn_PreCannedDetails.png" alt="" style="padding-top: 5px;" />
                                                                                </span>
                                                                                <asp:Label ID="Label1" runat="server" Text="Select message(s)"></asp:Label>
                                                                                <span style="padding-left: 150px"></span>
                                                                                <asp:Label ID="lblMsgDes" ForeColor="Red" runat="server" Text="Note: Maximum 5 messages can be sent at a time"></asp:Label>
                                                                            </h1>
                                                                        </div>
                                                                        <div class="right-col">
                                                                            <asp:ImageButton ID="ibtnAddMsg" runat="server" ImageUrl="~/images/btn_AddMsg.png"
                                                                                OnClick="ibtnAddMsg_Click" />
                                                                        </div>
                                                                    </div>
                                                                    <dxw:ASPxGridView ID="gvPreCannedMsgs" runat="server" Width="100%" KeyFieldName="PrecannedMsgId"
                                                                        ClientInstanceName="gvPreCannedMsgs" SettingsPager-Mode="ShowPager"
                                                                        CssFilePath="~/App_Themes/Office2003Blue/GridView/styles.css" CssPostfix="Office2003_Blue"
                                                                        EnableTheming="true" Theme="Office2003Blue" OnCustomJSProperties="gvPreCannedMsgs_CustomJSProperties">
                                                                        <%--<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>--%>
                                                                        <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"
                                                                            PageSize="5">
                                                                        </SettingsPager>
                                                                        <Columns>
                                                                            <dxw:GridViewDataTextColumn Width="5%" Caption="Services">
                                                                                <HeaderCaptionTemplate>
                                                                                    <asp:CheckBox ID="chkSelectAllMsgs" ToolTip="Select all in the current page" runat="server"
                                                                                        onclick="DevExpressGridCheckAll(1,'gvPreCannedMsgs');" Text="" />
                                                                                </HeaderCaptionTemplate>
                                                                                <DataItemTemplate>
                                                                                    <asp:CheckBox ID="chkMsgs" runat="server" Enabled='<%# Convert.ToBoolean(Eval("IsExceedMsgs")) %>'
                                                                                        Checked='<%# Convert.ToBoolean(Eval("Isselect")) %>' onclick="CheckListOfServiceIDs(this, 'hdnSelectedMsgIds','hdnMsgId',1);DevExpressGridCheckOrUnCheckSelectAll(1);" />
                                                                                </DataItemTemplate>
                                                                                <HeaderStyle Paddings-PaddingTop="1" Paddings-PaddingBottom="1" HorizontalAlign="Center" />
                                                                                <CellStyle HorizontalAlign="Center">
                                                                                </CellStyle>
                                                                            </dxw:GridViewDataTextColumn>
                                                                            <dxw:GridViewDataColumn FieldName="MsgName" Caption="MDTMessage" Width="70%">
                                                                                <HeaderCaptionTemplate>
                                                                                    <table cellpadding="0" cellspacing="0" border="0">
                                                                                        <tr>
                                                                                            <td style="height: 20px; padding-top: 5px">
                                                                                                <asp:Label ID="lblMsgName" runat="server" Text="Message"></asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
                                                                                </HeaderCaptionTemplate>
                                                                                <DataItemTemplate>
                                                                                    <asp:HiddenField ID="hdnMsgId" runat="server" Value='<%# Eval("PrecannedMsgId")+"-"+Eval("MsgName") %>' />
                                                                                    <asp:Label ID="lblMDTMessage" runat="server" Text='<%# Eval("MsgName") %>' />
                                                                                </DataItemTemplate>
                                                                                <Settings AllowAutoFilter="True" />
                                                                            </dxw:GridViewDataColumn>
                                                                        </Columns>
                                                                        <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                                                                        <SettingsText EmptyDataRow=" No Precanned Messages found" />
                                                                    </dxw:ASPxGridView>
                                                                </div>
                                                            </asp:Panel>
                                                        </td>
                                                    </tr>
                                                    <tr id="trAutoStop" runat="server">
                                                        <td>
                                                            <asp:Label ID="Label2" runat="server" Text="Stop Time"></asp:Label>
                                                            <asp:Label ID="Label4" runat="server" ForeColor="Red">*</asp:Label>
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="ddlStopTime" runat="server" Width="175px">
                                                                <asp:ListItem Text="30 secs" Value="30" Selected="True"></asp:ListItem>
                                                                <asp:ListItem Text="1 mins" Value="60"></asp:ListItem>
                                                                <asp:ListItem Text="2 mins" Value="120"></asp:ListItem>
                                                                <asp:ListItem Text="4 mins" Value="240"></asp:ListItem>
                                                                <asp:ListItem Text="6 mins" Value="360"></asp:ListItem>
                                                                <asp:ListItem Text="8 mins" Value="480"></asp:ListItem>
                                                                <asp:ListItem Text="10 mins" Value="600"></asp:ListItem>
                                                                <asp:ListItem Text="30 mins" Value="1800"></asp:ListItem>
                                                                <asp:ListItem Text="1 hrs" Value="3600"></asp:ListItem>
                                                                <asp:ListItem Text="2 hrs" Value="7200"></asp:ListItem>
                                                                <asp:ListItem Text="4 hrs" Value="14400"></asp:ListItem>
                                                                <asp:ListItem Text="6 hrs" Value="21600"></asp:ListItem>
                                                                <asp:ListItem Text="8 hrs" Value="28800"></asp:ListItem>
                                                                <asp:ListItem Text="10 hrs" Value="36000"></asp:ListItem>
                                                            </asp:DropDownList>
                                                        </td>
                                                        <td></td>
                                                        <td valign="middle" id="td1" runat="server">
                                                            <asp:Label ID="Label7" runat="server" Text="Stop Distance"></asp:Label>
                                                        </td>
                                                        <td width="50%" id="td2" runat="server">
                                                            <asp:TextBox ID="txtStopDistance" runat="server" Width="100px" MaxLength="10" onkeypress="return chkNumeric_only(event);">
                                                            </asp:TextBox>
                                                            &nbsp; (meters)
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="5" style="height: 10px">&nbsp;
                                                        </td>
                                                    </tr>
                                                    <tr id="trMandatory" runat="server">
                                                        <%--<td>
                                                    </td>--%>
                                                        <td colspan="3">
                                                            <asp:Label ID="Label3" runat="server" ForeColor="Red">*</asp:Label>&nbsp;
                                                        <asp:Label ID="lblIndicatesMandatory" runat="server">Required fields</asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr id="trUpdateButton" runat="server">
                                                        <td colspan="4" align="left">
                                                            <asp:ImageButton ID="btnUpgrade" runat="server" ImageUrl="~/images/btn-send-command.jpg"
                                                                OnClientClick="return ValidateGarminMaster();ShowPopUp();" Text="Send Command"
                                                                OnClick="ibtnSendCmd_Click" />
                                                            <asp:ImageButton ID="btnScheduleCommands" runat="server" ImageUrl="~/images/schedule-a-command.png"
                                                                OnClick="btnScheduleCommands_Click"></asp:ImageButton>
                                                            <asp:ImageButton ID="lbtnScheduleListing" runat="server" ImageUrl="~/images/btn-view-schedules.png"
                                                                OnClientClick="window.location.href='../Forms/SchedulingOfCommands.aspx'"></asp:ImageButton>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="5">
                                                            <asp:Panel ID="pnlScheduleCmds" runat="server" Visible="false">
                                                                <tr>
                                                                    <td>
                                                                        <p style="white-space: nowrap">
                                                                            <asp:Label ID="lblToCaption" runat="server" Text="Retries Period"></asp:Label>
                                                                            <asp:Label ID="lblEffectiveTillMandatory" runat="server" ForeColor="Red">*</asp:Label>
                                                                        </p>
                                                                    </td>
                                                                    <td>
                                                                        <asp:DropDownList ID="ddlRetriesTime" runat="server">
                                                                            <asp:ListItem Text="1 Day" Value="1" Selected="True"></asp:ListItem>
                                                                            <asp:ListItem Text="3 Days" Value="3"></asp:ListItem>
                                                                            <asp:ListItem Text="7 Days" Value="7"></asp:ListItem>
                                                                        </asp:DropDownList>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td colspan="2">
                                                                        <asp:Label ID="Label5" runat="server" ForeColor="Red">*</asp:Label>&nbsp;
                                                                    <asp:Label ID="Label6" runat="server">Required Fields</asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td class="label"></td>
                                                                    <td class="dropdown">
                                                                        <asp:ImageButton ID="ibtnSaveSchedules" runat="server" ImageUrl="~/images/schedule.png"
                                                                            OnClientClick="return ValidateGarminMaster();ShowPopUp();" OnClick="ibtnSaveSchedules_Click"></asp:ImageButton>
                                                                        <asp:ImageButton ID="ibtnCancel" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                            OnClick="ibtnCancel_Click" />
                                                                    </td>
                                                                </tr>
                                                            </asp:Panel>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <div id="divMsg" runat="server">
                                            </div>
                                        </div>
                                    </asp:Panel>
                                    <dxw:ASPxPopupControl ID="popup" runat="server" Width="525px" Height="80px" AllowDragging="True"
                                        Border-BorderColor="#99BBE8" BackColor="#dfe9f5" HeaderText="" EnableDefaultAppearance="False"
                                        ShowCloseButton="true" CloseAction="CloseButton" PopupHorizontalAlign="OutsideLeft"
                                        Top="150">
                                        <ContentStyle CssClass="content">
                                        </ContentStyle>
                                        <ContentCollection>
                                            <dxw:PopupControlContentControl runat="server">
                                                <asp:Panel runat="server" ID="pnlAddMessages" Style="width: 100%; background-color: #DFE9F5;">
                                                    <table cellpadding="0" cellspacing="0" width="99%" 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="Add Precanned Messages"></asp:Label>
                                                                    </h1>
                                                                    <div class="clear clearfix">
                                                                    </div>
                                                                </div>
                                                                <div class="popup-cont">
                                                                    <table cellpadding="0" cellspacing="0" border="0" class="form-tbl">
                                                                        <tr>
                                                                            <td>
                                                                                <asp:Label ID="lblCannedMessageType" CssClass="MDTfont" runat="server" Text="Message Type"></asp:Label>
                                                                            </td>
                                                                            <td width="35%">
                                                                                <asp:RadioButton ID="rbtAddServerMsg" CssClass="MDTfont" runat="server" onclick="return true;"
                                                                                    Text="Server to Device" GroupName="gpMDTMsgTableTypeAdd" Checked="true"></asp:RadioButton>
                                                                            </td>
                                                                            <td>
                                                                                <asp:RadioButton ID="rbtAddDeviceMsg" CssClass="MDTfont" runat="server" onclick="return true;"
                                                                                    Text="Device to server" GroupName="gpMDTMsgTableTypeAdd"></asp:RadioButton>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                <asp:Label ID="lblCannedMsg" runat="server" CssClass="MDTfont" Text="Pre-canned Message"></asp:Label>
                                                                            </td>
                                                                            <td>
                                                                                <asp:TextBox ID="txtCannedMsg" runat="server" TextMode="MultiLine" MaxLength="40"
                                                                                    onkeypress="return chkAlphaNumericWithSpace(event,this,39);" onpaste="return false"></asp:TextBox>
                                                                            </td>
                                                                            <td>
                                                                                <asp:ImageButton ID="ibtnSaveMsg" OnClientClick="return ValidateMsgInputs();ShowPopUp();"
                                                                                    Style="padding-top: 5px" OnClick="ibtnSaveMsg_Click" runat="server" ImageUrl="~/images/btn-save.jpg" />
                                                                                <asp:ImageButton ID="ibtnCancelMsg" OnClientClick="return true;" runat="server" ImageUrl="~/images/btn-cancel.jpg" />
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </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>
                                                    </table>
                                                </asp:Panel>
                                            </dxw:PopupControlContentControl>
                                        </ContentCollection>
                                        <Border BorderColor="#99BBE8" />
                                    </dxw:ASPxPopupControl>
                                    <asp:Timer ID="tmrCheck" runat="server" Enabled="false" OnTick="tmrCheck_Tick">
                                    </asp:Timer>
                                    <div class="clear clearfix">
                                    </div>
                                    <asp:Panel ID="pnlAssignedLandmark" runat="server">
                                        <div id="grid-dsply">
                                            <div id="top">
                                                <div class="left-col">
                                                    <span class="icon" style="padding-top: 3px">
                                                        <asp:Image ID="imgAssignGeozone" runat="server" ImageUrl="../images/icn-assign-geozone.gif" />
                                                    </span><span class="txt">
                                                        <asp:Label ID="lblAssignedGeozones" Text="Assigned Landmarks" runat="server"></asp:Label>
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                                                </div>
                                                <div class="right-col">
                                                    <asp:ImageButton ID="ibtnReferesh" runat="server" ImageUrl="../images/Refresh.png"
                                                        AlternateText="Refresh" ToolTip="Refresh" OnClick="ibtnReferesh_Click" Style="vertical-align: middle"
                                                        OnClientClick="ShowPopUp();" />
                                                </div>
                                                <div class="clear clearfix">
                                                </div>
                                            </div>
                                            <cc1:TabContainer ID="tcGarminContainer" runat="server" AutoPostBack="false" class="form-box">
                                                <cc1:TabPanel ID="tpStopMessages" runat="server" HeaderText="View Stops">
                                                    <HeaderTemplate>
                                                        Stops
                                                    </HeaderTemplate>
                                                    <ContentTemplate>
                                                        <dxw:ASPxGridView ID="gvStops" ClientInstanceName="gvStops" runat="server" Width="100%" AutoGenerateColumns="False"
                                                            KeyFieldName="LandmarkId" CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" CssPostfix="Office2003_Blue"
                                                            EnableTheming="true" Theme="Office2003Blue">
                                                            <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="250" />
                                                            <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                            <CollapsedButton Height="12px" Url="~/App_Themes/Office2  003 Blue/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>--%>
                                                            <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>
                                                            <Columns>
                                                                <dxw:GridViewDataTextColumn Caption="LandMark Name" FieldName="LandmarkName" VisibleIndex="3"
                                                                    Width="12%">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ImageUrl="../images/landmark-icon.gif" ImageAlign="top" AlternateText=""
                                                                                runat="server" ID="imgLandmarkName" /></span>
                                                                        <asp:Label ID="lblLandmarkName" runat="server" CssClass="label" Text="Landmark Name"></asp:Label>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="Description" FieldName="Description" VisibleIndex="4"
                                                                    Visible="false" Width="13%">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ImageUrl="../images/icn-description.gif" ImageAlign="top" AlternateText=""
                                                                                runat="server" ID="imgLandmarkDesc" /></span>
                                                                        <asp:Label ID="lblLandmarkDescCaption" runat="server" CssClass="label" Text="Description"></asp:Label>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="StreetAddress" FieldName="StreetAddress" Width="19%"
                                                                    CellStyle-Wrap="True" VisibleIndex="5">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ImageUrl="../images/icn-address.gif" ImageAlign="top" AlternateText=""
                                                                                ID="imgStreetAddressCaption" runat="server" /></span>
                                                                        <asp:Label Text="Street Address" CssClass="label" ID="lblAddressCaption" runat="server"></asp:Label>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="Status" FieldName="Status" Width="19%" VisibleIndex="5"
                                                                    CellStyle-Wrap="True">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ImageUrl="../images/icn-status.gif" ImageAlign="top" AlternateText=""
                                                                                ID="imgGrdStatus" runat="server" /></span>
                                                                        <asp:Label Text="Status" CssClass="label" ID="lblGrdStatus" runat="server"></asp:Label>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                            </Columns>
                                                            <Settings ShowStatusBar="Auto" ShowFilterRow="true" ShowFilterRowMenu="True" />
                                                            <SettingsText EmptyDataRow="No assigned landmarks matching to the search criteria" />
                                                        </dxw:ASPxGridView>
                                                    </ContentTemplate>
                                                </cc1:TabPanel>
                                                <cc1:TabPanel ID="tpWayPoints" runat="server" HeaderText="View Waypoints">
                                                    <HeaderTemplate>
                                                        Waypoints
                                                    </HeaderTemplate>
                                                    <ContentTemplate>
                                                        <dxw:ASPxGridView ID="gvWaypoints" ClientInstanceName="gvWaypoints" runat="server"
                                                            Width="100%" AutoGenerateColumns="False" KeyFieldName="LandmarkId"
                                                            CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" CssPostfix="Office2003_Blue"
                                                            EnableTheming="true" Theme="Office2003Blue">
                                                            <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="250" />
                                                            <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                            <CollapsedButton Height="12px" Url="~/App_Themes/Office2  003 Blue/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>--%>
                                                            <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>
                                                            <Columns>
                                                                <dxw:GridViewDataTextColumn Caption="LandMark Name" FieldName="LandmarkName" VisibleIndex="3"
                                                                    Width="12%">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ImageUrl="../images/landmark-icon.gif" ImageAlign="top" AlternateText=""
                                                                                runat="server" ID="imgLandmarkName" /></span>
                                                                        <asp:Label ID="lblLandmarkName" runat="server" CssClass="label" Text="Landmark Name"></asp:Label>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="Description" FieldName="Description" VisibleIndex="4"
                                                                    CellStyle-Wrap="True" Visible="false" Width="13%">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ImageUrl="../images/icn-description.gif" ImageAlign="top" AlternateText=""
                                                                                runat="server" ID="imgLandmarkDesc" /></span>
                                                                        <asp:Label ID="lblLandmarkDescCaption" runat="server" CssClass="label" Text="Description"></asp:Label>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="StreetAddress" FieldName="StreetAddress" Width="19%"
                                                                    VisibleIndex="5">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ImageUrl="../images/icn-address.gif" ImageAlign="top" AlternateText=""
                                                                                ID="imgStreetAddressCaption" runat="server" /></span>
                                                                        <asp:Label Text="Street Address" CssClass="label" ID="lblAddressCaption" runat="server"></asp:Label>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="Status" FieldName="Status" Width="19%" VisibleIndex="5"
                                                                    CellStyle-Wrap="True">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ImageUrl="../images/icn-status.gif" ImageAlign="top" AlternateText=""
                                                                                ID="imgGrdStatus" runat="server" /></span>
                                                                        <asp:Label Text="Status" CssClass="label" ID="lblGrdStatus" runat="server"></asp:Label>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                            </Columns>
                                                            <Settings ShowStatusBar="Auto" ShowFilterRow="true" ShowFilterRowMenu="True" />
                                                            <SettingsText EmptyDataRow="No assigned landmarks matching to the search criteria" />
                                                        </dxw:ASPxGridView>
                                                    </ContentTemplate>
                                                </cc1:TabPanel>
                                                <cc1:TabPanel ID="tpETA" runat="server" HeaderText="View Waypoints">
                                                    <HeaderTemplate>
                                                        View ETA
                                                    </HeaderTemplate>
                                                    <ContentTemplate>
                                                        <div id="divETA" runat="server">
                                                            <table class="form-tbl" border="0" cellpadding="0" cellspacing="0" width="100%">
                                                                <tr style="display: none">
                                                                    <td colspan="3"></td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <span class="label"><b>Last Queried Time</b></span>
                                                                    </td>
                                                                    <td align="left">
                                                                        <asp:Label ID="lblLastQueriedTime" runat="server"></asp:Label>
                                                                    </td>
                                                                    <td></td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <span class="label"><b>ETA</b></span>
                                                                    </td>
                                                                    <td align="left">
                                                                        <asp:Label ID="lblETA" runat="server"></asp:Label>
                                                                    </td>
                                                                    <td></td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <span class="label"><b>Distance</b></span>
                                                                    </td>
                                                                    <td align="left">
                                                                        <asp:Label ID="lblDistance" runat="server"></asp:Label>
                                                                    </td>
                                                                    <td align="left"></td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <span class="label"><b>Destination</b></span>
                                                                    </td>
                                                                    <td align="left">
                                                                        <asp:Label ID="lblETAAddress" runat="server"></asp:Label>
                                                                    </td>
                                                                    <td>
                                                                        <asp:ImageButton ID="imgMapit" runat="server" ImageUrl="~/images/btn-mapit.jpg" OnClick="imgMapit_Click" />
                                                                    </td>
                                                                    <td align="left"></td>
                                                                </tr>
                                                            </table>
                                                        </div>
                                                        <div id="divETAMsg" runat="server" align="center">
                                                            No Data Found
                                                        </div>
                                                    </ContentTemplate>
                                                </cc1:TabPanel>
                                                <cc1:TabPanel ID="tpHistory" runat="server" HeaderText="View Waypoints">
                                                    <HeaderTemplate>
                                                        Garmin History
                                                    </HeaderTemplate>
                                                    <ContentTemplate>
                                                        <asp:UpdatePanel ID="upGarminHistory" runat="server">
                                                            <ContentTemplate>
                                                                <asp:Panel ID="pnlGarminHistory" runat="server">
                                                                    <table border="0" cellpadding="0" cellspacing="0" id="Table1" width="90%">
                                                                        <tr>
                                                                            <td>
                                                                                <table cellpadding="0" cellspacing="0" id="control-form" border="0" width="100%">
                                                                                    <tr>
                                                                                        <td style="vertical-align: middle">
                                                                                            <asp:Image ID="imgDurationFrom" runat="server" ImageUrl="../images/calendar-rht-icon.gif"
                                                                                                AlternateText="Duration From" /><asp:HiddenField runat="server" ID="hdnDateFormat"
                                                                                                    Value="dd-MMM-yyyy" />
                                                                                            <span class="MDTfont">From</span>
                                                                                        </td>
                                                                                        <td style="vertical-align: middle">
                                                                                            <asp:TextBox ID="txtStartDate" runat="server" oncopy="return false" oncut="return false"
                                                                                                onkeydown="doCheckBackSpaceOrDelete()" onkeypress="return false" onpaste="return false"
                                                                                                CssClass="date" Width="70px" ToolTip="dd-MMM-yyyy"></asp:TextBox>
                                                                                        </td>
                                                                                        <td></td>
                                                                                        <td style="vertical-align: middle;">
                                                                                            <asp:DropDownList ID="ddlFromHours" runat="server" CssClass="time" onchange="CheckTimePicker(this,'tcGarminContainer_tpHistory_ddlFromAMPM');"
                                                                                                Width="50px">
                                                                                                <asp:ListItem>00</asp:ListItem>
                                                                                                <asp:ListItem>01</asp:ListItem>
                                                                                                <asp:ListItem>02</asp:ListItem>
                                                                                                <asp:ListItem>03</asp:ListItem>
                                                                                                <asp:ListItem>04</asp:ListItem>
                                                                                                <asp:ListItem>05</asp:ListItem>
                                                                                                <asp:ListItem>06</asp:ListItem>
                                                                                                <asp:ListItem>07</asp:ListItem>
                                                                                                <asp:ListItem>08</asp:ListItem>
                                                                                                <asp:ListItem>09</asp:ListItem>
                                                                                                <asp:ListItem>10</asp:ListItem>
                                                                                                <asp:ListItem>11</asp:ListItem>
                                                                                                <asp:ListItem>12</asp:ListItem>
                                                                                            </asp:DropDownList>
                                                                                        </td>
                                                                                        <td style="vertical-align: middle;" width="50px">
                                                                                            <asp:DropDownList ID="ddlFromAMPM" runat="server" CssClass="time" Width="50px">
                                                                                                <asp:ListItem>AM</asp:ListItem>
                                                                                                <asp:ListItem>PM</asp:ListItem>
                                                                                            </asp:DropDownList>
                                                                                        </td>
                                                                                        <td width="20px"></td>
                                                                                        <td style="vertical-align: middle">
                                                                                            <asp:Image ID="imgDurationTo" runat="server" ImageUrl="../images/calendar-lft-icon.gif"
                                                                                                AlternateText="Duration To" />
                                                                                            <span class="MDTfont">To</span>
                                                                                        </td>
                                                                                        <td style="vertical-align: middle">
                                                                                            <asp:TextBox ID="txtEndDate" runat="server" oncopy="return false" oncut="return false"
                                                                                                CssClass="date" onkeydown="doCheckBackSpaceOrDelete()" onkeypress="return false"
                                                                                                onpaste="return false" ToolTip="dd-MMM-yyyy" Width="70px"></asp:TextBox>
                                                                                        </td>
                                                                                        <td></td>
                                                                                        <td style="vertical-align: middle;">
                                                                                            <asp:DropDownList ID="ddlToHours" runat="server" Width="50px" CssClass="time" onchange="CheckTimePicker(this,'tcGarminContainer_tpHistory_ddlToAMPM');">
                                                                                                <asp:ListItem>00</asp:ListItem>
                                                                                                <asp:ListItem>01</asp:ListItem>
                                                                                                <asp:ListItem>02</asp:ListItem>
                                                                                                <asp:ListItem>03</asp:ListItem>
                                                                                                <asp:ListItem>04</asp:ListItem>
                                                                                                <asp:ListItem>05</asp:ListItem>
                                                                                                <asp:ListItem>06</asp:ListItem>
                                                                                                <asp:ListItem>07</asp:ListItem>
                                                                                                <asp:ListItem>08</asp:ListItem>
                                                                                                <asp:ListItem>09</asp:ListItem>
                                                                                                <asp:ListItem>10</asp:ListItem>
                                                                                                <asp:ListItem>11</asp:ListItem>
                                                                                                <asp:ListItem>12</asp:ListItem>
                                                                                            </asp:DropDownList>
                                                                                        </td>
                                                                                        <td style="vertical-align: middle;">
                                                                                            <asp:DropDownList ID="ddlToAMPM" runat="server" CssClass="time" Width="50px">
                                                                                                <asp:ListItem>AM</asp:ListItem>
                                                                                                <asp:ListItem>PM</asp:ListItem>
                                                                                            </asp:DropDownList>
                                                                                        </td>
                                                                                        <td style="vertical-align: middle;">
                                                                                            <asp:ImageButton ID="btnView" ImageUrl="~/images/btn-update-results.jpg" runat="server"
                                                                                                OnClick="btnView_Click" OnClientClick="ShowPopUp();" />
                                                                                        </td>
                                                                                        <td>&nbsp;
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                    <div id="grid-dsply">
                                                                        <div id="top">
                                                                            <div class="left-col">
                                                                                <h1>
                                                                                    <asp:Label ID="lblGarminHistory" runat="server" Text=""></asp:Label></h1>
                                                                            </div>
                                                                            <div class="right-col">
                                                                                <span class="dropdown">
                                                                                    <dxw:ASPxComboBox ID="dcExport" runat="server" ValueType="System.String" Width="80px" Height="20px"
                                                                                        ShowImageInEditBox="false" ItemImage-Height="12px" ClientInstanceName="ASPxCboExport" SelectedIndex="0"
                                                                                        CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                                        EnableTheming="true" Theme="Office2003Blue">
                                                                                        <Items>
                                                                                            <dxw:ListEditItem ImageUrl="../images/icn-pdf.jpg" Text="pdf" Value="pdf" />
                                                                                            <dxw:ListEditItem ImageUrl="../images/icn-excel.jpg" Text="xls" Value="xls" />
                                                                                            <dxw:ListEditItem ImageUrl="../images/icn-excel-xlsx.png" Text="xlsx" Value="xlsx" />
                                                                                            <dxw:ListEditItem ImageUrl="../images/icn-word.jpg" Text="rtf" Value="rtf" />
                                                                                            <%--<dxw:ListEditItem ImageUrl="../images/icn-csv.gif" Text="csv" Value="csv" />--%>
                                                                                        </Items>
                                                                                    </dxw:ASPxComboBox>
                                                                                </span><span class="txt">
                                                                                    <asp:ImageButton ID="btnExportHistory" runat="server" ImageUrl="~/images/btn-export.jpg"
                                                                                        OnClick="btnExportHistory_Click" />
                                                                                </span>
                                                                            </div>
                                                                        </div>
                                                                        <dxw:ASPxGridView ID="gvGarminHistory" ClientInstanceName="gvGarminHistory" runat="server" KeyFieldName="MessageInID"
                                                                            AutoGenerateColumns="False" Settings-ShowFilterRow="true" EnableViewState="true" Width="100%"
                                                                            CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" CssPostfix="Office2003_Blue"
                                                                            EnableTheming="true" Theme="Office2003Blue" OnDataBinding="gvGarminHistory_DataBinding">
                                                                            <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>
                                                                            <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">
                                                                                    <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="1" Caption="Name"
                                                                                    Width="14%">
                                                                                    <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="Latitude" VisibleIndex="0" Visible="False">
                                                                                    <DataItemTemplate>
                                                                                        <asp:Label ID="lblLatitude" runat="server" Text='<%# Eval("Latitude") %> '></asp:Label>
                                                                                    </DataItemTemplate>
                                                                                </dxw:GridViewDataTextColumn>
                                                                                <dxw:GridViewDataTextColumn FieldName="Longitude" VisibleIndex="0" Visible="False">
                                                                                    <DataItemTemplate>
                                                                                        <asp:Label ID="lblLongitude" runat="server" Text='<%# Eval("Longitude") %> '></asp:Label>
                                                                                    </DataItemTemplate>
                                                                                </dxw:GridViewDataTextColumn>
                                                                                <dxw:GridViewDataDateColumn FieldName="TimestampSort" VisibleIndex="2" Caption="Date & Time"
                                                                                    Width="13%">
                                                                                    <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="Date Time"></asp:Label></span>
                                                                                    </HeaderCaptionTemplate>
                                                                                    <DataItemTemplate>
                                                                                        <div class="DateStyle">
                                                                                            <asp:Label ID="lblDateTime" runat="server" Text='<%# Eval("TimestampDisp") %> '></asp:Label>
                                                                                        </div>
                                                                                    </DataItemTemplate>
                                                                                    <Settings ShowFilterRowMenu="False" />
                                                                                </dxw:GridViewDataDateColumn>
                                                                                <dxw:GridViewDataTextColumn FieldName="TimestampDisp" VisibleIndex="3" Caption="Date & Time"
                                                                                    Width="13%" Visible="false">
                                                                                    <HeaderCaptionTemplate>
                                                                                        <span class="icon">
                                                                                            <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="20%">
                                                                                    <HeaderCaptionTemplate>
                                                                                        <span class="icon">
                                                                                            <asp:Image ImageUrl="..\Images\address-icon.gif" AlternateText="" ImageAlign="top"
                                                                                                runat="server" ID="imgAddressIcon" /></span> <span class="label">
                                                                                                    <asp:Label ID="lblStreetAddressCaption" runat="server" Text="Address"></asp:Label></span>
                                                                                    </HeaderCaptionTemplate>
                                                                                    <DataItemTemplate>
                                                                                        <asp:Label ID="lblAddress" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Address")%>'></asp:Label>
                                                                                    </DataItemTemplate>
                                                                                </dxw:GridViewDataTextColumn>
                                                                                <dxw:GridViewDataTextColumn FieldName="Message" VisibleIndex="4" Visible="False">
                                                                                    <DataItemTemplate>
                                                                                        <asp:Label ID="lblMessage" runat="server" Text='<%# Eval("Message") %>'>
                                                                                        </asp:Label>
                                                                                    </DataItemTemplate>
                                                                                </dxw:GridViewDataTextColumn>
                                                                                <dxw:GridViewDataTextColumn FieldName="MessageDetails" VisibleIndex="4" Caption="Message Details"
                                                                                    Width="19%" CellStyle-Wrap="True">
                                                                                    <HeaderCaptionTemplate>
                                                                                        <span class="icon">
                                                                                            <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>
                                                                                        <asp:Label ID="lbtMsgDetails" runat="server" Text='<%# Eval("MessageDetails") %>'>
                                                                                        </asp:Label>
                                                                                    </DataItemTemplate>
                                                                                </dxw:GridViewDataTextColumn>
                                                                            </Columns>
                                                                            <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="200" />
                                                                            <SettingsText EmptyDataRow="No data matching to the search criteria" />
                                                                            <Settings ShowFilterRow="true" ShowFilterRowMenu="true" />
                                                                        </dxw:ASPxGridView>
                                                                        <dxw:ASPxGridViewExporter ID="agvExporter" runat="server" GridViewID="gvGarminHistory"
                                                                            ReportHeader="{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}}\viewkind4\uc1\pard\qc\b\fs28 History Details    \par\pard\par\par}">
                                                                            <PageFooter Right="[Page # of Pages #]">
                                                                            </PageFooter>
                                                                        </dxw:ASPxGridViewExporter>
                                                                    </div>
                                                                </asp:Panel>
                                                            </ContentTemplate>
                                                            <Triggers>
                                                                <asp:PostBackTrigger ControlID="btnExportHistory" />
                                                            </Triggers>
                                                        </asp:UpdatePanel>
                                                    </ContentTemplate>
                                                </cc1:TabPanel>
                                            </cc1:TabContainer>
                                            <div class="clear clearfix">
                                            </div>
                                            <%--<div class="form-box">
                                   <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                        <tr>
                                            <td width="80%">
                                            </td>
                                            <td width="20%" align="right">
                                                <div>
                                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                        <tr>
                                                            <td>
                                                                <asp:ImageButton ID="lnkUnassignGEozones" runat="server" ImageUrl="~/images/btn-unassign-geozones.jpg" />
                                                            </td>
                                                            <td valign="top">
                                                                <asp:ImageButton ID="btnSchedule_Unassign" runat="server" ImageUrl="~/images/add-schedule.png" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>--%>
                                            <div class="clear clearfix">
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </div>
                                <!-- Main Content Ends Here -->
                                <div id="left">
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div id="right">
                            </div>
                            <div class="clear clearfix">
                            </div>
                        </div>
                    </div>
                    <asp:HiddenField ID="hdnSelectedValue" runat="server" />
                    <asp:HiddenField ID="hdnCountCheck" runat="server" Value="0" />
                    <asp:HiddenField ID="hdnIsRefresh" runat="server" />
                    <asp:HiddenField ID="hdnCondition" runat="server" />
                    <asp:HiddenField ID="HdnEnterkey" runat="server" />
                    <asp:HiddenField ID="hdnLatitude" runat="server" />
                    <asp:HiddenField ID="hdnLongitude" runat="server" />
                    <asp:HiddenField ID="hdnCategory" runat="server" />
                    <asp:HiddenField ID="hdnAddressStatus" runat="server" />
                    <asp:HiddenField ID="hdnETALatitude" runat="server" />
                    <asp:HiddenField ID="hdnETALongitude" runat="server" />
                    <asp:HiddenField ID="hdnSelectedMsgIds" runat="server" />
                    <%--<cc1:ModalPopupExtender ID="mpeAddMsgLoad" runat="server" BackgroundCssClass="modalbackground"
                    PopupControlID="pnlAddMessages" TargetControlID="ibtnAddMsg" X="280" CancelControlID="ibtnCancelMsg">
                </cc1:ModalPopupExtender>--%>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="ddlLandmarks" />
                    <asp:AsyncPostBackTrigger ControlID="ddlStopGarminAction" />
                    <asp:AsyncPostBackTrigger ControlID="ddlFleet" />
                    <asp:AsyncPostBackTrigger ControlID="ddlVehicle" />
                    <asp:AsyncPostBackTrigger ControlID="rdbAdd" />
                    <asp:AsyncPostBackTrigger ControlID="rdbDelete" />
                    <asp:AsyncPostBackTrigger ControlID="rdbDeleteAll" />
                    <asp:AsyncPostBackTrigger ControlID="lnkAdd" />
                    <asp:AsyncPostBackTrigger ControlID="ibtnAddMsg" />
                </Triggers>
            </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 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>
        </form>
    </div>
    <uc2:Footer ID="ucFooter" runat="server" />

    <script language="javascript" type="text/javascript">
        function OpenNewWindow() {
            var latitude = document.getElementById("hdnETALaitude").value;
            var longitude = document.getElementById("hdnETALongitude").value;
            if (latitude.length != 0 && longitude.length != 0) {
                window.open('http://maps.google.co.in/?q=' + latitude + ',' + longitude + '')
            }
        }


        var keyValue;
        function OnMoreInfoClick(element) {
            popup.ShowAtElement(element);

        }
        function popup_Shown(s, e) {

            popup.ShowAtPos(s, e);
        }
        function ValidateMsgInputs() {

            var txtCannedMsg = document.getElementById("txtCannedMsg");
            if (RemoveSpaces(txtCannedMsg).length == 0) {
                alertMsg = 'Please enter the precanned message.';
                txtCannedMsg.style.backgroundColor = 'lightyellow';
                txtCannedMsg.focus();
            }
            else {
                txtCannedMsg.style.backgroundColor = 'white';
            }
        }
        function CheckListOfIDs(checkBoxItem, hiddenfieldname, ID) //selectAllCheckBox, checkbxPrefix, checkbxSufix)
        {
            var isIE = CheckBrowser();
            var hiddenField = document.getElementById(hiddenfieldname);
            var i = 2;
            var test = hiddenField.value.split(",");
            if ((test.length - 1) < 5) {
                if (Array.contains(test, ID)) {
                    if (!checkBoxItem.checked) {
                        Array.remove(test, ID);
                    }
                }
                else if (checkBoxItem.parentNode.getAttribute(isIE ? 'className' : 'class') != 'ControlHide') {
                    if (test[test.length - 1] == "") {
                        Array.insert(test, test.length - 1, ID);
                    }
                    else {
                        Array.add(test, ID);
                    }
                }
                hiddenField.value = test.join(",");
            }
            else {
                if (!checkBoxItem.checked) {
                    Array.remove(test, ID);
                    hiddenField.value = test.join(",");
                }
                else {
                    alert('Maximum 5 details can be select at a time.');
                    checkBoxItem.checked = false;
                }
            }
        }

        var gridName;
        var ControlPrefix; // Holds the Control prefix 
        var chkSingleControl; // Holds the Control Sufix
        var hdnIdHolder; // Holds the hidden field which contains the ID of the data key
        var hdnSelectedIDList; // Holds the hidden field to which the selected IDs has to be there
        var chkSelectAll // Holds the select all Check boxes.
        var schedulingControl; // Holds the control for scheduling
        var i = 0;
        function DevExpressGridCheckAll(type, gvName) {
            var pageIndex = 0;
            if (type == 1) {
                var gv = document.getElementById(gvName);
                if (gv != null) {
                    pageIndex = gvPreCannedMsgs.cpPageIndex * 5;
                    chkSelectAll = gvName + '_header0_chkSelectAllMsgs';
                    controlPrefix = gvName + '_cell';
                    chkSingleControl = '_0_chkMsgs';
                    hdnIdHolder = '_1_hdnMsgId';
                    hdnSelectedIDList = 'hdnSelectedMsgIds';
                }
            }
            var elementID = document.getElementById(chkSelectAll);
            var i = pageIndex;
            var str = controlPrefix + i + hdnIdHolder;
            var str1 = controlPrefix + i + chkSingleControl;
            var hiddenField = document.getElementById(controlPrefix + i + hdnIdHolder);
            var dataRowCheckBox = document.getElementById(controlPrefix + i + chkSingleControl);
            var hidden = document.getElementById(hdnSelectedIDList);
            while (dataRowCheckBox != null) {
                if (dataRowCheckBox.disabled) {
                    alert('Already this vehicle have 10 messages.');
                    elementID.checked = false;
                    break;
                }
                var test = hidden.value.split(",");
                if (((test.length - 1) < 5) || (elementID.checked == false)) {
                    dataRowCheckBox.checked = elementID.checked;
                    if ((hiddenField != null)) {
                        CheckListOfIDs(dataRowCheckBox, hdnSelectedIDList, hiddenField.value);
                    }
                    i++;
                    dataRowCheckBox = document.getElementById(controlPrefix + i + chkSingleControl);
                    hiddenField = document.getElementById(controlPrefix + i + hdnIdHolder);
                }
                else {
                    alert('Maximum 5 details can be select at a time.');
                    elementID.checked = false;
                    break;
                }
            }
        }
        function CheckListOfServiceIDs(checkBoxItem, hiddenfieldname, hdnName, type) //selectAllCheckBox, checkbxPrefix, checkbxSufix)
        {
            var isIE = CheckBrowser();
            var hiddenField = document.getElementById(hiddenfieldname);
            var i = 2;
            if (hdnName == "hdnUserId")
                var str = "chkUser";
            else
                str = "chkMsgs";
            var ID = document.getElementById(checkBoxItem.id.replace("_0_" + str, "_1_" + hdnName)).value;
            var test = hiddenField.value.split(",");
            if ((test.length - 1) < 5) {
                if (Array.contains(test, ID)) {
                    if (!checkBoxItem.checked) {
                        Array.remove(test, ID);
                    }
                }
                else if (checkBoxItem.parentNode.getAttribute(isIE ? 'className' : 'class') != 'ControlHide') {
                    if (test[test.length - 1] == "") {
                        Array.insert(test, test.length - 1, ID);
                    }
                    else {
                        Array.add(test, ID);
                    }
                }
                hiddenField.value = test.join(",");
            }
            else {
                if (!checkBoxItem.checked) {
                    Array.remove(test, ID);
                    hiddenField.value = test.join(",");
                }
                else {
                    alert('Maximum 5 details can be select at a time.');
                    checkBoxItem.checked = false;
                    return false;
                }
            }
        }


        function DevExpressGridCheckOrUnCheckSelectAll(type) {
            var isIE = CheckBrowser();

            if (type == 1) {
                chkSelectAll = 'gvPreCannedMsgs_header0_chkSelectAllMsgs';
                controlPrefix = 'gvPreCannedMsgs_cell'
                chkSingleControl = '_0_chkMsgs';
                hdnIdHolder = '_1_hdnMsgId';
                hdnSelectedIDList = 'hdnSelectedMsgIds';
            }

            var selectAllCheckbox = document.getElementById(chkSelectAll);
            var checkedItems = 0;
            var i = 0;
            var visibleCount = 0;
            var dataRowCheckbox = document.getElementById(controlPrefix + i + chkSingleControl);
            while (dataRowCheckbox != null) {

                if (dataRowCheckbox.parentNode.getAttribute(isIE ? 'className' : 'class') != 'ControlHide') {
                    visibleCount++;
                }
                if (dataRowCheckbox.checked) {
                    checkedItems++;
                }

                //        if (dataRowCheckbox.checked) checkedItems++;
                i++;
                dataRowCheckbox = document.getElementById(controlPrefix + i + chkSingleControl);
            }
            if (selectAllCheckbox != null) {
                if (checkedItems == visibleCount && visibleCount > 0) {//if (checkedItems == i) {
                    selectAllCheckbox.checked = true;
                }
                else {
                    selectAllCheckbox.checked = false;
                }
            }
        }
    </script>

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

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

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

</body>
</html>
<%--                            <div id="Div1">
                                <div id="Div2">
                                    <div class="left-col">
                                        <span class="icon" style="padding-top: 3px">
                                            <asp:Image ID="imgUnassGeozone" runat="server" ImageUrl="../images/icn-unassigned-geozone.gif" />
                                        </span><span class="txt">
                                            <asp:Label ID="lblUnassGeozones" Text="Unassigned Landmark" runat="server"></asp:Label>
                                            &nbsp;&nbsp; </span>
                                    </div>
                                    <asp:HiddenField ID="hdnGeozoneIdsToBeAssinged" runat="server" />
                                    <asp:HiddenField ID="hdnGeozoneNosToBeAssinged" runat="server" />
                                    <div class="clear clearfix">
                                    </div>
                                </div>
                                <dxw:ASPxGridView ID="gvAssignedGeozones" ClientInstanceName="gvAssigne" runat="server"
                                    CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" CssPostfix="Office2003_Blue"
                                    Width="100%" AutoGenerateColumns="False" KeyFieldName="LandmarkId">
                                    <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="100" />
                                    <ClientSideEvents SelectionChanged="function(s, e) { OnGridSelectionChangedUnAssign(); }" />
                                    <Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                        <CollapsedButton Height="12px" Url="~/App_Themes/Office2  003 Blue/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>
                                    <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>
                                    <Columns>
                                        <dxw:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Name="Checkbox"
                                            Width="3%">
                                            <HeaderTemplate>
                                                <input type="checkbox" onclick="gvAssigne.SelectAllRowsOnPage(this.checked);" style="vertical-align: middle;"
                                                    title="Select/Unselect all rows on the page"></input>
                                            </HeaderTemplate>
                                            <HeaderStyle Paddings-PaddingTop="1" Paddings-PaddingBottom="1" HorizontalAlign="Center" />
                                        </dxw:GridViewCommandColumn>
                                        <dxw:GridViewDataTextColumn Caption="LandMark Name" FieldName="LandMarkName" VisibleIndex="3"
                                            Width="12%">
                                            <HeaderCaptionTemplate>
                                                <span class="icon">
                                                    <asp:Image ImageUrl="../images/landmark-icon.gif" ImageAlign="top" AlternateText=""
                                                        runat="server" ID="imgLandmarkName" /></span>
                                                <asp:Label ID="lblLandmarkName" runat="server" CssClass="label" Text="Landmark Name"></asp:Label>
                                            </HeaderCaptionTemplate>
                                        </dxw:GridViewDataTextColumn>
                                        <dxw:GridViewDataTextColumn Caption="Description" FieldName="Description" VisibleIndex="4"
                                            Width="13%">
                                            <HeaderCaptionTemplate>
                                                <span class="icon">
                                                    <asp:Image ImageUrl="../images/icn-description.gif" ImageAlign="top" AlternateText=""
                                                        runat="server" ID="imgLandmarkDesc" /></span>
                                                <asp:Label ID="lblLandmarkDescCaption" runat="server" CssClass="label" Text="Description"></asp:Label>
                                            </HeaderCaptionTemplate>
                                        </dxw:GridViewDataTextColumn>
                                        <dxw:GridViewDataTextColumn Caption="StreetAddress" FieldName="StreetAddress" Width="19%"
                                            VisibleIndex="5">
                                            <HeaderCaptionTemplate>
                                                <span class="icon">
                                                    <asp:Image ImageUrl="../images/icn-address.gif" ImageAlign="top" AlternateText=""
                                                        ID="imgStreetAddressCaption" runat="server" /></span>
                                                <asp:Label Text="Street Address" CssClass="label" ID="lblAddressCaption" runat="server"></asp:Label>
                                            </HeaderCaptionTemplate>
                                        </dxw:GridViewDataTextColumn>
                                    </Columns>
                                    <Settings ShowStatusBar="Auto" ShowFilterRow="true" ShowFilterRowMenu="True" />
                                    <SettingsText EmptyDataRow="No assigned Geozones matching to the search criteria" />
                                </dxw:ASPxGridView>
                                <div class="clear clearfix">
                                </div>
                                <div class="form-box">
                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                        <tr>
                                            <td width="80%">
                                            </td>
                                            <td width="20%" align="right">
                                                <div>
                                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                        <tr>
                                                            <td>
                                                                <asp:ImageButton ID="lnkAssign" runat="server" ImageUrl="~/images/btn-assign-geozones.jpg" />
                                                            </td>
                                                            <td valign="top">
                                                                <asp:ImageButton ID="btnSchedule" runat="server" ImageUrl="~/images/add-schedule.png" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <div class="clear clearfix">
                            </div>--%>