<%@ page language="C#" autoeventwireup="true" inherits="Forms_CameraMaster, App_Web_lq2z12jk" %>

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

<%--<%@ Register Assembly="DevExpress.Web.ASPxGridView.v8.2, 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.v8.2" Namespace="DevExpress.Web.ASPxPopupControl"
    TagPrefix="dxpc" %>--%>

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head id="Head1" runat="server">
    <title>tSense-IoT Camera Master</title>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <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)" />
    <style type="text/css">
        .header {
            background: #DFE9F5;
            border-left: 1px solid #99BBE8;
            border-right: 1px solid #99BBE8;
            border-top: 1px solid #99BBE8;
        }

        .content {
            background: #DFE9F5;
            border-left: 1px solid #99BBE8;
            border-right: 1px solid #99BBE8;
            border-bottom: 1px solid #99BBE8;
        }
    </style>
    <style type="text/css">
        .MDTfont {
            font-family: Arial, Helvetica, sans-serif;
            height: 30px;
            font-size: 11px;
        }

        .modal {
            display: none;
            position: absolute;
            top: 0px;
            left: 0px;
            background-color: black;
            z-index: 100;
            opacity: 0.8;
            filter: alpha(opacity=60);
            -moz-opacity: 0.8;
            min-height: 100%;
            -moz-border-radius: 10px; /* for Firefox */
            -webkit-border-radius: 10px; /* for Webkit-Browsers */
            border-radius: 10px; /* regular */
            -moz-box-shadow: 3px 3px 5px 6px #ccc;
            -webkit-box-shadow: 3px 3px 5px 6px #ccc;
            box-shadow: 3px 3px 5px 6px #ccc;
        }

        #divImage {
            display: none;
            z-index: 1000;
            position: fixed;
            top: 0;
            left: 0;
            background-color: White;
            height: auto;
            width: auto;
            padding: 3px;
            border: solid 1px black;
        }

        .dlTable {
            border: double 1px #D9D9D9;
            width: 200px;
            text-align: center;
            -moz-border-radius: 10px; /* for Firefox */
            -webkit-border-radius: 10px; /* for Webkit-Browsers */
            border-radius: 10px; /* regular */
            -moz-box-shadow: 3px 3px 5px 6px #ccc;
            -webkit-box-shadow: 3px 3px 5px 6px #ccc;
            box-shadow: 3px 3px 5px 6px #ccc;
        }
    </style>

    <script type="text/javascript">

        function LoadDiv(url, lnk) {
            var img = new Image();
            var bcgDiv = document.getElementById("divBackground");
            var imgDiv = document.getElementById("divImage");
            var imgFull = document.getElementById("imgFull");
            //var imgLoader = document.getElementById("imgLoader");
            var dl = document.getElementById("<%#dlstImgGallery.ClientID%>");
            //var imgs = document.getElementById("imgLoader"); // dl.getElementsByTagName("img");

            //imgLoader.style.display = "block";
            img.onload = function () {
                imgFull.src = img.src;
                imgFull.style.display = "block";
                //imgLoader.style.display = "none";
            };
            img.src = url;
            var width = document.body.clientWidth;
            if (document.body.clientHeight > document.body.scrollHeight) {
                bcgDiv.style.height = document.body.clientHeight + "px";
            }
            else {
                bcgDiv.style.height = document.body.scrollHeight + "px";
            }

            imgDiv.style.left = (width - 650) / 2 + "px";
            imgDiv.style.top = "20px";
            bcgDiv.style.width = "100%";

            bcgDiv.style.display = "block";
            imgDiv.style.display = "block";
            return false;
        }
        function HideDiv() {
            var bcgDiv = document.getElementById("divBackground");
            var imgDiv = document.getElementById("divImage");
            var imgFull = document.getElementById("imgFull");
            bcgDiv.style.display = "none";
            imgDiv.style.display = "none";
            imgFull.style.display = "none";
        }

    </script>

    <link id="reset" runat="server" href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link id="dropdown" runat="server" href="../css/dropdown.css" rel="stylesheet" type="text/css" />
    <link id="stylesheet2" runat="server" href="../css/stylesheet2.css" rel="stylesheet"
        type="text/css" />
    <link id="datepicker" runat="server" type="text/css" href="../css/ui.datepicker.css"
        rel="stylesheet" />
    <link id="uicore" runat="server" type="text/css" href="../css/ui.core.css" rel="stylesheet" />
    <link id="uitheme" runat="server" type="text/css" href="../css/ui.theme.css" rel="stylesheet" />
    <link id="ieonly" runat="server" rel="stylesheet" type="text/css" href="" />

    <%--Custom Theme for DevEx 14.2--%>
    <link id="GridView" type="text/css" href="~/App_Themes/Office2003Blue/GridView/grid.css" rel="stylesheet" />
    <link id="Editors" type="text/css" href="~/App_Themes/Office2003Blue/Editors/styles.css" rel="stylesheet" />
    <link rel="SHORTCUT ICON" href="../images/favicon.ico" />
    <%-- <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
    
  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.tabs.js"></script>--%>

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

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

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

    <script src="../js/myformvalidations.js" type="text/javascript"></script>
    <%--********* For Bootstrap Implementation *************--%>
    <link id="BootStrapCss" href="../css/bootstrap.css" runat="server" rel="stylesheet" type="text/css" />
    <link id="mainstyle" runat="server" href="../css/mainstyle.css" rel="stylesheet" type="text/css" />
    <%--********* End of Bootstrap Implementation *************--%>
    <script src="../js/wow.min.js"></script>
