<%@ Page Language="vb" AutoEventWireup="false" Title="FinIQ Login" Explicit="false"
    CodeBehind="FinIQAppLogin.aspx.vb" Inherits="FinIQWebApp.FinIQAppLogin" %>

<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
    <title>Login</title>

    <%--<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">--%>

    <link href="FinIQJS/jquery-ui.css" rel="stylesheet" type="text/css" />
    <script src="FinIQJS/external/jquery/jquery.js" type="text/javascript"></script>
    <script src="FinIQJS/jquery-ui.js" type="text/javascript"></script>

     
    <link id="FinIQTheme" href="App_Themes/Style1.css" rel="stylesheet" type="text/css" />
    

    <script type="text/javascript">

        document.onkeydown = function () {

            if ((window.event.keyCode == 116) || (window.event.keyCode == 122) || ((window.event.keyCode == 78) && (window.event.ctrlKey)) || ((window.event.keyCode == 82) && (window.event.ctrlKey)) || ((window.event.keyCode == 67) && (window.event.ctrlKey)) || ((window.event.keyCode == 86) && (window.event.ctrlKey)) || ((window.event.keyCode == 88) && (window.event.ctrlKey)) || ((window.event.keyCode == 222) && (window.event.ctrlKey))) {
                window.event.returnValue = false;
                window.event.cancelBubble = true;
                window.event.keyCode = 0;
                return false;
            }
        }

    </script>

    <script>
        //START|Added by Jassim AR/Anand K on 23-Nov-2020||SSO integration in 1FinIQ||INT1FIN47-11
        function HideLoginMessage() {
            document.getElementById("tblSSOMessage").style.visibility = "hidden";
        }
        function SubmitForm() {
            Form_Login.submit();
        }

        //END | Added by Jassim AR/Anand K on 23-Nov-2020||SSO integration in 1FinIQ||INT1FIN47-11
    </script>

    <script type="text/javascript">
        document.oncontextmenu = cancelit;
        function cancelit() {
            event.returnValue = false;
        }

        if (typeof (window.opener) == "undefined") {
            window.open('Default.htm', '_self');
        }

        function fillText() { $("#btnLogIn")[0].style.color = "Black"; }
        function changeColor() { $("#btnLogIn")[0].style.color = "#888888"; }
        function changetype() {
            var txtpwd = document.getElementById('txtPassword');
            if (txtpwd.value == 'Password') txtpwd.value = '';
            var newObj = txtpwd.cloneNode(true);
            newObj.setAttribute('id', txtpwd.getAttribute('id'));
            newObj.setAttribute('type', 'password');
            newObj.setAttribute('name', txtpwd.getAttribute('name'));
            newObj.setAttribute('class', 'txt form_input');
            newObj.setAttribute('onfocus', 'changetype()');
            txtpwd.parentNode.replaceChild(newObj, txtpwd);

        }

        function changetype1() {
            var txtpwd1 = document.getElementById('txtPassword');
            if (txtpwd1.value == '') txtpwd1.value = 'Password';
        }
		
		//CookieOTP
        //<Added by Hamza || 05-Jun-2020 || To get geolocation of the user>

        function getLocation() {
            try {
                //updated function by Shekhar L/ Manasi A. @14-Mar-2022 Added condition every page load got error undefined showError
            if (navigator.geolocation) {
                if (typeof showError != 'undefined') {
                    navigator.geolocation.getCurrentPosition(showPosition, showError);
                } else {
                    navigator.geolocation.getCurrentPosition(showPosition);
                } 
           } else {
               document.getElementById('<%= hdnLocationPosition.ClientID %>').value = "Geolocation is not supported by this browser.";
                }
            } catch (er) { }
     }
   
        function showPosition(position) {
            var lat = position.coords.latitude;
            var long = position.coords.longitude;
            document.getElementById('<%= hdnLocationPosition.ClientID %>').value = lat.toFixed(2) + "," + long.toFixed(2);
        }
         //Added showError by Shekhar L/Manasi A. @14-Mar-2022 developed by Shreyas V for BBVA.
        function showError(error) {
            try {
                //debugger
                //sessionStorage.removeItem("locInfo");
                //sessionStorage.setItem("locInfo", "ERROR");
                switch (error.code) {
                    case error.PERMISSION_DENIED:
                        document.getElementById('<%= hdnLocationPosition.ClientID %>').value = "User denied the request for Geolocation."
                        break;
                    case error.POSITION_UNAVAILABLE:
                        document.getElementById('<%= hdnLocationPosition.ClientID %>').value = "Location information is unavailable."
                        break;
                    case error.TIMEOUT:
                        document.getElementById('<%= hdnLocationPosition.ClientID %>').value = "The request to get user location timed out."
                        break;
                    case error.UNKNOWN_ERROR:
                        document.getElementById('<%= hdnLocationPosition.ClientID %>').value = "An unknown error occurred."
                        break;
                }
            } catch (er) {

            }
           
        }
    </script>

    <style type="text/css">
        .UCOverflow
        {
            overflow: auto;
        }

        .UCCustomerFind
        {
            position: absolute;
            background-color: white;
            display: block;
        }

        .HiddenColumn
        {
            display: none;
        }

        .FindButton
        {
            position: relative;
        }

        .UCPosition
        {
            position: absolute;
        }


        .ConfirmIframBeforePlaceOrder
        {
            height: 400px;
            width: 900px;
        }
    </style>

    <%--Movable Panel CSS Start--%>
    <style type="text/css">
        .move
        {
            border-bottom: 1px;
        }

        .panel_nouse
        {
            border-style: none;
            border-color: inherit;
            border-width: 1px;
            position: absolute;
            left: 0px;
            top: 102px;
        }

        .panel_old
        {
            position: absolute;
            border: 1px;
            left: 200px;
            top: 150px;
        }

        .Disclaimer
        {
            font-family: 'Open Sans', sans-serif;
            font-size: 12px;
            color: #fff;
            position: fixed;
            z-index: -1;
            text-align: center;
        }

        .footer1
        {
            font-family: 'Open Sans', sans-serif !important;
            font-size: 12px !important;
            color: #fff !important;
            overflow: auto !important;
            margin: 0 auto 0 -130px !important;
            bottom: 0px !important;
            position: fixed !important;
            padding-bottom: 20px !important;
            left: 47% !important;
            z-index: -1 !important;
        }


      
        .btnLogin1
        {
             
            width: 75px;
            height: 35px;
            border:  solid 1px #CCCCCC;
                 outline:none;
        }

        .btnLogin1:active, .btnLogin1:visited
        {
             
            width: 75px;
            height: 35px;
            border:  none 1px #CCCCCC !important;
                 outline:none;
        }

        .btnLogin1:hover, .btnLogin1:focus
        {             
            width: 75px;
            height: 35px;
            border: solid 1px #CCCCCC;
            color: #000000 !important;
            background-color: #f6f6f6 !important;
            cursor: pointer !important;
             outline:none;    
        }
        
        .labelsLogin
        {
            padding: 15px;
            white-space: nowrap;
            text-align:left;
        }

        .txtsLogin
        {
            padding: 10px;
            white-space: nowrap;
        }

            .txtsLogin input[type="submit"]
            {
                width: 70px !important;
                padding: 5px;
                border: 1px none #ccc;
                box-sizing: border-box;
            }

             .txtsLogin input[type="text"], .txtsLogin input[type="password"]
            {
                width: 250px !important;
                padding: 5px;
                border: 1px solid #ccc;
                box-sizing: border-box;
            }

        .LoginFooter
        {
            width: 100%;
            margin: 0 auto;
            padding: 5px;
            white-space: nowrap;
            text-align: center;
        }

        /*Start :: Added by Arshin S || on 18th Nov 2021 || Asked by Tushar A*/
        /*<Added By Shekhar on 27-Jan-2020>*/
        #pnlAgreement {
            background: #fFFFFF;
            display: none;
        }

        .ui-dialog[aria-describedby="pnlAgreement"] .ui-dialog-titlebar, .ui-dialog[aria-describedby="pnlAgreement"] .ui-dialog-titlebar .ui-widget {
            background-image: none !important;
            background-color: rgba(7, 33, 70,1) !important;
            color: #ffffff !important;
        }

        .ui-dialog[aria-describedby="pnlAgreement"] .ui-dialog-title {
            color: #ffffff !important;
            font: normal 18px Helvetica, Verdana, sans-serif !important;
            font-weight: normal !important;
        }

        .ui-dialog[aria-describedby="pnlAgreement"] .ui-button {
            background-image: none !important;
            background-color: rgba(7, 33, 70,1) !important;
            color: #ffffff !important;
            border: 1px solid rgba(7, 33, 70,1) !important;
            padding: 10px;
        }

        .ui-dialog[aria-describedby="pnlAgreement"] .ui-dialog-buttonpane {
            margin-top: 0px !important;
        }

        .ui-dialog[aria-describedby="pnlAgreement"] .ui-dialog-content p {
            font: normal 14px/22px verdana !important;
            padding: 20px !important;
            word-spacing: 2px;
            text-align: justify;
            width: 80%;
            line-height: 43px;
            margin: 0 auto;
        }
        /*</Added By Shekhar on 27-Jan-2020>*/

        /*</Added By Shekhar on 27-Jan-2020>*/

        .DivPopUpNotification {
            display: none;
            width: auto;
            z-index: 10000000 !important;
            position: absolute !important;
        }

        #tbl_NDP div table td {
            padding: 8px;
        }

        .strip2 #lblLDAPHeader {
            padding: 15px !important;
            line-height: 38px;
        }

        .noteImage {
            width: 12px;
            padding-left: 4px;
        }

        .BusinessSupport {
            cursor: pointer;
            float: right;
            text-align: center;
            padding-top: 20px;
            background-image: url("App_Resources/BusinessContact.png");
            background-position: top center;
            background-size: 20px 20px;
            background-repeat: no-repeat;
        }
        /* End: Added by Arshin S || on 18th Nov 2021 || Asked by Tushar A*/
    </style>
    <%--Movable Panel CSS end--%>
