<%@ page language="C#" autoeventwireup="true" inherits="Masters_SMSReceivers, App_Web_kdtfyeob" %>

<!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">
<head runat="server">
    <link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css" type="text/css" />
    <link href="../bootstrap/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="../dist/css/AdminLTE.min.css" type="text/css" />
    <link href="../dist/css/custom.css" rel="stylesheet" type="text/css" />
    <link href="../dist/css/fonts.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="../bootstrap/css/autoCompleteNew.css" type="text/css" />
    <link rel="stylesheet" href="../plugins/select2/select2.min.css">
    <script type="text/javascript" src="../bootstrap/js/1.4.3/jquery.min.js"></script>

    <script src="../bootstrap/js/1.8.5/jquery-ui.min.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="content">
            <div class="emp-filter">
                <div class="row">
                    <div class="form-horizontal">
                        <div class="col-md-12">
                            <div class="row form-group">
                                <asp:HiddenField ID="hdnfldUsergroup" runat="server" />
                                <div class="col-md-2">
                                    <asp:Label ID="lblUsergroup" runat="server"></asp:Label>
                                </div>
                                <div class="col-md-3">
                                    <div style="border: solid 1px; padding-left: 10px; overflow: auto; height: 250px">
                                        <asp:CheckBox ID="cbAll" runat="server" Text="&nbsp;&nbsp;Select All" onclick="CheckAll();"
                                            Font-Size="12px" Font-Bold="true" Font-Names="tahoma" Style="padding-left: 2px;" />
                                        <asp:CheckBoxList ID="chklstuserGroup" runat="server" RepeatDirection="vertical"
                                            Font-Names="tahoma" Font-Size="12px" onclick="UnCheckAll();">
                                        </asp:CheckBoxList>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row" align="right">
                            <div class="col-md-5">
                                <asp:LinkButton ID="btn_Ok" CssClass="btn save-btn fa-check-square-o" runat="server"
                                    Text="&nbsp;&nbsp;Ok" onclick="btn_Ok_Click" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>

    <script type="text/javascript">
     function CheckAll() {     
            var intIndex = 0;
            var rowCount = document.getElementById('chklstuserGroup').getElementsByTagName("input").length;
            for (i = 0; i < rowCount; i++) {
                if (document.getElementById('cbAll').checked == true) {
                    if (document.getElementById("chklstuserGroup" + "_" + i)) {
                        if (document.getElementById("chklstuserGroup" + "_" + i).disabled != true)
                            document.getElementById("chklstuserGroup" + "_" + i).checked = true;
                    }
                }
                else {
                    if (document.getElementById("chklstuserGroup" + "_" + i)) {

                        if (document.getElementById("chklstuserGroup" + "_" + i).disabled != true)
                            document.getElementById("chklstuserGroup" + "_" + i).checked = false;
                    }
                }
            }
        }
        function UnCheckAll() {
            var intIndex = 0;
            var flag = 0;
            var rowCount = document.getElementById('chklstuserGroup').getElementsByTagName("input").length;
            for (i = 0; i < rowCount; i++) {
                if (document.getElementById("chklstuserGroup" + "_" + i)) {
                    if (document.getElementById("chklstuserGroup" + "_" + i).checked == true) {
                        flag = 1;
                    }
                    else {
                        flag = 0;
                        break;
                    }
                }
            }
            if (flag == 0)
                document.getElementById('cbAll').checked = false;
            else

                document.getElementById('cbAll').checked = true;
        }
    </script>

</body>
</html>
