<%@ page language="C#" autoeventwireup="true" inherits="Forms_GeoZoneVehicleAssignment, App_Web_tixsvc3u" %>

<%@ 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="TimePicker" Namespace="MKB.TimePicker" TagPrefix="MKB" %>

<%--<%@ 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" %>--%>

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

<!DOCTYPE html>
<html lang="en">
<head id="Head1" runat="server">
    <title>tSense-IoTGeozone Vehicle Assignment</title>
    <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" />

    <meta content="charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

    <link id="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="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link id="ieonly" runat="server" rel="stylesheet" type="text/css" href="" />
    <link id="uicore" runat="server" type="text/css" href="../css/ui.core.css" rel="stylesheet" />
    <link id="uitheme" runat="server" type="text/css" href="../css/ui.theme.css" rel="stylesheet" />

    <%--Custom Theme for DevEx 14.2--%>
    <link id="GridView" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/GridView/grid.css" rel="stylesheet" />
    <link id="Editors" runat="server" type="text/css" href="~/App_Themes/Office2003Blue/Editors/styles.css" rel="stylesheet" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <link id="uidatepicker" runat="server" type="text/css" href="../css/ui.datepicker.css"
        rel="stylesheet" />

    <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 language="JavaScript1.2" type="text/javascript" src="../js/GridCheckBoxMaintaining.js"></script>

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

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

    <script type="text/javascript" src="../js/JQQueryDatePicker.js"></script>
    <%--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/wow.min.js"></script>