</head>
<body>
    <div id="container">
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel ID="UpMDT" runat="server">
                <ContentTemplate>
                    <!-- Header Starts Here -->
                    <uc1:Header ID="ucHeader" runat="server" />
                    <!-- Nav Ends Here -->
                    <!-- Content Starts Here -->
                    <div id="outer">
                        <div id="inner">
                            <div id="float-wrap">
                                <!-- Main Content Starts Here -->
                                <div id="content">
                                    <div class="content-wrap">
                                        <div id="top-content">
                                            <div id="heading">
                                                <img class="icon" src="../images/configuration-icon.jpg" alt="" />
                                                <h1>
                                                    <asp:Literal ID="lblConfigurationSetupCaption" runat="server"></asp:Literal></h1>
                                                <asp:LinkButton ID="lnkHomeCaption" runat="server"></asp:LinkButton>
                                                <span>&gt;</span><a href="CameraMaster.aspx"><asp:Label ID="lblHistoryCaption" runat="server"></asp:Label></a>
                                            </div>
                                            <div id="control-box">
                                                <asp:UpdatePanel ID="updPanel" runat="server">
                                                    <ContentTemplate>
                                                        <asp:HiddenField ID="hdnAlarmIDs" runat="server" Value="" />
                                                        <asp:Button ID="Button1" Style="display: none;" runat="server" />
                                                        <asp:HiddenField ID="hdnlang" runat="server" />
                                                        <table border="0" cellpadding="0" cellspacing="0" id="control-tbl">
                                                            <tr>
                                                                <td>
                                                                    <table cellpadding="0" cellspacing="0" id="control-form" border="0">
                                                                        <tr>
                                                                            <td>
                                                                                <asp:Image ID="imgFleetIcon" runat="server" ImageUrl="../images/fleet-icon.gif" AlternateText="Fleet Name" />
                                                                            </td>
                                                                            <td class="dropdown">
                                                                                <dxw:ASPxComboBox ID="ddlFleet" runat="server" ValueType="System.Int32" Width="130px" Height="20px" AutoPostBack="true"
                                                                                    EnableIncrementalFiltering="true" ShowImageInEditBox="false" ClientInstanceName="ddlFleet" SelectedIndex="0"
                                                                                    CssFilePath="~/App_Themes/Office2003 Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                                    EnableTheming="true" Theme="Office2003Blue" OnSelectedIndexChanged="ddlFleet_SelectedIndexChanged">
                                                                                </dxw:ASPxComboBox>
                                                                            </td>
                                                                            <td>
                                                                                <asp:Image ID="imgDurationFrom" runat="server" ImageUrl="../images/calendar-rht-icon.gif"
                                                                                    AlternateText="Duration From" /><asp:HiddenField runat="server" ID="hdnDateFormat"
                                                                                        Value="dd-MMM-yyyy" />
                                                                            </td>
                                                                            <td>
                                                                                <table id="frmHrs">
                                                                                    <tr>
                                                                                        <td style="padding-top: 1px;">
                                                                                            <asp:TextBox ID="txtStartDate" runat="server" oncopy="return false" oncut="return false"
                                                                                                onkeydown="doCheckBackSpaceOrDelete()" onkeypress="return false" onpaste="return false"
                                                                                                CssClass="date" ToolTip="dd-MMM-yyyy"></asp:TextBox>
                                                                                        </td>
                                                                                        <td class="time">
                                                                                            <MKB:TimeSelector ID="tsFromHrs" runat="server" AmPm="AM" DisplaySeconds="False"
                                                                                                Hour="8" Font-Size="10pt" Height="20px" SelectedTimeFormat="Twelve">
                                                                                            </MKB:TimeSelector>
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                                <%--<asp:DropDownList ID="ddlFromHours" runat="server" CssClass="time" onchange="CheckTimePicker(this,'ddlFromAMPM');">
                                                                        <asp:ListItem>00</asp:ListItem>
                                                                        <asp:ListItem>01</asp:ListItem>
                                                                        <asp:ListItem>02</asp:ListItem>
                                                                        <asp:ListItem>03</asp:ListItem>
                                                                        <asp:ListItem>04</asp:ListItem>
                                                                        <asp:ListItem>05</asp:ListItem>
                                                                        <asp:ListItem>06</asp:ListItem>
                                                                        <asp:ListItem>07</asp:ListItem>
                                                                        <asp:ListItem>08</asp:ListItem>
                                                                        <asp:ListItem>09</asp:ListItem>
                                                                        <asp:ListItem>10</asp:ListItem>
                                                                        <asp:ListItem>11</asp:ListItem>
                                                                        <asp:ListItem>12</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                    <asp:DropDownList ID="ddlFromAMPM" runat="server" CssClass="time">
                                                                        <asp:ListItem>AM</asp:ListItem>
                                                                        <asp:ListItem>PM</asp:ListItem>
                                                                    </asp:DropDownList>--%>
                                                                            </td>
                                                                            <td></td>
                                                                            <td class="lft-bor" id="tdPolyCaption" runat="server" style="display: none">
                                                                                <asp:Label ID="lblPolyline" runat="server" Text="Polyline Style"></asp:Label>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                <asp:Image ID="imgVehicleIcon" runat="server" ImageUrl="../images/vehicle-icon.gif"
                                                                                    AlternateText="Vehicle" />
                                                                            </td>
                                                                            <td class="dropdown">
                                                                                <dxw:ASPxComboBox ID="ddlVehicle" runat="server" ValueType="System.Int32" Width="130px" Height="20px" AutoPostBack="false"
                                                                                    ShowImageInEditBox="false" ClientInstanceName="ddlVehicle" SelectedIndex="0" EnableIncrementalFiltering="true"
                                                                                    CssFilePath="~/App_Themes/Office2003 Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                                    EnableTheming="true" Theme="Office2003Blue">
                                                                                </dxw:ASPxComboBox>
                                                                            </td>
                                                                            <td>
                                                                                <asp:Image ID="imgDurationTo" runat="server" ImageUrl="../images/calendar-lft-icon.gif"
                                                                                    AlternateText="Duration To" />
                                                                            </td>
                                                                            <td>
                                                                                <table>
                                                                                    <tr>
                                                                                        <td>
                                                                                            <asp:TextBox ID="txtEndDate" runat="server" oncopy="return false" oncut="return false"
                                                                                                CssClass="date" onkeydown="doCheckBackSpaceOrDelete()" onkeypress="return false"
                                                                                                onpaste="return false" ToolTip="dd-MMM-yyyy"></asp:TextBox>
                                                                                        </td>
                                                                                        <td class="time">
                                                                                            <MKB:TimeSelector ID="tsToHours" runat="server" AmPm="AM" DisplaySeconds="False"
                                                                                                Hour="10" Font-Size="10pt" Height="20px" SelectedTimeFormat="Twelve">
                                                                                            </MKB:TimeSelector>
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                                <%--<asp:DropDownList ID="ddlToHours" runat="server" CssClass="time" onchange="CheckTimePicker(this,'ddlToAMPM');">
                                                                        <asp:ListItem>00</asp:ListItem>
                                                                        <asp:ListItem>01</asp:ListItem>
                                                                        <asp:ListItem>02</asp:ListItem>
                                                                        <asp:ListItem>03</asp:ListItem>
                                                                        <asp:ListItem>04</asp:ListItem>
                                                                        <asp:ListItem>05</asp:ListItem>
                                                                        <asp:ListItem>06</asp:ListItem>
                                                                        <asp:ListItem>07</asp:ListItem>
                                                                        <asp:ListItem>08</asp:ListItem>
                                                                        <asp:ListItem>09</asp:ListItem>
                                                                        <asp:ListItem>10</asp:ListItem>
                                                                        <asp:ListItem>11</asp:ListItem>
                                                                        <asp:ListItem>12</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                    <asp:DropDownList ID="ddlToAMPM" runat="server" CssClass="time">
                                                                        <asp:ListItem>AM</asp:ListItem>
                                                                        <asp:ListItem>PM</asp:ListItem>
                                                                    </asp:DropDownList>--%>
                                                                            </td>
                                                                            <td>
                                                                                <asp:ImageButton ID="btnView1" ImageUrl="~/images/btn-update-results.jpg" runat="server"
                                                                                    OnClick="btnView_Click" OnClientClick="try{if( Validate('V')){ShowPopUp(); return true;} else return false;} catch(Error){return false};"
                                                                                    Visible="false" />
                                                                                <asp:LinkButton ID="btnView" runat="server" CssClass="MultilingualBtn" OnClick="btnView_Click"
                                                                                    OnClientClick="ShowPopUp();">
                                                                                    <span id="Span1" runat="server" class="MultilingualBtnspan">
                                                                                        <div class="Search">
                                                                                            <div id="UpdateResultsButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                                Update Results
                                                                                            </div>
                                                                                        </div>
                                                                                    </span>
                                                                                </asp:LinkButton>&nbsp;
                                                                            </td>
                                                                            <td class="lft-bor" align="left" id="tdPolyButtons" runat="server" style="display: none">
                                                                                <p style="white-space: nowrap">
                                                                                    <img id="solid" src="../images/btn-solid-over.jpg" alt="" onclick="try{Draw('solid');}catch(Error){}"
                                                                                        style="cursor: hand;" />&nbsp;&nbsp;&nbsp;
                                                                                <img id="dot" src="../images/btn-dot.jpg" alt="" onclick="try{Draw('dot');}catch(Error){}"
                                                                                    style="cursor: not-allowed;" />&nbsp;&nbsp;&nbsp;
                                                                                <img id="dash" src="../images/btn-dash.jpg" alt="" onclick="try{Draw('dash');}catch(Error){}"
                                                                                    style="cursor: not-allowed;" />
                                                                                </p>
                                                                            </td>
                                                                            <td></td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                        <%--<asp:UpdateProgress ID="progress_valid" runat="server" DynamicLayout="True" AssociatedUpdatePanelID="updPanel">
                                                <ProgressTemplate>
                                                    <center>
                                                        
                                                    </center>
                                                </ProgressTemplate>
                                            </asp:UpdateProgress>--%>
                                                    </ContentTemplate>
                                                    <%-- <Triggers>
                                                    <asp:PostBackTrigger ControlID="btnView" />
                                                </Triggers>--%>
                                                </asp:UpdatePanel>
                                            </div>
                                            <div class="clear clearfix">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="clear clearfix">
                                    </div>
                                    <cc1:TabContainer ID="tcManageMDT" runat="server" AutoPostBack="false" class="form-box">
                                        <cc1:TabPanel ID="tpMDTMessages" runat="server" HeaderText="Image Gallery">
                                            <HeaderTemplate>
                                                Image Gallery
                                            </HeaderTemplate>
                                            <ContentTemplate>
                                                <asp:UpdatePanel ID="updImgGalary" runat="server">
                                                    <ContentTemplate>
                                                        <asp:Panel ID="pnlImageGallery" runat="server">
                                                            <div class="form-box">
                                                                <div id="myGallery" style="background-color: White; overflow: auto; height: 650px">
                                                                    <asp:DataList ID="dlstImgGallery" runat="server" RepeatColumns="5" RepeatDirection="Horizontal"
                                                                        Width="98%" HorizontalAlign="Center">
                                                                        <ItemTemplate>
                                                                            <br />
                                                                            <table cellpadding="5px" cellspacing="10px" class="dlTable" width="100%" align="center"
                                                                                style="float: right">
                                                                                <tr>
                                                                                    <td>&nbsp;
                                                                                    <asp:Image ID="imgProduct" runat="server" Style="width: 200px; height: 200px; cursor: pointer"
                                                                                        onclick="LoadDiv(this.src, this)" />
                                                                                        <asp:HiddenField ID="lblCamData1" runat="server" Value='<%# Eval("CameraData") %>' />
                                                                                    </td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td style="text-align: left; padding-left: 3px; padding-right: 3px;">
                                                                                        <asp:Label ID="Label2" runat="server" Text="Date Time: " Font-Bold="true" CssClass="MDTfont">
                                                                                        </asp:Label>
                                                                                        <asp:Label ID="lblTime" runat="server" Text='<%# Eval("Timestamp") %>' CssClass="MDTfont">
                                                                                        </asp:Label>
                                                                                    </td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td style="text-align: left; padding-left: 3px; padding-right: 3px;">
                                                                                        <asp:Label ID="Label3" runat="server" Text="Address: " Font-Bold="true" CssClass="MDTfont">
                                                                                        </asp:Label>
                                                                                        <asp:Label ID="lblAddress" runat="server" Text='<%# Eval("StreetAddress") %>' CssClass="MDTfont">
                                                                                        </asp:Label>
                                                                                        <br />
                                                                                        <br />
                                                                                    </td>
                                                                                </tr>
                                                                            </table>
                                                                            <br />
                                                                        </ItemTemplate>
                                                                    </asp:DataList>
                                                                </div>
                                                                <div id="divBackground" class="modal">
                                                                </div>
                                                                <div id="divImage">
                                                                    <table style="height: 100%; width: 100%">
                                                                        <tr>
                                                                            <td align="right" valign="middle" style="width: 200px">
                                                                                <img src="../imagesButton/btn-close.png" id="btnClose" onclick="HideDiv()" style="cursor: pointer" />
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td valign="middle" align="center" colspan="3" style="height: auto;">
                                                                                <%--<img id="imgLoader" runat="server" alt="" src="images/loader.gif" />--%>
                                                                                <img id="imgFull" alt="" src="" style="display: none; height: auto; width: auto" />
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </div>
                                                            </div>
                                                        </asp:Panel>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </ContentTemplate>
                                        </cc1:TabPanel>
                                        <cc1:TabPanel ID="tpMDTUsers" runat="server" HeaderText="Settings">
                                            <ContentTemplate>
                                                <asp:UpdatePanel ID="UpdSetting" runat="server">
                                                    <ContentTemplate>
                                                        <asp:Panel ID="pnlCameraSettings" runat="server" Style="height: 650px">
                                                            <div class="form-box">
                                                                <table width="50%" height="50%">
                                                                    <tr>
                                                                        <td class="label">
                                                                            <asp:Label ID="lblSelectCmd" runat="server" Text="Select Command"></asp:Label>
                                                                        </td>
                                                                        <td class="dropdown">
                                                                            <dxw:ASPxComboBox runat="server" ID="ddlCommands" ClientInstanceName="ddlCommands"
                                                                                Width="200px" Height="20px" ValueType="System.String" AutoPostBack="true" DropDownStyle="DropDownList"
                                                                                CssFilePath="~/App_Themes/Office2003 Blue/Editors/styles.css" CssPostfix="Office2003_Blue"
                                                                                EnableTheming="true" Theme="Office2003Blue" OnSelectedIndexChanged="ddlCommands_SelectedIndexChanged">
                                                                                <%--  <Items>
                                                                                <dxw:ListEditItem Text="Set Camera Settings" Value="W17" />
                                                                                <dxw:ListEditItem Text="Get Camera Settings" Value="W18" />
                                                                            </Items>--%>
                                                                            </dxw:ASPxComboBox>
                                                                        </td>
                                                                    </tr>
                                                                    <tr runat="server" id="trCameraSettings">
                                                                        <td colspan="2" style="padding: 0px; margin: 0px">
                                                                            <asp:Panel ID="Panel1" runat="server" CssClass="innerTable">
                                                                                <table cellpadding="0" cellspacing="0" border="0" width="100%" class="innerTable">
                                                                                    <tr id="TdCamTakePicture">
                                                                                        <td class="label" width="30%"></td>
                                                                                        <td width="70%">
                                                                                            <br />
                                                                                            <asp:CheckBox ID="ChkTakPicture" runat="server" Checked="true" Text="TakePicture" />
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td class="label"></td>
                                                                                        <td>
                                                                                            <br />
                                                                                            <asp:CheckBox ID="chkCamShowSettings" runat="server" Text="Show Camera Settings"
                                                                                                onclick="ShowHideCameraSettings()" />
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr id="TdCamResolution" runat="server" style="display: none">
                                                                                        <td class="label">
                                                                                            <br />
                                                                                            <asp:Label ID="Label1" runat="server" Text="Resolution"></asp:Label>
                                                                                        </td>
                                                                                        <td>
                                                                                            <br />
                                                                                            <asp:DropDownList ID="ddlResolution" runat="server">
                                                                                                <asp:ListItem Value="1">160 x 120</asp:ListItem>
                                                                                                <asp:ListItem Value="2">320 x 240</asp:ListItem>
                                                                                                <asp:ListItem Value="3">640 x 480</asp:ListItem>
                                                                                            </asp:DropDownList>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr id="TdCamPeriodic" runat="server" style="display: none">
                                                                                        <td class="label"></td>
                                                                                        <td>
                                                                                            <br />
                                                                                            <asp:CheckBox ID="ChkEnablePeriodicClick" runat="server" Text="Enable Periodic Click"
                                                                                                onclick="ShowHidePeriodicTime()" />
                                                                                            <asp:DropDownList ID="ddlPeriodicTime" runat="server" Style="display: none">
                                                                                                <%--  <asp:ListItem Value="5">5 Mins</asp:ListItem>
                                                                                            <asp:ListItem Value="10">10 Mins</asp:ListItem>--%>
                                                                                                <asp:ListItem Value="15">15 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="20">20 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="25">25 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="30">30 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="35">35 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="40">40 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="45">45 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="50">50 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="55">55 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="60">1 Hr</asp:ListItem>
                                                                                                <asp:ListItem Value="65">1 Hr 5 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="70">1 Hr 10 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="75">1 Hr 15 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="80">1 Hr 20 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="85">1 Hr 25 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="90">1 Hr 30 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="95">1 Hr 35 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="100">1 Hr 40 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="105">1 Hr 45 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="110">1 Hr 50 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="115">1 Hr 55 Mins</asp:ListItem>
                                                                                                <asp:ListItem Value="120">2 Hrs</asp:ListItem>
                                                                                            </asp:DropDownList>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td colspan="2" align="center">&nbsp;
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                            </asp:Panel>
                                                                        </td>
                                                                    </tr>
                                                                    <tr runat="server" id="trTakePicture">
                                                                        <td style="padding: 0px; margin: 0px">
                                                                            <br />
                                                                            <asp:Label ID="Label4" runat="server" Text="Resolution"></asp:Label>
                                                                        </td>
                                                                        <td style="padding: 0px; margin: 0px">
                                                                            <br />
                                                                            <asp:DropDownList ID="ddlResolutionTakePicture" runat="server">
                                                                                <asp:ListItem Value="1">160 x 120</asp:ListItem>
                                                                                <asp:ListItem Value="2">320 x 240</asp:ListItem>
                                                                                <asp:ListItem Value="3">640 x 480</asp:ListItem>
                                                                            </asp:DropDownList>
                                                                        </td>
                                                                    </tr>
                                                                    <tr runat="server" id="trCameraSettingsAdvanced">
                                                                        <td style="padding: 0px; margin: 0px">&nbsp;
                                                                        </td>
                                                                        <td style="padding: 0px; margin: 0px">
                                                                            <table width="70%">
                                                                                <tr>
                                                                                    <td>
                                                                                        <asp:CheckBox ID="ChkEnableCamSettings" runat="server" Text="Enable Camera settings"
                                                                                            onclick="EnableCameraSettings()" />
                                                                                    </td>
                                                                                </tr>
                                                                                <tr id="trEnableCamSetting" runat="server" style="display: none">
                                                                                    <td>
                                                                                        <asp:Panel ID="Panel2" runat="server" CssClass="innerTable">
                                                                                            <table cellpadding="0" cellspacing="0" border="0" width="100%" class="innerTable">
                                                                                                <tr>
                                                                                                    <td style="padding: 0px; margin: 0px">&nbsp;&nbsp;&nbsp;
                                                                                                    <asp:CheckBox ID="chEnableEventSettings" runat="server" Text="Enable Event based settings"
                                                                                                        onclick="ShowHideEventSettings()" />
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr>
                                                                                                    <td id="tdEventSettings" runat="server" style="display: none; float: right">
                                                                                                        <table width="100%" align="right">
                                                                                                            <tr>
                                                                                                                <td>
                                                                                                                    <asp:CheckBox ID="ChkDoor" runat="server" Text="Door" />
                                                                                                                    <br />
                                                                                                                    <asp:CheckBox ID="ChkTrunk" runat="server" Text="Trunk" />
                                                                                                                    <br />
                                                                                                                    <asp:CheckBox ID="ChkPanic" runat="server" Text="Panic" />
                                                                                                                    <br />
                                                                                                                    <asp:CheckBox ID="ChkSpeed" runat="server" Text="Speed" />
                                                                                                                    <br />
                                                                                                                    <asp:CheckBox ID="ChkIding" runat="server" Text="Iding" />
                                                                                                                    <br />
                                                                                                                    <asp:CheckBox ID="ChkExtIdling" runat="server" Text="Ext.Idling" />
                                                                                                                    <br />
                                                                                                                    <asp:CheckBox ID="ChkHarshExtremeBreaking" runat="server" Text="Harsh/Extreme Braking" />
                                                                                                                    <br />
                                                                                                                    <asp:CheckBox ID="ChkGeofence" runat="server" Text="Geofence" />
                                                                                                                    <br />
                                                                                                                    <asp:CheckBox ID="ChkGeozoneIn" runat="server" Text="Geozone In" />
                                                                                                                    <br />
                                                                                                                    <asp:CheckBox ID="ChkGPSAntennaOpen" runat="server" Text="GPS Antenna Open" />
                                                                                                                </td>
                                                                                                            </tr>
                                                                                                        </table>
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr>
                                                                                                    <td style="padding: 0px; margin: 0px">
                                                                                                        <br />
                                                                                                        &nbsp;&nbsp;&nbsp;
                                                                                                    <asp:CheckBox ID="chEnableTimebasedSettings" runat="server" Text="Enable Time based settings"
                                                                                                        onclick="ShowHideTimebasedSettings()" />
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr>
                                                                                                    <td id="tdTimeBasedSettings" runat="server" style="display: none; float: right">
                                                                                                        <table width="100%">
                                                                                                            <tr>
                                                                                                                <td align="left">
                                                                                                                    <asp:CheckBox ID="chkIgnitionON" runat="server" Text="Ignition ON" onclick="ShowHideIgnitionONSettings()" />
                                                                                                                    <br />
                                                                                                                </td>
                                                                                                                <td id="tdIgnitionON" runat="server" style="display: none" align="right">
                                                                                                                    <br />
                                                                                                                    <asp:Label ID="Label9" runat="server" Text="Take Picture every"></asp:Label>
                                                                                                                    <br />
                                                                                                                    <asp:DropDownList ID="ddlPeriodicTimeAdvancedSettingsIgnON" runat="server">
                                                                                                                        <asp:ListItem Value="15">15 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="20">20 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="25">25 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="30">30 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="35">35 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="40">40 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="45">45 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="50">50 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="55">55 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="60">1 Hr</asp:ListItem>
                                                                                                                        <asp:ListItem Value="65">1 Hr 5 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="70">1 Hr 10 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="75">1 Hr 15 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="80">1 Hr 20 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="85">1 Hr 25 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="90">1 Hr 30 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="95">1 Hr 35 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="100">1 Hr 40 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="105">1 Hr 45 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="110">1 Hr 50 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="115">1 Hr 55 Mins</asp:ListItem>
                                                                                                                        <asp:ListItem Value="120">2 Hrs</asp:ListItem>
                                                                                                                    </asp:DropDownList>
                                                                                                                </td>
                                                                                                            </tr>
                                                                                                            <tr>
                                                                                                                <td align="left">
                                                                                                                    <asp:CheckBox ID="chkIgnitionOFF" runat="server" Text="Ignition OFF" onclick="ShowHideIgnitionOFFSettings()" />
                                                                                                                    <br />
                                                                                                                </td>
                                                                                                                <td id="tdIgnitionOFF" runat="server" style="display: none">
                                                                                                                    <table>
                                                                                                                        <tr>
                                                                                                                            <td>
                                                                                                                                <br />
                                                                                                                                <%--<asp:Label ID="Label7" runat="server" Text="KMS"></asp:Label>--%>
                                                                                                                                <asp:CheckBox ID="ChkIgnOFFkms" runat="server" Text="KMS" onclick="ShowHideIgnitionOFFKMSSettings()" />
                                                                                                                                <br />
                                                                                                                                <asp:TextBox ID="txtIgnOFFkms" runat="server" MaxLength="3" Style="display: none" onkeypress="return chkNumeric_only(event);"></asp:TextBox>
                                                                                                                                <br />
                                                                                                                                <asp:Label ID="lblExKMS" runat="server" Text="(10kms - 200kms)" Style="display: none"></asp:Label>
                                                                                                                            </td>
                                                                                                                        </tr>
                                                                                                                        <tr>
                                                                                                                            <td>
                                                                                                                                <br />
                                                                                                                                <%--<asp:Label ID="Label10" runat="server" Text="Take Picture every"></asp:Label>--%>
                                                                                                                                <asp:CheckBox ID="ChkIgnOFFTakePciture" runat="server" Text="Take Picture every" onclick="ShowHideIgnitionOFFTimeSettings()" />
                                                                                                                                <br />
                                                                                                                                <asp:DropDownList ID="ddlPeriodicTimeAdvancedSettingsIgnOFF" runat="server" Style="display: none">
                                                                                                                                    <asp:ListItem Value="15">15 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="20">20 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="25">25 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="30">30 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="35">35 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="40">40 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="45">45 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="50">50 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="55">55 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="60">1 Hr</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="65">1 Hr 5 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="70">1 Hr 10 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="75">1 Hr 15 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="80">1 Hr 20 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="85">1 Hr 25 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="90">1 Hr 30 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="95">1 Hr 35 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="100">1 Hr 40 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="105">1 Hr 45 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="110">1 Hr 50 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="115">1 Hr 55 Mins</asp:ListItem>
                                                                                                                                    <asp:ListItem Value="120">2 Hrs</asp:ListItem>
                                                                                                                                </asp:DropDownList>
                                                                                                                            </td>
                                                                                                                        </tr>
                                                                                                                    </table>
                                                                                                                </td>
                                                                                                            </tr>
                                                                                                        </table>
                                                                                                    </td>
                                                                                                </tr>
                                                                                            </table>
                                                                                        </asp:Panel>
                                                                                    </td>
                                                                                </tr>
                                                                            </table>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td colspan="2">&nbsp;
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td colspan="2" align="center">
                                                                            <asp:LinkButton ID="btnSend" runat="server" CssClass="MultilingualBtn" OnClick="btnSend_Click"
                                                                                OnClientClick="ShowPopUp();document.getElementById('tcManageMDT_tpMDTUsers_divMsg').innerHTML='';if(validateKMSValue()){return true;}else{return false;}">
                                                                                <span id="Span2" runat="server" class="MultilingualBtnspan">
                                                                                    <div class="SendCommands">
                                                                                        <div id="SendCommandButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                            Send Command
                                                                                        </div>
                                                                                    </div>
                                                                                </span>
                                                                            </asp:LinkButton>
                                                                            &nbsp;
                                                                        <asp:ImageButton ID="btnScheduleCommands1" runat="server" OnClick="btnScheduleCommands_Click"
                                                                            ImageUrl="~/images/schedule-a-command.png" Visible="false"></asp:ImageButton>
                                                                            <asp:LinkButton ID="btnScheduleCommands" runat="server" CssClass="MultilingualBtn"
                                                                                OnClick="btnScheduleCommands_Click">
                                                                                <span id="Span5" runat="server" class="MultilingualBtnspan">
                                                                                    <div class="ScheduleCommand">
                                                                                        <div id="ScheduleCommandButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                            Schedule Command
                                                                                        </div>
                                                                                    </div>
                                                                                </span>
                                                                            </asp:LinkButton>
                                                                            &nbsp;
                                                                        <asp:LinkButton ID="ibtnSave" runat="server" CssClass="MultilingualBtn" OnClick="btnSend_Click"
                                                                            Visible="false">
                                                                            <span id="Span6" runat="server" class="MultilingualBtnspan">
                                                                                <div class="Save">
                                                                                    <div id="SaveButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                        Save
                                                                                    </div>
                                                                                </div>
                                                                            </span>
                                                                        </asp:LinkButton>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td colspan="2">
                                                                            <asp:Panel ID="pnlScheduleCmds" runat="server" Visible="false">
                                                                                <table>
                                                                                    <tr>
                                                                                        <td>
                                                                                            <p style="white-space: nowrap">
                                                                                                <asp:Label ID="lblToCaption" runat="server" Text="Retries Period"></asp:Label>
                                                                                                <asp:Label ID="lblEffectiveTillMandatory" runat="server" ForeColor="Red">*</asp:Label>
                                                                                            </p>
                                                                                        </td>
                                                                                        <td>
                                                                                            <asp:DropDownList ID="ddlRetriesTime" runat="server">
                                                                                                <asp:ListItem Text="1 Day" Value="1" Selected="True"></asp:ListItem>
                                                                                                <asp:ListItem Text="3 Days" Value="3"></asp:ListItem>
                                                                                                <asp:ListItem Text="7 Days" Value="7"></asp:ListItem>
                                                                                            </asp:DropDownList>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td colspan="2">
                                                                                            <asp:Label ID="Label3" runat="server" ForeColor="Red">*</asp:Label>&nbsp;
                                                                                        <asp:Label ID="lblIndicatesMandatory" runat="server">Required Fields</asp:Label>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td class="label"></td>
                                                                                        <td class="dropdown">
                                                                                            <asp:ImageButton ID="ibtnSaveSchedules1" runat="server" OnClientClick="return ValidateSchedulingOfCommands(true);"
                                                                                                ImageUrl="~/images/schedule.png" OnClick="btnSend_Click" Visible="false"></asp:ImageButton>
                                                                                            <asp:LinkButton ID="ibtnSaveSchedules" runat="server" CssClass="MultilingualBtn"
                                                                                                OnClientClick="return ValidateSchedulingOfCommands(true);validateKMSValue();ShowPopUp();" OnClick="btnSend_Click">
                                                                                                <span id="Span3" runat="server" class="MultilingualBtnspan">
                                                                                                    <div class="Schedule">
                                                                                                        <div id="ScheduleButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                                            Schedule
                                                                                                        </div>
                                                                                                    </div>
                                                                                                </span>
                                                                                            </asp:LinkButton>&nbsp;
                                                                                        <%--  <asp:LinkButton ID="ibtnSaveSchedules" runat="server" CssClass="btn" Width="60px" 
                                                                OnClientClick="return ValidateSchedulingOfCommands(true);" 
                                                                ImageUrl="~/images/btn-save.jpg" OnClick="btnSend_Click"> <span>Schedule</span></asp:LinkButton>--%>
                                                                                            <%--<asp:ImageButton ID="ibtnSaveSchedules" runat="server" 
                                                                OnClientClick="return ValidateSchedulingOfCommands(true);" 
                                                                ImageUrl="~/images/btn-save.jpg" OnClick="btnSend_Click"   />--%>
                                                                                            <asp:ImageButton ID="ibtnCancel1" runat="server" ImageUrl="~/images/btn-cancel.jpg"
                                                                                                OnClick="ibtnCancel_Click" Visible="false" />
                                                                                            <asp:LinkButton ID="ibtnCancel" runat="server" CssClass="MultilingualBtn" OnClick="ibtnCancel_Click">
                                                                                                <span id="Span4" runat="server" class="MultilingualBtnspan">
                                                                                                    <div class="Cancel">
                                                                                                        <div id="CancelButDiv" runat="server" class="MultilingualBtnTextAlign">
                                                                                                            Cancel
                                                                                                        </div>
                                                                                                    </div>
                                                                                                </span>
                                                                                            </asp:LinkButton>
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                            </asp:Panel>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </div>
                                                            <div id="divMsg" runat="server" align="center" style="font-weight: bold;">
                                                            </div>
                                                        </asp:Panel>
                                                        <asp:Timer ID="tmrCheck" runat="server" Enabled="false" OnTick="tmrCheck_Tick">
                                                        </asp:Timer>
                                                        <asp:HiddenField ID="IsScheduleCmds" runat="server" Value="false" />
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </ContentTemplate>
                                        </cc1:TabPanel>
                                    </cc1:TabContainer>

                                    <script language="javascript">
                                        function ShowHidePeriodicTime(ObjddlList) {
                                            var ddlperiodicTimeList = document.getElementById('tcManageMDT_tpMDTUsers_ddlPeriodicTime');
                                            if (document.getElementById('tcManageMDT_tpMDTUsers_ChkEnablePeriodicClick').checked) {
                                                ddlperiodicTimeList.style.display = 'table-row';
                                            }
                                            else {
                                                ddlperiodicTimeList.style.display = 'none';
                                            }
                                        }
                                        function ShowHideCameraSettings(ObjddlList) {
                                            var TdCamResolution = document.getElementById('tcManageMDT_tpMDTUsers_TdCamResolution');
                                            var TdCamTakePicture = document.getElementById('tcManageMDT_tpMDTUsers_TdCamTakePicture');
                                            var TdCamPeriodic = document.getElementById('tcManageMDT_tpMDTUsers_TdCamPeriodic');
                                            if (document.getElementById('tcManageMDT_tpMDTUsers_chkCamShowSettings').checked) {
                                                TdCamResolution.style.display = 'table-row';
                                                TdCamPeriodic.style.display = 'table-row';
                                            }
                                            else {
                                                TdCamResolution.style.display = 'none';
                                                TdCamPeriodic.style.display = 'none';
                                            }
                                        }
                                        function ShowHideEventSettings(ObjddlList) {
                                            var TdEventSettings = document.getElementById('tcManageMDT_tpMDTUsers_tdEventSettings');
                                            if (document.getElementById('tcManageMDT_tpMDTUsers_chEnableEventSettings').checked) {
                                                TdEventSettings.style.display = 'table-row';
                                            }
                                            else {
                                                TdEventSettings.style.display = 'none';
                                            }
                                        }
                                        function ShowHideTimebasedSettings(ObjddlList) {
                                            var TdTimeBasedSettings = document.getElementById('tcManageMDT_tpMDTUsers_tdTimeBasedSettings');
                                            if (document.getElementById('tcManageMDT_tpMDTUsers_chEnableTimebasedSettings').checked) {
                                                TdTimeBasedSettings.style.display = 'table-row';
                                            }
                                            else {
                                                TdTimeBasedSettings.style.display = 'none';
                                            }
                                        }
                                        function EnableCameraSettings(ObjddlList) {
                                            var TdEnableCamSetting = document.getElementById('tcManageMDT_tpMDTUsers_trEnableCamSetting');
                                            if (document.getElementById('tcManageMDT_tpMDTUsers_ChkEnableCamSettings').checked) {
                                                TdEnableCamSetting.style.display = 'table-row';
                                            }
                                            else {
                                                TdEnableCamSetting.style.display = 'none';
                                            }
                                        }

                                        function ShowHideIgnitionONSettings(ObjddlList) {
                                            var TdtdIgnitionON = document.getElementById('tcManageMDT_tpMDTUsers_tdIgnitionON');
                                            if (document.getElementById('tcManageMDT_tpMDTUsers_chkIgnitionON').checked) {
                                                TdtdIgnitionON.style.display = 'table-row';
                                            }
                                            else {
                                                TdtdIgnitionON.style.display = 'none';
                                            }
                                        }

                                        function ShowHideIgnitionOFFSettings(ObjddlList) {
                                            var TdtdIgnitionOFF = document.getElementById('tcManageMDT_tpMDTUsers_tdIgnitionOFF');
                                            if (document.getElementById('tcManageMDT_tpMDTUsers_chkIgnitionOFF').checked) {
                                                TdtdIgnitionOFF.style.display = 'table-row';
                                            }
                                            else {
                                                TdtdIgnitionOFF.style.display = 'none';
                                            }
                                        }

                                        function ShowHideIgnitionOFFKMSSettings(ObjddlList) {
                                            if (document.getElementById('tcManageMDT_tpMDTUsers_ChkIgnOFFkms').checked) {
                                                document.getElementById('tcManageMDT_tpMDTUsers_txtIgnOFFkms').style.display = 'table-row';
                                                document.getElementById('tcManageMDT_tpMDTUsers_lblExKMS').style.display = 'table-row';
                                            }
                                            else {
                                                document.getElementById('tcManageMDT_tpMDTUsers_txtIgnOFFkms').style.display = 'none';
                                                document.getElementById('tcManageMDT_tpMDTUsers_lblExKMS').style.display = 'none';
                                            }
                                        }

                                        function ShowHideIgnitionOFFTimeSettings(ObjddlList) {
                                            if (document.getElementById('tcManageMDT_tpMDTUsers_ChkIgnOFFTakePciture').checked) {
                                                document.getElementById('tcManageMDT_tpMDTUsers_ddlPeriodicTimeAdvancedSettingsIgnOFF').style.display = 'table-row';
                                            }
                                            else {
                                                document.getElementById('tcManageMDT_tpMDTUsers_ddlPeriodicTimeAdvancedSettingsIgnOFF').style.display = 'none';
                                            }
                                        }
                                        function validateKMSValue() {
                                            if (document.getElementById('tcManageMDT_tpMDTUsers_ChkIgnOFFkms').checked) {
                                                var varKMSValue = document.getElementById('tcManageMDT_tpMDTUsers_txtIgnOFFkms').value;

                                                if (varKMSValue >= 10 && varKMSValue <= 200 && varKMSValue != '') {
                                                    return true;
                                                }
                                                else {
                                                    alert('Please enter the valid Ignition OFF KMS input');
                                                    HidePopUp();
                                                    return false;
                                                }
                                            }
                                            else {
                                                return true;
                                            }

                                        }
                                    </script>

                                </div>
                                <!-- Main Content Ends Here -->
                                <div id="left">
                                </div>
                                <div class="clear clearfix">
                                </div>
                            </div>
                            <div id="right">
                                <div class="clear clearfix">
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- Content Ends Here -->
                    <cc1:ModalPopupExtender ID="mpeProgressIndicator" runat="server" PopupControlID="progressPopUp"
                        TargetControlID="btnTesting">
                    </cc1:ModalPopupExtender>
                    <asp:Button ID="btnTesting" Style="display: none;" runat="server" />
                    <asp:Panel ID="progressPopUp" runat="server" CssClass="processMessage" Style="z-index: 1000; display: none;">
                        <center>
                            <br />
                            <img id="imgLoad" runat="server" alt="Please Wait ..." src="../images/47.gif" /><br />
                            <br />
                            <asp:Label ID="lbl_msg12" Text="Processing... Please Wait..." runat="server" CssClass="specialdisplay"></asp:Label>
                            <br />
                            <br />
                        </center>
                    </asp:Panel>
                    <input type="hidden" id="hdnInput" name="hdnInput" style="display: none" />
                    <%--<script type="text/javascript" language="javascript" src="../js/HistoryScript.js"></script>--%>

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

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

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

                    <asp:HiddenField ID="hdnLogout" runat="server" />
                </ContentTemplate>
            </asp:UpdatePanel>
        </form>
    </div>
    <uc2:Footer ID="ucFooter" runat="server" />
</body>
</html>
