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

<%@ 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.v14.2" Namespace="DevExpress.Web" TagPrefix="dxw" %>

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

<!DOCTYPE html>
<html lang="en">
<head id="Head1" runat="server">
    <title>tSense-IoT Route ETA</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <%--<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)" />--%>

    <link href="../css/CustomeAlert/demos.css" rel="stylesheet" type="text/css" />
    <link href="../css/CustomeAlert/themes/jquery.ui.all.css" rel="stylesheet" type="text/css" />
    <link id="reset" runat="server" href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link id="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 rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <link id="ieonly" runat="server" rel="stylesheet" type="text/css" href="" />

    <%--BootStrap Css--%>
    <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 Css--%>

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

    <%--<script type="text/javascript" language="javascript" src="http://api.maptp.map24.com/ajax?appkey=4b25c0fb0d9f746bbe44a74f549b49208f1833336bb01f04"></script>--%>
    <%-- <script src="http://jsapi.lbsp.navteq.com/v1/jsl.js" type="text/javascript" charset="utf-8"></script>

    <script type="text/javascript" language="javascript" src="../js/NavTeq.js"></script>--%>
    <%--   <script type="text/javascript" src="http://maps.google.com/maps/api/js?key=AIzaSyAUL1owqE12VPufCFpeV8UWAnlotRKLTKw&sensor=false"></script>--%>
    <%--  <script src="http://jsapi.lbsp.navteq.com/v1/jsl.js" type="text/javascript" charset="utf-8"></script>

    <script type="text/javascript" language="javascript" src="../js/NavTeq.js"></script>--%>
    <link href="../App_Themes/Office2003Blue/GridView/grid.css" rel="Stylesheet" />
    <link href="../App_Themes/Office2003Blue/Editors/styles.css" rel="Stylesheet" />
    <script src="../js/wow.min.js"></script>
