<%@ page language="C#" autoeventwireup="true" inherits="Forms_ManageGeozone, App_Web_h0wv500x" validaterequest="false" enableeventvalidation="false" %>

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

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

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

<!DOCTYPE html>
<html lang="en">
<head id="Head1" runat="server">
    <title>tSense-IoT Manage Geozones</title>
    <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" />
    <%-- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0)" />
    <meta http-equiv="Page-Exit" content="blendTrans(Duration=0)" />--%>

    <link href="../css/CustomeAlert/demos.css" rel="stylesheet" type="text/css" />
    <link href="../css/CustomeAlert/themes/jquery.ui.all.css" rel="stylesheet" type="text/css" />
    <link id="reset" runat="server" href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link id="stylesheet2" runat="server" href="../css/stylesheet2.css" rel="stylesheet" type="text/css" />
    <link id="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link id="style" runat="server" href="../css/style.css" rel="stylesheet" type="text/css" />
    <link id="jcarousel" runat="server" rel="stylesheet" type="text/css" href="../css/jquery.jcarousel.css" />
    <link id="skin" runat="server" rel="stylesheet" type="text/css" href="../css/skin.css" />
    <link id="ieonly" runat="server" rel="stylesheet" type="text/css" href="" />
    <%--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" />
    <%--BootStrap Css--%>
    <link id="BootStrapCss" href="../css/bootstrap.css" runat="server" rel="stylesheet" type="text/css" />
    <link id="mainstyle" runat="server" href="../css/mainstyle.css" rel="stylesheet" type="text/css" />
    <%--End of BootStrap Css--%>
    <script src="../js/jquery-1.11.2.min.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/jquery.min.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/jquery-ui-1.10.3.custom.js" type="text/javascript"></script>
    <script src="../js/CustomAlert/CustomAlert.js" type="text/javascript"></script>
    <%--<script src="http://jsapi.lbsp.navteq.com/v1/jsl.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="../js/NavTeq_GeoZoneScript.js"></script>--%>
    <script src="../js/wow.min.js"></script>
