<%@ page language="C#" autoeventwireup="true" inherits="Forms_RouteAssignment, App_Web_adi25cik" %>

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

<%--<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2" Namespace="DevExpress.Web.ASPxGridView"
    TagPrefix="dxgv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2" Namespace="DevExpress.Web.ASPxEditors"
    TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v8.2, Version=8.2.10.0, Culture=neutral, PublicKeyToken=9B171C9FD64DA1D1"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>--%>

<%--********* For Bootstrap Implementation *************--%>
<!DOCTYPE html>
<html lang="en">
<%--********* End of Bootstrap Implementation *************--%>
<head runat="server">
    <title>Route - Assignment</title>
    <%--********* For Bootstrap Implementation *************--%>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <%--********* End of Bootstrap Implementation *************--%>
    <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 rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <style type="text/css"></style>
    <script type="text/javascript" src="../js/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="../js/ui.datepicker.js"></script>
    <script type="text/javascript" src="../js/JQQueryDatePicker.js"></script>
    <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" />
    <script src="../js/jquery-1.11.2.min.js" type="text/javascript"></script>
    <link id="ieonly" runat="server" rel="stylesheet" type="text/css" href="" />
    <link id="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <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 src="../js/jquery-1.5.1.min.js" type="text/javascript"></script>
    <%--********* 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>
    <%--********* For Bootstrap Implementation *************--%>
    <div class="pageContainer">
        <%--********* End of Bootstrap Implementation *************--%>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel ID="updGrid" runat="server">
                <Triggers>
                    <asp:PostBackTrigger ControlID="lbtLoadDetails" />
                </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">
                                <!-- Main Content Starts Here -->
                                <!-- Main Content Starts Here -->
                                <div id="content">
                                    <div class="content-wrap">
                                        <div id="top-content" class="head-part">
                                            <div id="heading" class="col-sm-4 col-md-4">
                                                <img class="icon" src="../images/icn-route.gif" alt="" />
                                                <h1>
                                                    <asp:Literal ID="lblConfigurationSetupCaption" runat="server"></asp:Literal>
                                                </h1>
                                                <%--<a href="Dashboard.aspx"><asp:Label ID="lblHomeCaption" Text="Home" runat="server"></asp:Label></a>--%>
                                                <p style="white-space: nowrap">
                                                    <asp:LinkButton ID="lnkHomeCaption" runat="server"></asp:LinkButton><span>&gt;</span><span><a
                                                        href="RouteAssignment.aspx"><asp:Label ID="lblRouteAgmtCaption" Text="Route Assignment"
                                                            runat="server"></asp:Label></a></span>
                                                </p>
                                            </div>
                                            <%-- <div id="header" runat="server" align="right" style="background-image: none;">--%>
                                            <div id="" class="col-sm-8 col-md-8 head-part-btns">
                                                <div class="pull-right">

                                                    <asp:LinkButton ID="btnManageRoutes" runat="server" CssClass="MultilingualBtn" PostBackUrl="~/Forms/RouteMaster.aspx"
                                                        Style="margin-top: 20px">
                                                        <span runat="server" class="MultilingualBtnspan">
                                                            <div class="ManageRoute">
                                                                <div id="mangeRoute" runat="server" class="MultilingualBtnTextAlign">
                                                                    Manage Routes
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                    <%--<asp:LinkButton ID="btnManageRoutes" runat="server" class="btn" Width="100px" PostBackUrl="~/Forms/RouteMaster.aspx"> <span>Manage Routes</span></asp:LinkButton>--%>

                                                    <asp:LinkButton ID="lbtnRouteDriverSchedule" runat="server" CssClass="MultilingualBtn"
                                                        PostBackUrl="~/Forms/RouteVehicleListing.aspx" Style="margin-top: 20px" Visible="false">
                                                        <span runat="server" class="MultilingualBtnspan">
                                                            <div class="ScheduleDrivers">
                                                                <div id="RouteDriver" runat="server" class="MultilingualBtnTextAlign">
                                                                    Route - Driver Schedule
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                    <%-- <asp:LinkButton ID="lbtnRouteDriverSchedule" runat="server" class="btn" Width="140px"
                                                                                PostBackUrl="~/Forms/RouteDriverListing.aspx"> <span>Route - Driver Schedule</span></asp:LinkButton>--%>
                                                                        </td>
                                                <%--<td>
                                                                        &nbsp;
                                                                    </td>--%>

                                                    <asp:LinkButton ID="lbtnRouteVehicleSchedule" runat="server" CssClass="MultilingualBtn"
                                                        PostBackUrl="~/Forms/RouteVehicleListing.aspx" Style="margin-top: 20px">
                                                        <span runat="server" class="MultilingualBtnspan">
                                                            <div class="VehiclesSchedule">
                                                                <div id="RouteVehicleSchedule" runat="server" class="MultilingualBtnTextAlign">
                                                                    Route - Vehicle Schedule
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                    <%--<asp:LinkButton ID="lbtnRouteVehicleSchedule" runat="server" class="btn" Width="140px"
                                                                                PostBackUrl="~/Forms/RouteVehicleListing.aspx"> <span>Route - Vehicle Schedule</span></asp:LinkButton>--%>

                                                    <asp:LinkButton ID="ibtnBackToConfig" runat="server" CssClass="ControlHide" PostBackUrl="~/Forms/RoutePanel.aspx"
                                                        CausesValidation="false" Style="margin-top: 20px">
                                                        <span runat="server" class="MultilingualBtnspan">
                                                            <div class="Back">
                                                                <div id="BackToConfig" runat="server" class="MultilingualBtnTextAlign">
                                                                    Back to Route
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>

                                                </div>
                                            </div>
                                            <div class="clear clearfix">
                                            </div>
                                            <div class="row-Geozone"></div>
                                            <div class="clear clearfix">
                                            </div>
                                        </div>
                                        <asp:Panel ID="pnlRouteAssignment" runat="server">
                                            <div class="form-box col-xs-12 nullpadding">
                                                <h1>
                                                    <span class="icon">
                                                        <img alt="" src="../imagesButton/route-assignment.png" /></span><asp:Label ID="lblCaptionRouteAssignement"
                                                            Text="Route Assignment" runat="server"></asp:Label></h1>
                                                <div class="col-sm-6 col-md-4 nullpadding">
                                                    <div class="col-sm-12 form-group icon-label">
                                                        <div class="col-xs-4 col-sm-4 nullpadding icon-img">
                                                            <asp:Image ID="imgFleetName" runat="server" ImageUrl="../images/fleet-icon.gif" alt="Fleet Name"
                                                                title="Fleet Name" CssClass="icon" />

                                                            <asp:Label Style="white-space: nowrap;" ID="Label1" runat="server" Text="Fleet Name"></asp:Label>
                                                        </div>
                                                        <div class="col-xs-6 col-sm-6 nullpadding">
                                                            <asp:DropDownList ID="ddlFleet" runat="server" class="form-control form-controllinebreak" AutoPostBack="True" OnSelectedIndexChanged="ddlFleet_SelectedIndexChanged">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>


                                                    <div class="col-sm-12 form-group">
                                                        <div class="col-sm-4 col-xs-4 nullpadding icon-img">
                                                            <asp:Image ID="imgVehicle" runat="server" ImageUrl="../images/vehicle-icon.gif" alt="Vehicle"
                                                                ToolTip="Vehicle" />

                                                            <asp:Label Style="white-space: nowrap" ID="Label2" runat="server" Text="Vehicle Name"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-6 col-xs-6 nullpadding">
                                                            <asp:DropDownList ID="ddlVehicle" runat="server" AutoPostBack="true" class="form-control form-controllinebreak">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>


                                                    <div class="col-sm-12 form-group">
                                                        <div class="col-sm-4 col-xs-4 nullpadding icon-img">
                                                            <asp:Image ID="imgRoute" runat="server" AlternateText="Route Name" ImageUrl="../images/icn-route.gif" />

                                                            <asp:Label ID="lblRouteName" runat="server" Style="white-space: nowrap" Text="Route Name"></asp:Label>
                                                        </div>
                                                        <div class="col-sm-6 col-xs-6 nullpadding">
                                                            <asp:DropDownList ID="ddlRouteName" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlRouteName_SelectedIndexChanged" class="form-control form-controllinebreak">
                                                                <asp:ListItem Text="- Select -" Value="0"></asp:ListItem>
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="col-sm-12 nullpadding">
                                                    <asp:CheckBox ID="chktrip" runat="server" Text="Is Round Trip" TextAlign="Left" Visible="false" />

                                                    <div class="col-sm-12 col-md-12 col-lg-12 nullpaddingRight">
                                                        <div class="col-xs-4 col-sm-2 col-md-1 col-lg-1 nullpadding">
                                                            <asp:Image ID="imgDurationFrom" runat="server" ImageUrl="../images/calendar-rht-icon.gif"
                                                                AlternateText="Duration From" />

                                                            <asp:Label ID="lblFrom" runat="server" Text="Route Start Date"></asp:Label>
                                                        </div>
                                                        <div class="col-xs-6 col-sm-2 col-md-1 col-lg-1  padding-width-sm-left">
                                                            <asp:TextBox ID="txtEffectiveFrom" runat="server" onkeypress="return false" onpaste="return false"
                                                                class="form-control form-controllinebreak" AutoCompleteType="Disabled">

                                                            </asp:TextBox><%--<cc1:CalendarExtender ID="calFromdate" runat="server"
                                                                                    CssClass="cal_Theme1" TargetControlID="txtFromDate" Format="dd-MMM-yyyy" OnClientDateSelectionChanged="checkDateRoute">
                                                                                </cc1:CalendarExtender>--%>
                                                        </div>
                                                        <div class="col-xs-3 col-sm-2 col-md-1 col-lg-1 padding-width-sm icon-img">
                                                            <asp:Label ID="Label3" runat="server" Text="Start Time"></asp:Label>
                                                        </div>
                                                        <div class=" col-xs-3 col-sm-2 col-md-1 col-lg-1 padding-width-sm">
                                                            <asp:DropDownList ID="ddlFromHours" runat="server" class="form-control form-controllinebreak" onchange="CheckTimePicker(this,'ddlFromAMPM');"
                                                                Width="">
                                                                <%--<asp:ListItem Value="0" Text="00"></asp:ListItem>--%>
                                                                <asp:ListItem Value="1" Text="01"></asp:ListItem>
                                                                <asp:ListItem Value="2" Text="02"></asp:ListItem>
                                                                <asp:ListItem Value="3" Text="03"></asp:ListItem>
                                                                <asp:ListItem Value="4" Text="04"></asp:ListItem>
                                                                <asp:ListItem Value="5" Text="05"></asp:ListItem>
                                                                <asp:ListItem Value="6" Text="06"></asp:ListItem>
                                                                <asp:ListItem Value="7" Text="07"></asp:ListItem>
                                                                <asp:ListItem Value="8" Text="08"></asp:ListItem>
                                                                <asp:ListItem Value="9" Text="09"></asp:ListItem>
                                                                <asp:ListItem Value="10" Text="10"></asp:ListItem>
                                                                <asp:ListItem Value="11" Text="11"></asp:ListItem>
                                                                <asp:ListItem Value="12" Text="12"></asp:ListItem>
                                                            </asp:DropDownList>
                                                        </div>
                                                        <div class=" col-xs-3 col-sm-2 col-md-1 col-lg-1 padding-width-sm icon-img">
                                                            <asp:DropDownList ID="ddlFromMin" runat="server" class="form-control form-controllinebreak">
                                                                <asp:ListItem>00</asp:ListItem>
                                                                <asp:ListItem>15</asp:ListItem>
                                                                <asp:ListItem>30</asp:ListItem>
                                                                <asp:ListItem>45</asp:ListItem>
                                                            </asp:DropDownList>
                                                        </div>
                                                        <div class=" col-xs-3 col-sm-2 col-md-1 col-lg-1 padding-width-sm icon-img">
                                                            <asp:DropDownList ID="ddlFromAMPM" runat="server" class="form-control form-controllinebreak">
                                                                <asp:ListItem>AM</asp:ListItem>
                                                                <asp:ListItem>PM</asp:ListItem>
                                                            </asp:DropDownList>
                                                        </div>
                                                        <div class=" col-xs-3 col-sm-2 col-md-1 col-lg-1 padding-width-sm icon-img">
                                                            <asp:Label ID="lblend" Style="margin-top: 10px" runat="server" Text="End Time"></asp:Label>
                                                        </div>
                                                        <div class="col-xs-3 col-sm-2 col-md-1 col-lg-1 padding-width-sm">
                                                            <asp:DropDownList ID="ddlToHours" runat="server" class="form-control form-controllinebreak" onchange="CheckTimePicker(this,'ddlToAMPM');"
                                                                Width="">
                                                                <%--<asp:ListItem Value="0" Text="00"></asp:ListItem>--%>
                                                                <asp:ListItem Value="1" Text="01"></asp:ListItem>
                                                                <asp:ListItem Value="2" Text="02"></asp:ListItem>
                                                                <asp:ListItem Value="3" Text="03"></asp:ListItem>
                                                                <asp:ListItem Value="4" Text="04"></asp:ListItem>
                                                                <asp:ListItem Value="5" Text="05"></asp:ListItem>
                                                                <asp:ListItem Value="6" Text="06"></asp:ListItem>
                                                                <asp:ListItem Value="7" Text="07"></asp:ListItem>
                                                                <asp:ListItem Value="8" Text="08"></asp:ListItem>
                                                                <asp:ListItem Value="9" Text="09"></asp:ListItem>
                                                                <asp:ListItem Value="10" Text="10"></asp:ListItem>
                                                                <asp:ListItem Value="11" Text="11"></asp:ListItem>
                                                                <asp:ListItem Value="12" Text="12"></asp:ListItem>
                                                            </asp:DropDownList>
                                                        </div>
                                                        <div class="col-xs-3 col-sm-2 col-md-1 col-lg-1 padding-width-sm icon-img">
                                                            <asp:DropDownList ID="ddlToMin" runat="server" class="form-control">
                                                                <asp:ListItem>00</asp:ListItem>
                                                                <asp:ListItem>15</asp:ListItem>
                                                                <asp:ListItem>30</asp:ListItem>
                                                                <asp:ListItem>45</asp:ListItem>
                                                            </asp:DropDownList>
                                                        </div>
                                                        <div class="col-xs-3 col-sm-2 col-md-1 col-lg-1 padding-width-sm">
                                                            <asp:DropDownList ID="ddlToAMPM" class="form-control form-controllinebreak" runat="server">
                                                                <asp:ListItem>AM</asp:ListItem>
                                                                <asp:ListItem>PM</asp:ListItem>
                                                            </asp:DropDownList>
                                                        </div>
                                                        <div class="col-xs-4 col-sm-2 col-md-1 col-lg-1 nullpadding icon-img">
                                                            <asp:Image ID="imgDurationTo" runat="server" ImageUrl="../images/calendar-lft-icon.gif"
                                                                AlternateText="Duration To" />

                                                            <asp:Label ID="lblTo" Style="margin-top: 10px" runat="server" Text="EffectiveTo"></asp:Label>
                                                        </div>
                                                        <div class="col-xs-6 col-sm-2 col-md-1 col-lg-1 padding-width-sm">
                                                            <asp:TextBox ID="txtRouteEndDate" runat="server" onkeypress="return false" onpaste="return false" AutoCompleteType="Disabled"
                                                                class="form-control form-controllinebreak FutureDate"></asp:TextBox><%--<cc1:CalendarExtender ID="calTodate" runat="server"
                                                                                    CssClass="cal_Theme1" TargetControlID="txtToDate" Format="dd-MMM-yyyy" OnClientDateSelectionChanged="checkDateRoute">
                                                                                </cc1:CalendarExtender>--%>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="clearfix"></div>
                                                <div class="col-sm-12 nullpadding">
                                                    <div class="col-sm-10 col-md-8 col-lg-8 form-horizontal">
                                                        <asp:Panel ID="pnl_advsettings" runat="server" GroupingText="Recurring Frequency">
                                                            <div class="col-sm-12">
                                                                <div class="col-sm-1 nullpadding">
                                                                    <asp:RadioButton ID="rdnDaily" runat="server" CssClass="radio" GroupName="Freq" Text="Daily" onchange="return FreqBtn();" Checked="true" />
                                                                </div>
                                                                <div class="col-sm-11 nullpadding icon-label">
                                                                    <asp:Label ID="lblDaily" runat="server">Route will be scheduled for all days of week till effective To date.</asp:Label>
                                                                </div>
                                                            </div>
                                                            <asp:Panel ID="pnlFrequencyWeekly" runat="server">
                                                                <div class="col-sm-12">
                                                                    <div class="col-sm-1 nullpadding">
                                                                        <asp:RadioButton ID="rdnWeekly" runat="server" CssClass="radio" GroupName="Freq" Text="Weekly" onchange="return FreqBtn();" Checked="false" />
                                                                    </div>
                                                                    <div class="col-sm-11 nullpadding">
                                                                        <asp:CheckBox ID="chkSelectAllDelay" runat="server" CssClass="checkbox" Text="" onclick="selectAllDelay(this.checked);" Visible="false" />
                                                                        <asp:CheckBoxList ID="chkRecurringDelay" runat="server" onclick="CheckItemDelay(this)"
                                                                            RepeatDirection="Horizontal" Width="" CssClass="col-sm-10 col-md-10 col-lg-12" Style="vertical-align: middle">
                                                                        </asp:CheckBoxList>
                                                                    </div>
                                                                </div>
                                                            </asp:Panel>
                                                            <div class="col-sm-12">
                                                                <div class="col-sm-1 col-xs-3 nullpadding">
                                                                    <asp:RadioButton ID="rdnMonth" runat="server" CssClass="radio" GroupName="Freq" Text="Monthly" onchange="return FreqBtn();" Checked="false" /></td>
                                                                </div>
                                                                <asp:Panel ID="pnlFrequencyMonthly" runat="server" Style="display: block">
                                                                    <div class="col-sm-1 col-xs-2 nullpadding icon-label">
                                                                        <asp:Label ID="Label15" runat="server" Text="On"></asp:Label>
                                                                    </div>
                                                                    <div class="col-sm-2 col-xs-4 nullpadding">
                                                                        <asp:TextBox ID="txtFrequencyMonthlyDay" runat="server" CssClass="form-control" onkeypress="return chkNumeric_only_ForDate(event,'txtFrequencyMonthlyDay');"
                                                                            MaxLength="2" Width="" TabIndex="42" onpaste="return false;" ondrop="return false;"></asp:TextBox>
                                                                    </div>
                                                                </asp:Panel>
                                                            </div>
                                                        </asp:Panel>
                                                    </div>
                                                </div>
                                                <div class="col-sm-12 nullpadding">
                                                    <div class="col-sm-6 form-group">
                                                        <asp:LinkButton ID="lbtLoadDetails" runat="server" CssClass="MultilingualBtn" OnClick="AssignVehiclesDrivers" OnClientClick="return Validate(1);" Style="margin-top: 10px">
                                                            <span runat="server" class="MultilingualBtnspan">
                                                                <div class="PopulateVehicle">
                                                                    <div id="LoadDetails" runat="server" class="MultilingualBtnTextAlign">
                                                                        Assign
                                                                    </div>
                                                                </div>
                                                            </span>
                                                        </asp:LinkButton>
                                                        <asp:LinkButton ID="LinkButton1" runat="server" CssClass="MultilingualBtn" OnClick="DeleteVehicleRoute" OnClientClick="Showpopup();" Visible="false">
                                                            <span runat="server" class="MultilingualBtnspan">
                                                                <div class="PopulateVehicle">
                                                                    <div id="Div1" runat="server" class="MultilingualBtnTextAlign">
                                                                        Unassign Route
                                                                    </div>
                                                                </div>
                                                            </span>
                                                        </asp:LinkButton>
                                                        &nbsp;
                                                                        <asp:LinkButton ID="LinkButton2" runat="server" CssClass="MultilingualBtn" OnClick="DeleteVehicleRouteAll" OnClientClick="ShowPopUp();">
                                                                            <span runat="server" class="MultilingualBtnspan">
                                                                                <div class="PopulateVehicle">
                                                                                    <div id="Div2" runat="server" class="MultilingualBtnTextAlign">
                                                                                        Unassign All Route
                                                                                    </div>
                                                                                </div>
                                                                            </span>
                                                                        </asp:LinkButton>&nbsp;&nbsp;&nbsp;<%--PostBackUrl="~/Forms/RoutePanel.aspx" OnClientClick="JavaScript:window.history.back(1); return false;"--%>
                                                        <asp:LinkButton ID="LinkButton3" runat="server" CssClass="MultilingualBtn" PostBackUrl="~/Forms/RoutePanel.aspx"
                                                            CausesValidation="false" Style="margin-top: 10px">
                                                            <span id="Span9" runat="server" class="MultilingualBtnspan">
                                                                <div class="Cancel">
                                                                    <div id="CancelRoute" runat="server" class="MultilingualBtnTextAlign">
                                                                        Cancel
                                                                    </div>
                                                                </div>
                                                            </span>
                                                            </span>
                                                        </asp:LinkButton>
                                                        <asp:LinkButton ID="LinkButton4" runat="server" CssClass="MultilingualBtn" OnClientClick="JavaScript:window.history.back(1); return false;"
                                                            CausesValidation="false" Style="margin-top: 10px" Visible="false">
                                                            <span id="Span1" runat="server" class="MultilingualBtnspan">
                                                                <div class="Cancel">
                                                                    <div id="Div3" runat="server" class="MultilingualBtnTextAlign">
                                                                        Cancel
                                                                    </div>
                                                                </div>
                                                            </span>
                                                            </span>
                                                        </asp:LinkButton>
                                                    </div>
                                                </div>
                                                <div class="clear clearfix">
                                                </div>
                                            </div>
                                        </asp:Panel>
                                        <div class="clear clearfix">
                                        </div>
                                        <asp:HiddenField ID="hdnRecurrenceDaysDelay" runat="server" />
                                        <asp:HiddenField ID="hdnSelectedFleetList" runat="server" />
                                        <asp:HiddenField ID="hdnSelectedVehiclesList" runat="server" />
                                        <asp:HiddenField ID="hdnSelectedDriverGroupList" runat="server" />
                                        <asp:HiddenField ID="hdnSelectedDriverList" runat="server" />
                                        <asp:HiddenField ID="hdnAssignedVehicles" runat="server" />
                                        <asp:HiddenField ID="hdnAssignedDrivers" runat="server" />
                                        <asp:Panel ID="pnlUnassignedList" runat="server" CssClass="ControlHide">
                                            <div class="form-box">
                                                <h1></h1>
                                                <div id="grid-dsply">
                                                    <div class="fleetContent">
                                                        <table border="0" cellspacing="0px" cellpadding="0" class="form-tbl" width="100%">
                                                            <tr>
                                                                <td width="49.5%" style="padding-top: 0px; vertical-align: top">
                                                                    <div class="table-responsive">
                                                                        <asp:GridView ID="gvFleetVehiclesList" runat="server" AllowPaging="False" AllowSorting="False"
                                                                            AutoGenerateColumns="False" BackColor="#CCCCCC" CellPadding="0" CellSpacing="1"
                                                                            GridLines="None" Width="100%" OnRowDataBound="gvFleetVehiclesList_RowDataBound">
                                                                            <Columns>
                                                                                <asp:TemplateField>
                                                                                    <HeaderTemplate>
                                                                                        <table cellpadding="0" cellspacing="0" width="100%">
                                                                                            <tr>
                                                                                                <td>&nbsp;&nbsp;&nbsp;
                                                                                                </td>
                                                                                                <td style="width: 5%;">
                                                                                                    <asp:CheckBox ID="chkFleets" TabIndex="3" runat="server" onclick="SelectAllParentGrid(this.checked, 
                                                                                            'gvFleetVehiclesList_ctl', '_chkFleetID', '_hdnFleetID', 'hdnSelectedFleetList', '_gvVehiclesList_ctl01_chkSelectAllVehicles',
                                                                                            '_chkVehiclesCheck', 'hdnSelectedVehiclesList', '_hdnVehicleID');"
                                                                                                        Style="visibility: hidden" />
                                                                                                </td>
                                                                                                <td style="width: 94%;">
                                                                                                    <asp:Label ID="lblFleetList" runat="server" Text="Fleet List"></asp:Label>
                                                                                                    &nbsp;
                                                                                            <asp:Label ID="Label14" runat="server" ForeColor="Red">*</asp:Label>
                                                                                                </td>
                                                                                            </tr>
                                                                                        </table>
                                                                                    </HeaderTemplate>
                                                                                    <ItemTemplate>
                                                                                        <table cellpadding="0" cellspacing="0" width="100%">
                                                                                            <tr>
                                                                                                <td>
                                                                                                    <img id="imgExpandCollapse" onclick="ExpandOrCollpaseRouteAgmt('_trVehiclesList', this.id);"
                                                                                                        src="../images/gvCollapsedButton.png" runat="server" />
                                                                                                </td>
                                                                                                <td style="width: 5%;">
                                                                                                    <asp:CheckBox ID="chkFleetID" runat="server" TabIndex="4" onclick="SelectOrUnSelectHeaderRoute(this.id, this.checked, 
                                                                                            'gvFleetVehiclesList_ctl', '_chkFleetID', '_hdnFleetID', 'hdnSelectedFleetList', 'gvFleetVehiclesList_ctl01_chkFleets');
                                                                                            UnCheckChild(this.id, this.checked, '_gvVehiclesList_ctl01_chkSelectAllVehicles', '_chkVehiclesCheck', 'hdnSelectedVehiclesList', 
                                                                                            '_hdnVehicleID', '_chkFleetID', '_hdnFleetID', 'hdnSelectedFleetList');"
                                                                                                        Style="visibility: hidden;" />
                                                                                                    <asp:HiddenField ID="hdnFleetID" runat="server" Value='<%# Eval("FleetId") %>' />
                                                                                                </td>
                                                                                                <td style="width: 94%;">
                                                                                                    <asp:Label ID="lblFleetName" runat="server" Text='<%# Eval("FleetName") %>'></asp:Label>
                                                                                                </td>
                                                                                            </tr>
                                                                                            <tr id="trVehiclesList" class="ControlHide" runat="server" style="padding-bottom: 5px">
                                                                                                <td></td>
                                                                                                <td colspan="2" style="margin: 0px; padding: 0px">
                                                                                                    <asp:GridView ID="gvVehiclesList" runat="server" AllowPaging="False" AllowSorting="False"
                                                                                                        AutoGenerateColumns="False" BackColor="#CCCCCC" CellPadding="0" CellSpacing="1"
                                                                                                        GridLines="None" Width="100%" OnRowDataBound="gvVehiclesList_RowDataBound" OnRowCreated="gvVehiclesList_RowCreated">
                                                                                                        <Columns>
                                                                                                            <asp:TemplateField ItemStyle-Width="1%">
                                                                                                                <ItemTemplate>
                                                                                                                    <asp:CheckBox ID="chkVehiclesCheck" TabIndex="6" runat="server" onclick="SelectOrUnSelectChildHead(this.id, this.checked, 
                                                                                                            'hdnSelectedVehiclesList', '_hdnVehicleID', '_chkVehiclesCheck', '_chkSelectAllVehicles', '_chkFleetID');" />
                                                                                                                    <asp:HiddenField ID="hdnVehicleID" runat="server" Value='<%# Eval("VehicleId") %>' />
                                                                                                                </ItemTemplate>
                                                                                                                <HeaderTemplate>
                                                                                                                    <asp:CheckBox ID="chkSelectAllVehicles" TabIndex="5" runat="server" onclick="SelectAllChilds(this.id, this.checked, 
                                                                                                                '_chkVehiclesCheck', 'hdnSelectedVehiclesList', '_hdnVehicleID', '_chkFleetID', '_hdnFleetID', 'hdnSelectedFleetList');" />
                                                                                                                </HeaderTemplate>
                                                                                                                <HeaderStyle HorizontalAlign="Left" Width="5px" />
                                                                                                            </asp:TemplateField>
                                                                                                            <asp:TemplateField ItemStyle-Width="25%">
                                                                                                                <HeaderTemplate>
                                                                                                                    <asp:Label ID="lblFleetList" runat="server" Text="Vehicle Name"></asp:Label>
                                                                                                                </HeaderTemplate>
                                                                                                                <ItemTemplate>
                                                                                                                    <asp:Label ID="lblVehicleDescription" runat="server" Text='<%# Eval("VehicleDescription") %>'
                                                                                                                        ForeColor='<%# (Eval("AssignedStatus").ToString() == "1") ? System.Drawing.Color.Blue : System.Drawing.Color.Black %>' />
                                                                                                                </ItemTemplate>
                                                                                                                <%--<HeaderStyle HorizontalAlign="Left" />--%>
                                                                                                            </asp:TemplateField>
                                                                                                        </Columns>
                                                                                                        <EmptyDataTemplate>
                                                                                                            No vehicles found.
                                                                                                        </EmptyDataTemplate>
                                                                                                        <RowStyle CssClass="fleetCon" />
                                                                                                        <FooterStyle CssClass="fleetFoot" />
                                                                                                        <AlternatingRowStyle CssClass="fleetConalt" />
                                                                                                        <PagerStyle CssClass="fleetFoot" HorizontalAlign="Left" />
                                                                                                        <HeaderStyle CssClass="fleetHead" />
                                                                                                        <EmptyDataRowStyle CssClass="fleetHead" />
                                                                                                    </asp:GridView>
                                                                                                </td>
                                                                                            </tr>
                                                                                        </table>
                                                                                    </ItemTemplate>
                                                                                </asp:TemplateField>
                                                                            </Columns>
                                                                            <EmptyDataTemplate>
                                                                                No fleet found.
                                                                            </EmptyDataTemplate>
                                                                            <RowStyle CssClass="fleetCon" />
                                                                            <FooterStyle CssClass="fleetFoot" />
                                                                            <AlternatingRowStyle CssClass="fleetConalt" />
                                                                            <PagerStyle CssClass="fleetFoot" HorizontalAlign="Left" />
                                                                            <HeaderStyle CssClass="fleetHead" />
                                                                            <EmptyDataRowStyle CssClass="fleetHead" />
                                                                        </asp:GridView>
                                                                    </div>
                                                                </td>
                                                                <td width="1%"></td>
                                                                <td width="49.5%" style="padding-top: 0px; vertical-align: top" class="ControlHide">
                                                                    <asp:GridView ID="gvDriverGroupDriverList" runat="server" AllowPaging="False" AllowSorting="False"
                                                                        AutoGenerateColumns="False" BackColor="#CCCCCC" CellPadding="0" CellSpacing="1"
                                                                        GridLines="None" Width="100%" OnRowDataBound="gvDriverGroupDriverList_RowDataBound">
                                                                        <Columns>
                                                                            <asp:TemplateField>
                                                                                <HeaderTemplate>
                                                                                    <table cellpadding="0" cellspacing="0" width="100%">
                                                                                        <tr>
                                                                                            <td>&nbsp;&nbsp;&nbsp;
                                                                                            </td>
                                                                                            <td style="width: 5%;">
                                                                                                <asp:CheckBox ID="chkDriverGroup" TabIndex="3" runat="server" onclick="SelectAllParentGrid(this.checked, 
                                                                                            'gvDriverGroupDriverList_ctl', '_chkDriverGroupID', '_hdnDriverGroupID', 'hdnSelectedDriverGroupList', '_gvDriversList_ctl01_chkSelectAllDrivers',
                                                                                            '_chkDriverCheck', 'hdnSelectedDriverList', '_hdnDriverID');"
                                                                                                    Style="visibility: hidden" />
                                                                                            </td>
                                                                                            <td style="width: 94%;">
                                                                                                <asp:Label ID="lblDriverGroupList" runat="server" Text="Driver Group List"></asp:Label>
                                                                                                &nbsp;
                                                                                            <asp:Label ID="Label14" runat="server" ForeColor="Red">*</asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
                                                                                </HeaderTemplate>
                                                                                <ItemTemplate>
                                                                                    <table cellpadding="0" cellspacing="0" width="100%">
                                                                                        <tr>
                                                                                            <td>
                                                                                                <img id="imgExpandCollapse" onclick="ExpandOrCollpaseRouteAgmt('_trDriversList', this.id);"
                                                                                                    src="../images/gvCollapsedButton.png" runat="server" />
                                                                                            </td>
                                                                                            <td style="width: 5%;">
                                                                                                <asp:CheckBox ID="chkDriverGroupID" runat="server" TabIndex="4" onclick="SelectOrUnSelectHeaderRoute(this.id, this.checked, 
                                                                                            'gvDriverGroupDriverList_ctl', '_chkDriverGroupID', '_hdnDriverGroupID', 'hdnSelectedDriverGroupList', 'gvDriverGroupDriverList_ctl01_chkDriverGroup');
                                                                                            UnCheckChild(this.id, this.checked, '_gvDriversList_ctl01_chkSelectAllDrivers', '_chkDriverCheck', 'hdnSelectedDriverList', 
                                                                                            '_hdnDriverID', '_chkDriverGroupID', '_hdnDriverGroupID', 'hdnSelectedDriverGroupList');"
                                                                                                    Style="visibility: hidden" />
                                                                                                <asp:HiddenField ID="hdnDriverGroupID" runat="server" Value='<%# Eval("DriverGroupId") %>' />
                                                                                            </td>
                                                                                            <td style="width: 94%;">
                                                                                                <asp:Label ID="lblDriverGroupName" runat="server" Text='<%# Eval("DriverGroupName") %>'></asp:Label>
                                                                                            </td>
                                                                                        </tr>
                                                                                        <tr id="trDriversList" class="ControlHide" runat="server" style="padding-bottom: 5px">
                                                                                            <td></td>
                                                                                            <td colspan="2" style="margin: 0px; padding: 0px">
                                                                                                <asp:GridView ID="gvDriversList" runat="server" AllowPaging="False" AllowSorting="False"
                                                                                                    AutoGenerateColumns="False" BackColor="#CCCCCC" CellPadding="0" CellSpacing="1"
                                                                                                    GridLines="None" Width="100%" OnRowDataBound="gvDriversList_RowDataBound" OnRowCreated="gvDriversList_RowCreated">
                                                                                                    <Columns>
                                                                                                        <asp:TemplateField ItemStyle-Width="5%">
                                                                                                            <ItemTemplate>
                                                                                                                <asp:CheckBox ID="chkDriverCheck" TabIndex="6" runat="server" onclick="SelectOrUnSelectChildHead(this.id, this.checked, 
                                                                                                            'hdnSelectedDriverList', '_hdnDriverID', '_chkDriverCheck', '_chkSelectAllDrivers', '_chkDriverGroupID');" />
                                                                                                                <asp:HiddenField ID="hdnDriverID" runat="server" Value='<%# Eval("DriverId") %>' />
                                                                                                            </ItemTemplate>
                                                                                                            <HeaderTemplate>
                                                                                                                <asp:CheckBox ID="chkSelectAllDrivers" TabIndex="5" runat="server" onclick="SelectAllChilds(this.id, this.checked, 
                                                                                                                '_chkDriverCheck', 'hdnSelectedDriverList', '_hdnDriverID', '_chkDriverGroupID', '_hdnDriverGroupID', 'hdnSelectedDriverGroupList');" />
                                                                                                            </HeaderTemplate>
                                                                                                            <%--<HeaderStyle HorizontalAlign="Left" />--%>
                                                                                                        </asp:TemplateField>
                                                                                                        <asp:TemplateField HeaderText="Driver Name" ItemStyle-Width="25%">
                                                                                                            <HeaderTemplate>
                                                                                                                <asp:Label ID="lblDriverName" runat="server" Text="Driver Name">
                                                                                                                </asp:Label>
                                                                                                            </HeaderTemplate>
                                                                                                            <ItemTemplate>
                                                                                                                <asp:Label ID="lblDriverName" runat="server" Text='<%# Eval("DriverName") %>' ForeColor='<%# (Eval("AssignedStatus").ToString() == "1") ? System.Drawing.Color.Blue : System.Drawing.Color.Black %>' />
                                                                                                            </ItemTemplate>
                                                                                                            <%--<HeaderStyle HorizontalAlign="Left" />--%>
                                                                                                        </asp:TemplateField>
                                                                                                    </Columns>
                                                                                                    <EmptyDataTemplate>
                                                                                                        No drivers found.
                                                                                                    </EmptyDataTemplate>
                                                                                                    <RowStyle CssClass="fleetCon" />
                                                                                                    <FooterStyle CssClass="fleetFoot" />
                                                                                                    <AlternatingRowStyle CssClass="fleetConalt" />
                                                                                                    <PagerStyle CssClass="fleetFoot" HorizontalAlign="Left" />
                                                                                                    <HeaderStyle CssClass="fleetHead" />
                                                                                                    <EmptyDataRowStyle CssClass="fleetHead" />
                                                                                                </asp:GridView>
                                                                                            </td>
                                                                                        </tr>
                                                                                    </table>
                                                                                </ItemTemplate>
                                                                            </asp:TemplateField>
                                                                        </Columns>
                                                                        <EmptyDataTemplate>
                                                                            No driver groups found.
                                                                        </EmptyDataTemplate>
                                                                        <RowStyle CssClass="fleetCon" />
                                                                        <FooterStyle CssClass="fleetFoot" />
                                                                        <AlternatingRowStyle CssClass="fleetConalt" />
                                                                        <PagerStyle CssClass="fleetFoot" HorizontalAlign="Left" />
                                                                        <HeaderStyle CssClass="fleetHead" />
                                                                        <EmptyDataRowStyle CssClass="fleetHead" />
                                                                    </asp:GridView>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                    <div class="form-box" style="margin: 0; padding: 0">
                                                        <table width="100%" class="form-tbl" style="margin: 0; padding: 0">
                                                            <tr>
                                                                <td>
                                                                    <asp:Label ID="lblDisclaimerMsg" runat="server" ForeColor="Red" Text=""></asp:Label>
                                                                </td>
                                                                <td width="10%" valign="bottom" style="padding-left: 20px">
                                                                    <asp:LinkButton ID="btnAssignVehiclesDrivers" runat="server" CssClass="MultilingualBtn"
                                                                        OnClick="AssignVehiclesDrivers" OnClientClick="return Validate(1);">
                                                                        <span runat="server" class="MultilingualBtnspan">
                                                                            <div class="Save">
                                                                                <div id="AssignVehicles" runat="server" class="MultilingualBtnTextAlign">
                                                                                    Save
                                                                                </div>
                                                                            </div>
                                                                        </span>
                                                                    </asp:LinkButton>
                                                                    <%--<asp:ImageButton ID="btnAssignVehiclesDrivers" runat="server" ImageUrl="~/images/btn-save.jpg"
                                                                    OnClick="AssignVehiclesDrivers" OnClientClick="return Validate(1);" />--%>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </div>
                                                </div>
                                                <div class="clear clearfix">
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                    <div class="clear clearfix">
                                    </div>
                                </div>
                            </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>
                </ContentTemplate>
            </asp:UpdatePanel>

            <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="progressPopUp"
                TargetControlID="btnTesting">
            </cc1:ModalPopupExtender>
            <asp:Button ID="btnTesting" Style="display: none;" runat="server" />
            <asp:Panel ID="progressPopUp" runat="server" CssClass="processMessage" Style="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>

            <%--<script language="JavaScript1.2" type="text/javascript" src="../js/GridCheckBoxMaintaining.js"></script>--%>

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

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

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

                function Freq() { //chkRecurringDelay txtFrequencyMonthlyDay
                    // document.getElementById('chkRecurringDelay').disabled = true;

                    var isenablewk = false;
                    var isenableMn = false;
                    if (document.getElementById('rdnWeekly') != null) {
                        if (document.getElementById('rdnWeekly').checked == true) {
                            isenablewk = false;
                            isenableMn = true;
                        }
                    }
                    if (document.getElementById('rdnMonth') != null) {
                        if (document.getElementById('rdnMonth').checked == true) {
                            isenablewk = true;
                            isenableMn = false;
                        }
                    }
                    if (document.getElementById('rdnDaily') != null) {
                        if (document.getElementById('rdnDaily').checked == true) {
                            isenablewk = true;
                            isenableMn = true;
                        }
                    }

                    var tbl = document.getElementById('<%= chkRecurringDelay.ClientID %>');
                    if (tbl == null) return;
                    var checkboxCollection = tbl.getElementsByTagName('input');
                    if (checkboxCollection == null) return;
                    for (var i = 0; i < checkboxCollection.length; i++) {
                        if (checkboxCollection[i].type.toString().toLowerCase() == "checkbox") {
                            if (document.getElementById('<%= hdnRecurrenceDaysDelay.ClientID %>').value == "" || document.getElementById('<%= hdnRecurrenceDaysDelay.ClientID %>').value == null)
                            { checkboxCollection[i].checked = false; }
                            checkboxCollection[i].disabled = isenablewk;
                        }
                    }

                    // document.getElementById('chkSelectAllDelay').disabled = isenablewk;
                    document.getElementById('txtFrequencyMonthlyDay').disabled = isenableMn;

                }
                function FreqBtn() { //chkRecurringDelay txtFrequencyMonthlyDay
                    // document.getElementById('chkRecurringDelay').disabled = true;

                    var isenablewk = false;
                    var isenableMn = false;
                    if (document.getElementById('rdnWeekly') != null) {
                        if (document.getElementById('rdnWeekly').checked == true) {
                            isenablewk = false;
                            isenableMn = true;
                            document.getElementById('txtFrequencyMonthlyDay').value = "";
                        }
                    }
                    if (document.getElementById('rdnMonth') != null) {
                        if (document.getElementById('rdnMonth').checked == true) {
                            isenablewk = true;
                            isenableMn = false;
                        }
                    }
                    if (document.getElementById('rdnDaily') != null) {
                        if (document.getElementById('rdnDaily').checked == true) {
                            isenablewk = true;
                            isenableMn = true;
                            document.getElementById('txtFrequencyMonthlyDay').value = "";
                        }
                    }

                    var tbl = document.getElementById('<%= chkRecurringDelay.ClientID %>');
                    if (tbl == null) return;
                    var checkboxCollection = tbl.getElementsByTagName('input');
                    if (checkboxCollection == null) return;
                    for (var i = 0; i < checkboxCollection.length; i++) {
                        if (checkboxCollection[i].type.toString().toLowerCase() == "checkbox") {
                            checkboxCollection[i].checked = false;
                            checkboxCollection[i].disabled = isenablewk;
                        }
                    }

                    // document.getElementById('chkSelectAllDelay').disabled = isenablewk;
                    document.getElementById('txtFrequencyMonthlyDay').disabled = isenableMn;

                }
                // function prev() {  window.history.back(1); return false; }
            </script>


            <!-- Content Ends Here -->
            <uc2:Footer ID="ucFooter" runat="server" />
        </form>
    </div>
</body>
</html>