</head>
<body onload="goMap24();">
    <div class="pageContainer">
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScmRoute" runat="server" EnablePageMethods="true" AsyncPostBackTimeout="1000">
            </asp:ScriptManager>
            <asp:HiddenField ID="hdnResultValue" runat="server" />
            <%-- <asp:UpdatePanel ID="upUserGroup" runat="server">
                    <Triggers>
                        <asp:PostBackTrigger ControlID="btnTest" />
                    </Triggers>
                    <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">
                        <!-- Do not delete 'btnTest' Button -->
                        <asp:Button ID="btnTest" Text="Test" CssClass="ControlHide" runat="server" OnClick="btnTest_Click" />
                        <!-- Main Content Starts Here -->
                        <div id="content">
                            <div class="content-wrap">
                                <div id="top-content" class="head-part">
                                    <div id="heading" class="col-sm-6 col-md-4">
                                        <img class="icon" src="../images/icn-route.gif" alt="" />
                                        <h1>
                                            <asp:Literal ID="lblRouteCaption" runat="server"></asp:Literal>
                                        </h1>
                                        <%--<asp:Literal ID="lblConfigurationCaption" runat="server"></asp:Literal>--%>
                                        <asp:LinkButton ID="lnkHomeCaption" runat="server"></asp:LinkButton>
                                        <span>&gt;</span>
                                        <span>
                                            <a href="RouteETA.aspx">
                                                <asp:Label ID="lblManageCaption" Text="Route ETA" runat="server"></asp:Label>
                                            </a>
                                        </span>
                                    </div>
                                    <div class="col-sm-6 col-md-6">
                                        <asp:LinkButton ID="ibtnBackToConfig" runat="server" CssClass="MultilingualBtn ControlHide"
                                            PostBackUrl="~/Forms/ConfigurationSetup.aspx" CausesValidation="false">
                                            <span id="Span5" runat="server" class="MultilingualBtnspan">
                                                <div class="Back">
                                                    <div id="BackToConfig" runat="server" class="MultilingualBtnTextAlign">
                                                        Back to Configuration
                                                    </div>
                                                </div>
                                            </span>
                                        </asp:LinkButton>
                                    </div>
                                </div>
                                <div class="clear clearfix">
                                </div>
                                <div class="clear clearfix">
                                </div>
                                <div id="map-lang" style="right: 0px; height: auto; position: absolute; z-index: 100; margin-top: 05px; padding-top: 0px; float: right;">
                                    <div class='panel_lng' align='center' id='lnkLegend'>
                                        <div class='panelcontent_lng'>
                                            <asp:Panel ID="pnlH3_legend" runat="server">
                                                <table id='tblLegend_lng' align='right' style='direction: ltr;'>
                                                    <tr>
                                                        <td align='right' style='padding: 15px 0px 6px 6px;'>
                                                            <table cellpadding='2' cellspacing='2' align='right' width='100px' height='25px'>
                                                                <tr>
                                                                    <td align='left'>
                                                                        <span id="eng3" class="H_btn H_rdo_title" title="Switch To English Language" aria-role="label"
                                                                            style="cursor: pointer">ENG</span>
                                                                    </td>
                                                                    <td align='left'>
                                                                        <span id="arb3" class="H_btn H_rdo_title" title="التحول إلى اللغة العربية" aria-role="label"
                                                                            style="cursor: pointer">العربية</span>
                                                                    </td>
                                                                    <td align='left'>
                                                                        <span id="hin3" class="H_btn H_rdo_title" title="हिन्दी भाषा के लिए स्विच" aria-role="label"
                                                                            style="cursor: pointer">हिंदी</span>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </asp:Panel>
                                            <asp:Panel ID="pnlH2_legend" runat="server">
                                                <ul class="nm_mapSettingsWrap nm_layout_horizontal nm_right" aria-expanded="false"
                                                    aria-role="menubar">
                                                    <dl aria-haspopup="true" aria-hidden="false" aria-expanded="false" class="nm_dropDownMenu  nm_mapSelectorWrap nm_wrap nm_layout_horizontal nm_firstInGroup nm_lastInGroup"
                                                        tabindex="0" aria-role="menu">
                                                        <dt class="nm_menuItemMapType" aria-role="menuitem"><span id="eng2" class="nm_labelOpen nm_firstBG"
                                                            title="Switch To English Language" aria-role="label" style="cursor: pointer">ENG</span>
                                                        </dt>
                                                    </dl>
                                                </ul>
                                                <ul class="nm_mapSettingsWrap nm_layout_horizontal nm_right" aria-expanded="false"
                                                    aria-role="menubar">
                                                    <dl aria-haspopup="true" aria-hidden="false" aria-expanded="false" class="nm_dropDownMenu  nm_mapSelectorWrap nm_wrap nm_layout_horizontal nm_firstInGroup nm_lastInGroup"
                                                        tabindex="0" aria-role="menu">
                                                        <dt class="nm_menuItemMapType" aria-role="menuitem"><span id="arb2" class="nm_labelOpen nm_firstBG"
                                                            title="التحول إلى اللغة العربية" aria-role="label" style="cursor: pointer">العربية</span>
                                                        </dt>
                                                    </dl>
                                                </ul>
                                                <ul class="nm_mapSettingsWrap nm_layout_horizontal nm_right" aria-expanded="false"
                                                    aria-role="menubar">
                                                    <dl aria-haspopup="true" aria-hidden="false" aria-expanded="false" class="nm_dropDownMenu  nm_mapSelectorWrap nm_wrap nm_layout_horizontal nm_firstInGroup nm_lastInGroup"
                                                        tabindex="0" aria-role="menu">
                                                        <dt class="nm_menuItemMapType" aria-role="menuitem"><span id="hin2" class="nm_labelOpen nm_firstBG"
                                                            title="हिन्दी भाषा के लिए स्विच" aria-role="label" style="cursor: pointer">हिंदी</span></dt>
                                                    </dl>
                                                </ul>
                                            </asp:Panel>
                                        </div>
                                    </div>
                                </div>
                                <div id="map-legend" style="right: 0px; height: auto; position: absolute; z-index: 100; margin-top: 90px; padding-top: 0px; float: right;">
                                </div>
                                <div id="maparea" style="height: 380px; background-color: #E0E0E0; margin-top: 5px" dir="ltr">
                                </div>
                                <div class="">
                                    <asp:UpdatePanel ID="upUserGroup" runat="server">
                                        <Triggers>
                                            <asp:PostBackTrigger ControlID="btnTest" />
                                            <asp:PostBackTrigger ControlID="btnRoute" />
                                            <%--<asp:PostBackTrigger ControlID="btnDelete" />--%>
                                        </Triggers>
                                        <ContentTemplate>
                                            <asp:Panel ID="pnlRouteInformations" runat="server" CssClass="ControlHide">
                                                <%--<div class="form-box">
                                                    <h1>
                                                        <span class="icon" style="padding-top: 0px">
                                                            <asp:Image runat="server" ID="imgUserGroupInformation" ImageUrl="../images/icn-manage-usergroup.gif" />
                                                        </span>
                                                        <asp:Label ID="lblRouteInformation" runat="server" Text="Manage Routes"></asp:Label></h1>--%>
                                                <div class="form-tbl">
                                                    <div class="form-group">
                                                        <div class="col-sm-3">
                                                            <asp:Label ID="lblRouteName" runat="server" CssClass="label" Text="Route Name"></asp:Label>
                                                            &nbsp;<asp:Label ID="Label14" runat="server" ForeColor="Red">*</asp:Label>
                                                        </div>
                                                        <div class="col-sm-6">
                                                            <asp:TextBox ID="txtRouteName" runat="server" onkeypress="return chkAlphaNumericWithSpace(event,this,29)"
                                                                MaxLength="30" TabIndex="1" onpaste="return false;" ondrop="return false;" Width="200px"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <div class="col-sm-3">
                                                            <asp:Button ID="btnAddIntermidiateLocation" runat="server" Text="Add Intermediate Locations"
                                                                CssClass="ControlHide" />

                                                            <asp:Label ID="lblRouteDes" runat="server" CssClass="label" Text="Route Description"
                                                                Width="120px"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-6">
                                                            <asp:TextBox ID="txtRouteDescription" runat="server" Width="250px" Height="50px"
                                                                TextMode="MultiLine" MaxLength="250" TabIndex="2" onblur="return disallowScriptTags(this);"
                                                                onkeypress="return chkDescription(event,this,249);"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <div class="col-sm-3">
                                                            <asp:Label ID="lblLandmark" Text="Select Landmark" runat="server"></asp:Label>
                                                            &nbsp;<asp:Label ID="Label3" runat="server" ForeColor="Red">*</asp:Label>
                                                        </div>
                                                        <div class="col-sm-6">
                                                            <asp:DropDownList ID="ddlLandmarks" runat="server" CssClass="ddllAlign">
                                                            </asp:DropDownList>
                                                            <%--<div style="padding-left: 5px; float: left"> CssClass="btn"--%>
                                                            <asp:LinkButton ID="btnAdd" runat="server" CssClass="MultilingualBtn">
                                                                <span id="Span6" runat="server" class="MultilingualBtnspan">
                                                                    <div class="AddGeozone">
                                                                        <div id="AddLand" runat="server" class="MultilingualBtnTextAlign">
                                                                            Add
                                                                        </div>
                                                                    </div>
                                                                </span>
                                                            </asp:LinkButton>
                                                            <%--<asp:LinkButton ID="btnAdd" runat="server" CssClass="btn" OnClick="btnAdd_Click"><span >Add</span></asp:LinkButton>--%>
                                                            <%--<asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="Add" CssClass="btn" />--%>
                                                            <%-- </div>--%>
                                                        </div>
                                                    </div>
                                                    <div class="form-group ControlHide">
                                                        <div class="col-sm-3">
                                                            <asp:Label ID="lblDuration" runat="server" Text="Duration"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-6">
                                                            <div style="float: left">
                                                                <asp:DropDownList ID="ddlDuration" runat="server" CssClass="time ControlHide">
                                                                    <asp:ListItem>00</asp:ListItem>
                                                                    <asp:ListItem>15</asp:ListItem>
                                                                    <asp:ListItem>30</asp:ListItem>
                                                                    <asp:ListItem>45</asp:ListItem>
                                                                    <asp:ListItem>60</asp:ListItem>
                                                                </asp:DropDownList>
                                                            </div>
                                                            <%--<div style="padding-left: 5px; float: left">
                                                                        <asp:LinkButton ID="btnAdd" runat="server" CssClass="btn" OnClick="btnAdd_Click"><span >Add</span></asp:LinkButton>
                                                                </div>--%>
                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <div class="col-sm-3">
                                                            <asp:Label ID="lblTravelTime" runat="server">Travel Time</asp:Label>
                                                        </div>
                                                        <div class="col-sm-6">
                                                            <asp:TextBox ID="txtDuration" runat="server" onkeypress="return false;" onkeydown="return false;"
                                                                Width="200px"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <div class="col-sm-3">
                                                            <asp:Label ID="Label2" runat="server">Travel Time With Traffic</asp:Label>
                                                        </div>
                                                        <div class="col-sm-6">
                                                            <asp:TextBox ID="txtTrafficDuration" runat="server" onkeypress="return false;" onkeydown="return false;"
                                                                Width="200px"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <div class="col-sm-3">
                                                            <asp:Label ID="lblTravelDistance" runat="server">Travel Distance</asp:Label>
                                                        </div>
                                                        <div class="col-sm-6">
                                                            <asp:TextBox ID="txtDistance" runat="server" onkeypress="return false;" onkeydown="return false;"
                                                                Width="200px"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <div class="col-sm-3">
                                                            <asp:Label ID="Label1" runat="server" ForeColor="Red">*</asp:Label>&nbsp;
                                                                <asp:Label ID="lblMandatory" runat="server" Text="Required Fields"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-6">
                                                            <asp:TextBox ID="lblNextStopDuration" runat="server">Next Stop Duration</asp:TextBox><br />
                                                            <asp:TextBox ID="lblNextStopDistance" runat="server">Next Stop Distance</asp:TextBox><br />
                                                            <asp:TextBox ID="lblDestinationDuration" runat="server">Destination Duration</asp:TextBox><br />
                                                            <asp:TextBox ID="lblDestinationDistance" runat="server">Destination Distance</asp:TextBox><br />
                                                            <asp:Button ID="btnRouteUpdatetest" runat="server" Text="getValue" OnClick="btnRouteUpdatetest_click" />
                                                        </div>
                                                    </div>
                                                </div>
                                                <%--  </div>--%>
                                            </asp:Panel>
                                            <div id="grid-dsply">
                                                <div class="clear clearfix">
                                                </div>
                                                <div id="top">
                                                    <asp:UpdatePanel ID="UpdMap" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                                                        <ContentTemplate>
                                                            <div class="col-xs-12 gridheader">
                                                                <div class="col-sm-6">
                                                                    <span class="txt">
                                                                        <asp:Label runat="server" ID="lblFleetCaption" Text=""></asp:Label>
                                                                    </span>
                                                                    <span class="dropdown">
                                                                        <dxw:ASPxComboBox ID="ddlFleet" runat="server" ValueType="System.Int32" Width="130px" Height="20px"
                                                                            ClientInstanceName="ddlFleet" SelectedIndex="0" OnSelectedIndexChanged="ddlFleet_SelectedIndexChanged"
                                                                            EnableIncrementalFiltering="true" AutoPostBack="true" EnableTheming="true" Theme="Office2003Blue"
                                                                            CssFilePath="~/App_Themes/office2003Blue/Editors/styles.css" CssPostfix="office2003_Blue">
                                                                            <ClientSideEvents SelectedIndexChanged="function(s, e) { ShowPopUp(); }" />
                                                                        </dxw:ASPxComboBox>
                                                                    </span>&nbsp;&nbsp;
                                                                <asp:Button ID="btnResizeEventHandling" runat="server" OnClick="btnResizeEventHandling_Click"
                                                                    CssClass="ControlHide" Visible="false" />
                                                                    <asp:ImageButton ID="btnFullMap" runat="server" ImageUrl="~/images/fullscreen.png"
                                                                        AlternateText="Full Screen Map" OnClientClick="FullscreenMap();return false;"
                                                                        Style="vertical-align: top" Visible="false" />
                                                                    <%--OnClientClick="if (gvDataRoute.GetSelectedRowCount() != 0) {FullscreenMap();return false;}else{alert('Kindly select One/more Vehicle');return false;}"--%>
                                                                    <asp:ImageButton ID="ibtnReferesh" runat="server" ImageUrl="~/images/Refresh.png"
                                                                        AlternateText="Refresh Grid/Alarms/Map" OnClick="ibtnReferesh_Click" Style="vertical-align: top"
                                                                        OnClientClick="ShowPopUp();" />
                                                                    <%--<asp:ImageButton ID="ibutFullScreen" runat="server" ImageUrl="~/images/fullscreen.png"
                                                                    ToolTip="Hide/Show Alarm(s)" OnClientClick="doToggle1();" Style="vertical-align: top" />--%>
                                                                </div>
                                                                <div class="col-sm-6">
                                                                    <div class="pull-right">
                                                                        <span class="txt">
                                                                            <asp:Label ID="lblSelRouteName" runat="server"></asp:Label>&nbsp;
                                                                     <asp:Label ID="lblSelRouteTime" runat="server"></asp:Label>&nbsp;
                                                                        </span>
                                                                        <span class="dropdown" style="display: none">
                                                                            <dxw:ASPxComboBox ID="ASPxCboExport" runat="server" ValueType="System.String" Width="80px" Height="20px" AutoPostBack="false"
                                                                                EnableTheming="true" Theme="Office2003Blue" ShowImageInEditBox="false" ClientInstanceName="ASPxCboExport" SelectedIndex="0"
                                                                                EnableIncrementalFiltering="true" CssFilePath="~/App_Themes/office2003Blue/Editors/styles.css" CssPostfix="office2003_Blue">
                                                                                <Items>
                                                                                    <dxw:ListEditItem ImageUrl="../images/icn-pdf.jpg" Text="pdf" Value="pdf" />
                                                                                    <dxw:ListEditItem ImageUrl="../images/icn-excel.jpg" Text="xls" Value="xls" />
                                                                                    <dxw:ListEditItem ImageUrl="../images/icn-excel-xlsx.png" Text="xlsx" Value="xlsx" />
                                                                                    <dxw:ListEditItem ImageUrl="../images/icn-word.jpg" Text="rtf" Value="rtf" />
                                                                                    <%--<dxw:ListEditItem ImageUrl="../images/icn-csv.gif" Text="csv" Value="csv" />--%>
                                                                                </Items>
                                                                            </dxw:ASPxComboBox>
                                                                        </span>
                                                                        <span class="txt" style="display: none">
                                                                            <asp:LinkButton ID="btnExport" runat="server" CssClass="MultilingualBtn" OnClick="btnExport_Click">
                                                                                <span id="Span4" runat="server" class="MultilingualBtnspan">
                                                                                    <div class="Export">
                                                                                        <div id="ExportButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                            Export
                                                                                        </div>
                                                                                    </div>
                                                                                </span>
                                                                            </asp:LinkButton>
                                                                        </span>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </ContentTemplate>
                                                    </asp:UpdatePanel>
                                                </div>
                                                <div style="width: 100%; overflow: auto;">
                                                    <asp:UpdatePanel ID="updGrid" runat="server" UpdateMode="Conditional" OnUnload="UpdatePanel_Unload">
                                                        <%-- <Triggers>
                                                                <asp:PostBackTrigger ControlID="btnExport" />
                                                            </Triggers>--%>
                                                        <ContentTemplate>
                                                            <dxw:ASPxGridView ID="gvDataRoute" ClientInstanceName="gvDataRoute" runat="server" AutoGenerateColumns="False"
                                                                EnableTheming="true" Theme="Office2003Blue" CssFilePath="~/App_Themes/office2003Blue/GridView/grid.css" CssPostfix="office2003_Blue"
                                                                Width="100%" KeyFieldName="RouteID" Settings-ShowFilterRow="true"
                                                                Settings-ShowFilterRowMenu="true" OnHtmlRowPrepared="gvDataRoute_OnHtmlRowCreated">
                                                                <%--<ClientSideEvents ="function(s, e){if(s.GetValue())gvDataRoute.PerformCallback(&quot;Neo&quot;);}" />--%>
                                                                <%--OnCustomCallback="gvDataRoute_CustomCallback"   OnInit="gvDataRoute_Init"--%>
                                                                <%--OnDataBinding="gvDataRoute_DataBinding" OnAfterPerformCallback="gvDataRoute_AfterPerformCallback"--%>
                                                                <%--<Images ImageFolder="~/App_Themes/office2003Blue/{0}/">
                                                <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>
                                                                    <AlternatingRow Enabled="True">
                                                                    </AlternatingRow>
                                                                    <PagerTopPanel CssClass="PageFooter">
                                                                    </PagerTopPanel>
                                                                </Styles>
                                                                <SettingsContextMenu Enabled="false" EnableGroupPanelMenu="False" ColumnMenuItemVisibility-GroupByColumn="false" ColumnMenuItemVisibility-ShowGroupPanel="false"
                                                                    EnableFooterMenu="False" ColumnMenuItemVisibility-ShowFooter="false" RowMenuItemVisibility-NewRow="false" RowMenuItemVisibility-EditRow="false"
                                                                    RowMenuItemVisibility-DeleteRow="false" EnableRowMenu="false">
                                                                </SettingsContextMenu>
                                                                <SettingsLoadingPanel Mode="ShowAsPopup" />
                                                                <SettingsPager PrevPageButton-Image-Url="../App_Themes/office2003Blue/GridView/pPrev.gif"
                                                                    PrevPageButton-Image-UrlDisabled="../App_Themes/office2003Blue/GridView/pPrevDisabled.gif"
                                                                    NextPageButton-Image-UrlDisabled="../App_Themes/office2003Blue/GridView/pNextDisabled.gif"
                                                                    NextPageButton-Image-Url="../App_Themes/office2003Blue/GridView/pNext.gif" AlwaysShowPager="true">
                                                                    <NextPageButton>
                                                                        <Image Url="../App_Themes/office2003Blue/GridView/pNext.gif" UrlDisabled="../App_Themes/office2003Blue/GridView/pNextDisabled.gif" />
                                                                    </NextPageButton>
                                                                    <PrevPageButton>
                                                                        <Image Url="../App_Themes/office2003Blue/GridView/pPrev.gif" UrlDisabled="../App_Themes/office2003Blue/GridView/pPrevDisabled.gif" />
                                                                    </PrevPageButton>
                                                                </SettingsPager>
                                                                <%--<SettingsBehavior AllowSelectByRowClick="true" />--%>
                                                                <%--<Settings HorizontalScrollBarMode="Visible" />--%>
                                                                <Columns>
                                                                    <dxw:GridViewDataTextColumn Caption="Edit" Width="30px" HeaderStyle-HorizontalAlign="Center"
                                                                        CellStyle-HorizontalAlign="Center" Name="Edit" VisibleIndex="0">
                                                                        <HeaderCaptionTemplate>
                                                                            <span class="icon">
                                                                                <asp:Image ID="imgStatusIcon" runat="server" ImageUrl="../images/icn-mapit.gif"
                                                                                    AlternateText="" ImageAlign="top" /></span>

                                                                        </HeaderCaptionTemplate>
                                                                        <DataItemTemplate>
                                                                            <asp:ImageButton ID="btnEdit" runat="server" CommandArgument='<%# Eval("RouteId") + "|" + Eval("Mapitvalues")+ "|" + Eval("CurrentLocationLat")+ "|" + Eval("CurrentLocationLon")+ "|" + Eval("DestinationLat")+ "|" + Eval("DestinationLon") %>'
                                                                                AlternateText="Edit" CommandName="Delete" ImageUrl="~/images/icn-mapit.gif" OnClick="btnEditRoute_click"
                                                                                ToolTip="Click here to MapIT" ImageAlign="Middle" CssClass="handButton" />
                                                                        </DataItemTemplate>
                                                                    </dxw:GridViewDataTextColumn>
                                                                    <dxw:GridViewDataTextColumn Name="RouteStatusIndicator" VisibleIndex="1"
                                                                        Width="25px">
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="RouteIndication" runat="server" Height="30px" Width="12px" ToolTip='<%# Eval("RouteStatusTxt") %>'>
                                                                            </asp:Label>
                                                                        </DataItemTemplate>
                                                                    </dxw:GridViewDataTextColumn>
                                                                    <dxw:GridViewDataTextColumn FieldName="VehicleDescription" VisibleIndex="2" Caption="Vehicle Name"
                                                                        Width="125px">
                                                                        <HeaderCaptionTemplate>
                                                                            <span class="icon">
                                                                                <img id="imgVehNameIcon" runat="server" src="../images/icn-vehicle-name.gif" alt=""
                                                                                    align="top" /></span>
                                                                            <span class="label">
                                                                                <asp:Label runat="server" ID="lblVehNameHeading" Text="Vehicle Name"></asp:Label></span>

                                                                        </HeaderCaptionTemplate>
                                                                        <DataItemTemplate>
                                                                            <%--  <asp:LinkButton ID="lblVehicleName" runat="server" Text='<%# Eval("VehicleDescription")%>'
                                                                            CommandName="Command" OnClientClick="ShowPopUp();">
                                                                        </asp:LinkButton>--%>

                                                                            <asp:Label ID="lblVehicleName" runat="server" Text='<%# Eval("VehicleDescription")%>'>
                                                                            </asp:Label>
                                                                            <asp:HiddenField ID="lblAutoID" runat="server" Value='<%# Eval("VehicleID")%>' />
                                                                            <%-- <asp:Image ID="imgDrv" runat="server" src="../images/default-user.png" width="20" height="20" ToolTip='<%# Eval("DriverName")%>'
                                                                                align="top" />--%>
                                                                            <br />
                                                                            <asp:Label ID="lblDriverName" runat="server" Text='<%# Eval("DriverName")%>'>
                                                                            </asp:Label>
                                                                        </DataItemTemplate>
                                                                        <Settings AutoFilterCondition="Contains" />
                                                                    </dxw:GridViewDataTextColumn>
                                                                    <%--  <dxw:GridViewDataTextColumn FieldName="DriverName" VisibleIndex="2" Caption="Driver Name"
                                                            Width="15%" Visible="false">
                                                            <HeaderCaptionTemplate>
                                                                <span class="icon">
                                                                    <img id="imgVehNameIcon" runat="server" src="../images/icn-driver-name.gif" alt=""
                                                                        align="top" /></span> <span class="label">
                                                                            <asp:Label runat="server" ID="lblDrName" Text="Driver Name"></asp:Label></span>
                                                            </HeaderCaptionTemplate>
                                                            <DataItemTemplate>
                                                                <asp:Label ID="lblDriverName" runat="server" Text='<%# Eval("DriverName")%>'>
                                                                </asp:Label>
                                                            </DataItemTemplate>
                                                            <Settings AutoFilterCondition="Contains" />
                                                        </dxw:GridViewDataTextColumn>--%>
                                                                    <dxw:GridViewDataTextColumn Caption="RouteName" Width="190px" VisibleIndex="3" HeaderStyle-HorizontalAlign="Center"
                                                                        CellStyle-Wrap="True">
                                                                        <HeaderTemplate>
                                                                            <span class="icon">
                                                                                <img id="imgVehNameIcon" runat="server" src="../images/icn-route.gif" alt=""
                                                                                    align="top" /></span>

                                                                            <span class="label">
                                                                                <asp:Label ID="lblRouteName" runat="server" Text="Route Details"></asp:Label></span>
                                                                        </HeaderTemplate>
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="lbtnRouteName" runat="server" Text='<%# Eval("RouteName") %>'
                                                                                Style="text-decoration: none;"></asp:Label><br />
                                                                            <%--OnClick="lbtnRouteName_Click"--%>
                                                                            <%--  <asp:Image ID="imgSchedule" runat="server" src="../images/icn-time.gif" ToolTip='<%# Eval("ScheduledDuration")%>'
                                                                                align="top" />--%>
                                                                            <asp:Label ID="Label7" runat="server" Font-Bold="true" Text="Total Distance :"
                                                                                Style="text-decoration: none;"></asp:Label>
                                                                            <asp:Label ID="Label5" runat="server" Text='<%# Eval("TravelDistance") %>'
                                                                                Style="text-decoration: none;"></asp:Label><br />
                                                                            <asp:Label ID="Label6" runat="server" Font-Bold="true" Text="Total Duration :"
                                                                                Style="text-decoration: none;"></asp:Label><br />
                                                                            <asp:Label ID="Label4" runat="server" Text='<%# Eval("TravelDuration") %>'
                                                                                Style="text-decoration: none;"></asp:Label>
                                                                            <%-- <asp:Label ID="lbtnDetailsDestination" runat="server" Text='<%# Eval("Destination") %>'
                                                                                CommandArgument='<%# Eval("RouteId") %>' Style="text-decoration: none;"></asp:Label>--%>
                                                                        </DataItemTemplate>
                                                                        <Settings AutoFilterCondition="Contains" />
                                                                    </dxw:GridViewDataTextColumn>
                                                                    <dxw:GridViewDataDateColumn FieldName="OriginDateTimeSort" VisibleIndex="4" Caption="Date & Time"
                                                                        Width="125px">
                                                                        <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 runat="server" ID="lblDateandTimeHeading" Text="Date & Time" /></span>
                                                                        </HeaderCaptionTemplate>
                                                                        <DataItemTemplate>
                                                                            <div class="DateStyle">
                                                                                <asp:Label ID="lblOriginDate" runat="server" Text='<%# Eval("OriginDateTime")%>'>
                                                                                </asp:Label>
                                                                            </div>
                                                                        </DataItemTemplate>
                                                                        <Settings AllowAutoFilter="True" ShowFilterRowMenu="False" />
                                                                    </dxw:GridViewDataDateColumn>
                                                                    <dxw:GridViewDataTextColumn FieldName="Address" VisibleIndex="5" CellStyle-VerticalAlign="Middle"
                                                                        CellStyle-Wrap="True" Width="150px">
                                                                        <CellStyle VerticalAlign="Middle" Wrap="True">
                                                                        </CellStyle>
                                                                        <HeaderCaptionTemplate>
                                                                            <span class="icon">
                                                                                <asp:Image ImageUrl="../Images/address-icon.gif" AlternateText="" ImageAlign="top"
                                                                                    runat="server" ID="imgAddressIcon" /></span>
                                                                            <span class="label">
                                                                                <asp:Label runat="server" ID="lblAddressHeading" Text="Current Location" /></span>
                                                                        </HeaderCaptionTemplate>
                                                                        <DataItemTemplate>
                                                                            <table>
                                                                                <tr>
                                                                                    <td style="vertical-align: middle" width="20px">
                                                                                        <asp:Image ID="imgValidity" runat="server" ImageUrl='<%# Convert.ToString(Eval("IsCurrent")) == "0" ? "~/Images/icn-address-notvalid.gif" : "~/Images/icn-address-valid.gif"  %>'
                                                                                            ToolTip='<%# Convert.ToString(Eval("IsCurrent")) == "0" ? "Not current location" : "Current location"  %>'
                                                                                            AlternateText='<%# Convert.ToString(Eval("IsCurrent")) == "0" ? "Not Current Location" : "Current Location"  %>' />
                                                                                    </td>
                                                                                    <td>
                                                                                        <asp:Label ID="lbladdr" runat="server" Text='<%# Eval("Address") %> '></asp:Label>
                                                                                    </td>
                                                                                </tr>
                                                                            </table>
                                                                        </DataItemTemplate>
                                                                        <Settings AutoFilterCondition="Contains" />
                                                                    </dxw:GridViewDataTextColumn>
                                                                    <dxw:GridViewDataTextColumn FieldName="OriginDateTime" VisibleIndex="6" Caption="Date & Time"
                                                                        Visible="false">
                                                                        <HeaderCaptionTemplate>
                                                                            <span class="icon">
                                                                                <asp:Image ImageUrl="../Images/address-icon.gif" AlternateText="" ImageAlign="top"
                                                                                    runat="server" ID="imgAddressIcon" /></span>
                                                                            <span class="label">
                                                                                <asp:Label runat="server" ID="lblDateandTimeHeading" Text="Date & Time" /></span>
                                                                        </HeaderCaptionTemplate>
                                                                        <DataItemTemplate>
                                                                            <div class="DateStyle">
                                                                                <asp:Label ID="lblOriginDate" runat="server" Text='<%# Eval("OriginDateTime")%>'>
                                                                                </asp:Label>
                                                                            </div>
                                                                        </DataItemTemplate>
                                                                        <Settings AllowAutoFilter="False" />
                                                                    </dxw:GridViewDataTextColumn>

                                                                    <dxw:GridViewDataTextColumn Caption="StartLocation" Width="160px" VisibleIndex="7" HeaderStyle-HorizontalAlign="Center"
                                                                        CellStyle-Wrap="True" Visible="false">
                                                                        <HeaderTemplate>
                                                                            <span class="icon">
                                                                                <asp:Image ID="imgStatusIcon" runat="server" ImageUrl="../images/status-icon.gif"
                                                                                    AlternateText="" ImageAlign="top" /></span>
                                                                            <span class="label">
                                                                                <asp:Label ID="lblStartLocation" runat="server" Text="Start Location"></asp:Label></span>
                                                                        </HeaderTemplate>
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="lbtnStartLocation" runat="server" Text='<%# Eval("StartLocation") %>'
                                                                                CommandArgument='<%# Eval("RouteId") %>' Style="text-decoration: none;"></asp:Label><%--OnClick="lbtnRouteName_Click"--%>
                                                                        </DataItemTemplate>
                                                                    </dxw:GridViewDataTextColumn>
                                                                    <dxw:GridViewDataTextColumn Caption="NextStop" Width="200px" VisibleIndex="8" HeaderStyle-HorizontalAlign="Center"
                                                                        CellStyle-Wrap="True">
                                                                        <HeaderTemplate>
                                                                            <span class="icon">
                                                                                <asp:Image ID="imgStatusIcon" runat="server" ImageUrl="../images/status-icon.gif"
                                                                                    AlternateText="" ImageAlign="top" /></span>
                                                                            <span class="label">
                                                                                <asp:Label ID="lblRouteName" runat="server" Text="Next Stop"></asp:Label></span>
                                                                        </HeaderTemplate>
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="lbtnNextStop" runat="server" Text='<%# Eval("NextStop") %>'
                                                                                CommandArgument='<%# Eval("RouteId") %>' Style="text-decoration: none;"></asp:Label>
                                                                            <br />
                                                                            <asp:Label ID="Label7" runat="server" Font-Bold="true" Text="Distance :"
                                                                                Style="text-decoration: none;"></asp:Label>
                                                                            <asp:Label ID="Label12" runat="server" Text='<%# Eval("NextStopDistance") %>'></asp:Label>
                                                                            <br />
                                                                            <asp:Label ID="Label11" runat="server" Font-Bold="true" Text="Duration :"
                                                                                Style="text-decoration: none;"></asp:Label>
                                                                            <asp:Label ID="Label13" runat="server" Text='<%# Eval("NextStopDuration") %>'></asp:Label>
                                                                            <br />
                                                                            <asp:Label ID="Label16" runat="server" Font-Bold="true" Text="ETA :"
                                                                                Style="text-decoration: none;"></asp:Label>
                                                                            <asp:Label ID="Label15" runat="server" Text='<%# Eval("NextStopETA") %>'></asp:Label>
                                                                        </DataItemTemplate>
                                                                    </dxw:GridViewDataTextColumn>
                                                                    <dxw:GridViewDataTextColumn Caption="Destination" Width="190px" VisibleIndex="9" HeaderStyle-HorizontalAlign="Center"
                                                                        CellStyle-Wrap="True">
                                                                        <HeaderTemplate>
                                                                            <span class="icon">
                                                                                <asp:Image ID="imgStatusIcon" runat="server" ImageUrl="../images/status-icon.gif"
                                                                                    AlternateText="" ImageAlign="top" /></span>
                                                                            <span class="label">
                                                                                <asp:Label ID="lblDestination" runat="server" Text="Final Destination"></asp:Label></span>
                                                                        </HeaderTemplate>
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="lbtnDestination" runat="server" Text='<%# Eval("Destination") %>'
                                                                                CommandArgument='<%# Eval("RouteId") %>' Style="text-decoration: none;"></asp:Label><br />
                                                                            <asp:Label ID="Label7" runat="server" Font-Bold="true" Text="Distance :"
                                                                                Style="text-decoration: none;"></asp:Label>
                                                                            <asp:Label ID="Label12" runat="server" Text='<%# Eval("DestinationStopDistance") %>'></asp:Label>
                                                                            <br />
                                                                            <asp:Label ID="Label11" runat="server" Font-Bold="true" Text="Duration :"
                                                                                Style="text-decoration: none;"></asp:Label>
                                                                            <asp:Label ID="Label13" runat="server" Text='<%# Eval("DestinationStopDuration") %>'></asp:Label><br />
                                                                            <asp:Label ID="Label16" runat="server" Font-Bold="true" Text="ETA :"
                                                                                Style="text-decoration: none;"></asp:Label>
                                                                            <asp:Label ID="Label15" runat="server" Text='<%# Eval("DestinationStopETA") %>'></asp:Label>
                                                                            <asp:Label ID="lblStopStaus" runat="server" Text='<%# Eval("StopStatus") %>' Style="display: none"></asp:Label>
                                                                        </DataItemTemplate>
                                                                    </dxw:GridViewDataTextColumn>
                                                                    <%--  <dxw:GridViewDataTextColumn FieldName="LastSpeed" Caption="Speed" VisibleIndex="10"
                                                                        Width="70px" CellStyle-HorizontalAlign="Center">
                                                                        <CellStyle HorizontalAlign="Center">
                                                                        </CellStyle>
                                                                        <HeaderCaptionTemplate>
                                                                            <span class="icon">
                                                                                <asp:Image ID="imgSpeedIcon" runat="server" ImageUrl="../Images/icn-speed.gif" AlternateText=""
                                                                                    ImageAlign="Middle" /></span>
                                                                            <span class="label">
                                                                                <asp:Label ID="lblSpeedHeading" runat="server" Font-Bold="false" CssClass="label"
                                                                                    Text="Speed"></asp:Label></span>

                                                                        </HeaderCaptionTemplate>
                                                                        <DataItemTemplate>
                                                                            
                                                                        </DataItemTemplate>
                                                                        <Settings AllowAutoFilter="False" />
                                                                    </dxw:GridViewDataTextColumn>--%>
                                                                    <dxw:GridViewDataTextColumn FieldName="Status" VisibleIndex="11" Caption="Status"
                                                                        Width="120px" CellStyle-Wrap="True">
                                                                        <CellStyle VerticalAlign="Middle">
                                                                        </CellStyle>
                                                                        <HeaderCaptionTemplate>
                                                                            <span class="icon">
                                                                                <asp:Image ID="imgStatusIcon" runat="server" ImageUrl="../images/status-icon.gif"
                                                                                    AlternateText="" ImageAlign="top" /></span>
                                                                            <span class="label">
                                                                                <asp:Label runat="server" ID="lblStatusHeading" Text="Status" /></span>
                                                                        </HeaderCaptionTemplate>
                                                                        <DataItemTemplate>
                                                                            <asp:Label ID="Label10" runat="server" Text="Vehicle Status: " Font-Bold="true"></asp:Label>
                                                                            <asp:Label ID="lblStatus" runat="server" Text='<%# Eval("Status") %> '></asp:Label><br />
                                                                            <asp:Label ID="Lbl12" runat="server" Text="Speed: " Font-Bold="true"></asp:Label>
                                                                            <asp:Label ID="lblSpeed" runat="server" Text='<%# Eval("LastSpeed") %> '></asp:Label><br />
                                                                            <asp:Label ID="Label9" runat="server" Text="Route Status: " Font-Bold="true"></asp:Label>
                                                                            <asp:Label ID="Label8" runat="server" Text='<%# Eval("RouteStatusTxt") %> '></asp:Label>
                                                                        </DataItemTemplate>
                                                                        <Settings AutoFilterCondition="Contains" />
                                                                    </dxw:GridViewDataTextColumn>

                                                                    <dxw:GridViewDataColumn FieldName="Mapitvalues" Caption="Mapitvalues" Visible="false" VisibleIndex="13">
                                                                    </dxw:GridViewDataColumn>
                                                                </Columns>
                                                                <ClientSideEvents EndCallback="function(s, e) {document.getElementById('btnTest').click();}" />
                                                                <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="125" />
                                                                <SettingsText EmptyDataRow="No Active Route Vehicles under the selected fleet" />
                                                                <%--<ClientSideEvents SelectionChanged="function(s, e) { OnGridSelectionChanged1(); }" />--%>
                                                                <%--EndCallback="function(s, e) {SetDivPosition();}" --%>
                                                                <SettingsBehavior ProcessSelectionChangedOnServer="false" AllowFocusedRow="true" />
                                                            </dxw:ASPxGridView>

                                                            <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvDataRoute" OnRenderBrick="ASPxGridViewExporter1_RenderBrick">
                                                                <PageFooter Right="[Page # of Pages #]">
                                                                </PageFooter>
                                                            </dxw:ASPxGridViewExporter>
                                                        </ContentTemplate>
                                                    </asp:UpdatePanel>
                                                    <asp:Timer ID="tmr1" runat="server" OnTick="tmr1_Tick" Enabled="false">
                                                    </asp:Timer>
                                                    <asp:Timer ID="tmrShow" runat="server" OnTick="tmrShow_Tick" Enabled="false">
                                                    </asp:Timer>
                                                </div>
                                                <div id="left">
                                                </div>
                                                <div class="clear clearfix">
                                                    <asp:LinkButton ID="btnLand" runat="server">
                                                    </asp:LinkButton>
                                                </div>
                                            </div>
                                            <div id="right">
                                            </div>
                                            <div class="selection form-horizontal ControlHide">
                                                <div class="form-group">
                                                    <div class="col-sm-4" style="display: none">
                                                        Start:
                                                    </div>
                                                    <div class="col-sm-6">
                                                        <input type="hidden" id='start' class="form-control" runat="server" />
                                                    </div>
                                                </div>
                                                <div class="form-group" style="display: none">
                                                    <div class="col-sm-4">
                                                        Via Point 1:
                                                    </div>
                                                    <div class="col-sm-6">
                                                        <input type='text' id='via_0' class="form-control" value='' />
                                                    </div>
                                                </div>
                                                <div class="form-group" style="display: none">
                                                    <div class="col-sm-4">
                                                        Via Point 2:
                                                    </div>
                                                    <div class="col-sm-6">
                                                        <input type='text' id='via_1' class="form-control" value='' />
                                                    </div>
                                                </div>
                                                <div class="form-group" style="display: none">
                                                    <div class="col-sm-4">
                                                        Via Point 3:
                                                    </div>
                                                    <div class="col-sm-6">
                                                        <input type='text' id='via_2' class="form-control" value='' />
                                                    </div>
                                                </div>
                                                <div class="form-group" style="display: none">
                                                    <div class="col-sm-4">
                                                        Via Point 4:
                                                    </div>
                                                    <div class="col-sm-6">
                                                        <input type='text' id='via_3' class="form-control" value='' />
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <div class="col-sm-4" style="display: none">
                                                        Destination:
                                                    </div>
                                                    <div class="col-sm-6">
                                                        <input type="hidden" id='destination' class="form-control" runat="server" />
                                                    </div>
                                                </div>
                                            </div>
                                            <div id="routeID" style="display: none">
                                            </div>
                                            <div id="routeDescription" class="col-sm-9" style="text-align: left; display: none">
                                            </div>
                                        </ContentTemplate>
                                        <Triggers>
                                            <asp:PostBackTrigger ControlID="btnExport" />
                                            <%--<asp:PostBackTrigger ControlID="ibtnCancelRoute" />--%>
                                            <%--<asp:PostBackTrigger ControlID="ibtnReferesh" />--%>
                                        </Triggers>
                                    </asp:UpdatePanel>
                                </div>
                            </div>
                            <br />
                        </div>
                        <!-- Main Content Ends Here -->
                    </div>
                </div>
            </div>
            <asp:HiddenField ID="hdnLandmarksCount" runat="server" EnableViewState="false" />
            <asp:HiddenField ID="hdnOrder" runat="server" />
            <asp:HiddenField ID="isDuplicate" runat="server" />
            <asp:HiddenField ID="hdnLandId" runat="server" />
            <asp:HiddenField ID="hdnlang" runat="server" />
            <asp:HiddenField ID="hdnDurationSec" runat="server" />
            <asp:HiddenField ID="hdnIndDistance" runat="server" />
            <asp:HiddenField ID="hdnDuration" runat="server" />
            <asp:HiddenField ID="hdnCondition" runat="server" />
            <asp:HiddenField ID="hdnTrafficDuration" runat="server" />
            <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="progressPopUp"
                TargetControlID="btnTesting">
            </cc1:ModalPopupExtender>
            <asp:Button ID="btnTesting" Style="display: none;" runat="server" />
            <asp:Button ID="btnRoute" Style="display: none;" runat="server" OnClick="btnRoute_click" />
            <asp:Panel ID="progressPopUp" runat="server" CssClass="processMessage" Style="z-index: 1000; display: none;">
                <center>
                    <br />
                    <img id="imgLoad" runat="server" alt="Please Wait ..." src="../images/47.gif" /><br />
                    <br />
                    <asp:Label ID="lbl_msg12" Text="Processing... Please Wait..." runat="server" CssClass="specialdisplay"></asp:Label>
                    <br />
                    <br />
                </center>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="mpeMapProgressIndicator" runat="server" PopupControlID="pnlMapPopUp"
                BackgroundCssClass="modalBackground" TargetControlID="btnTesting">
            </cc1:ModalPopupExtender>
            <asp:Panel ID="pnlMapPopUp" runat="server" CssClass="processMessage" Style="z-index: 1000; display: none;">
                <center>
                    <br />
                    <img id="img1" runat="server" alt="Please Wait ..." src="../images/47.gif" /><br />
                    <br />
                    <asp:Label ID="lbl_msg13" Text="Auto Refreshing... Please Wait..." runat="server"
                        CssClass="specialdisplay"></asp:Label>
                    <br />
                    <br />
                </center>
            </asp:Panel>

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

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

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

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

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

                .nm_menuItemMapType {
                    float: left !important;
                    margin-left: 1px !important;
                }
            </style>
            <style type="text/css">
                .tDnD_whileDrag {
                    background-color: #F0F8FF;
                }

                tr.myDragClass td {
                    background-color: #F0F8FF;
                }
            </style>

            <script src="../js/jquery.tablednd.0.6.min.js" type="text/javascript"></script>
            <script language="javascript" type="text/javascript" src="../js/myformvalidations.js"></script>
            <script type="text/javascript" language="javascript" src="../js/GridCheckBoxMaintaining.js"></script>

            <script type="text/javascript" language="javascript">
                var Alert_DeleteConfirmationRoute = "Are sure you want to delete this route?";
                var Alert_DeleteConfirmation = "Are you sure you want to delete this point?";
                var Alert_Scheduled = "Route cannot be deleted as it has been already assigned/scheduled to vehicle(s)";

                function SetAlertMessage(DeleteConfirmationRoute, DeleteConfirmation, Scheduled) {
                    Alert_DeleteConfirmationRoute = DeleteConfirmationRoute;
                    Alert_DeleteConfirmation = DeleteConfirmation;
                    Alert_Scheduled = Scheduled;
                }
                function ConfirmDelete(btnId) {
                    var hdnDelete = document.getElementById(btnId.id.substring(0, btnId.id.lastIndexOf("_")) + "_hdnDelete").value.split('$');
                    if (hdnDelete[0] == 0) {
                        alert(Alert_Scheduled);
                        return false;
                    }
                    else if (hdnDelete[0] == 1) {
                        return confirm(Alert_DeleteConfirmationRoute.replace("#", hdnDelete[1]));
                    }
                }

                function DeleteConfirmations(id) {

                    if (confirm(Alert_DeleteConfirmation)) {
                        var hdnDelete = id.nextSibling.nextSibling.defaultValue;
                        document.getElementById(id.id.substring(0, id.id.lastIndexOf("_")) + "_hdnLandId").value.split('$');
                        document.getElementById("hdnLandId").value = hdnDelete;
                        //                        document.getElementById("btnLand").click();
                    }
                    else {
                        return false;
                    }
                }
            </script>
            <script type="text/javascript" language="javascript">
                //                $(document).ready(function() {
                //                    var prm = Sys.WebForms.PageRequestManager.getInstance();
                //                    prm.add_endRequest(function() {
                //                        $(document).ready(function() {
                //                            $("#gvLandMarks").tableDnD({
                //                                onDragClass: "myDragClass",
                //                                onDrop: function(table, row) {
                //                                    var rows = table.tBodies[0].rows;
                //                                    var debugStr = "";
                //                                    var IsDuplicate = document.getElementById("IsDuplicate");
                //                                    var Value = null;
                //                                    for (var i = 0; i < rows.length; i++) {
                //                                        if (Value == rows[i].id) {
                //                                            IsDuplicate.value = true;
                //                                            break;
                //                                        }
                //                                        debugStr += rows[i].id + "*" + (i) + "$";
                //                                        Value = rows[i].id;
                //                                    }
                //                                    //$("#hdnOrder").val(debugStr.replace("gvLandMarks_", ""));
                //                                    document.getElementById("hdnOrder").value = debugStr.replace("gvLandMarks_", "");
                //                                    //document.getElementById("btnAdd").click();
                //                                    __doPostBack('btnAdd', '');
                //                                }
                //                            });
                //                        });
                //                    });
                //                    $('#gvLandMarks').tableDnD();
                //                });
            </script>
            <script type="text/javascript">
                function SetCond() {
                    document.getElementById("hdnCondition").value = "1";
                    alert(document.getElementById("hdnCondition").value);

                }
                var FullMapWindow;
                function FullscreenMap() {
                    FullMapWindow = window.open("FullscreenMap_RouteETA.aspx?7JUeVv9wzyvaH1FI7OLcHA==", 'FullscreenMap', 'scrollbars=yes,resizable=no,width=' +
                            screen.width + ',height=' + screen.height, false);
                    FullMapWindow.moveTo(0, 0);
                    FullMapWindow.focus();
                }
            </script>
        </form>
    </div>
    <!-- Content Ends Here -->
    <uc2:Footer ID="ucFooter" runat="server" />
</body>
</html>
