<%--
    Document   : mark_unmark_NPA_Operations
    Created on : Mar 22, 2016, 12:37:45 PM
    Author     : Shubhrangshu
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<html>
    <head>
        <title>Mark/Unmark NPA</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="${pageContext.request.contextPath}/js/Calendar.js?pacs=<%=((new java.util.Date()).getTime())%>"></script>
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/TableCSSCode.css?pacs=<%=((new java.util.Date()).getTime())%>" />
        <link rel="shortcut icon" href="${pageContext.request.contextPath}/img/favicon.ico?pacs=<%=((new java.util.Date()).getTime())%>" type="image/x-icon" />
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/styles.css?pacs=<%=((new java.util.Date()).getTime())%>"/>
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/ButtonAndText.css?pacs=<%=((new java.util.Date()).getTime())%>" />
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/info.css?pacs=<%=((new java.util.Date()).getTime())%>" />
        <script type="text/javascript" src="${pageContext.request.contextPath}/jquery-ui-1.10.4.custom/development-bundle/jquery-1.10.2.js?pacs=<%=((new java.util.Date()).getTime())%>"></script>
        <script type="text/javascript" src="/PacsApplication/chromejs/chrome.js?pacs=<%=((new java.util.Date()).getTime())%>"></script>
        <script type="text/javascript" src="/PacsApplication/js/iFrame_killer.js"></script>
    </head>
    <body  onload="noBack()">
        <script type="text/javascript">
            function noBack()
            {
                window.history.forward();
            }
            function checkSubmit(npaOperation)
            {
                if (checkDiv())
                {
                    document.forms[0].action = '/PacsApplication/Mark_Unmark_NPAOperationsServlet';
                    document.forms[0].submit();
                }
            }

            function checkDiv()
            {
                if (npaOperation.accountNumber.value == "")
                {
                    alert("Please enter Account Number.");
                    npaOperation.accountNumber.focus();
                    return false;
                }
                if (npaOperation.checkOperation.value == "")
                {
                    alert("Please select Mark Account As.");
                    npaOperation.checkOperation.focus();
                    return false; 
                }

                return true;
            }
            function popup_loanAccount(width, height, accountNumber) {
                if (window.innerWidth) {
                    LeftPosition = (window.innerWidth - width) / 2;
                    TopPosition = ((window.innerHeight - height) / 2) - 20;
                }
                else {
                    LeftPosition = (parseInt(window.screen.width) - width) / 2;
                    TopPosition = ((parseInt(window.screen.height) - height) / 2) - 20;
                }
                attr = 'resizable=yes,scrollbars=yes,width=' + width + ',height=' +
                    height + ',screenX=300,screenY=200,left=' + LeftPosition + ',top=' +
                    TopPosition + '';
                var screenName = "mark_unmark_npa_loan.jsp";
                var lovKey = "loanAccount"
                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationLoanLOV.jsp?accountNumber=' + accountNumber + '&screenName=' + screenName + '&lovKey=' + lovKey, 'loanAccount', attr);
                popWin.focus();

            } function ShowParent()
            {
                document.forms[0].action = "${pageContext.request.contextPath}/Loan/mark_unmark_npa_loan.jsp";
                document.forms[0].submit();
            }

        // to restrict back button
            history.pushState(null, null, location.href);
            window.addEventListener('popstate', function(event) {
                history.pushState(null, null, location.href);
            });
        
        </script>
        <jsp:include page="MenuHead_Loan.jsp" flush="true" />
        <br>
        <%!
            String blankNull(String s) {
                return (s == null) ? "" : s;
            }
        %>

        <%
                    String error_msg = "";
                    Object error = request.getAttribute("message");
                    if (error != null) {
                        error_msg = error.toString();
                    }
        %>

        <br>
        <fieldset style="border-color: black; background-image: url('/PacsApplication/img/download.jpg'); border-width: 3px">
            <legend style="padding: 8px; border-radius: 20px; background-color: #006600; color: white">Mark/Unmark As Npa Operation</legend>

            <form name="npaOperation" method="post" action="">
                <%if (!error_msg.equalsIgnoreCase("")) {%>
                <center><div class="info" id="errorMessage"><center><%= error_msg%></center></div></center>
                <% }%>
                <br>
                <br>
                <center>
                    <table >
                        <tbody>
                            <tr>
                                <td>Enter Account Number<font color="red" >*</font>:</td>
                                <td><input type="text" value="" name="accountNumber" size="20" style="text-align:right;" onkeypress='return event.charCode >= 48 && event.charCode <= 57' /></td>
                                <td><input type="button" name="accNoSearch" id="accNoSearch" value="Search" onclick="javascript:popup_loanAccount(220, 180, document.npaOperation.accountNumber.value);"/></td>
                            </tr>
                            <tr>
                                <td><br></td>
                            </tr>
                            <tr>
                                <td style="text-align:right;">Mark Account As<font color="red" >*</font>: </td>
                                <td><select id="checkOperation" name="checkOperation" >
                                        <option value="" disabled selected style="display:none;" > --select-- </option>
                                        <option value="1" >1:Standard</option>
                                        <option value="4" >4:Substandard</option>
                                        <option value="5" >5:Doubtful Asset 1</option>
                                        <option value="6" >6:Doubtful Asset 2</option>
                                        <option value="7" >7:Doubtful Asset 3</option>
                                        <option value="8" >8:Lost Asset</option>
                                    </select></td>
                            </tr>
                            <tr>
                                <td><br></td>
                            </tr>
                            <tr>
                                <td></td>
                                <td><input type="submit" value="Submit" onclick="javascript:checkSubmit(npaOperation)"></td>
                                <td><input type="button" value="Reset"  onclick="javascript:ShowParent();"/></td>
                            </tr>
                        <input type="hidden" value="mark_unmark_npa_loan" name="screenName" />
                        <input name="handle_id" id="handle_id" type="hidden" value="" />
                        </tbody>
                    </table>
                </center>
            </form>
        </fieldset>
    </body>

</html>
