<%@ Page Title="" Language="C#"  MasterPageFile="~/SiteMaster.Master"
    CodeBehind="change_pass.aspx.cs" Inherits="MKinsight.Online.UIServices.change_pass" %>

<%@ Register Src="../UIControls/MessageBox.ascx" TagName="MessageBox" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="../UIControls/Header.ascx" TagName="Header" TagPrefix="uc2" %>
<%@ Register Src="../UIControls/PopupMessageBox.ascx" TagName="PopupMessageBox" TagPrefix="uc3" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript" src="../scripts/jquery/jquery_min.js"></script>

    <script type="text/javascript">


        $(document).keydown(function (event) {

            if (event.keyCode === 10 || event.keyCode === 13)
                event.preventDefault();

        });


        function CheckPassword(formObj) {
            var contextArray = formObj.id;
            PageMethods.CheckStrength(formObj.value, OnComplete, OnError);
		}


        function OnError(error, userContext, methodName) {



		}

        function OnComplete(result, userContext, methodName) {

            var s = result.split(":");
			var el = document.getElementById('<%:lbl_I.ClientID%>')

            if (s[1] == "1") {
                el.style.backgroundColor = '#7FFF7F';
			}
            else {
                el.style.backgroundColor = '#ED9B8F';
			}
            el.style.display = 'block';
            el.innerHTML = s[0] ;

		}
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="c_M" runat="server">
    <div>
        <uc2:Header ID="usc_Header" runat="server" />
    </div>
    <div>

        <uc1:MessageBox ID="usc_M" runat="server" />

    </div>
    <b>
        <asp:Literal ID="lit_LNewPass" runat="server" /></b>
    <uc3:PopupMessageBox ID="usc_PopupMessage" runat="server" />
    <table>
        <tr>
            <td class="dltr">
                <asp:Label ID="lbl_Current" runat="server"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txt_Current" TextMode="Password" runat="server" Width="200" autocomplete="off" />
                <asp:ImageButton ID="btn_Info" runat="server" ImageUrl="~/images/info24.png" CausesValidation="False" />
            </td>
        </tr>
        <tr>
            <td class="dltr">
                <asp:Label ID="lbl_New1" runat="server"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txt_New1" TextMode="Password" runat="server" Width="200" autocomplete="off"
                    onkeyup="CheckPassword(this)" />
                <asp:Label ID="lbl_I" runat="server" Font-Bold="False" BorderColor="WhiteSmoke" Width="202" Style="display: none"
                    BorderStyle="Ridge" BorderWidth="1px"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="dltr">
                <asp:Label ID="lbl_New2" runat="server"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txt_New2" TextMode="Password" runat="server" Width="200" autocomplete="off" />
            </td>
        </tr>
    </table>
    <br />
    <asp:Button ID="btn_Submit" Text="Change" runat="server" />
    <asp:Button ID="btn_Cancel" Text="Cancel" runat="server" />
</asp:Content>