</head>
<body class="login-page" onclick="CloseNotificationWindow()">
    <%--CloseNotificationWindow :: Added by Arshin S || on 22nd Nov 2021 || Asked by Tushar A || HSBCELINT-188 Addition of Technical and Functional support buttons on UI at top right, like BBVA--%>

    <form id="Form_Login" autocomplete="off" method="post" runat="server">
          <%--Added by Jassim AR/Anand K on 23-Nov-2020||SSO integration in 1FinIQ||INT1FIN47-11--%>
        <input type="hidden" name="SAMLRequest" id="SAMLRequest" runat="server" />
          <input type="hidden" name="RelayState" id="RelayState" runat="server" />
         <%--End Addition  by Jassim AR/Anand K on 23-Nov-2020||SSO integration in 1FinIQ||INT1FIN47-11--%>
        <asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release" EnablePartialRendering="true">
            <CompositeScript ScriptMode="Release">
                <Scripts>
                    <asp:ScriptReference Name="MicrosoftAjax.js" />
                    <asp:ScriptReference Name="MicrosoftAjaxWebForms.js" />
                </Scripts>
            </CompositeScript>
        </asp:ScriptManager>
        <asp:ScriptManagerProxy ID="ScriptManagerProxy11" runat="server"></asp:ScriptManagerProxy>


        <div id="container">
            <div id="header">
                <div id="logo">
                </div>
            </div>
            <div id="body">
                <table style="width: 100%;" cellpadding="0" cellspacing="0">
                    <%--START| Added by Jassim AR/Anand K on 23-Nov-2020||SSO integration in 1FinIQ||INT1FIN47-11--%>
                    <tr ID="tblSSOMessage" runat="server" Visible="false">
                        <td>
                            <table class="Filter" style="width: 100%; margin-top: 250px">
                                <tr>
                                    <td style="text-align: center;" class="background_gray">Please wait while your application is loading.</td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <%--END | Added by Jassim AR/Anand K on 23-Nov-2020||SSO integration in 1FinIQ||INT1FIN47-11--%>
                    <tr id ="tdLogin" runat ="server">
                        <td style="text-align: center;">
                            <center> 
                                 <asp:UpdatePanel ID="Updatepanel1" runat="server">
                                    <ContentTemplate>
                                        <table id="tblLogin" class="strip1" cellpadding="0" cellspacing="0" runat="server" style="width: 370px;">
                                            <%--style="width: 377px;"--%>
                                            <tr>
                                                <td colspan="2" class="strip2" style="white-space: nowrap;">
                                                    <table style="width: 95%;">
                                                        <tr>
                                                            <td>
                                                                <asp:Label ID="lblLDAPHeader" runat="server" Text="* Please Enter User Name &amp; Password"></asp:Label></td>
                                                            <td>
                                                                <div class="BusinessSupport" onclick="NotificationPanel(this,event,'BUSINESS');" id="tdSupport">
                                                                    Need Help?
                                                        <%--<asp:Image ID="imgBusinessSupport" runat="server" Style="height: 20px !important; margin-left: 9px" ImageUrl="~/App_Resources/BusinessContact.png" />
                                                        <span style="white-space: nowrap; font-size: 7px;">Need Help?</span>--%>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </table>


                                                </td>

                                                <%--<Pooja S(21-Apr-2020) || To show contact on Login page || Asked By : Rajveer>--%>
                                                <%-- <td class="strip2" style="width: 50px; cursor: pointer;" >
                                                    <table>
                                                        <tr>
                                                            <td></td>
                                                        </tr>
                                                       
                                                    </table>
                                                </td>--%>
                                            </tr>
                                            <tr>
                                                <td colspan="2" style="height: 10px;"></td>
                                            </tr>
                                            <tr>
                                    <td class="labelsLogin">User Name</td>
                                    <td align="left" class="txtsLogin">
                                        <asp:TextBox ID="txtUserName" runat="server"  CssClass="txt"  AutoPostBack="True" 
                                                TabIndex="1"  AutoCompleteType="Disabled"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RFVUserName" runat="server" ControlToValidate="txtUserName" ErrorMessage="*" ValidationGroup="Login"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>

                                <tr>
                                    <td class="labelsLogin">Password</td>
                                    <td class="txtsLogin">
                                        <asp:TextBox ID="txtPassword" runat="server" CssClass="txt" TextMode="Password"    TabIndex="2" autocomplete="off"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RFVPassword" runat="server" ControlToValidate="txtPassword" ErrorMessage="*" ValidationGroup="Login"></asp:RequiredFieldValidator>

                                    </td>
                                </tr>
                                    <tr  runat ="server" id ="trDomain" visible="false">
                                         <td class=" ">
                                              <asp:Label runat="server" ID="Label3" AssociatedControlID="ddlDomain" Text="Domain" CssClass="floating-label"></asp:Label>                                      
                                             <asp:DropDownList ID="ddlDomain" runat="server" AutoPostBack="true" CssClass="ddl " Width="252px" >
                                        </asp:DropDownList>
                                        <asp:RequiredFieldValidator ID="RFVDomain" runat="server" ControlToValidate="ddlDomain"   ErrorMessage="*" ValidationGroup="Login"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>								
                                 <tr> 
                                                <td class="labelsLogin"></td>
                                                <td class="txtsLogin">
                                                    <asp:LinkButton CssClass="lnk" ID="btnForgotPass" Visible="false" runat="server" TabIndex="5" Style="color: #4DA6FF; width: 175px; display: inline-block;">Forgot password?</asp:LinkButton>
                                                    <asp:Button ID="btnLogIn" Text="Log In" runat="server" TabIndex="3" CssClass="btn btnLogin1" Style="width: 70px; height: 34px !important;" />
                                                </td>
                                            </tr>

                                            <tr>
                                                <td align="right" colspan="2">


                                                    <table style="width: 100%;">
                                                        <tr>
                                                            <td align="center" style="height: 15px;">
                                                                        <asp:Label ID="lblError" runat="server"  Style="color: Red !important; font-size: 14px !important; text-align: center"></asp:Label>
                                           
                                                            </td>
                                                        </tr>
                                                    </table>
                                         
                                                 
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <asp:Panel ID="pnlConfirmMsg" runat="server" Height="150px" Width="305px" Visible="False" class="UCCustomerFind UCCustomerPos move panel"
                                                                    BorderStyle="Solid" BorderWidth="2px" BorderColor="#5D7B9D" BackColor="White">
                                                                    <table width="100%" class="filter" style="height: 80%">
                                                                        <tr>
                                                                            <td class="background_gray" align="center" height="20px">Login Expiry 
                                                   Notification </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td align="center">
                                                                                <asp:Label ID="lblConfirmMsg" runat="server"></asp:Label></td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td align="center">
                                                                                <asp:Button ID="btnYes" runat="server" Text="Yes" CssClass="btn" Width="60px" />
                                                                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                                         <asp:Button ID="btnNo" runat="server" Text="No" CssClass="btn" Width="60px" />
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </asp:Panel>
                                                               <%-- Below Section Commented By Prasad P | Sijo G on 24-Mar-2021 for Mashreq SSO || START--%>
                                                               <%-- <asp:Panel ID="pnlGroup" runat="server" HorizontalAlign="Center" Style="top: 305px; left: 810px" Height="100px" Width="305px" Visible="False" class="UCCustomerFind UCCustomerPos move panel"
                                                                    BorderStyle="Solid" BorderWidth="2px" BorderColor="#5D7B9D" BackColor="White">
                                                                    <table>
                                                                        <tr>
                                                                            <td style="width: 100%" colspan="2">
                                                                                <asp:Label ID="lblGrp" runat="server" Text="Choose a group/role to login FinIQ System" CssClass="lbl"></asp:Label>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                <asp:Label ID="lblMappedGrps" runat="server" Text="Mapped Groups:" CssClass="lbl"></asp:Label>
                                                                            </td>

                                                                            <td align="left" style="padding-left: 40px;">
                                                                                <asp:DropDownList ID="ddlGrp" runat="server" AutoPostBack="true" CssClass="ddl" Width="150px" TabIndex="4"></asp:DropDownList>

                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td class="tdlblMappedGrp">
                                                                                <asp:Button ID="btnGroup" runat="server" CssClass="btn" Text="Login" />
                                                                            </td>
                                                                            <td class="tdlblMappedGrp">
                                                                                <asp:Button ID="btnCancel" runat="server" CssClass="btn" Text="Cancel" />
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </asp:Panel>--%>
                                                                <%--Commented section ends here || Prasad P | Sijo G on 24-mar-2021--%>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </table>
                                         
                                    </td>
                                </tr>



                            </table>
   </ContentTemplate>
                                        </asp:UpdatePanel>
                                </center>
                        </td>
                    </tr>
                   <%-- pnl group shifted here by Prasad P | Sijo G on 24-mar-2021 for Mashreq SSO || START--%>
                     <tr runat="server">
                        <td style="text-align: center;">
                        <center>
                             <asp:UpdatePanel ID="Updatepanel3" runat="server">
                                            <ContentTemplate> 
                    <%--<asp:Panel ID="" runat="server" HorizontalAlign="Center" cssclass="strip1"  Width="322px" Visible="False" >--%>
                                        <%-- <Manasi A || 24-mar-2021 || UBP SSO : Modified panel to table and added css classes > --%>
                                        <table id="pnlGroup" class="strip1" visible="False" cellpadding="0" cellspacing="0" runat="server" style="width: 370px;">
                                            <tr>
                                                <td colspan="2" class="strip2" style="padding: 10px !important">
                                                    <asp:Label ID="lblGrp" runat="server" Text="Choose a group/role to login FinIQ System"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2" style="height: 10px;"></td>
                                            </tr>
                                            <tr>
                                                <td class="labelsLogin">
                                                    <asp:Label ID="lblMappedGrps" runat="server" Text="Mapped Groups" CssClass="lbl"></asp:Label>
                                                </td>

                                                <td align="left" class="txtsLogin">
                                                    <asp:DropDownList ID="ddlGrp" runat="server" AutoPostBack="true" CssClass="ddl" Width="180px" TabIndex="4"></asp:DropDownList>

                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="labelsLogin"></td>
                                                <td style="padding-left: 10px; padding-bottom: 20px;">
                                                    <asp:Button ID="btnGroup" runat="server" CssClass="btn btnLogin1" Text="Login" Style="width: 70px; height: 30px !important; margin-left: 3px" />
                                                    <asp:Button ID="btnCancel" runat="server" CssClass="btn btnLogin1" Text="Cancel" Style="width: 70px; height: 30px !important; margin-left: 10px" />
                                                </td>
                                            </tr>

                                        </table>

                                        <%--</asp:Panel>--%>
                                        <table style="width: 100%;">
                                            <tr>
                                                <td align="center" style="height: 15px;">
                                                    <asp:Label ID="lblGroupError" runat="server" Style="color: Red !important; font-size: 14px !important; text-align: center"></asp:Label>
                                           
                                                            </td>
                                                        </tr>
                                                    </table>
   </ContentTemplate>
                                        </asp:UpdatePanel>
            </center>
              </td>
              </tr>
                  <%-- pnl group shifted here by Prasad P | Sijo G on 24-mar-2021 for Mashreq SSO || END--%>    
                    <tr>
                        <td style="text-align: center; vertical-align: top;">
                            <center>
                            <table id="Table1" class="lbl" cellpadding="4" cellspacing="4" runat="server"
                                style="width: 600px;">
                                <tr>
                                    <td valign="top" align="left" style="white-space: normal; text-align: justify;">
                                        <asp:Literal ID="litDisclaimer" runat="server"></asp:Literal>
                                    </td>
                                </tr>
                            </table>
                        </center>
                        </td>
                    </tr>
                </table>

            </div>
            <input id="hdnDN" runat="server" type="hidden" />
			<%-- Added by Jassim AR/Anand K on 23-Nov-2020||SSO integration in 1FinIQ||INT1FIN47-11--%>
            <div class="LoginFooter" id="footer" style="text-align: center;" runat ="server">
                <table style="width: 100%;">
                    <tr>
                        <td align="center" style="vertical-align: top;">
                            <center>
                        <table style="width: 400px; padding: 0px;">
                            <tr>
                                <td style="text-align: center; vertical-align: top;">
                                            <span>
                                                <script>document.write(new Date().getFullYear())</script>
                                            </span>&copy; FinIQ Consulting Pte. Ltd. All Rights Reserved.
                                     
                                </td>
                            </tr>
                        </table>
                    </center>
                        </td>
                    </tr>
                </table>
            </div>
            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                <ContentTemplate>
                    <asp:HiddenField ID="hdnLoginID" runat="server" />
                    <asp:HiddenField ID="hdnLoginRole" runat="server" />
                    <asp:HiddenField ID="hdnOSName" runat="server" />
                    <%--START| Added by Jassim AR/Anand K on 23-Nov-2020||SSO integration in 1FinIQ||INT1FIN47-11--%>
                    <asp:HiddenField ID="hdnRelayState" runat="server" />  
                     <asp:HiddenField ID="hdnGrpField" runat="server" />  
                	<asp:HiddenField ID="hdnCheckDomain" runat="server" />
                    <asp:HiddenField ID="hdnGID" runat="server" /> 
                    <%--END| Added by Jassim AR/Anand K on 23-Nov-2020||SSO integration in 1FinIQ||INT1FIN47-11--%>

                      <asp:HiddenField ID="hdnLocationPosition" runat="server" /> <%--<Added by Hamza || 05-Jun-2020 || To store geolocation of the user>--%>
                    <asp:HiddenField ID="hdnGeoocationYN" runat="server"/> <%--added by shreyasv 17 jun 2020 cookie auth--%>
                 <asp:HiddenField ID="hdnBusinessSupport" runat="server" />
                    <asp:HiddenField ID="hdnContactDetailsYN" runat="server" />
				</ContentTemplate>
            </asp:UpdatePanel>
        </div>

        <div id="tbl_NDP" class="DivPopUpNotification">
        </div>
        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
            DisplayAfter="0">
            <ProgressTemplate>
                <div>
                    <img alt="Loading" src="App_Resources/loading.gif" style="width: 40px;" /><span class="lbl">Loading...&nbsp;&nbsp;
                    </span>
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>

         <!-- Added by Shekhar L. @01-Sep-2021 for Theme -->
         <input id="hdnFinIQTheme" runat="server" type="hidden" value="" />

        <script type="text/javascript">
            var childWindow = '';
            var RecentPagesArr;//Updated By Shekhar L @15-Mar-2022 reset localstorage with Recent Page list
            function pageLoad(sender, args) {
                try {
                    //<added by Shekhar on 27-Jan-2020>
                    localStorage.removeItem("NotAgreed");
                    // <Added by Shekhar @30-Sep-2021>
                    if (typeof ShowHide_ForgotPasswor == "function") {
                        ShowHide_ForgotPasswor();
                    }
                    // <Added by Shekhar @08-Jul-2020>
                    if (typeof SetDefault_FontProps == "function") {
                        SetDefault_FontProps();
                    }
                    FinIQTheme = (window.localStorage.getItem('FinIQTheme') == null ? '' : window.localStorage.getItem('FinIQTheme'));
                    CustomTheme = (window.localStorage.getItem('CustomTheme') == null ? '' : jQuery.parseJSON(window.localStorage.getItem('CustomTheme')));
                    FinIQ_FontFamily = (window.localStorage.getItem('FinIQ_FontFamily') == null ? '' : window.localStorage.getItem('FinIQ_FontFamily').replace(/"/g, ""));
                    //Updated By Shekhar L @15-Mar-2022 reset localstorage with Recent Page list
                    RecentPagesArr = (window.localStorage.getItem('RecentPagesArr') == null ? '' : window.localStorage.getItem('RecentPagesArr'));
                    window.localStorage.clear();

                    //Updated By Shekhar L @15-Mar-2022 reset localstorage with Recent Page list
                    if (RecentPagesArr != '' || RecentPagesArr != null) {
                        window.localStorage.setItem('RecentPagesArr', RecentPagesArr);
                    }
                    if (FinIQTheme != '') {
                        window.localStorage.setItem('FinIQTheme', FinIQTheme); 
                    }
                    
                    if (FinIQ_FontFamily != '' && FinIQ_FontFamily != 'Default') {
                        window.localStorage.setItem('FinIQ_FontFamily', FinIQ_FontFamily);
                    } else {
                        window.localStorage.setItem('FinIQ_FontFamily', 'Default');
                        window.localStorage.setItem('Default_FontFamily', $('body').css('font-family'));
                    }
                      
                    window.localStorage.removeItem("pageName"); //added by Shekhar @30-May-2020 clear back button page call;
                    window.childWindow = "childWindow" + (new Date().getFullYear() + '' + new Date().getMonth() + '' + new Date().getDate() + '' + new Date().getMilliseconds());
                    window.localStorage.setItem('childWindow', childWindow);

                } catch (er) {
                    console.log(er.message);
                }
            }

            // <updated (copied from head section in Mashreq) by Shekhar @30-Sep-2021>
            // (function () { ShowHide_ForgotPasswor(); })(); 
            function ShowHide_ForgotPasswor() {
                try {

                    //Arshin | 09Dec2021 | Config based contact details
                    var ContactDetailsYN = $('[id$="hdnContactDetailsYN"]').val();
                    if (ContactDetailsYN.toUpperCase() === "YES") {
                        $('#tdSupport').show();
                    }
                    else {
                        $('#tdSupport').hide();
                    }

                    ForgotPasswordYN = '<%=ConfigurationManager.AppSettings.Get("ForgotPassword_Visible")%>';
                    if (ForgotPasswordYN == undefined || ForgotPasswordYN == '' || ForgotPasswordYN == "true") {
                        $('a#btnForgotPass').css({ 'visibility': 'visible' });
                    } else {
                        $('a#btnForgotPass').css({ 'visibility': 'hidden' });
                    }

                    if (window.localStorage.getItem('FinIQTheme') == "All_Black") {
                        $(document).find('img[src="App_Resources/loading.gif"]').attr('src',  "App_Resources/All_Black/loading_1.gif");
                       // $(document).find('.loading_parent').css({ "background-image": 'url("../App_Resources/All_Black / loading_1.gif")' });
                    }

                    if (Sys != undefined || typeof (Sys) != "undefined") {
                        RequestManager = Sys.WebForms.PageRequestManager.getInstance();
                        RequestManager.remove_endRequest(ShowHide_ForgotPasswor);
                        RequestManager.add_endRequest(ShowHide_ForgotPasswor);
                    }
                } catch (er) {
                    console.log(er.message);
                }
            }
            function SetDefault_FontProps() {
                // <Added by Shekhar @08-Jul-2020>
                try {

                    if (window.localStorage.getItem('FinIQTheme') != null) {
                        //$('#ctl00_rblTheme [type="radio"]').filter(function () {
                        //    return this.value == window.localStorage.getItem('FinIQTheme');
                        //}).prop('checked', "checked");
                        if (window.localStorage.getItem('FinIQTheme') != "Style1") {
                            $('link#FinIQTheme').attr('href', 'App_Themes/' + window.localStorage.getItem('FinIQTheme') + '.css');
                            $(document).find('link[href="App_Themes/Style1.css"]').attr('href', 'App_Themes/' + window.localStorage.getItem('FinIQTheme') + '.css');
                        }
                    }

                    if (window.localStorage.getItem('FinIQ_FontSize') != null) {
                        FinIQ_FontSize = window.localStorage.getItem('FinIQ_FontSize');
                        $('body').css({ "font-size": Number(FinIQ_FontSize) });
                        $('.FinIQ_lblUser, .FinIQ_logout, .lbl, .txt, .ddl, select, htmlselect, .lblerror, .lblError, .LBLERROR, .lblInfo, .lblsuccess, .Grid, .grid, .GridHeaderTitle, .GridHeaderTitle th, .Grid .GridHeaderTitle td, .GridHeaderTitle th a:hover, .GridHeaderTitle a, .GridHeader td, .GridHeader th, .AlternatItemStyle a, .GridItem a, .GridItemSelect a, .GridList, .GridPager, .GridPager a:link, .GridPager a:hover, .GridPager a:active, .GridPager a:visited, .GridPager td span, .GridFooter, .Filter, .tbl, .tbl2, .footer, .FinIQ_MenuBG ul li a, .FinIQ_MenuBG UL li UL > li a, .menu li a, .menu li, .smallfont, .orange1, .purple1, .olive1, .almond1, .QueueButtons, .QueueButtons[disable="disabled"], input[type="text"], input[type="password"], textarea, .ddl, select, .ui-selectmenu-button span.ui-selectmenu-text, .readOnly, input[type="text"][disabled="disabled"], .loading_span, .Dashboard1, .Dashboard, .slidingDiv').css({ "font-size": Number(FinIQ_FontSize) });
                        $('#ctl00_rblFontSize [type="radio"]').filter(function () {
                            return this.value == FinIQ_FontSize;
                        }).prop('checked', "checked");
                    }
                    // Changes by Rohit Rohit T 13-May-2022 | Font Weight Related
                    if (window.localStorage.getItem('FinIQ_FontFamily') != null) {
                        FinIQ_FontFamily = window.localStorage.getItem('FinIQ_FontFamily');
                        if (FinIQ_FontFamily == "Montserrat") {
                            $(document.head).append($('<link>', { 'id': "lnkMontserrat", "href": "https://fonts.googleapis.com/css?family=" + FinIQ_FontFamily + ":wght@400;500;700&display=swap", "rel": "stylesheet" }));
                            $('body').css({ "font-Family": FinIQ_FontFamily });
                            $('span, td, div, input, textarea, a').css({ "font-Family": FinIQ_FontFamily });
                            $('body').css({ "font-weight": "500" });
                            $('span, td, div, input, textarea, a').css({ "font-weight": "500" });
                        } else {
                            $(document.head).find('#lnkMontserrat').remove();
                            $('div, td, span, input, textarea, a, a:hover, label, button, selectize').each(function () {
                                $(this)[0].style.removeProperty('font-weight');
                            });
                            if ($(this).find(':checked').val() == 'Default') {
                                $('body').css({ "font-Family": window.defaultFontFamily });
                                $('span, td, div, input, textarea, a').css({ "font-Family": window.defaultFontFamily });
                            } else {
                                $('body').css({ "font-Family": $(this).find(':checked').val() });
                                $('span, td, div, input, textarea, a').css({ "font-Family": $(this).find(':checked').val() });
                            }
                        }
                         
                        $('#ctl00_rblFontFamily [type="radio"]').filter(function () {
                            return this.value == FinIQ_FontFamily;
                        }).prop('checked', "checked");
                    }
                } catch (er) { }
            }

        </script>

        <script language="javascript" type="text/javascript">
            //updated by Shekhar L @14-Mar-2022 set current Year in copy rights on browser window status
            try {
                window.status = new Date().getFullYear() + " &copy; FinIQ Consulting Pte. Ltd. All Rights Reserved."
            } catch (er) {}
            
        </script>
        
        <script type="text/javascript">
            //Added by Shekhar L. @01-Sep-2021 for Theme
            $(window).on('load', function () {
                try {
                    if (window.localStorage.getItem('FinIQTheme') != null) {
                        document.getElementById("hdnFinIQTheme").value = window.localStorage.getItem('FinIQTheme');
                        var FinIQTheme = window.localStorage.getItem('FinIQTheme');
                        if (window.localStorage.getItem('FinIQTheme') != "Style1") {
                            $('link#FinIQTheme').attr('href', 'App_Themes/' + window.localStorage.getItem('FinIQTheme') + '.css');
                        }
                        //updated by Shekhar L. @030-Sep-2021 for Theme
                        window.onbeforeunload = function () {
                            try {
                                if (window.localStorage.getItem('FinIQTheme') != null) {
                                      $.ajax({
                                          type: 'POST',
                                          url: 'FinIQ_User_Controls/FinIQ_WebMethods.aspx/FinIQThemes',
                                          contentType: "application/json; charset=utf-8",
                                          dataType: "json",
                                          crossDomain: true,
                                          async: true,
                                          data: JSON.stringify({ 'FinIQThemeName': window.localStorage.getItem('FinIQTheme') }),
                                          success: function (data) { },
                                          error: function (xhr, ajaxOptions, thrownError) {
                                              //console.log(thrownError);
                                          }
                                      });
                                  }
                              } catch (er) {
                                  console.log(er.message);
                              }
                          }
                      }
                  } catch (er) {
                      console.log(er.message);
                  }
              });

            //Start:: Added by Arshin S || on 22nd Nov 2021 || Asked by Tushar A || HSBCELINT - 188 Addition of Technical and Functional support buttons on UI at top right, like BBVA
            //<Pooja S(21-Apr-2020) || To show contact on Login page || Asked By : Rajveer>
            var flagPanelOpen = false;
            function NotificationPanel(x, e, notificationType) {
                flagPanelOpen = true;

                GetBusinessSupportDetails(x, e);
                var leftPos = "983px";
                if ($("#tdSupport").position() != undefined) {
                    leftPos = ($("#tdSupport").position().left + 50) + 'px';
                }

                document.getElementById('tbl_NDP').style.left = leftPos;
                document.getElementById('tbl_NDP').style.top = '200px';
            }

            function GetBusinessSupportDetails(x, e) {
                try {
                    x = $(x).attr('id');
                    var tblND = "<div id = 'div_notif' onclick='setNotificationClicked();' >"
                    tblND += "<table class='TableSearchResult' cellpadding=1 cellspacing=1 style='border-collapse:collapse;width:320px;' >"

                    var value = document.getElementById('<%=hdnBusinessSupport.ClientID%>').value.split('~');
                    for (var i = 0; i < value.length; i++) {
                        tblND += "<tr><td>"
                        tblND += value[i]
                        tblND += "</td></tr>"
                    }
                    tblND += "</table></div>";

                    $("#tbl_NDP").html(tblND);
                    $("#tbl_NDP").show();
                } catch (ex) {

                }
            }

            function setNotificationClicked() {
                flagPanelOpen = true;
            }

            function CloseNotificationWindow() {
                try {
                    if (flagPanelOpen == false) {
                        $("#div_notif").html("");
                        document.getElementById('tbl_NDP').style.left = '0px';
                        document.getElementById('tbl_NDP').style.top = '0px';
                        $("#div_notif").hide();
                    } else {
                        flagPanelOpen = false;
                    }
                }
                catch (error) {
                    console.log(error);
                }
            }
        //</Pooja S(21-Apr-2020) || To show contact on Login page || Asked By : Rajveer>
            //End :: Added by Arshin S || on 22nd Nov 2021 || Asked by Tushar A || HSBCELINT - 188 Addition of Technical and Functional support buttons on UI at top right, like BBVA
        </script>
    </form>
</body>
</html>