</head>
<body onload="loadMap();">
    <div class="pageContainer">
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <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-4 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><asp:LinkButton ID="lnkGeozoneCaption" runat="server" PostBackUrl="~/Forms/GeozonePanel.aspx"
                                            Text="Geozone"></asp:LinkButton></span><span> &gt;</span><span><asp:LinkButton PostBackUrl="~/Forms/ManageGeozone.aspx"
                                                ID="lnkManageCaption" runat="server" Text="Manage" OnClick="lnkManageCaption_Click"></asp:LinkButton>
                                            </span>
                                    </div>
                                    <div class="col-sm-8  col-md-9 col-md-9 head-part-btns">
                                        <div class="pull-right">
                                            <div class="ManageGeozoneTableAlign">
                                                <asp:UpdatePanel ID="updCtrlBox" runat="server" UpdateMode="Conditional">
                                                    <ContentTemplate>
                                                        <asp:ImageButton ID="ibtnAddGeozone1" runat="server" ImageUrl="~/images/btn-add-geozone.jpg"
                                                            OnClientClick="ShowPopUp();r1 = null; first = ''; document.getElementById('hdnMapZoomLevel').value = '';"
                                                            OnClick="ibtnAddGeozone_Click" Visible="false" />
                                                        <asp:LinkButton ID="ibtnAddGeozone" runat="server" CssClass="MultilingualBtn" OnClientClick="ShowPopUp();r1 = null; first = ''; document.getElementById('hdnMapZoomLevel').value = '';"
                                                            OnClick="ibtnAddGeozone_Click">
                                                            <span runat="server" class="MultilingualBtnspan">
                                                                <div class="AddGeozone">
                                                                    <div id="AddGeozoneDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                        Add Geozone
                                                                    </div>
                                                                </div>
                                                            </span>
                                                        </asp:LinkButton>
                                                        <%--map.setCenter(new GLatLng(23.805450, 78.486328), 4);--%>
                                                        <asp:ImageButton ID="ibtnVehGeoAgmt1" runat="server" ImageUrl="~/images/btn-assign-geozones.jpg"
                                                            OnClick="ibtnVehGeoAgmt_Click" OnClientClick="ShowPopUp();" Visible="false" />
                                                        <asp:LinkButton ID="ibtnVehGeoAgmt" runat="server" CssClass="MultilingualBtn" OnClientClick="ShowPopUp();"
                                                            OnClick="ibtnVehGeoAgmt_Click">
                                                            <span runat="server" class="MultilingualBtnspan">
                                                                <div class="AssignGeozone">
                                                                    <div id="AssignGeozoneDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                        Assign Geozones
                                                                    </div>
                                                                </div>
                                                            </span>
                                                        </asp:LinkButton>
                                                        <asp:ImageButton ID="ibtnGeozoneVehicleAssignment1" runat="server" ImageUrl="~/images/btn-geozone-vehicle-assign.jpg"
                                                            OnClick="ibtnGeozoneVehicleAssignment_Click" OnClientClick="ShowPopUp();" Visible="false" />
                                                        <asp:LinkButton ID="ibtnGeozoneVehicleAssignment" runat="server" CssClass="MultilingualBtn"
                                                            OnClientClick="ShowPopUp();" OnClick="ibtnGeozoneVehicleAssignment_Click">
                                                            <span runat="server" class="MultilingualBtnspan">
                                                                <div class="GeozoneVehicle">
                                                                    <div id="GeozoneVehicleAssignmentDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                        Geozone Vehicle Assignment
                                                                    </div>
                                                                </div>
                                                            </span>
                                                        </asp:LinkButton>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="clear clearfix">
                                    </div>
                                    <div class="row-Geozone"></div>
                                </div>
                                <div class="clear clearfix">
                                </div>
                                <asp:UpdatePanel ID="updControls" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <asp:Panel ID="pnlManageGeozoneHolder" runat="server" CssClass="ControlHide" Width="100%">
                                            <div class="form-box">
                                                <h1>
                                                    <span class="icon">
                                                        <asp:Image ID="imgManageGeozones" runat="server" ImageUrl="../images/icn-manage-geozones.gif" /></span>
                                                    <asp:Label ID="lblManageGeozones" runat="server" Text="Manage Geozones"></asp:Label>
                                                </h1>
                                                <div class="clear clearfix"></div>
                                                <div class="row">
                                                    <div class="col-sm-8 col-md-9 col-lg-9 padding-width-lg-left">
                                                        <div id="map" style="width: 100%; direction: ltr; margin-top: -1px;">
                                                        </div>
                                                        <style type="text/css">
                                                            .nm_buttonPair {
                                                                right: 96%;
                                                            }

                                                            @media screen and (-webkit-min-device-pixel-ratio:0) {
                                                                .nm_zoomWrap {
                                                                    margin-right: 96%;
                                                                }
                                                            }
                                                        </style>
                                                    </div>
                                                    <div class="col-sm-4 col-md-3 col-lg-3 nullpadding">
                                                        <div id="search-box" style="margin-top: -1px; height: auto!important;">
                                                            <span class="icon" style="padding-bottom: 3px!important; padding-left: 12px!important;">
                                                                <asp:Image ID="imgManageGeozone" runat="server" ImageUrl="../images/icn-manage-geozones.gif"
                                                                    AlternateText="Manage Geozone" />
                                                                <asp:Label ID="lblManageGeozoneCaption" runat="server" Font-Size="Medium" Font-Bold="true"
                                                                    Text="Geozone Details"></asp:Label>
                                                            </span>
                                                            <div class="clear clearfix"></div>
                                                            <div class="GeozoneAlignment">
                                                                <div class="row form-group">
                                                                    <div class="col-xs-2 nullpaddingRight"></div>
                                                                    <div class="col-xs-6 nullpadding">
                                                                        <div id="tdStreetAddr" runat="server" class="LandmarkPaddingStyle">
                                                                            <asp:DropDownList ID="ddlType" runat="server" CssClass="form-control" onchange="showControls(this.selectedIndex);">
                                                                            </asp:DropDownList>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div id="spAddr" name="spAddr" runat="server" class="row form-group">
                                                                    <div class="col-xs-1">
                                                                        <asp:Label ID="Label6" runat="server" ForeColor="Red" valign="top">*</asp:Label>
                                                                    </div>
                                                                    <div class="col-xs-4 padding-width-sm">
                                                                        <asp:TextBox ID="txtstreet" CssClass="form-control" runat="server" onblur="return disallowScriptTags(this);"
                                                                            TextMode="MultiLine" MaxLength="250" onkeypress="return chkDescription(event,this,249);"
                                                                            placeholder="Address"></asp:TextBox>
                                                                    </div>
                                                                    <div class="col-xs-4 padding-width-sm">
                                                                        <asp:TextBox ID="txtcity" runat="server" CssClass="form-control" onpaste="return false" ondrop="return false"
                                                                            onkeypress="return chkCharacter_only(event)" MaxLength="25" placeholder="City"></asp:TextBox>
                                                                        <asp:TextBox ID="txtstate" runat="server" CssClass="form-control" onpaste="return false" ondrop="return false"
                                                                            onkeypress="return chkCharacter_only(event)" MaxLength="25" placeholder="State"></asp:TextBox>
                                                                        <asp:TextBox ID="txtCountry" onpaste="return false" CssClass="form-control" ondrop="return false" runat="server"
                                                                            onkeypress="return chkCharacter_only(event)" MaxLength="25" placeholder="Country"></asp:TextBox>
                                                                    </div>
                                                                </div>
                                                                <div id="spLatlng" name="spLatlng" runat="server" style="display: none;" class="row form-group">
                                                                    <div class="row gridrow-space">
                                                                        <div class="col-xs-1">
                                                                            <asp:Label ID="Label8" runat="server" ForeColor="Red">*</asp:Label>
                                                                        </div>

                                                                        <div class="col-xs-5 col-Landmark padding-width-sm">
                                                                            <asp:TextBox ID="txtlat" CssClass="form-control" runat="server" MaxLength="17"
                                                                                placeholder="Latitude" onkeypress="return chkDecNums(event,this);"></asp:TextBox>
                                                                        </div>
                                                                        <div class="col-xs-5 padding-width-sm">
                                                                            <asp:TextBox ID="txtlong" CssClass="form-control" runat="server" MaxLength="17"
                                                                                placeholder="Longitude" onkeypress="return chkDecNums(event,this);"></asp:TextBox>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="row form-group">
                                                                    <div class="col-xs-2"></div>
                                                                    <div class="col-xs-8 padding-width-sm">
                                                                        <asp:LinkButton ID="btnLocateMe" runat="server" Width="120px" CssClass="MultilingualBtn" OnClientClick="ShowPopUp();if(PlotAddress()){HidePopUp(); return false;}else{HidePopUp(); return false;}">
                                                                            <span runat="server" class="MultilingualBtnspan">
                                                                                <div class="LocateMe">
                                                                                    <div id="AddressButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                        Locate Me
                                                                                    </div>
                                                                                </div>
                                                                            </span>
                                                                        </asp:LinkButton>
                                                                    </div>
                                                                </div>
                                                                <div class="row form-group">
                                                                    <div class="col-xs-2 nullpaddingRight">
                                                                        <asp:Image ID="imgGeozoneName" runat="server" align="top" AlternateText="Geozone Name"
                                                                            ImageUrl="../images/icn-geo-zone-name.gif" />
                                                                        <asp:Label ID="Label7" runat="server" ForeColor="Red">*</asp:Label>
                                                                    </div>
                                                                    <div class="col-xs-6 nullpadding">
                                                                        <asp:TextBox ID="txtGeozoneName" runat="server" CssClass="form-control" MaxLength="50" ondrop="return false;"
                                                                            onkeypress="return chkCharWithDotAndUnderScore(event)" onpaste="return false;"
                                                                            TabIndex="5"></asp:TextBox>
                                                                    </div>
                                                                    <cc1:TextBoxWatermarkExtender ID="wtxtGeozoneName" runat="server" TargetControlID="txtGeozoneName"
                                                                        WatermarkText="Geozone Name">
                                                                    </cc1:TextBoxWatermarkExtender>
                                                                </div>
                                                                <div class="row form-group">
                                                                    <div class="col-xs-2 nullpaddingRight">
                                                                        <asp:Image ID="imgDescription" runat="server" align="top" AlternateText="Description"
                                                                            ImageUrl="../images/icn-description.gif" />
                                                                    </div>
                                                                    <div class="col-xs-6 nullpadding">
                                                                        <asp:TextBox ID="txtGeozoneDesc" CssClass="form-control" runat="server" Height="45px" MaxLength="150" onblur="return disallowScriptTags(this);"
                                                                            onkeypress="return chkDescription(event,this,249);" TabIndex="6" TextMode="MultiLine"></asp:TextBox>
                                                                    </div>
                                                                    <cc1:TextBoxWatermarkExtender ID="wtxtGeozoneDesc" runat="server" TargetControlID="txtGeozoneDesc"
                                                                        WatermarkText="Description">
                                                                    </cc1:TextBoxWatermarkExtender>
                                                                </div>
                                                                <div class="row form-group">
                                                                    <div class="col-xs-2 nullpaddingRight">
                                                                        <asp:Image ID="imgSeverity" runat="server" align="top" AlternateText="Severity" ImageUrl="../images/icn-severity.gif" />

                                                                        <asp:Label ID="Label2" runat="server" ForeColor="Red">*</asp:Label>
                                                                    </div>
                                                                    <div class="col-xs-6 nullpadding">
                                                                        <asp:DropDownList ID="ddlSeverity" CssClass="form-control ddl" runat="server" TabIndex="7">
                                                                            <asp:ListItem Text="-Select-" Value="0"></asp:ListItem>
                                                                        </asp:DropDownList>
                                                                    </div>
                                                                </div>
                                                                <div class="row form-group">
                                                                    <div class="col-xs-2 nullpaddingRight">
                                                                        <asp:Image runat="server" ID="imgDirection" align="top" AlternateText="Direction"
                                                                            ImageUrl="../images/compass.png" />

                                                                        <asp:Label ID="Label3" runat="server" ForeColor="Red">*</asp:Label>
                                                                    </div>
                                                                    <div class="col-xs-6 nullpadding">
                                                                        <asp:DropDownList ID="ddlDirection" CssClass="form-control ddl" runat="server" TabIndex="8">
                                                                        </asp:DropDownList>
                                                                    </div>
                                                                </div>
                                                                <div class="row form-group">
                                                                    <div class="col-xs-2 nullpaddingRight">
                                                                        <asp:Image runat="server" ID="imgCategory" align="top" AlternateText="Category" ImageUrl="../images/icn-category.gif" />

                                                                        <asp:Label ID="Label4" runat="server" ForeColor="Red">*</asp:Label>
                                                                    </div>
                                                                    <div class="col-xs-6 nullpadding">
                                                                        <asp:DropDownList ID="ddlCategory" CssClass="form-control" runat="server" align="left" AutoPostBack="true"
                                                                            OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged" TabIndex="9">
                                                                        </asp:DropDownList>
                                                                    </div>
                                                                    <div class="col-xs-1 nullpadding">
                                                                        <asp:ImageButton ID="lnkAddCategory" runat="server" CommandName="Add" ImageUrl="~/images/add-icon.gif"
                                                                            OnClientClick="ShowPopUp();" OnClick="lnkAddCategory_Click" TabIndex="10" />
                                                                    </div>
                                                                </div>
                                                                <div class="row form-group">
                                                                    <div class="col-xs-2 nullpaddingRight">
                                                                        <asp:Image runat="server" ID="imgLandmark" align="top" AlternateText="Landmark" ImageUrl="../images/icn-landmark-name.gif" />
                                                                    </div>

                                                                    <div class="col-xs-6 nullpadding">
                                                                        <dxw:ASPxComboBox ID="ddlLandMark" runat="server" AutoPostBack="True" TabIndex="13" ValueType="System.String" onchange="ShowPopUp();"
                                                                            EnableIncrementalFiltering="true" ClientInstanceName="ddlLandMark" OnSelectedIndexChanged="ddlLandMark_SelectedIndexChanged"
                                                                            CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue" EnableTheming="true" Theme="Office2003Blue">
                                                                            <ClientSideEvents SelectedIndexChanged="function(s,e) {ShowPopUp()}" />
                                                                        </dxw:ASPxComboBox>
                                                                    </div>
                                                                </div>
                                                                <div class="row row-Geozone">
                                                                    <div class="col-xs-2 nullpaddingRight">
                                                                        <asp:Image runat="server" ID="imgGeozoneType" align="top" AlternateText="Geozone Type"
                                                                            ImageUrl="../images/icn-geozone-type.gif" />

                                                                        <asp:Label ID="Label1" runat="server" ForeColor="Red">*</asp:Label>
                                                                    </div>
                                                                    <div class="col-xs-9 nullpadding form-horizontal chkSettings">
                                                                        <div class="col-xs-3 col-sm-4 col-md-4 col-lg-3 nullpadding">
                                                                            <asp:RadioButton ID="unitsKM" runat="server" CssClass="radio labelRadio" onclick="toggle('unitsKM')" TabIndex="11"
                                                                                Text="Polygon" Checked="true" />
                                                                        </div>
                                                                        <div class="col-xs-3 col-sm-4 col-md-4 col-lg-3 nullpadding">
                                                                            <asp:RadioButton ID="unitsMI" runat="server" CssClass="radio labelRadio" Checked="false" onclick="toggle('unitsMI')"
                                                                                TabIndex="12" Text="Rectangle" />
                                                                        </div>
                                                                        <div class="col-xs-3 col-sm-4 col-md-4 col-lg-3 nullpadding chkSettings">
                                                                            <asp:RadioButton ID="unitsCIR" runat="server" CssClass="radio labelRadio" Checked="false" onclick="toggle('unitsCIR')"
                                                                                TabIndex="13" Text="Circular" />
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="row form-group">
                                                                    <div class="col-xs-2 nullpaddingRight">
                                                                        <asp:Image runat="server" ID="Image1" align="top" AlternateText="Category" ImageUrl="../images/icn-radius.gif" />

                                                                        <asp:Label ID="Label5" runat="server" ForeColor="Red">*</asp:Label>
                                                                    </div>
                                                                    <div class="col-xs-6 nullpadding">
                                                                        <asp:DropDownList ID="ddlRadius" CssClass="form-control" runat="server" TabIndex="10">
                                                                            <asp:ListItem Text="50" Selected="True" Value="50"></asp:ListItem>
                                                                            <asp:ListItem Text="100" Value="100"></asp:ListItem>
                                                                            <asp:ListItem Text="150" Value="150"></asp:ListItem>
                                                                            <asp:ListItem Text="200" Value="200"></asp:ListItem>
                                                                            <asp:ListItem Text="250" Value="250"></asp:ListItem>
                                                                            <asp:ListItem Text="450" Value="400"></asp:ListItem>
                                                                            <asp:ListItem Text="500" Value="500"></asp:ListItem>
                                                                            <asp:ListItem Text="750" Value="750"></asp:ListItem>
                                                                            <asp:ListItem Text="1000" Value="1000"></asp:ListItem>
                                                                        </asp:DropDownList>
                                                                    </div>
                                                                </div>
                                                                <div id="trNotification" runat="server" class="row form-group">
                                                                    <div class="col-xs-2">
                                                                        <asp:ImageButton ID="btnAddNotifictions1" runat="server" ImageUrl="~/images/btn-manage-notification.jpg"
                                                                            OnClick="btnAddNotifictions_Click" OnClientClick="ShowPopUp();" TabIndex="14"
                                                                            text="Add Notifications" Visible="false" />
                                                                    </div>
                                                                    <div class="col-xs-8">
                                                                        <asp:LinkButton ID="btnAddNotifictions" runat="server" CssClass="MultilingualBtn"
                                                                            OnClientClick="ShowPopUp();" OnClick="btnAddNotifictions_Click">
                                                                            <span runat="server" class="MultilingualBtnspan">
                                                                                <div class="ManageNotification">
                                                                                    <div id="AddNotifictionsButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                        Manage Notifications
                                                                                    </div>
                                                                                </div>
                                                                            </span>
                                                                        </asp:LinkButton>
                                                                    </div>
                                                                </div>
                                                                <div class="row form-group" id="chkScheduledVehicle" runat="server">
                                                                    <div class="col-sm-12">
                                                                        <asp:CheckBox ID="chkVehicleGeozone" CssClass="checkbox chkSettings radioLabel" runat="server" Text="Schedule Vehicle(s)" onclick="validateNotification();" />
                                                                    </div>
                                                                </div>
                                                                <div class="row form-group" id="VehicleGeozone" runat="server">
                                                                    <div class="col-xs-2">
                                                                        <asp:Image ID="imgVehicleIcon" runat="server" ImageUrl="../images/vehicle-icon.gif" alt="" />
                                                                    </div>
                                                                    <div class="col-xs-6 nullpadding">
                                                                        <dxw:ASPxTokenBox ID="ASPxTokenBox1" runat="server" EnableTheming="true" Theme="Office2003Blue" NullText="Select Vehicles.."
                                                                            Border-BorderStyle="Solid" Border-BorderColor="#C0C0C0" FocusedStyle-Border-BorderColor="#000" Paddings-PaddingTop="3px" Paddings-PaddingBottom="3px"
                                                                            AnimationType="Fade" TextField="VehicleDescription" ValueField="BoxId" AllowCustomTokens="false" AutoResizeWithContainer="true" CssClass="">
                                                                            <TokenTextStyle Wrap="True" VerticalAlign="Bottom"></TokenTextStyle>
                                                                            <ListBoxStyle CssClass="VehicleGeozone"></ListBoxStyle>
                                                                            <%--<TokenBoxInputStyle Width="50%"></TokenBoxInputStyle>
                                                                                    <TokenStyle Width="250px"></TokenStyle>--%>
                                                                            <TokenRemoveButtonStyle VerticalAlign="Top"></TokenRemoveButtonStyle>
                                                                            <ClientSideEvents TokensChanged="function(s,e) { if(ASPxTokenBox1.GetSelectedItem().text == 'All'){ ASPxTokenBox1.ClearTokenCollection();  ASPxTokenBox1.AddToken('All'); }else   { ASPxTokenBox1.RemoveTokenByText('All'); } if(ASPxTokenBox1.GetTokenCollection().length > 5) { ASPxTokenBox1.RemoveToken(5); TrinetraCustomAlerts('Maximum selection limit is 5 vehicles.'); } }" />
                                                                        </dxw:ASPxTokenBox>
                                                                    </div>
                                                                </div>
                                                                <div class="row form-group">
                                                                    <div class="col-xs-2 nullpaddingRight" style="padding-left: 32px;">
                                                                        <asp:Label ID="Label12" runat="server" ForeColor="Red">*</asp:Label>&nbsp;
                                                                    </div>
                                                                    <div class="col-xs-6 col-Geozone">

                                                                        <asp:Label ID="lblIndicatesMandatory" Text="Required Fields" runat="server"></asp:Label>
                                                                    </div>
                                                                </div>
                                                                <div class="row form-group">
                                                                    <div class="col-xs-2 nullpaddingRight"></div>
                                                                    <div class="col-xs-10 nullpadding">
                                                                        <%-- <div class="col-xs-7 nullpadding">--%>
                                                                        <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 nullpadding">

                                                                            <asp:LinkButton ID="btnView" runat="server" CssClass="MultilingualBtn" OnClientClick="if(view()){ShowPopUp();return true;}else{return false;}"
                                                                                OnClick="btnView_Click" CausesValidation="false">
                                                                                <span runat="server" class="MultilingualBtnspan">
                                                                                    <div class="Save">
                                                                                        <div id="SaveButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                            Save
                                                                                        </div>
                                                                                    </div>
                                                                                </span>
                                                                            </asp:LinkButton>
                                                                        </div>
                                                                        <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4 nullpadding">
                                                                            <asp:ImageButton ID="ibtnCancel1" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                                OnClick="ibtnCancel_Click" OnClientClick="ShowPopUp();clearArray();" TabIndex="16"
                                                                                Visible="false" />&nbsp;
                                                                                    <asp:LinkButton ID="ibtnCancel" runat="server" CssClass="MultilingualBtn" OnClientClick="clearArray();ShowPopUp();"
                                                                                        OnClick="ibtnCancel_Click" TabIndex="17">
                                                                                        <span runat="server" class="MultilingualBtnspan">
                                                                                            <div class="Cancel">
                                                                                                <div id="CancelButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                                    Cancel
                                                                                                </div>
                                                                                            </div>
                                                                                        </span>
                                                                                    </asp:LinkButton>
                                                                            <%-- <asp:LinkButton ID="LinkButton1" runat="server" CssClass="MultilingualBtn" OnClientClick="clearArray();ShowPopUp();"
                                                                                        OnClick="btnAddSchedule_Click" TabIndex="17">
                                                                                        <span runat="server" class="MultilingualBtnspan">
                                                                                            <div class="Cancel">
                                                                                                <div id="Div1" runat="server" class="MultilingualBtnTextAlign">
                                                                                                    Add Schedule
                                                                                                </div>
                                                                                            </div>
                                                                                        </span>
                                                                                    </asp:LinkButton>--%>
                                                                        </div>
                                                                        <%--</div>--%>
                                                                        <div class="col-xs-5 col-sm-6 col-md-6 col-lg-4 nullpadding">
                                                                            <div id="tdClearMap" runat="server">
                                                                                <asp:UpdatePanel ID="updMap" runat="server" UpdateMode="Conditional">
                                                                                    <ContentTemplate>
                                                                                        <asp:ImageButton ID="btnClearMap1" runat="server" CausesValidation="false" ImageUrl="~/images/btn-clear-map.jpg"
                                                                                            OnClick="btnClearMap_Click" OnClientClick="document.getElementById('ddlLandMark').selectedIndex = 0;"
                                                                                            TabIndex="17" Visible="false" />
                                                                                        <asp:LinkButton ID="btnClearMap" runat="server" CausesValidation="false" CssClass="MultilingualBtn"
                                                                                            OnClientClick="document.getElementById('ddlLandMark').selectedIndex = 0;ShowPopUp();" OnClick="btnClearMap_Click"
                                                                                            TabIndex="17">
                                                                                            <span runat="server" class="MultilingualBtnspan">
                                                                                                <div class="Clear">
                                                                                                    <div id="ClearButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                                        Clear Map
                                                                                                    </div>
                                                                                                </div>
                                                                                            </span>
                                                                                        </asp:LinkButton>
                                                                                    </ContentTemplate>
                                                                                </asp:UpdatePanel>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="row row-Geozone">
                                                                    <div class="col-xs-2"></div>
                                                                    <div class="col-xs-6 col-Geozone">
                                                                        <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                        <div class="clearfix"></div>
                                        <asp:Panel ID="pnlGeozoneDetailsList" runat="server">
                                            <div id="grid-dsply">
                                                <div id="top">
                                                    <div class="col-xs-12 gridheader">
                                                        <div class="col-sm-4 padding-width-md-left">
                                                            <span class="icon">
                                                                <asp:ImageButton ID="btnFullMap" runat="server" ImageUrl="~/images/fullscreen.png" ToolTip="Click here to view all geozone in full screen map"
                                                                    AlternateText="Full Screen Map" OnClientClick="FullscreenMap_gz();return false;"
                                                                    Style="vertical-align: top" />
                                                            </span>
                                                        </div>
                                                        <div class="col-sm-8 nullpadding">
                                                            <div class="pull-right">
                                                                <span class="txt">
                                                                    <asp:ImageButton ID="btnImportGeozones1" runat="server" ImageUrl="~/images/import.jpg" Visible="false" />
                                                                    <asp:LinkButton ID="btnImportGeozones" runat="server" OnClientClick="popUpAdvancedSearch(1);HidePopUp();return false;"
                                                                        CssClass="MultilingualBtn" Visible="true">
                                                                        <span id="Span10" runat="server" class="MultilingualBtnspan">
                                                                            <div class="Import">
                                                                                <div id="ImportDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                    Import
                                                                                </div>
                                                                            </div>
                                                                        </span>
                                                                    </asp:LinkButton>
                                                                </span>
                                                                <span class="txt">
                                                                    <asp:Label runat="server" ID="lblSelectionMode" Text="Selection"></asp:Label>
                                                                </span>
                                                                <span class="dropdown">
                                                                    <dxw:ASPxComboBox ID="ASPxCboSelectionMode" runat="server" ValueType="System.String" Width="80px" Height="20px" SelectedIndex="0"
                                                                        ShowImageInEditBox="false" ClientInstanceName="ASPxCboSelectionMode" EnableTheming="true" Theme="Office2003Blue"
                                                                        CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue">
                                                                        <Items>
                                                                            <dxw:ListEditItem Text="Deselect All" Value="Deselect" />
                                                                            <dxw:ListEditItem Text="Select All" Value="Select" />
                                                                        </Items>
                                                                        <ClientSideEvents SelectedIndexChanged="function(s,e) {
                                                                                                     if(ASPxCboSelectionMode.GetSelectedIndex() == 0)
                                                                                                            gvData.UnselectRows();
                                                                                                     else
                                                                                                            gvData.SelectRows();                                                                                                         
                                                                              }" />
                                                                    </dxw:ASPxComboBox>
                                                                </span>&nbsp;
                                                    <%--<span class="dropdownExport">
                                                    </span>&nbsp;--%>
                                                                <span class="dropdown">
                                                                    <dxw:ASPxComboBox ID="ASPxCboExport" runat="server" ValueType="System.String" Width="80px" Height="20px"
                                                                        ShowImageInEditBox="false" ItemImage-Height="12px" ClientInstanceName="ASPxCboExport" SelectedIndex="0"
                                                                        CssFilePath="~/App_Themes/Office2003Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                        EnableTheming="true" Theme="Office2003Blue">
                                                                        <Items>
                                                                            <dxw:ListEditItem ImageUrl="../images/icn-pdf.jpg" Text="pdf" Value="pdf" />
                                                                            <dxw:ListEditItem ImageUrl="../images/icn-excel.jpg" Text="xls" Value="xls" />
                                                                            <dxw:ListEditItem ImageUrl="../images/icn-excel-xlsx.png" Text="xlsx" Value="xlsx" />
                                                                            <dxw:ListEditItem ImageUrl="../images/icn-word.jpg" Text="rtf" Value="rtf" />
                                                                            <%--<dxw:ListEditItem ImageUrl="../images/icn-csv.gif" Text="csv" Value="csv" />--%>
                                                                        </Items>
                                                                    </dxw:ASPxComboBox>
                                                                </span>
                                                                <span class="txt">
                                                                    <asp:ImageButton ID="btnExport1" runat="server" ImageUrl="~/images/btn-export.jpg"
                                                                        Visible="false" />
                                                                    <asp:LinkButton ID="btnExport" runat="server" CssClass="MultilingualBtn" OnClick="btnExport_Click">
                                                                        <span id="Span11" runat="server" class="MultilingualBtnspan">
                                                                            <div class="Export">
                                                                                <div id="ExportButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                    Export
                                                                                </div>
                                                                            </div>
                                                                        </span>
                                                                    </asp:LinkButton>
                                                                </span>
                                                                <%--<cc1:ModalPopupExtender ID="mpeGeozoneDetailsLoad" runat="server" BackgroundCssClass="modalbackground"
                                                                    PopupControlID="pnlImportGeozones" TargetControlID="btnImportGeozones" X="280"
                                                                    CancelControlID="ibtnCancelImport">
                                                                </cc1:ModalPopupExtender>--%>
                                                            </div>
                                                            <%--<span class="txt">
                                                            <dxw:ASPxButton ID="btnFieldChooser" runat="server" BackgroundImage-ImageUrl="~/images/icn-addRemoveColumns.png"
                                                                Image-AlternateText="Toggle Field Chooser" RenderMode="Link" Height="20px" Width="20px" ToolTip="Toggle Field Chooser"
                                                                UseSubmitBehavior="false" AutoPostBack="false" Visible="true">
                                                                <ClientSideEvents Click="function(s,e) {
                                                                if (gvData.IsCustomizationWindowVisible())
                                                                    gvData.HideCustomizationWindow();
                                                                else
                                                                    gvData.ShowCustomizationWindow();
                                                                }" />
                                                            </dxw:ASPxButton>
                                                        </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="hdnVehicleIdsToBeAssinged" runat="server" />
                                                <asp:HiddenField ID="hdnAssignedVehicleIds" runat="server" />
                                                <asp:HiddenField ID="hdnIsAssigned" runat="server" />
                                                <asp:HiddenField ID="hdnVehicleIdsToBeUnassinged" runat="server" />
                                                <div class="table-responsive">
                                                    <dxw:ASPxGridView ID="gvData" ClientInstanceName="gvData" KeyFieldName="GeozoneNo" runat="server"
                                                        CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" CssPostfix="Office2003_Blue" EnableTheming="true"
                                                        Theme="Office2003Blue" Width="100%" AutoGenerateColumns="False" OnHtmlRowCreated="gvData_HtmlRowCreated"
                                                        OnFillContextMenuItems="gvData_FillContextMenuItems">
                                                        <Settings ShowVerticalScrollBar="true" VerticalScrollableHeight="240" />
                                                        <%--VerticalScrollableHeight="335"OnRowCommand="gvData_RowCommand"--%>
                                                        <SettingsPager PrevPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pPrev.gif"
                                                            PrevPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pPrevDisabled.gif"
                                                            NextPageButton-Image-UrlDisabled="../App_Themes/Office2003Blue/GridView/pNextDisabled.gif"
                                                            NextPageButton-Image-Url="../App_Themes/Office2003Blue/GridView/pNext.gif" AlwaysShowPager="true">
                                                        </SettingsPager>
                                                        <ClientSideEvents SelectionChanged="function(s, e) { OnGridSelectionChanged(); }" />
                                                        <%--<Images ImageFolder="~/App_Themes/Office2003Blue/GridView/">
                                                        <CollapsedButton Height="12px" Url="~/App_Themes/Office2  003 Blue/GridView/gvCollapsedButton.png"
                                                            Width="11px" />
                                                        <ExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                            Width="11px" />
                                                        <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvCollapsedButton.png"
                                                            Width="11px" />
                                                        <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003Blue/GridView/gvExpandedButton.png"
                                                            Width="11px" />
                                                    </Images>--%>
                                                        <Styles CssFilePath="~/App_Themes/Office2003Blue/GridView/grid.css" AlternatingRow-Enabled="True"
                                                            CssPostfix="Office2003_Blue">
                                                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                            </Header>
                                                            <LoadingPanel ImageSpacing="10px">
                                                            </LoadingPanel>
                                                            <PagerBottomPanel CssClass="PageFooter">
                                                            </PagerBottomPanel>
                                                            <PagerTopPanel CssClass="PageFooter">
                                                            </PagerTopPanel>
                                                        </Styles>
                                                        <SettingsPopup CustomizationWindow-HorizontalAlign="RightSides" CustomizationWindow-VerticalAlign="TopSides" />
                                                        <SettingsBehavior EnableCustomizationWindow="false" />
                                                        <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':
                                                                    gvData.SelectAllRowsOnPage();
                                                                    break;
                                                               case 'DeselectAll':
                                                                    gvData.UnselectAllRowsOnPage();
                                                                    break;}

                                                    }" />
                                                        <%--ContextMenu="function OnContextMenu(s, e) {

                                                                if (e.objectType == 'row') {
                                                                    ExportContextMenu.ShowAtPos(ASPxClientUtils.GetEventX(e.htmlEvent), ASPxClientUtils.GetEventY(e.htmlEvent));
                                                                }
                                                            }"--%>
                                                        <Columns>
                                                            <dxw:GridViewDataTextColumn Caption="GeozoneNo" FieldName="GeozoneNo" Visible="false" ShowInCustomizationForm="false">
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblNo" runat="server" value='<%#Eval("GeozoneNo") %>' ForeColor='<%# Convert.ToString(Eval("AssignedVehicles")) == "0"?System.Drawing.Color.Red:System.Drawing.Color.Green%>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Caption="GeoType" FieldName="GeoType" Visible="false" ShowInCustomizationForm="false">
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblGeoType" runat="server" value='<%#Eval("GeoType") %>' ForeColor='<%#Convert.ToString(Eval("AssignedVehicles")) == "0"?System.Drawing.Color.Red:System.Drawing.Color.Green%>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Caption="Geozone Name" FieldName="GeozoneName" VisibleIndex="0"
                                                                Width="17%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image runat="server" ImageUrl="../images/icn-geo-zone-name.gif" align="top"
                                                                            AlternateText="Geozone Name" /></span> <span class="label">
                                                                                <asp:Label ID="lblGeozoneName" runat="server" Text="Geozone Name"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblGeoName" runat="server" Text='<%#Eval("GeozoneName")%>' ForeColor='<%#Convert.ToString(Eval("AssignedVehicles")) == "0"?System.Drawing.Color.Red:System.Drawing.Color.Green%>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Caption="Description" FieldName="Description" VisibleIndex="1"
                                                                Width="15%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image runat="server" ImageUrl="../images/icn-description.gif" align="top" AlternateText="Description" /></span>
                                                                    <span class="label">
                                                                        <asp:Label ID="lblDEscription" runat="server" Text="Description"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblGeoDescription" runat="server" Text='<%#Eval("Description") %>' ForeColor='<%# Convert.ToString(Eval("AssignedVehicles")) == "0"?System.Drawing.Color.Red:System.Drawing.Color.Green%>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Caption="Geozone Type" FieldName="GeozoneTypeName" VisibleIndex="1"
                                                                Width="10%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image runat="server" ImageUrl="../images/icn-description.gif" align="top" AlternateText="Geozone Type" /></span>
                                                                    <span class="label">
                                                                        <asp:Label ID="lblGeozoneType" runat="server" Text="Geozone Type"></asp:Label>
                                                                    </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblGeoTypeName" runat="server" Text='<%#Eval("GeozoneTypeName") %>' ForeColor='<%# Convert.ToString(Eval("AssignedVehicles")) == "0" ? System.Drawing.Color.Red : System.Drawing.Color.Green%>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Caption="Severity" FieldName="Severity" VisibleIndex="2"
                                                                Width="9%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgSeverity" ImageUrl="../images/icn-severity.gif" runat="server"
                                                                            align="top" AlternateText="Severity" /></span> <span class="label">
                                                                                <asp:Label ID="lblSeverity" runat="server" Text="Severity"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblGeoSeverity" runat="server" Text='<%#Eval("Severity") %>' ForeColor='<%# Convert.ToString(Eval("AssignedVehicles")) == "0"?System.Drawing.Color.Red:System.Drawing.Color.Green%>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Width="10%" Caption="Category" FieldName="CategoryName"
                                                                VisibleIndex="3">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image runat="server" ImageUrl="../images/icn-category.gif" ID="imgCategory"
                                                                            align="top" AlternateText="Category" /></span> <span class="label">
                                                                                <asp:Label ID="lblCategory" runat="server" Text="Category"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblGeoCategory" runat="server" Text='<%#Eval("CategoryName") %>' ForeColor='<%# Convert.ToString(Eval("AssignedVehicles")) == "0"?System.Drawing.Color.Red:System.Drawing.Color.Green%>'></asp:Label>
                                                                </DataItemTemplate>
                                                                <Settings AllowSort="True" />

                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Caption="Email Users" FieldName="EmailUserNameList"
                                                                VisibleIndex="4" Width="17%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgEmailUsers" runat="server" ImageUrl="../images/icn-email-users.gif"
                                                                            align="top" AlternateText="Email Users" /></span> <span class="label">
                                                                                <asp:Label ID="lblEmailUsers" runat="server" Text="Email Users"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblGeoEmail" runat="server" Text='<%#Eval("EmailUserNameList") %>' ForeColor='<%# Convert.ToString(Eval("AssignedVehicles")) == "0"?System.Drawing.Color.Red:System.Drawing.Color.Green%>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Caption="SMS Users" FieldName="SMSUserNameList" VisibleIndex="5"
                                                                Width="14%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgSMSUsers" runat="server" ImageUrl="../images/icn-sms-users.gif"
                                                                            align="top" AlternateText="SMS Users" /></span> <span class="label">
                                                                                <asp:Label ID="lblSMSUsers" runat="server" Text="SMS Users"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblSmsUserName" runat="server" Text='<%#Eval("SMSUserNameList") %>' ForeColor='<%# Convert.ToString(Eval("AssignedVehicles")) == "0"?System.Drawing.Color.Red:System.Drawing.Color.Green%>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Caption="Count" CellStyle-HorizontalAlign="Center" FieldName="AssignedVehicles" VisibleIndex="5"
                                                                Width="12%">
                                                                <HeaderCaptionTemplate>
                                                                    <span class="icon">
                                                                        <asp:Image ID="imgSMSUsers" runat="server" ImageUrl="../images/icn-unassigned-vehicles.gif"
                                                                            align="top" AlternateText="Count Vehicles" /></span> <span class="label">
                                                                                <asp:Label ID="lblCountVehicles" runat="server" Text="Vehicles Assigned"></asp:Label>
                                                                            </span>
                                                                </HeaderCaptionTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:Label ID="lblCountVehiclesGeozone" runat="server" Text='<%#Eval("AssignedVehicles") %>' ForeColor='<%# Convert.ToString(Eval("AssignedVehicles")) == "0"?System.Drawing.Color.Red:System.Drawing.Color.Green%>'></asp:Label>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Caption="Assign" CellStyle-HorizontalAlign="Center"
                                                                Width="3%" Name="Assign">
                                                                <HeaderTemplate>
                                                                </HeaderTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:LinkButton ID="lnkAssign" runat="server" OnClientClick="ShowPopUp();" OnClick="lnkAssign_Click"
                                                                        CommandArgument='<%# Eval("CategoryId") +","+Eval("GeozoneNo") %>' Style="text-decoration: none;">
                                                                <img src="../images/icn-vehicle-assignment.gif" alt="Click here to Assign" />
                                                                    </asp:LinkButton>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Caption="View" CellStyle-HorizontalAlign="Center" Width="3%"
                                                                Name="View">
                                                                <HeaderTemplate>
                                                                </HeaderTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:HiddenField ID="hdnAssignedGeozoneID" runat="server" Value='<%#Eval("GeozoneID") %>' />
                                                                    <asp:HiddenField ID="hdnAssignedGeozoneNo" runat="server" Value='<%#Eval("GeozoneNo") %>' />
                                                                    <asp:HiddenField ID="hdnGeozoneType" runat="server" Value='<%#Eval("GeozoneType") %>' />
                                                                    <asp:LinkButton ID="lnkView" runat="server" OnClientClick="ShowPopUp();" OnClick="lnkView_Click"
                                                                        CommandArgument="LandMarkId" Style="text-decoration: none;">
                                                                <img src="../images/icn-view.gif" alt="Click here to View"/></asp:LinkButton>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Caption="Edit" CellStyle-HorizontalAlign="Center" Width="3%"
                                                                Name="Edit">
                                                                <HeaderTemplate>
                                                                </HeaderTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:LinkButton ID="lnkEdit" runat="server" CommandArgument="LandMarkId" CommandName="Edit"
                                                                        OnClick="lnkEdit_Click" OnClientClick="ShowPopUp();" Style="text-decoration: none;">
                                                                <img src="../images/icn-edit.gif" alt="Click here to Edit" /></asp:LinkButton>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                            <dxw:GridViewDataTextColumn Caption="Delete" CellStyle-HorizontalAlign="Center"
                                                                Width="3%" Name="Delete">
                                                                <HeaderTemplate>
                                                                </HeaderTemplate>
                                                                <DataItemTemplate>
                                                                    <asp:LinkButton ID="lnkDelete" runat="server" CommandArgument="LandMarkId" CommandName="Delete"
                                                                        OnClick="lnkDelete_Click" OnClientClick="ShowPopUp();" Style="text-decoration: none;">
                                                                <img src="../images/delete-icon.gif" alt="Click here to Delete" /></asp:LinkButton>
                                                                </DataItemTemplate>
                                                            </dxw:GridViewDataTextColumn>
                                                        </Columns>
                                                        <Settings ShowStatusBar="Auto" ShowFilterRow="true" ShowGroupPanel="false" />
                                                        <SettingsText EmptyDataRow="No Geozones Identified" />
                                                        <SettingsBehavior ColumnResizeMode="NextColumn" AllowSort="true" AllowDragDrop="true"
                                                            AllowGroup="true" AllowFocusedRow="true" />
                                                    </dxw:ASPxGridView>
                                                </div>
                                                <dxw:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="gvData">
                                                    <PageFooter Right="[Page # of Pages #]">
                                                    </PageFooter>
                                                </dxw:ASPxGridViewExporter>
                                            </div>
                                            <div class="AlignControl" style="padding-left: 4px; margin-top: -8px;">
                                                <br />
                                                <img src="../images/green.png" />
                                                <asp:Label ID="BlueIcnIndicator" runat="server" Text="Assigned Geozone(s)"></asp:Label>&nbsp;
                                         &nbsp;
                                        <img src="../images/red.png" />
                                                <asp:Label ID="Label9" runat="server" Text="UnAssigned Geozone(s)"></asp:Label>
                                            </div>
                                        </asp:Panel>

                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:PostBackTrigger ControlID="btnExport" />
                                    </Triggers>
                                </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>
            <asp:Button ID="btnMap" runat="server" Style="display: none" />
            <asp:UpdatePanel ID="updNotify" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Panel ID="pnlNotificationsList" runat="server" CssClass="notifyManagePanel col-xs-9">
                        <uc3:NotificationsList ID="ucNotificationList" runat="server" NotificationType="3" />
                    </asp:Panel>
                </ContentTemplate>
            </asp:UpdatePanel>
            <asp:Panel ID="pnlGeozoneCategory" runat="server" CssClass="edit-LandmarkPanel col-sm-6 col-md-5 col-lg-4 ">
                <asp:UpdatePanel ID="upGeozoneCategory" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <div class="popup">
                            <%--  <tr>
                                <td id="Pnltopl" runat="server" class="top-l">&nbsp;
                                </td>
                                <td class="top-m">&nbsp;
                                </td>
                                <td id="Pnltopr" runat="server" class="top-r">&nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td id="PnltopLeft" runat="server" class="left">&nbsp;
                                </td>
                                <td>--%>
                            <div class="top">
                                <h1>
                                    <asp:Label ID="lblCategory" runat="server"></asp:Label></h1>
                                <div class="close">
                                    <asp:ImageButton ID="ibClose" runat="server" ImageUrl="~/Images/popup-close.gif"
                                        OnClientClick="CloseCategoryPopup('Close'); return false;" />
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <%--<div class="popup-cont">--%>
                            <div class="form-tbl form-landmark">
                                <div class="row row-Geozone" style="margin-left: 0px;">
                                    <div class="col-sm-4">
                                        <asp:Label ID="lblCategoryName" runat="server" Text="Category Name"></asp:Label><span
                                            class="redtxt"> *</span>
                                    </div>
                                    <div class="col-sm-5">
                                        <asp:TextBox ID="txtCategoryName" TabIndex="22" runat="server" onpaste="return false"
                                            ondrop="return false" CssClass="form-control" onkeypress="return chkAlphaNumericWithSpace(event,this,24);"></asp:TextBox>
                                    </div>
                                </div>
                                <div class="row row-Geozone" style="margin-left: 0px;">
                                    <div class="col-sm-4">
                                        <asp:Label ID="lblDescription" runat="server" Text="Description"></asp:Label>
                                    </div>
                                    <div class="col-sm-5">
                                        <asp:TextBox ID="txtCategoryDescription" runat="server" CssClass="form-control" TabIndex="23" TextMode="MultiLine"
                                            onkeypress="return chkDescription(event,this,499);" onblur="return disallowScriptTags(this);"
                                            MaxLength="500"></asp:TextBox>
                                    </div>
                                </div>
                                <asp:HiddenField ID="hdnCatAssignedStatus" runat="server" />
                                <div class="row row-Geozone" style="margin-left: 0px;">
                                    <div class="col-sm-4"></div>
                                    <div class="col-sm-8">
                                        <asp:ImageButton ID="btnSubmit1" runat="server" TabIndex="24" ImageUrl="~/images/btn-save.jpg"
                                            OnClick="btnSubmit_Click" Style="vertical-align: top" OnClientClick="if(CategoryValidation()){ShowPopUp();return true;} else{return false;}"
                                            Visible="false" />
                                        &nbsp;
                                                <asp:LinkButton ID="btnSubmit" runat="server" CssClass="MultilingualBtn" OnClick="btnSubmit_Click"
                                                    Style="vertical-align: top" OnClientClick="if(CategoryValidation()){ShowPopUp();return true;} else{return false;}">
                                                    <span runat="server" class="MultilingualBtnspan">
                                                        <div class="Save">
                                                            <div id="SaveButDivCategory" runat="server" class="MultilingualBtnTextAlign">
                                                                Save
                                                            </div>
                                                        </div>
                                                    </span>
                                                </asp:LinkButton>
                                        &nbsp;
                                                <asp:ImageButton ID="btnDelete1" runat="server" ImageUrl="~/images/btn-delete.jpg"
                                                    TabIndex="25" OnClick="btnDelete_Click" OnClientClick="if(GetCategoryConfirmation()) {ShowPopUp(); return true;} else{return false;}"
                                                    Visible="false" />
                                        <asp:LinkButton ID="btnDelete" runat="server" CssClass="MultilingualBtn" OnClick="btnDelete_Click"
                                            OnClientClick="if(GetCategoryConfirmation()) {ShowPopUp(); return true;} else{return false;}">
                                            <span runat="server" class="MultilingualBtnspan">
                                                <div class="Delete">
                                                    <div id="DeleteButDivCategory" runat="server" class="MultilingualBtnTextAlign">
                                                        Delete
                                                    </div>
                                                </div>
                                            </span>
                                        </asp:LinkButton>
                                        &nbsp;
                                                <asp:ImageButton runat="server" TabIndex="26" text="Cancel" ID="btnCancel1" OnClientClick="CloseCategoryPopup('Close'); return false;"
                                                    onkeydown="return setFocus(event,'txtCategoryName');" ImageUrl="~/images/btn-cancel.jpg"
                                                    Style="vertical-align: top;" Visible="false" />
                                        <asp:LinkButton ID="btnCancel" runat="server" CssClass="MultilingualBtn" OnClientClick="CloseCategoryPopup('Close'); return false;">
                                            <span runat="server" class="MultilingualBtnspan">
                                                <div class="Cancel">
                                                    <div id="CancelButDivCategory" runat="server" class="MultilingualBtnTextAlign">
                                                        Cancel
                                                    </div>
                                                </div>
                                            </span>
                                        </asp:LinkButton>
                                    </div>
                                </div>
                            </div>
                            <%-- </div>--%>
                            <%--     </div>
                                </td>
                                <td id="PnltopRight" runat="server" class="right">&nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td id="Pnlbottoml" runat="server" class="bottom-l">&nbsp;
                                </td>
                                <td class="bottom-m">&nbsp;
                                </td>
                                <td id="Pnlbottomr" runat="server" class="bottom-r">&nbsp;
                                </td>
                            </tr>--%>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="progressPopUp"
                TargetControlID="btnTesting">
            </cc1:ModalPopupExtender>
            <asp:Button ID="btnTesting" Style="display: none;" runat="server" />
            <asp:Panel ID="pnlAddressLocating" runat="server" Style="display: none;" CssClass="col-sm-7 col-md-8">
                <div id="message" style="position: absolute; z-index: 100;" class="col-xs-12">
                    &nbsp;
                </div>
            </asp:Panel>
            <asp:Panel ID="progressPopUp" runat="server" CssClass="processMessage" Style="z-index: 1000; display: none;">
                <center>
                <br />
                <img id="imgLoad" runat="server" alt="Please Wait ..." src="../images/47.gif" /><br />
                <br />
                <asp:Label ID="lbl_msg12" Text="Processing... Please Wait..." runat="server" CssClass="specialdisplay"></asp:Label>
                <br />
                <br />
            </center>
            </asp:Panel>
            <asp:Panel ID="pnlImportGeozones" runat="server" Style="display: none;" CssClass="import-LandmarkPanel col-sm-7 col-md-5 col-lg-4">
                <asp:UpdatePanel ID="updImportGeozones" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>

                        <div class="popup">

                            <div class="top">
                                <h1>
                                    <asp:Label ID="lblFile" Text="Bulk Import Geozones" runat="server"></asp:Label></h1>
                                <div class="close">
                                    <asp:ImageButton ID="ibtnClose" OnClientClick="popUpAdvancedSearch(0);HidePopUp();return false;"
                                        CausesValidation="false" ImageUrl="~/images/popup-close.gif" Visible="true" runat="server" />
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div class="popup-content">
                                <div class="form-tbl">
                                    <div class="form-horizontal">
                                        <div class="form-group">
                                            <div class="col-sm-2"></div>
                                            <div class="col-sm-10">
                                                <div class="col-sm-3 col-xs-5">
                                                    <asp:RadioButton ID="RadExportRectangle" CssClass="radio labelRadio" runat="server" Checked="true" onclick="toggle('unitsMI')"
                                                        TabIndex="12" Text="Rectangle" GroupName="GType" Font-Bold="true" />
                                                </div>
                                                <div class="col-sm-3">
                                                    <asp:RadioButton ID="RadExportCircular" CssClass="radio labelRadio" runat="server" Checked="false"
                                                        TabIndex="13" Text="Circular" Font-Bold="true" GroupName="GType" />
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-sm-2">
                                                <asp:Label ID="lblDriverDetails" runat="server" Text="Select File" CssClass="label"></asp:Label>
                                            </div>
                                            <div class="col-sm-8">
                                                <asp:FileUpload ID="fuGeozones" runat="server" onchange="return validateCSVFileUpload(this);" />
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <div class="col-sm-2"></div>
                                            <div class="col-sm-10">
                                                <asp:ImageButton ID="ibtnUpdateDrivers1" runat="server" ImageUrl="~/images/btn-update.jpg"
                                                    Visible="false" />
                                                <asp:LinkButton ID="ibtnUpdateGeozoneEntry" runat="server" CssClass="MultilingualBtn"
                                                    TabIndex="17" OnClick="ibtnUpdateGeozoneEntry_Click" OnClientClick="return ValidateFileEmpty(this,'fuGeozones'); ShowPopUp();">
                                                    <span id="Span12" runat="server" class="MultilingualBtnspan">
                                                        <div class="Update">
                                                            <div id="UpdateDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                Update
                                                            </div>
                                                        </div>
                                                    </span>
                                                </asp:LinkButton>
                                                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/btn-Cancel.jpg"
                                                    Visible="false" />
                                                &nbsp;
                                                    <asp:LinkButton ID="ibtnCancelImport" runat="server" CssClass="MultilingualBtn" TabIndex="19">
                                                        <span id="Span13" runat="server" class="MultilingualBtnspan">
                                                            <div class="Cancel">
                                                                <div id="CancelDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                    Cancel
                                                                </div>
                                                            </div>
                                                        </span>
                                                    </asp:LinkButton>
                                                &nbsp;&nbsp;
                                                    <asp:LinkButton ID="lbtnDownloadTemp" runat="server" Text="Download Template" OnClick="Download_Template"></asp:LinkButton>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </ContentTemplate>
                    <Triggers>
                        <asp:PostBackTrigger ControlID="ibtnUpdateGeozoneEntry" />
                        <asp:PostBackTrigger ControlID="ibtnCancelImport" />
                        <asp:PostBackTrigger ControlID="lbtnDownloadTemp" />
                    </Triggers>
                </asp:UpdatePanel>
            </asp:Panel>
            <asp:HiddenField ID="hdnPoly" runat="server" />
            <asp:HiddenField ID="hdnCoordinates" runat="server" />
            <asp:HiddenField ID="hdnMaxGeozoneMarkers" runat="server" />
            <asp:HiddenField ID="hdnMapType" runat="server" Value="N" />
            <asp:HiddenField ID="hdnMapZoomLevel" runat="server" Value="" />
            <asp:HiddenField ID="hdnlang" runat="server" />
            <asp:HiddenField ID="hdnLatLong" runat="server" />
            <asp:HiddenField ID="hdnMapLng" runat="server" />
            <asp:HiddenField ID="hdnIsLocateMe" runat="server" Value="N" />
            <asp:HiddenField ID="hdnIsCircleLocated" runat="server" Value="0" />
            <asp:HiddenField ID="hdnRestriction" runat="server" />
            <asp:HiddenField ID="hdnMapZoomLevelLatLong" runat="server" Value="" />
            <asp:HiddenField ID="hdnLandmarkImage" runat="server" />

            <script type="text/javascript" src="../js/Callback.js"></script>
            <script type="text/javascript" src="../js/GridCheckBoxMaintaining.js"></script>
            <script lang="JavaScript1.2" type="text/javascript" src="../js/myformvalidations.js"></script>
            <script lang="javascript" type="text/javascript">
                function validateCSVFileUpload(obj) {
                    var fileName = new String();
                    var fileExtension = new String();
                    var validfileextensions = "xls";
                    var validfileextensions1 = "xlsx";
                    var flag = false;
                    // store the file name into the variable
                    filename = obj.value;
                    // extract and store the file extension into another variable
                    fileextension = filename.substr(filename.length - 3, 3);
                    // check over the valid file extensions to compare them with uploaded file
                    if (fileextension.toLowerCase() == validfileextensions.toString().toLowerCase() || fileextension.toLowerCase() == validfileextensions1.toString().toLowerCase()) {
                        flag = true;
                    }
                    else {
                        alert(AlertFileType);
                    }
                }
                var FullMapWindow;
                function FullscreenMap_gz() {
                    FullMapWindow = window.open("FullscreenMap.aspx?iQ627RBfbVeQIdvDSPLCxg==", 'FullscreenMap', 'scrollbars=yes,resizable=no,width=' +
                            screen.width + ',height=' + screen.height, false);
                    FullMapWindow.moveTo(0, 0);
                    FullMapWindow.focus();
                }
                function popUpAdvancedSearch(PanelStatus) {
                    if (document.getElementById('pnlImportGeozones') != null) {
                        if (PanelStatus == 1)
                            document.getElementById('pnlImportGeozones').style.display = "inline-block";
                        else
                            document.getElementById('pnlImportGeozones').style.display = "none";
                    }
                }
            </script>
            <script type="text/javascript">
                function validateNotification() {
                    try {
                        var manageNotifiction = document.getElementById('VehicleGeozone');
                        var notify = document.getElementById('chkVehicleGeozone');
                        if (notify.checked) {
                            manageNotifiction.style.display = "block";
                        }
                        else {
                            if (manageNotifiction != null)
                                manageNotifiction.style.display = "none";
                        }
                    }
                    catch (ex) {

                    }
                }
            </script>
            <script language="javascript" type="text/javascript">
                window.onload = function () {
                    validateNotification();
                }
                var prm = Sys.WebForms.PageRequestManager.getInstance();
                prm.add_endRequest(function (s, e) {
                    validateNotification();
                });
            </script>
            <asp:TextBox ID="txtlat1" runat="server" MaxLength="50" ondrop="return false;" TabIndex="5"
                Width="145px" Visible="false"></asp:TextBox>
            <asp:TextBox ID="txtlong1" runat="server" MaxLength="50" ondrop="return false;" TabIndex="5"
                Width="145px" Visible="false"></asp:TextBox>
            <asp:HiddenField ID="hdnLogout" runat="server" />
        </form>
    </div>
    <!-- Content Ends Here -->
    <uc2:Footer ID="ucFooter" runat="server" />
</body>
</html>