</head>
<body>
    <div class="pageContainer">
        <form id="form1" runat="server">
            <asp:ScriptManager ID="GeozoneManager" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel ID="uptGeozone" runat="server">
                <ContentTemplate>
                    <uc1:Header ID="ucHeader" runat="server" />
                    <!-- Content Starts Here -->
                    <div id="outer">
                        <div id="inner">
                            <div id="float-wrap">
                                <!-- Main Content Starts Here -->
                                <div id="content">
                                    <div class="content-wrap">
                                        <div id="top-content" class="head-part">

                                            <div id="heading" class="col-sm-3 col-md-3 col-lg-3">
                                                <img class="icon" src="../images/geozone-icon.jpg" alt="" />
                                                <h1>
                                                    <asp:Literal ID="lblGeozoneCaption" runat="server"></asp:Literal></h1>

                                                <asp:LinkButton ID="lnkHomeCaption" runat="server"></asp:LinkButton>
                                                <span>&gt;</span><span><a href="GeozonePanel.aspx"><asp:Label runat="server" ID="lblCaptionGeozone"
                                                    Text="Geozone"></asp:Label></a></span>&gt;<span><a href="GeozoneVehicleAssignment.aspx"><asp:Label
                                                        runat="server" ID="lblAssignmentCaption" Text="Assignment"></asp:Label></a></span>
                                            </div>
                                            <div id="" class="col-sm-6 col-md-5 col-lg-6 padding-width-sm-right">
                                                <div class="topIconControl">
                                                    <div class="col-sm-12 padding-width-sm-right">
                                                        <div class="col-sm-4 col-lg-4 topControlAlign controllinebreak">
                                                            <div class="col-xs-1 col-sm-2 col-md-2 col-lg-1 padding-width-sm-right">
                                                                <img id="icnCategory" class="icon" runat="server" src="../images/icn-category.gif" align="top"
                                                                    alt="Category" />
                                                            </div>
                                                            <div class="col-xs-11 col-sm-9 col-md-10 col-lg-11 padding-width-sm">
                                                                <asp:DropDownList ID="ddlCategory" runat="server" CssClass="form-control FontAlign" AutoPostBack="True" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged">
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>
                                                        <div class="col-sm-4 col-lg-4 topControlAlign controllinebreak">
                                                            <div class="col-xs-1 col-sm-2 col-md-2 col-lg-1 padding-width-sm-right">
                                                                <img id="icnGeozoneName" class="icon" runat="server" src="../images/icn-geo-zone-name.gif" align="top"
                                                                    alt="Geozone Name" />
                                                            </div>
                                                            <div class="col-xs-11 col-sm-9 col-md-10 col-lg-11 padding-width-sm">
                                                                <asp:DropDownList ID="ddlGeozone" runat="server" onchange="ShowPopUp();" CssClass="form-control FontAlign" AutoPostBack="true" OnSelectedIndexChanged="ddlGeozone_SelectedIndexChanged">
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>
                                                        <div class="col-sm-2 col-lg-2 topControlAlign controllinebreak ControlHide">
                                                            <div class="col-xs-1 col-sm-3 col-md-3 col-lg-2 padding-width-sm-right">
                                                                <img id="imgDirection" class="icon" runat="server" src="../images/compass.png" align="top" alt="Direction" />
                                                            </div>
                                                            <div class="col-xs-11 col-sm-9 col-md-9 col-lg-10 padding-width-sm" style="margin-top: 4px;">
                                                                <asp:Label ID="lblDirection" runat="server" Text="Direction"></asp:Label>
                                                            </div>
                                                        </div>
                                                        <div class="col-sm-2 col-lg-2 topControlAlign controllinebreak ControlHide">
                                                            <div class="col-xs-1 col-sm-3 col-md-3 col-lg-2 padding-width-sm-right">
                                                                <img id="imgSeverity" runat="server" class="icon" src="../images/icn-severity.gif" align="top"
                                                                    alt="Severity" />
                                                            </div>
                                                            <div class="col-xs-11 col-sm-9 col-md-9 col-lg-10 padding-width-sm" style="margin-top: 4px;">
                                                                <asp:Label ID="lblSeverity" runat="server" Text="Severity"></asp:Label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-12 padding-width-sm-right row-Geozone">
                                                        <div class="col-sm-4 col-lg-4 topControlAlign controllinebreak">
                                                            <div class="col-xs-1 col-sm-2 col-md-2 col-lg-1 padding-width-sm-right">
                                                                <asp:Image ID="Image1" runat="server" ImageUrl="../images/icn-time.gif" alt="Geozone Time Limit"
                                                                    title="Fleet Name" CssClass="icon" Height="13" Width="16" Visible="false" />
                                                            </div>
                                                            <div class="col-xs-11 col-sm-9 col-md-10 col-lg-11 padding-width-sm">
                                                                <asp:LinkButton ID="ibtDelayNotification" runat="server" CssClass="MultilingualBtn"
                                                                    OnClientClick="LoadDelayNotifyPopup();EnableControlDelay(false);return false;">
                                                                    <span id="Span2" runat="server" class="MultilingualBtnspan">
                                                                        <div class="AddGeozone">
                                                                            <div id="DelayNotification" runat="server" class="MultilingualBtnTextAlign">
                                                                                Settings
                                                                            </div>
                                                                        </div>
                                                                    </span>
                                                                </asp:LinkButton>
                                                            </div>
                                                        </div>
                                                        <div class="col-sm-4 col-lg-4 topControlAlign controllinebreak">
                                                            <div class="col-xs-1 col-sm-2 col-md-2 col-lg-1 padding-width-sm-right">
                                                                <asp:Image ID="imgFleetIcon" CssClass="icon" ImageUrl="../images/fleet-icon.gif" AlternateText="Fleet Name" ToolTip="Fleet"
                                                                    runat="server" />
                                                            </div>
                                                            <div class="col-xs-11 col-sm-9 col-md-10 col-lg-11 padding-width-sm">
                                                                <asp:DropDownList ID="ddlFleet" runat="server" CssClass="form-control FontAlign" AutoPostBack="True" OnSelectedIndexChanged="ddlFleet_SelectedIndexChanged">
                                                                    <asp:ListItem Text="- Select -" Value="0"></asp:ListItem>
                                                                </asp:DropDownList>
                                                            </div>
                                                        </div>

                                                        <div class="ControlHide">
                                                            <%--<asp:Label ID="lblGTimeLimitMetrics" runat="server" Text="hrs"></asp:Label>--%>
                                                            <asp:ImageButton PostBackUrl="~/Forms/ManageGeozone.aspx" ID="ibtManageGeozones1"
                                                                runat="server" ImageUrl="../images/btn-manage-geozone.jpg" OnClientClick="ShowPopUp();"
                                                                Visible="false" />
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="col-sm-3 col-md-4 col-lg-3 head-part-btns">
                                                <div class="pull-right">
                                                    <asp:LinkButton ID="ibtManageGeozones" runat="server" CssClass="MultilingualBtn"
                                                        OnClientClick="ShowPopUp();" PostBackUrl="~/Forms/ManageGeozone.aspx">
                                                        <span runat="server" class="MultilingualBtnspan">
                                                            <div class="ManageGeozone">
                                                                <div id="ManageGeozoneDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Manage Geozone
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>&nbsp;
                                                            <asp:ImageButton PostBackUrl="~/Forms/VehicleGeozoneAssignment.aspx" ID="hrlVehicleGeozone"
                                                                runat="server" ImageUrl="../images/btn-assign-geozones.jpg" OnClientClick="ShowPopUp();"
                                                                Visible="false" />
                                                    <asp:LinkButton ID="lnkVehGeoAgmt" runat="server" CssClass="MultilingualBtn" OnClientClick="ShowPopUp();"
                                                        PostBackUrl="~/Forms/VehicleGeozoneAssignment.aspx">
                                                        <span runat="server" class="MultilingualBtnspan">
                                                            <div class="AssignGeozone">
                                                                <div id="AssignGeozoneDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Assign Geozones
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                </div>
                                            </div>
                                            <div class="clear clearfix">
                                            </div>
                                            <div class="row-Geozone"></div>
                                        </div>
                                        <asp:UpdatePanel ID="updVehicleGeozoneAssignment" runat="server" UpdateMode="Conditional">
                                            <ContentTemplate>
                                                <asp:Timer ID="tmrCheck" runat="server" Enabled="false" Interval="1000" OnTick="tmrCheck_Tick">
                                                </asp:Timer>
                                                <div id="grid-dsply">
                                                    <div id="top">
                                                        <div class="col-sm-12 padding-width-md">
                                                            <span class="icon">
                                                                <img src="../images/icn-unassigned-vehicles.gif" /></span> <span class="txt">
                                                                    <asp:Label ID="lblUnassignedVeh" Text="Unassigned Vehicles" runat="server"></asp:Label>
                                                                    &nbsp; </span>

                                                            <span class="controlLeft checkbox chkSettings">
                                                                <asp:CheckBox ID="chkunAuthorizedGeozone" runat="server" Text="Unauthorised Geozone" />
                                                            </span>
                                                            <div class="clear clearfix">
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <asp:HiddenField ID="hdnVehicleIdsToBeAssinged" runat="server" />
                                                    <asp:HiddenField ID="hdnAssignedVehicleIds" runat="server" />
                                                    <asp:HiddenField ID="hdnIsAssigned" runat="server" />
                                                    <div class="clear clearfix">
                                                    </div>
                                                    <div class="table-responsive">
                                                        <dxw:ASPxGridView ID="gvUnAssignedVehicles" runat="server" EnableTheming="true" Theme="Office2003Blue"
                                                            CssFilePath="~/App_Themes/Office2003 Blue/{0}/grid.css" CssPostfix="Office2003_Blue"
                                                            Width="100%" AutoGenerateColumns="False" KeyFieldName="BoxId" ClientInstanceName="gvUnAssignedVehicles"
                                                            OnHtmlRowCreated="gvUnassignedVehicles_OnHtmlRowCreated" OnFillContextMenuItems="gvData_FillContextMenuItems">
                                                            <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="50" />
                                                            <ClientSideEvents SelectionChanged="function(s, e) { OnGridSelectionChanged(1); }" />
                                                            <%--<Images ImageFolder="~/App_Themes/Office2003 Blue/{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>
                                                                <PagerTopPanel CssClass="PageFooter">
                                                                </PagerTopPanel>
                                                            </Styles>
                                                            <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                                PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                                NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                                NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true"
                                                                PageSize="15">
                                                            </SettingsPager>
                                                            <SettingsContextMenu Enabled="false" EnableGroupPanelMenu="False" ColumnMenuItemVisibility-GroupByColumn="false" ColumnMenuItemVisibility-ShowGroupPanel="false"
                                                                EnableFooterMenu="False" ColumnMenuItemVisibility-ShowFooter="false" RowMenuItemVisibility-NewRow="false" RowMenuItemVisibility-EditRow="false"
                                                                RowMenuItemVisibility-DeleteRow="false" EnableRowMenu="false">
                                                            </SettingsContextMenu>
                                                            <ClientSideEvents ContextMenuItemClick="function(s,e) {                                                         
                                                                                switch(e.item.name) {    
                                                                                        case 'SelectAll':
                                                                                            gvUnAssignedVehicles.SelectAllRowsOnPage();
                                                                                            break;
                                                                                        case 'DeselectAll':
                                                                                            gvUnAssignedVehicles.UnselectAllRowsOnPage();
                                                                                            break;} }" />
                                                            <Columns>
                                                                <dxw:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Name="Checkbox"
                                                                    Width="5%">
                                                                    <HeaderTemplate>
                                                                        <input type="checkbox" style="vertical-align: middle;" onclick="gvUnAssignedVehicles.SelectAllRowsOnPage(this.checked);"
                                                                            title="Select/Unselect all rows on the page"></input>
                                                                    </HeaderTemplate>
                                                                    <HeaderStyle Paddings-PaddingTop="1" Paddings-PaddingBottom="1" HorizontalAlign="Center" />
                                                                </dxw:GridViewCommandColumn>
                                                                <dxw:GridViewDataTextColumn Width="15%" Caption="Vehicle Description" FieldName="VehicleDescription">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ID="imgGeozoneVehicleName" runat="server" ImageUrl="..\Images\icn-vehicle-name.gif"
                                                                                align="top" AlternateText="Vehicle Name" ToolTip="Vehicle Name" />
                                                                        </span><span class="label">
                                                                            <asp:Label ID="lblUnAssVehNameCaption" runat="server" Text="Vehicle Name"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Width="10%" Caption="Vehicle TypeName" FieldName="VehicleTypeName">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ID="imgGeozoneVehicleType" runat="server" ImageUrl="..\Images\icn-vehicle-type.gif"
                                                                                align="top" AlternateText="Vehicle Type" ToolTip="Vehicle Type" />
                                                                        </span><span class="label">
                                                                            <asp:Label ID="lblUnAssVehTypeCaption" runat="server" Text="Vehicle Type"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="Make Name" FieldName="MakeName" Width="15%">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ID="imgGeozoneVehicleMake" runat="server" ImageUrl="..\Images\icn-make-name.gif"
                                                                                align="top" AlternateText="Vehicle Make" ToolTip="Vehicle Make" />
                                                                        </span><span class="label">
                                                                            <asp:Label ID="lblUnAssMakeNameCaption" runat="server" Text="Make Name"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Width="15%" Caption="Model Name" FieldName="ModelName">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ID="imgGeozoneVehicleModel" runat="server" ImageUrl="..\Images\icn-model-name.gif"
                                                                                align="top" AlternateText="Vehicle Model" ToolTip="Vehicle Model" />
                                                                        </span><span class="label">
                                                                            <asp:Label ID="lblUnAssModelNameCaption" runat="server" Text="Model Name"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="Model Year" FieldName="ModelYear" Width="10%">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ID="imgGeozoneVehicleYear" runat="server" ImageUrl="..\Images\icn-vehicle-year.gif"
                                                                                align="top" AlternateText="Vehicle Year" ToolTip="Vehicle Year" />
                                                                        </span><span class="label">
                                                                            <asp:Label ID="lblUnAssModelYearCaption" runat="server" Text="Model Year"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="Assigned Geozones" FieldName="AssignedGeozones"
                                                                    Width="15%">
                                                                    <HeaderCaptionTemplate>
                                                                        <%--      <span class="icon">
                                                                    <img src="..\Images\icn-vehicle-year.gif" alt="" align="top" /></span>--%>
                                                                        <span class="label">
                                                                            <asp:Label ID="lblUnAssGeozonesCaption" runat="server" Text="Assigned Geozones"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="Max. Geozones" FieldName="MaxGeozones" Width="15%">
                                                                    <HeaderCaptionTemplate>
                                                                        <%--      <span class="icon">
                                                                    <img src="..\Images\icn-vehicle-year.gif" alt="" align="top" /></span>--%>
                                                                        <span class="label">
                                                                            <asp:Label ID="lblUnAssMaxGeozonesCaption" runat="server" Text="Max. Geozones"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                            </Columns>
                                                            <SettingsText EmptyDataRow="No Unassigned Vehicles found" />
                                                            <Settings ShowStatusBar="Auto" ShowFilterRow="true" ShowFilterRowMenu="True" />
                                                        </dxw:ASPxGridView>

                                                    </div>

                                                    <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvAssignedVehicles"
                                                        ReportHeader="{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}}
                                                                        \viewkind4\uc1\pard\qc\b\fs28 Alert Details    \fs24\par
                                                                        \pard\par
                                                                        \par
                                                                        }
                                                                        ">
                                                        <PageFooter Right="[Page # of Pages #]">
                                                        </PageFooter>
                                                    </dxw:ASPxGridViewExporter>
                                                    <div class="clear clearfix">
                                                    </div>
                                                    <div class="form-box">
                                                        <div class="row rowSpace">
                                                            <div class="col-sm-6 col-md-8"></div>
                                                            <div class="col-sm-6 col-md-4">
                                                                <div class="form-groupAlign pull-right">
                                                                    <asp:ImageButton ID="btnAssignVehicles1" runat="server" ImageUrl="../images/btn-assign-vehicles.jpg"
                                                                        OnClick="btnAssignVehicles_Click" OnClientClick="return valiadteDelayNotify();if(VehGeoAsmtValidation()){ ShowPopUp(); return true;} else {return false;}"
                                                                        Visible="false" /><%--OnClientClick="return VehGeoAsmtValidation();"--%>
                                                                    <asp:LinkButton ID="btnAssignVehicles" runat="server" CssClass="MultilingualBtn"
                                                                        OnClick="btnAssignVehicles_Click" OnClientClick="if(VehGeoAsmtValidation() && valiadteDelayNotify()){ ShowPopUp(); return true;} else {return false;}">
                                                                        <span runat="server" class="MultilingualBtnspan">
                                                                            <div class="AssignVehicle">
                                                                                <div id="AssigneVehicleDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                    Assign
                                                                                </div>
                                                                            </div>
                                                                        </span>
                                                                    </asp:LinkButton>&nbsp;
                                                                <asp:ImageButton ID="btnSchedule1" runat="server" ImageUrl="~/images/add-schedule.png"
                                                                    OnClientClick="if(VehGeoAsmtValidation()){ return true;} else {return false;}"
                                                                    OnClick="btnSchedule_Click" Visible="false" />
                                                                    <asp:LinkButton ID="btnSchedule" runat="server" CssClass="MultilingualBtn" OnClientClick="ShowPopUp();"
                                                                        OnClick="btnSchedule_Click">
                                                                        <span runat="server" class="MultilingualBtnspan">
                                                                            <div class="AddSchedule">
                                                                                <div id="AddScheduleDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                    Add Schedule
                                                                                </div>
                                                                            </div>
                                                                        </span>
                                                                    </asp:LinkButton>
                                                                </div>

                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="clear clearfix">
                                                </div>
                                                <div id="grid-dsply">
                                                    <div id="top">
                                                        <div class="col-sm-12 padding-width-md">
                                                            <span class="icon">
                                                                <img src="../images/icn-vehicle-assignment.gif" alt="" /></span> <span class="txt nullpaddingRight">
                                                                    <asp:Label ID="lblAssignedVehicle" Text="Assigned Vehicles" runat="server"></asp:Label>
                                                                    &nbsp;&nbsp; </span>

                                                            <div class="right-col">
                                                                <span class="dropdown">
                                                                    <dxw:ASPxComboBox ID="ASPxCboExport" runat="server" ValueType="System.String" Height="20px"
                                                                        ShowImageInEditBox="false" ItemImage-Height="12px" ClientInstanceName="ASPxCboExport" SelectedIndex="0"
                                                                        Width="80px" EnableTheming="true" Theme="Office2003Blue"
                                                                        CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue">
                                                                        <Items>
                                                                            <dxw:ListEditItem ImageUrl="../images/icn-pdf.jpg" Text="pdf" Value="pdf" />
                                                                            <dxw:ListEditItem ImageUrl="../images/icn-excel.jpg" Text="xls" Value="xls" />
                                                                            <dxw:ListEditItem ImageUrl="../images/icn-excel-xlsx.png" Text="xlsx" Value="xlsx" />
                                                                            <dxw:ListEditItem ImageUrl="../images/icn-word.jpg" Text="rtf" Value="rtf" />
                                                                            <%--<dxw:ListEditItem ImageUrl="../images/icn-csv.gif" Text="csv" Value="csv" />--%>
                                                                        </Items>
                                                                    </dxw:ASPxComboBox>
                                                                </span><span>&nbsp;
                                                            <asp:ImageButton ID="btnExport1" runat="server" ImageUrl="~/images/btn-export.jpg"
                                                                OnClick="btnExport_Click" Visible="false" />
                                                                    <asp:LinkButton ID="btnExport" runat="server" CssClass="MultilingualBtn" OnClick="btnExport_Click">
                                                                        <span id="Span6" runat="server" class="MultilingualBtnspan">
                                                                            <div class="Export">
                                                                                <div id="ExportButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                    Export
                                                                                </div>
                                                                            </div>
                                                                        </span>
                                                                    </asp:LinkButton>
                                                                </span>
                                                            </div>
                                                        </div>

                                                    </div>
                                                    <div class="clear clearfix">
                                                    </div>
                                                    <dxw:ASPxPopupMenu ID="ExportContextMenu" runat="server" ClientInstanceName="ExportContextMenu"
                                                        EnableTheming="true" Theme="Office2003Blue" OnItemClick="ExportContextMenu_ItemClick" Visible="false">
                                                        <Items>
                                                            <dxw:MenuItem Name="ExportToPDF" Text="Export to PDF" ToolTip="Click to Export to PDF" />
                                                            <dxw:MenuItem Name="ExportToXLS" Text="Export to XLS" ToolTip="Click to Export to XLS" />
                                                            <dxw:MenuItem Name="ExportToXLSX" Text="Export to XLSX" ToolTip="Click to Export to XLSX" />
                                                            <dxw:MenuItem Name="ExportToRTF" Text="Export to RTF" ToolTip="Click to Export to RTF" />
                                                        </Items>
                                                        <ClientSideEvents ItemClick="function(s, e) { ExportContextMenu.Hide(); }" />
                                                    </dxw:ASPxPopupMenu>
                                                    <asp:HiddenField ID="hdnVehicleIdsToBeUnassinged" runat="server" />
                                                    <div class="clear clearfix"></div>
                                                    <div class="table-responsive">
                                                        <dxw:ASPxGridView ID="gvAssignedVehicles" runat="server"
                                                            CssFilePath="~/App_Themes/Office2003 Blue/GridView/grid.css" CssPostfix="Office2003_Blue"
                                                            EnableTheming="true" Theme="Office2003Blue" Width="100%" AutoGenerateColumns="False" KeyFieldName="BoxId"
                                                            ClientInstanceName="gvAssignedVehicles" OnHtmlRowCreated="gvAssignedVehicles_OnHtmlRowCreated"
                                                            OnFillContextMenuItems="gvData_FillContextMenuItems">
                                                            <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="50" />
                                                            <ClientSideEvents SelectionChanged="function(s, e) { OnGridSelectionChanged(2); }" />
                                                            <%--<Images ImageFolder="~/App_Themes/Office2003 Blue/{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>
                                                                <PagerTopPanel CssClass="PageFooter">
                                                                </PagerTopPanel>
                                                            </Styles>
                                                            <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                                PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                                NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                                NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true"
                                                                PageSize="15">
                                                            </SettingsPager>
                                                            <SettingsContextMenu Enabled="false" EnableGroupPanelMenu="False" ColumnMenuItemVisibility-GroupByColumn="false" ColumnMenuItemVisibility-ShowGroupPanel="false"
                                                                EnableFooterMenu="False" ColumnMenuItemVisibility-ShowFooter="false" RowMenuItemVisibility-NewRow="false" RowMenuItemVisibility-EditRow="false"
                                                                RowMenuItemVisibility-DeleteRow="false" EnableRowMenu="false">
                                                            </SettingsContextMenu>
                                                            <ClientSideEvents ContextMenuItemClick="
                                                                            function(s,e) {                                                         
                                                                                switch(e.item.name) {    
                                                                                        case 'SelectAll':
                                                                                            gvAssignedVehicles.SelectAllRowsOnPage();
                                                                                            break;
                                                                                        case 'DeselectAll':
                                                                                            gvAssignedVehicles.UnselectAllRowsOnPage();
                                                                                            break;}
                                                                            }" />
                                                            <%--ContextMenu="function OnContextMenu(s, e) {
                                                                if (e.objectType == 'row') {
                                                                    ExportContextMenu.ShowAtPos(ASPxClientUtils.GetEventX(e.htmlEvent), ASPxClientUtils.GetEventY(e.htmlEvent));
                                                                }
                                                            }"--%>
                                                            <Columns>
                                                                <dxw:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Name="Checkbox"
                                                                    Width="5%">
                                                                    <HeaderTemplate>
                                                                        <input type="checkbox" style="vertical-align: middle;" onclick="gvAssignedVehicles.SelectAllRowsOnPage(this.checked);"
                                                                            title="Select/Unselect all rows on the page"></input>
                                                                    </HeaderTemplate>
                                                                    <HeaderStyle Paddings-PaddingTop="1" Paddings-PaddingBottom="1" HorizontalAlign="Center" />
                                                                </dxw:GridViewCommandColumn>
                                                                <dxw:GridViewDataTextColumn Width="15%" Caption="Vehicle Description" FieldName="VehicleDescription">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ID="imgGeozoneVehicleNameU" runat="server" ImageUrl="..\Images\icn-vehicle-name.gif"
                                                                                align="top" AlternateText="Vehicle Name" ToolTip="Vehicle Name" /></span>
                                                                        <span class="label">
                                                                            <asp:Label ID="lblAssVehNameCaption" runat="server" Text="Vehicle Name"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Width="10%" Caption="Vehicle TypeName" FieldName="VehicleTypeName">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ID="imgGeozoneVehicleTypeU" runat="server" ImageUrl="..\Images\icn-vehicle-type.gif"
                                                                                align="top" AlternateText="Vehicle Type" ToolTip="Vehicle Type" />
                                                                        </span><span class="label">
                                                                            <asp:Label ID="lblAssVehTypeCaption" runat="server" Text="Vehicle Type"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="Make Name" FieldName="MakeName" Width="15%">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ID="imgGeozoneVehicleMakeU" runat="server" ImageUrl="..\Images\icn-make-name.gif"
                                                                                align="top" AlternateText="Vehicle Make" ToolTip="Vehicle Make" />
                                                                        </span><span class="label">
                                                                            <asp:Label ID="lblAssMakeNameCaption" runat="server" Text="Make Name"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Width="15%" Caption="Model Name" FieldName="ModelName">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ID="imgGeozoneVehicleModelU" runat="server" ImageUrl="..\Images\icn-model-name.gif"
                                                                                align="top" AlternateText="Vehicle Model" ToolTip="Vehicle Model" />
                                                                        </span><span class="label">
                                                                            <asp:Label ID="lblAssModelNameCaption" runat="server" Text="Model Name"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="Model Year" FieldName="ModelYear" Width="10%">
                                                                    <HeaderCaptionTemplate>
                                                                        <span class="icon">
                                                                            <asp:Image ID="imgGeozoneVehicleYearU" runat="server" ImageUrl="..\Images\icn-vehicle-year.gif"
                                                                                align="top" AlternateText="Vehicle Year" ToolTip="Vehicle Year" />
                                                                        </span><span class="label">
                                                                            <asp:Label ID="lblAssModelYearCaption" runat="server" Text="Model Year"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="Assigned Geozones" FieldName="AssignedGeozones"
                                                                    Width="15%">
                                                                    <HeaderCaptionTemplate>
                                                                        <%--      <span class="icon">
                                                                    <img src="..\Images\icn-vehicle-year.gif" alt="" align="top" /></span>--%>
                                                                        <span class="label">
                                                                            <asp:Label ID="lblAssGoezonesCaption" runat="server" Text="Assigned Geozones"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                                <dxw:GridViewDataTextColumn Caption="Max. Geozones" FieldName="MaxGeozones" Width="15%">
                                                                    <HeaderCaptionTemplate>
                                                                        <%--      <span class="icon">
                                                                    <img src="..\Images\icn-vehicle-year.gif" alt="" align="top" /></span>--%>
                                                                        <span class="label">
                                                                            <asp:Label ID="lblAssMaxGoezonesCaption" runat="server" Text="Max. Geozones"></asp:Label></span>
                                                                    </HeaderCaptionTemplate>
                                                                </dxw:GridViewDataTextColumn>
                                                            </Columns>
                                                            <SettingsText EmptyDataRow="No Assigned Vehicles found" />
                                                            <Settings ShowStatusBar="Auto" ShowFilterRow="true" ShowFilterRowMenu="True" />
                                                        </dxw:ASPxGridView>
                                                    </div>
                                                    <div class="clear clearfix">
                                                    </div>
                                                    <div class="form-box">
                                                        <div class="row rowSpace">
                                                            <div class="col-sm-4 col-md-4"></div>
                                                            <div class="col-sm-8 col-md-8">
                                                                <div class="pull-right">
                                                                    <div class="form-groupAlign">
                                                                        <asp:LinkButton ID="btnReAssignVehicles" runat="server" CssClass="MultilingualBtn"
                                                                            OnClick="btnReSchedule_Click" OnClientClick="ShowPopUp();">
                                                                            <span id="Span1" runat="server" class="MultilingualBtnspan">
                                                                                <div class="AssignVehicle">
                                                                                    <div id="UpdateSettingsDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                        Update Settings
                                                                                    </div>
                                                                                </div>
                                                                            </span>
                                                                        </asp:LinkButton>&nbsp;                                                            
                                                                <asp:ImageButton ID="btnUnassignVehicles1" runat="server" ImageUrl="../images/btn-unassign-vehicles.jpg"
                                                                    OnClick="btnUnassignVehicles_Click" OnClientClick="if(CheckSelectionForManipulation(2,'btnUnassignVehicles')){ ShowPopUp(); return true;} else {return false;}"
                                                                    Visible="false" /><%--OnClientClick="return CheckSelectionForManipulation(2);" --%>
                                                                        <asp:LinkButton ID="btnUnassignVehicles" runat="server" CssClass="MultilingualBtn"
                                                                            OnClick="btnUnassignVehicles_Click" OnClientClick="if(CheckSelectionForManipulation(2,'btnUnassignVehicles')){ ShowPopUp(); return true;} else {return false;}">
                                                                            <span runat="server" class="MultilingualBtnspan">
                                                                                <div class="UnassignVehicle">
                                                                                    <div id="UnassignVehicleDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                        Unassign
                                                                                    </div>
                                                                                </div>
                                                                            </span>
                                                                        </asp:LinkButton>&nbsp;
                                                                <asp:ImageButton ID="btnUnassignScheduleVehicles1" runat="server" ImageUrl="~/images/add-schedule.png"
                                                                    OnClientClick="if(CheckSelectionForManipulation(2,'btnUnassignScheduleVehicles')){ return true;} else {return false;}"
                                                                    OnClick="btnUnassignScheduleVehicles_Click" Visible="false" />
                                                                        <asp:LinkButton ID="btnUnassignScheduleVehicles" runat="server" CssClass="MultilingualBtn"
                                                                            OnClientClick="ShowPopUp();"
                                                                            OnClick="btnUnassignScheduleVehicles_Click">
                                                                            <span runat="server" class="MultilingualBtnspan">
                                                                                <div class="AddSchedule">
                                                                                    <div id="AddScheduleUnDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                        Add Schedule
                                                                                    </div>
                                                                                </div>
                                                                            </span>
                                                                        </asp:LinkButton>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="clear clearfix">
                                                </div>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </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>
            <asp:Panel ID="pnlDelayNotify" runat="server" CssClass="pnlTimeGeozone col-xs-10 col-sm-8 col-md-8 col-lg-5">
                <asp:UpdatePanel ID="upDelayNotify" runat="server">
                    <ContentTemplate>

                        <div class="popup">
                            <%--<tr>
                                    <td id="tdDelaytopL" runat="server" class="top-l">&nbsp;
                                    </td>
                                    <td class="top-m">&nbsp;
                                    </td>
                                    <td id="tdDelaytopR" runat="server" class="top-r">&nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td id="tdDelayL" runat="server" class="left">&nbsp;
                                    </td>
                                    <td>--%>
                            <div class="top">
                                <h1>
                                    <asp:Label ID="lblDelaynotify" Text="Geozone Settings" runat="server"></asp:Label></h1>
                                <div class="close">
                                    <asp:ImageButton ID="imgCloseDelay" runat="server" OnClientClick="CloseDelayNotifyPopup(); return false;"
                                        ImageUrl="~/Images/popup-close.gif" />
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div class="popup-cont">

                                <asp:CheckBox ID="chkDelayNotification" CssClass="checkbox chkDealyNotify" runat="server" Text="Delay Notifications" />

                                <asp:Panel ID="Panel2" runat="server" GroupingText="Delay Notification Settings">

                                    <b id="rec" runat="server">Recurring :</b>


                                    <asp:Panel ID="Panel1" runat="server">
                                        <div class="row">
                                            <div style="overflow: hidden; padding-left: 15px;" id="Div4">
                                                <asp:CheckBox ID="chkSelectAllDelay" CssClass="checkbox chkSettings" runat="server" Text="" onclick="selectAllDelay(this.checked);" />
                                                <div>
                                                    &nbsp;
                                                </div>
                                                <asp:CheckBoxList ID="chkRecurringDelay" runat="server" onclick="CheckItemDelay(this)"
                                                    RepeatDirection="Horizontal" CssClass="col-sm-10 col-md-10 col-lg-12" Style="vertical-align: middle">
                                                </asp:CheckBoxList>
                                            </div>
                                        </div>
                                    </asp:Panel>

                                    <b id="time" runat="server">Time :</b>

                                    <div class="time">
                                        <div class="row">
                                            <div class="col-sm-3">
                                                <asp:CheckBox ID="chkTrip1" runat="server" />

                                                <asp:Label ID="lblTrip1Time" runat="server" Text="Trip 1 Time"></asp:Label>
                                            </div>
                                            <div class="col-sm-3">
                                                <div class="time1 Responsivetime">
                                                    <MKB:TimeSelector ID="tmTrip1" runat="server" AmPm="AM" DisplaySeconds="False" Hour="10" Font-Size="10pt" Height="21px" SelectedTimeFormat="Twelve">
                                                    </MKB:TimeSelector>
                                                </div>
                                                <dxw:ASPxTimeEdit ID="taTrip" Visible="false" runat="server" DateTime="2009/11/01 15:31:34" CssClass="form-control"
                                                    EnableTheming="true" Theme="Office2003Blue">
                                                    <ValidationSettings ErrorDisplayMode="None" />
                                                </dxw:ASPxTimeEdit>
                                            </div>
                                            <div class="col-sm-3">
                                                <asp:Label ID="lblTrip1Grace" runat="server" Text="Trip 1 Grace Time"></asp:Label>
                                            </div>
                                            <div class="col-sm-3">
                                                <asp:DropDownList ID="ddlTrip1Grace" CssClass="form-control" runat="server">
                                                </asp:DropDownList>
                                            </div>
                                        </div>

                                        <div class="time">
                                            <div class="row">
                                                <div class="col-sm-3">
                                                    <asp:CheckBox ID="chkTrip2" runat="server" />

                                                    <asp:Label ID="lblTrip2Time" runat="server" Text="Trip 2 Time"></asp:Label>
                                                </div>
                                                <div class="col-sm-3">
                                                    <div class="time1 Responsivetime">
                                                        <MKB:TimeSelector ID="tmTrip2" runat="server" AmPm="AM" DisplaySeconds="False" Hour="10" Font-Size="10pt" Height="21px" SelectedTimeFormat="Twelve">
                                                        </MKB:TimeSelector>
                                                    </div>
                                                    <dxw:ASPxTimeEdit ID="tbTrip" runat="server" Visible="false" DateTime="2009/11/01 15:31:34" CssClass="form-control"
                                                        EnableTheming="true" Theme="Office2003Blue">
                                                        <ValidationSettings ErrorDisplayMode="None" />
                                                    </dxw:ASPxTimeEdit>
                                                </div>
                                                <div class="col-sm-3">
                                                    <asp:Label ID="lblTrip2Grace" runat="server" Text="Trip 2 Grace Time"></asp:Label>
                                                </div>
                                                <div class="col-sm-3">
                                                    <asp:DropDownList ID="ddlTrip2Grace" CssClass="form-control" runat="server">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="time">
                                            <div class="row">
                                                <div class="col-sm-3">
                                                    <asp:CheckBox ID="chkTrip3" runat="server" />

                                                    <asp:Label ID="lblTrip3Time" runat="server" Text="Trip 3 Time"></asp:Label>
                                                </div>
                                                <div class="col-sm-3">
                                                    <div class="time1 Responsivetime">
                                                        <MKB:TimeSelector ID="tmTrip3" runat="server" AmPm="AM" DisplaySeconds="False" Hour="10" Font-Size="10pt" Height="21px" SelectedTimeFormat="Twelve">
                                                        </MKB:TimeSelector>
                                                    </div>
                                                    <dxw:ASPxTimeEdit ID="tcTrip3" Visible="false" runat="server" DateTime="2009/11/01 15:31:34" CssClass="form-control"
                                                        EnableTheming="true" Theme="Office2003Blue">
                                                        <ValidationSettings ErrorDisplayMode="None" />
                                                    </dxw:ASPxTimeEdit>
                                                </div>
                                                <div class="col-sm-3">
                                                    <asp:Label ID="lblTrip3Grace" runat="server" Text="Trip 2 Grace Time"></asp:Label>
                                                </div>
                                                <div class="col-sm-3">
                                                    <asp:DropDownList ID="ddlTrip3Grace" CssClass="form-control" runat="server">
                                                    </asp:DropDownList>
                                                </div>
                                            </div>
                                        </div>
                                </asp:Panel>

                                <asp:Panel ID="Panel3" runat="server" GroupingText="Others">
                                    <div class="rowSpace">
                                        <div class="col-sm-4 padding-width-lg-right">
                                            <asp:CheckBox ID="chkEnableGeozoneSpeed" CssClass="checkbox chkSettings" runat="server" Text="Enable Speed Limit" onclick="hideControlForGeozone(this.checked,1)" />
                                        </div>
                                        <div class="col-sm-4 padding-width-lg-right">
                                            <div class="col-sm-5 col-md-4 col-lg-5 padding-width-lg-right">
                                                <div id="tdGeozoneSpeedDropDown" class="ControlHide">
                                                    <dxw:ASPxComboBox runat="server" ID="ddlGeozoneSpeedTh" ClientInstanceName="ddlGeozoneSpeedTh"
                                                        Width="60px" Height="20px" ValueType="System.Int32" EnableTheming="true" Theme="Office2003Blue"
                                                        CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css"
                                                        CssPostfix="Office2003_Blue" EnableIncrementalFiltering="true">
                                                    </dxw:ASPxComboBox>
                                                </div>
                                            </div>
                                            <div class="col-sm-4 col-md-3 col-lg-3 padding-width-lg-right" style="margin-top: 4px;">
                                                <asp:Label ID="lblGeozoneSpeedThMetrics" runat="server" class="ControlHide"></asp:Label>
                                            </div>
                                        </div>
                                        <div class="clearfix"></div>
                                    </div>
                                    <div class="row-Geozone">
                                        <asp:CheckBox ID="chkEnableGRestricted" CssClass="checkbox chkSettings" runat="server" Text="Is Restricted" />
                                    </div>
                                    <div class="row-Geozone">
                                        <asp:CheckBox ID="chkEnableGeozoneAlarm" CssClass="checkbox chkSettings" runat="server" Text="Enable" />
                                    </div>
                                    <div class="row-Geozone">
                                        <div class="col-sm-4 padding-width-lg-right">
                                            <asp:CheckBox ID="chkEnableGTimeLimit" CssClass="checkbox chkSettings" runat="server" Text="Enable Time Limit" onclick="hideControlForGeozone(this.checked,2)" />
                                        </div>
                                        <div class="col-sm-4 padding-width-lg-right">
                                            <div id="trGTimelimit" class="ControlHide">
                                                <div class="col-sm-5 col-md-4 col-lg-5 nullpadding">
                                                    <dxw:ASPxComboBox runat="server" ID="ddlGTimeLimit" ClientInstanceName="ddlGTimeLimit"
                                                        Width="60px" Height="20px" ValueType="System.Int32" EnableTheming="true" Theme="Office2003Blue"
                                                        CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                        EnableIncrementalFiltering="true" EnableViewState="true" AutoPostBack="false">
                                                        <Items>
                                                            <dxw:ListEditItem Text="30 mints" Value="1800" />
                                                            <dxw:ListEditItem Text="1" Value="3600" />
                                                            <dxw:ListEditItem Text="2" Value="7200" />
                                                            <dxw:ListEditItem Text="3" Value="10800" />
                                                            <dxw:ListEditItem Text="4" Value="14400" />
                                                            <dxw:ListEditItem Text="5" Value="18000" />
                                                            <dxw:ListEditItem Text="6" Value="21600" />
                                                            <dxw:ListEditItem Text="7" Value="25200" />
                                                            <dxw:ListEditItem Text="8" Value="28800" />
                                                        </Items>
                                                    </dxw:ASPxComboBox>

                                                </div>
                                                <div class="col-sm-5 col-md-3 col-lg-3 padding-width-lg-right" style="margin-top: 4px;">
                                                    <asp:Label ID="lblGTimeLimitMetrics" runat="server" Text="Hrs" class="ControlHide"></asp:Label>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-4 padding-width-lg-right">
                                            <div id="trGTimelimit2" class="ControlHide">
                                                <asp:CheckBox ID="chkEXtTimelimit" CssClass="checkbox chkSettings" runat="server" Text=" Enable Ext. Time Limit" />
                                            </div>
                                        </div>
                                    </div>
                                </asp:Panel>

                                <div>
                                    &nbsp;
                                </div>
                                <div id="divClose" runat="server" align="right">
                                    <asp:Button ID="btnCloseDelay" runat="server" Text="OK" OnClientClick="CloseDelayNotifyPopup(); return false;" />
                                </div>
                            </div>

                        </div>

                    </ContentTemplate>
                    <Triggers>
                        <asp:PostBackTrigger ControlID="btnExport" />
                    </Triggers>
                </asp:UpdatePanel>
            </asp:Panel>
            <asp:HiddenField ID="hdnRecurrenceDays" runat="server" />
            <asp:HiddenField ID="hdnRecurrenceDaysDelay" runat="server" />
            <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="progressPopUp"
                TargetControlID="btnTesting">
            </cc1:ModalPopupExtender>
            <asp:Button ID="btnTesting" Style="display: none;" runat="server" />
            <asp:Panel ID="progressPopUp" runat="server" CssClass="processMessage" Style="z-index: 1000; display: none;">
                <center>
                    <br />
                    <img id="imgLoad" runat="server" alt="Please Wait ..." src="../images/47.gif" /><br />
                    <br />
                    <asp:Label ID="lbl_msg12" Text="Command is in-progress...." runat="server" CssClass="specialdisplay"></asp:Label>
                    <br />
                    <br />
                </center>
            </asp:Panel>

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

            <asp:HiddenField ID="ddlFrequency" runat="server" Value="0" />
            <asp:HiddenField ID="hdnLogout" runat="server" />
        </form>
    </div>
    <!-- Content Ends Here -->
    <uc2:Footer ID="ucFooter" runat="server" />

    <script type="text/javascript" language="javascript">
        //        function validateDateRange() {
        //            var EffectiveFrom = document.getElementById("txtEffectiveFrom");
        //            var EffectiveTo = document.getElementById("txtEffectiveTo");
        //            var chkRestrictedGeozone = document.getElementById("chkRestrictedGeozone");
        //            var tsFromHrs = document.getElementById("tsFromHrs");
        //            var tsFromHrs1 = document.getElementById("tsFromHrs1");
        //            var tsToHours = document.getElementById("tsToHours");
        //            var tsToHours1 = document.getElementById("tsToHours1");
        //            var Error = '';

        //            if (chkRestrictedGeozone.checked != false) {
        //                if (EffectiveFrom.value == '') {
        //                    EffectiveFrom.style.backgroundColor = 'lightyellow';
        //                    Error += 'Enter EffectiveFrom date.\n';
        //                }
        //                else {
        //                    EffectiveFrom.style.backgroundColor = 'white';
        //                }
        //                if (EffectiveTo.value == '') {
        //                    EffectiveTo.style.backgroundColor = 'lightyellow';
        //                    Error += 'Enter EffectiveTo date.';
        //                }
        //                else {
        //                    EffectiveTo.style.backgroundColor = 'white';
        //                }
        //            }

        //            if (Error.length > 0) {
        //                alert(Error);
        //                return false;
        //            }
        //            else {
        //                return true;
        //            }
        //        }

        //        function ChangeDateFormat(value, hours, minutes) {
        //            var DateFm = value.split("-");
        //            var arr = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
        //            for (var i = 0; i < arr.length; i++) {
        //                if (DateFm[1] == arr[i]) {
        //                    return new Date((i + 1) + "-" + DateFm[0] + "-" + DateFm[2] + " " + hours + ":" + minutes)
        //                }
        //            }

        //        }

        //Delay Notification validations

        function EnableControlDelay(value) {
            document.getElementById("tmTrip1").disabled = value;
            document.getElementById("ddlTrip1Grace").disabled = value;
            document.getElementById("tmTrip2").disabled = value;
            document.getElementById("ddlTrip2Grace").disabled = value;
            document.getElementById("tmTrip3").disabled = value;
            document.getElementById("ddlTrip3Grace").disabled = value;

            if (!value) {
                document.getElementById("ddlTrip1Grace").value = "0";
                document.getElementById("ddlTrip2Grace").value = "0";
                document.getElementById("ddlTrip3Grace").value = "0";
            }
        }

        function valiadteDelayNotify() {
            ShowPopUp();

            var chkDelayNotification = document.getElementById("chkDelayNotification");
            var hdnRecurrenceDaysDelay = document.getElementById("hdnRecurrenceDaysDelay");
            var chkTrip1 = document.getElementById("chkTrip1");
            var chkTrip2 = document.getElementById("chkTrip2");
            var chkTrip3 = document.getElementById("chkTrip3");

            var errror = '';

            if (chkDelayNotification.checked != false) {
                if (hdnRecurrenceDaysDelay.value == '') {
                    errror += 'Select Recurring days.\n';
                }

                if (!chkTrip1.checked && !chkTrip2.checked && !chkTrip3.checked) {
                    errror += 'Select atleast one trip time.\n';
                }

                if (errror.length > 0) {
                    TrinetraCustomAlerts(errror);
                    HidePopUp();
                    return false;
                }
                else {
                    //ShowPopUp();
                    return true;
                }
            }
            else {
                ShowPopUp();
                return true;
            }
        }
        function hideControlForGeozone(isChecked, val) {
            var isIE = CheckBrowser();
            if (val == 1) {
                if (isChecked) {
                    if (isIE) {
                        document.getElementById('tdGeozoneSpeedDropDown').setAttribute('class', 'ControlShow');
                        document.getElementById('lblGeozoneSpeedThMetrics').setAttribute('class', 'ControlShow');
                    }
                    else {
                        document.getElementById('tdGeozoneSpeedDropDown').setAttribute('class', 'ControlShowFF');
                        document.getElementById('lblGeozoneSpeedThMetrics').setAttribute('class', 'ControlShowFF');
                    }
                }
                else {
                    document.getElementById('tdGeozoneSpeedDropDown').setAttribute('class', 'ControlHide');
                    document.getElementById('lblGeozoneSpeedThMetrics').setAttribute('class', 'ControlHide');
                }
            }
            else {
                if (isChecked) {
                    if (isIE) {

                        document.getElementById('trGTimelimit').setAttribute('class', 'ControlShow');
                        document.getElementById('trGTimelimit2').setAttribute('class', 'ControlShow');
                        document.getElementById('lblGTimeLimitMetrics').setAttribute('class', 'ControlShow');
                    }
                    else {

                        document.getElementById('trGTimelimit').setAttribute('class', 'ControlShowFF');
                        document.getElementById('trGTimelimit2').setAttribute('class', 'ControlShowFF');
                        document.getElementById('lblGTimeLimitMetrics').setAttribute('class', 'ControlShowFF');
                    }
                }
                else {

                    document.getElementById('trGTimelimit').setAttribute('class', 'ControlHide');
                    document.getElementById('trGTimelimit2').setAttribute('class', 'ControlHide');
                    document.getElementById('lblGTimeLimitMetrics').setAttribute('class', 'ControlHide');
                }
            }
        }
    </script>

</body>
</html>
