<%--
    Document   : IdentificationDetails
    Created on : Aug 3, 2015, 2:25:40 PM
    Author     : Administrator
--%>
<%@page import="DataEntryBean.DepositProductCreationBean" %>
<%@page import="java.sql.SQLException"%>
<%@page import="LoginDb.DbHandler"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Connection"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@page import="java.util.UUID" %>
<%String uuid = UUID.randomUUID().toString();%>
<% try {
%>


<html>
    <head>
        <title>Deposit Product Creation</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 checkCreateDiv(pacsOperation)
            {
                if (pacsOperation.productname.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.productname.focus();
                    return false;
                }
                if (pacsOperation.productdescription.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.productdescription.focus();
                    return false;
                }
                if (pacsOperation.productcode.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.productcode.focus();
                    return false;
                }
                if (pacsOperation.inttcategory.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.inttcategory.focus();
                    return false;
                }
                if (pacsOperation.intcatdescription.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.intcatdescription.focus();
                    return false;
                }
                if (pacsOperation.segmentCode.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.segmentCode.focus();
                    return false;
                }
                if (pacsOperation.status.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.status.focus();
                    return false;
                }
                if (pacsOperation.minbal.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.minbal.focus();
                    return false;
                }
                if (pacsOperation.maxbal.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.maxbal.focus();
                    return false;
                }
                if (pacsOperation.minwdl.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.minwdl.focus();
                    return false;
                }
                if (pacsOperation.maxwdl.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.maxwdl.focus();
                    return false;
                }
                if (pacsOperation.intrate.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.intrate.focus();
                    return false;
                }
                if (pacsOperation.inttmethod.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.inttmethod.focus();
                    return false;
                }
                if (pacsOperation.inttfrequency.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.inttfrequency.focus();
                    return false;
                }

                if (pacsOperation.odindicator.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.odindicator.focus();
                    return false;
                }

                if (pacsOperation.creditComp1.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.creditComp1.focus();
                    return false;
                }
                if (pacsOperation.creditComp2.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.creditComp2.focus();
                    return false;
                }
                if (pacsOperation.debitComp1.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.debitComp1.focus();
                    return false;
                }
                if (pacsOperation.debitComp2.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.debitComp2.focus();
                    return false;
                }
                if (pacsOperation.minterm.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.minterm.focus();
                    return false;
                }
                if (pacsOperation.maxterm.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.maxterm.focus();
                    return false;
                }
                if (pacsOperation.dormancytrigger.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.dormancytrigger.focus();
                    return false;
                }
                if (pacsOperation.rdFlag.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.rdFlag.focus();
                    return false;
                }
                if (pacsOperation.overduerate.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.overduerate.focus();
                    return false;
                }
                if (pacsOperation.preClosure.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.preClosure.focus();
                    return false;
                }
                if (pacsOperation.inttfrequency.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.inttfrequency.focus();
                    return false;
                }
                if (pacsOperation.glCodeInttPAYABLE.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.glCodeInttPAYABLE.focus();
                    return false;
                }
                if (pacsOperation.glCodeInttPAID.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.glCodeInttPAID.focus();
                    return false;
                }

                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.productcode.value))
                {
                    alert("!! ProductType could only contain numbers !!");
                    pacsOperation.productcode.focus();
                    return false;
                }

                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.inttcategory.value))
                {
                    alert("!! INTT Category could only contain numbers !!");
                    pacsOperation.inttcategory.focus();
                    return false;
                }

                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.minbal.value))
                {
                    alert("!! minbal could only contain numbers !!");
                    pacsOperation.minbal.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.maxbal.value))
                {
                    alert("!! maxbal could only contain numbers !!");
                    pacsOperation.maxbal.focus();
                    return false;
                }


                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.intrate.value))
                {
                    alert("!! intrate could only contain numbers !!");
                    pacsOperation.intrate.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.creditComp1.value))
                {
                    alert("!! Credit Comp1 could only contain numbers !!");
                    pacsOperation.intrate.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.creditComp2.value))
                {
                    alert("!! Credit Comp2 could only contain numbers !!");
                    pacsOperation.intrate.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.debitComp1.value))
                {
                    alert("!! Debit Comp1 could only contain numbers !!");
                    pacsOperation.intrate.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.debitComp2.value))
                {
                    alert("!! Debit Comp2 could only contain numbers !!");
                    pacsOperation.intrate.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.minterm.value))
                {
                    alert("!! Minimum Term(Days) could only contain numbers !!");
                    pacsOperation.minterm.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.maxterm.value))
                {
                    alert("!! Maximum Term(Days) could only contain numbers !!");
                    pacsOperation.maxterm.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.overduerate.value))
                {
                    alert("!! Overdue Rate could only contain numbers !!");
                    pacsOperation.overduerate.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.preClosure.value))
                {
                    alert("!! PreClosure Charges could only contain numbers !!");
                    pacsOperation.preClosure.focus();
                    return false;
                }



                return true;
            }


            function checkUpdateDiv(pacsOperation)
            {
                if (pacsOperation.productnameAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.productnameAmend.focus();
                    return false;
                }
                if (pacsOperation.productdescriptionAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.productdescriptionAmend.focus();
                    return false;
                }
                if (pacsOperation.productcodeAmend.value == "")
                {
                    alert("!! All fields must be filled !!");

                    pacsOperation.productcodeAmend.focus();
                    return false;
                }
                if (pacsOperation.inttcategoryAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.inttcategoryAmend.focus();
                    return false;
                }
                if (pacsOperation.intcatdescriptionAmend.value == "")
                {
                    alert("!! All fields must be filled !!");

                    pacsOperation.intcatdescriptionAmend.focus();
                    return false;
                }
                if (pacsOperation.segmentCodeAmend.value == "")
                {
                    alert("!! All fields must be filled !!");

                    pacsOperation.segmentCodeAmend.focus();
                    return false;
                }
                if (pacsOperation.statusAmend.value == "")
                {
                    alert("!! All fields must be filled !!");

                    pacsOperation.statusAmend.focus();
                    return false;
                }
                if (pacsOperation.effectDateAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.effectDateAmend.focus();
                    return false;
                }
                if (pacsOperation.minbalAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.minbalAmend.focus();
                    return false;
                }
                if (pacsOperation.maxbalAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.maxbalAmend.focus();
                    return false;
                }
                if (pacsOperation.minwdlAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.minwdlAmend.focus();
                    return false;
                }
                if (pacsOperation.maxwdlAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.maxwdlAmend.focus();
                    return false;
                }
                if (pacsOperation.intrateAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.intrateAmend.focus();
                    return false;
                }
                if (pacsOperation.inttmethodAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.inttmethodAmend.focus();
                    return false;
                }
                if (pacsOperation.inttfrequencyAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.inttfrequencyAmend.focus();
                    return false;
                }
                if (pacsOperation.inttcapfrequencyAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.inttcapfrequencyAmend.focus();
                    return false;
                }

                if (pacsOperation.odindicatorAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.odindicatorAmend.focus();
                    return false;
                }



                if (pacsOperation.creditComp1Amend.value == "")
                {
                    alert("!! All fields must be filled !!");

                    pacsOperation.creditComp1Amend.focus();
                    return false;
                }
                if (pacsOperation.creditComp2Amend.value == "")
                {
                    alert("!! All fields must be filled !!");

                    pacsOperation.creditComp2Amend.focus();
                    return false;
                }
                if (pacsOperation.debitComp1Amend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.debitComp1Amend.focus();
                    return false;
                }
                if (pacsOperation.debitComp2Amend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.debitComp2Amend.focus();
                    return false;
                }

                if (pacsOperation.dormancyprAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.dormancyprAmend.focus();
                    return false;
                }
                if (pacsOperation.allowdrAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.allowdrAmend.focus();
                    return false;
                }
                if (pacsOperation.allowcrAmend.value == "")
                {
                    alert("!! All fields must be filled !!");

                    pacsOperation.allowcrAmend.focus();
                    return false;
                }
                if (pacsOperation.mintermAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.mintermAmend.focus();
                    return false;
                }
                if (pacsOperation.maxtermAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.maxtermAmend.focus();
                    return false;
                }
                if (pacsOperation.dormancytriggerAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.dormancytriggerAmend.focus();
                    return false;
                }
                if (pacsOperation.rdFlagAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.rdFlagAmend.focus();
                    return false;
                }
                if (pacsOperation.overduerateAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.overduerateAmend.focus();
                    return false;
                }
                if (pacsOperation.preClosureAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.preClosureAmend.focus();
                    return false;
                }
                if (pacsOperation.inttfrequencyAmend.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.inttfrequencyAmend.focus();
                    return false;
                }

                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.minbalAmend.value))
                {
                    alert("!! minbal could only contain numbers !!");
                    pacsOperation.minbalAmend.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.maxbalAmend.value))
                {
                    alert("!! maxbal could only contain numbers !!");
                    pacsOperation.maxbalAmend.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.minwdlAmend.value))
                {
                    alert("!! minwithdrawal could only contain numbers !!");
                    pacsOperation.minwdlAmend.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.maxwdlAmend.value))
                {
                    alert("!! maxwithdrawal could only contain numbers !!");
                    pacsOperation.maxwdlAmend.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.dormancyprAmend.value))
                {
                    alert("!! maxbal could only contain numbers !!");
                    pacsOperation.dormancyprAmend.focus();
                    return false;
                }


                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.intrateAmend.value))
                {
                    alert("!! intrate could only contain numbers !!");
                    pacsOperation.intrateAmend.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.creditComp1Amend.value))
                {
                    alert("!! Credit Comp1 could only contain numbers !!");
                    pacsOperation.intrate.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.creditComp2Amend.value))
                {
                    alert("!! Credit Comp2 could only contain numbers !!");
                    pacsOperation.intrate.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.debitComp1Amend.value))
                {
                    alert("!! Debit Comp1 could only contain numbers !!");
                    pacsOperation.intrate.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.debitComp2Amend.value))
                {
                    alert("!! Debit Comp2 could only contain numbers !!");
                    pacsOperation.intrate.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.mintermAmend.value))
                {
                    alert("!! Minimum Term(Days) could only contain numbers !!");
                    pacsOperation.mintermAmend.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.maxtermAmend.value))
                {
                    alert("!! Maximum Term(Days) could only contain numbers !!");
                    pacsOperation.maxtermAmend.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.overduerateAmend.value))
                {
                    alert("!! Overdue Rate could only contain numbers !!");
                    pacsOperation.overduerateAmend.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.preClosureAmend.value))
                {
                    alert("!! PreClosure Rate could only contain numbers !!");
                    pacsOperation.preClosureAmend.focus();
                    return false;
                }


                return true;
            }

            function submitform(pacsOperation)
            {
                if (checkCreateDiv(pacsOperation))
                {
                    document.forms[0].handle_id.value = "Create";
                    document.forms[0].action = '/PacsApplication/DepositProductCreationServlet';
                    document.forms[0].submit();
                }

            }

            function updateform(pacsOperation)
            {

                if (checkUpdateDiv(pacsOperation))
                {
                    document.forms[0].handle_id.value = "Update";
                    pacsOperation.submit();

                }

            }

            function searchProduct() {
                if(checkbeforeSearch(pacsOperation)){
                    document.forms[0].handle_id.value = "Search";
                    document.forms[0].action = '/PacsApplication/DepositProductCreationServlet';
                    document.forms[0].submit();
                }
            }
            function checkbeforeSearch(pacsOperation){
                if (pacsOperation.productcodeSearch.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.productcodeSearch.focus();
                    return false;
                }
                if (pacsOperation.intcatSearch.value == "")
                {
                    alert("!! All fields must be filled !!");
                    pacsOperation.intcatSearch.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.productcodeSearch.value))
                {
                    alert("!! Product Code could only contain numbers !!");
                    pacsOperation.productcodeSearch.focus();
                    return false;
                }
                re = /^(?=.*\d)\d*(?:\.\d*)?$/; //this checks whether field contains digits
                if (!re.test(pacsOperation.intcatSearch.value))
                {
                    alert("!! Interest Category could only contain numbers !!");
                    pacsOperation.intcatSearch.focus();
                    return false;
                }
                return true;
            }
            function checkop()
            {
                if (document.getElementById("checkOption").value == "create")
                {
                    document.getElementById('create').style.display = 'block';
                    document.getElementById('amend').style.display = 'none';
                    document.getElementById('active').style.display = 'none';
                    document.getElementById('amend2').style.display = 'none';



                }
                if (document.getElementById("checkOption").value == "amend")
                {
                    document.getElementById('amend').style.display = 'block';
                    document.getElementById('create').style.display = 'none';
                    document.getElementById('active').style.display = 'none';
                    document.getElementById('amend2').style.display = 'none';



                }
                if (document.getElementById("checkOption").value == "active")
                {
                    document.getElementById('active').style.display = 'block';
                    document.getElementById('create').style.display = 'none';
                    document.getElementById('amend').style.display = 'none';
                    document.getElementById('amend2').style.display = 'none';


                }
                if (document.getElementById("checkOption").value == "deactive")
                {
                    document.getElementById('active').style.display = 'block';
                    document.getElementById('create').style.display = 'none';
                    document.getElementById('amend').style.display = 'none';
                    document.getElementById('amend2').style.display = 'none';


                }

            }
            function checkActvDeactv(pacsOperation){
                if(pacsOperation.productCodeActivation.value == ""){
                    alert("Please select Product Code!");
                    pacsOperation.productCodeActivation.focus();
                    return false;
                }
                if(pacsOperation.inttCategoryActivation.value == ""){
                    alert("Please select Intt Category!");
                    pacsOperation.inttCategoryActivation.focus();
                    return false;
                }
                if(pacsOperation.PacsproductstatusFlag.value == "select"){
                    alert("Please select status!");
                    pacsOperation.PacsproductstatusFlag.focus();
                    return false;
                }
                return true;
            }
            function ActvDeactv() {

                if(checkActvDeactv(pacsOperation)){
                    document.forms[0].handle_id.value = "StatusSearch";
                    document.forms[0].action = '/PacsApplication/DepositProductCreationServlet';
                    document.forms[0].submit();
                }

            }

            function popup_Product(width, height, pCode,iCode) {
                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 = "ProductCreation.jsp";
                var  lovKey="ParameterPdAmend";
                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationDepositLOV.jsp?productcodeSearch=' + pCode + '&intcatSearch=' + iCode + '&screenName=' + screenName+'&lovKey='+lovKey, 'ParameterPdAmend', attr);
                popWin.focus();

            }
            function popup_PrinBalGL(width, height) {
                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 = "ProductCreation.jsp";
                var  lovKey="glCodeSearchLOVKey";
                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationDepositLOV.jsp?screenName=' + screenName+'&lovKey='+lovKey, 'glCodeSearchLOVKey', attr);
                popWin.focus();

            }

            function popup_InttPayBalGL(width, height) {
                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 = "ProductCreation.jsp";
                var  lovKey="glCodeInttPAYABLESearchLOVKey";
                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationDepositLOV.jsp?screenName=' + screenName+'&lovKey='+lovKey, 'glCodeInttPAYABLESearchLOVKey', attr);
                popWin.focus();

            }

            function popup_InttPaidGL(width, height) {
                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 = "ProductCreation.jsp";
                var  lovKey="glCodeInttPAIDSearchLOVKey";
                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationDepositLOV.jsp?screenName=' + screenName+'&lovKey='+lovKey, 'glCodeInttPAIDSearchLOVKey', attr);
                popWin.focus();

            }



            function popup_InttPayBalGLAmend(width, height) {
                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 = "ProductCreation.jsp";
                var  lovKey="glCodeInttPAYABLESearchLOVKeyAmend";
                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationDepositLOV.jsp?screenName=' + screenName+'&lovKey='+lovKey, 'glCodeInttPAYABLESearchLOVKeyAmend', attr);
                popWin.focus();

            }

            function popup_InttPaidGLAmend(width, height) {
                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 = "ProductCreation.jsp";
                var  lovKey="glCodeInttPAIDSearchLOVKeyAmend";
                popWin = open('${pageContext.request.contextPath}/CommonSearchInformationDepositLOV.jsp?screenName=' + screenName+'&lovKey='+lovKey, 'glCodeInttPAIDSearchLOVKeyAmend', attr);
                popWin.focus();

            }
            
        // 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_Deposit.jsp" flush="true" />
        <br>

        <%!
            String blankNull(String s) {
                return (s == null) ? "" : s;
            }
        %>

        <%

             Object DepositProductCreationBeanobj = request.getAttribute("oDepositProductCreationBeanObj");
             DepositProductCreationBean oDepositProductCreationBean = new DepositProductCreationBean();
             if (DepositProductCreationBeanobj != null) {
                 oDepositProductCreationBean = (DepositProductCreationBean) request.getAttribute("oDepositProductCreationBeanObj");

             }
        %>

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

        <%
             String displayFlag = "";
             Object display = request.getAttribute("displayFlag");
             if (display != null) {
                 displayFlag = display.toString();
             }
        %>

        <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">DEPOSIT PRODUCT OPERATION</legend>

            <form name="pacsOperation" method="post" action="">

                <%if (!error_msg.equalsIgnoreCase("")) {%>
                <center><div class="info" id="errorMessage"><center><%= error_msg%></center></div></center>
                <% }%>
                <br>
                <br>

                <center><lable style=" font-family: Berlin Sans FB; font-weight:  normal;">Operation Selection</lable>
                    <select id="checkOption" onchange="checkop()" name="checkOption" id="checkOption">
                        <option value="" disabled selected style="display:none;" >--select--</option>
                        <option value="create" >Create</option>
                        <option value="amend" >Amend</option>
                        <option value="active" >Active/De-Active </option>
                    </select>
                </center>
                <br>

                <div id="create" style="display:none;">

                    <table>
                        <tbody>

                            <tr>
                                <td>Product Name:</td>
                                <td><input type="text"  name="productname" id="productname" size="20" /></td>
                            </tr>
                            <tr>
                                <td>Product Description:</td>
                                <td><input type="text"  name="productdescription" id="productdescription" size="20" /></td>
                            </tr>
                            <tr>
                                <td>Product Code:</td>
                                <td><input type="text"  name="productcode" id="productcode" maxlength="4" size="10"  /></td>
                            </tr>
                            <tr>
                                <td>INTT Category:</td>
                                <td><input type="text"  name="inttcategory" id="inttcategory" maxlength="4" size="10" /></td>
                            </tr>
                            <tr>
                                <td>INTCAT Description:</td>
                                <td><input type="text"  name="intcatdescription" id="intcatdescription" size="15" /></td>
                            </tr>
                            <tr>
                                <td>Segment Code:</td>
                                <td>
                                    <select id="segmentCode" name="segmentCode">
                                        <option value="" disabled selected style="display:none;">--Select--</option>
                                        <option value="0706">0706:INDIVIDUAL</option>
                                        <option value="0306">0306:STAFF</option>
                                        <option value="5003">5003:SENIOR CITIZEN</option>
                                        <option value="5010">5010:SHG</option>
                                        <option value="5000">5000:BANKS</option>
                                        <option value="5009">5009:INSTITUTIONS</option>
                                        <option value="5050">5050:OTHERS</option>
                                        <option value="5007">5007:SOCIETY</option>
                                        <option value="5011">5011:GOV/SEMI GOV</option>
                                        <option value="5012">5012:PACS</option>
                                        <option value="5013">5013:UCB</option>
                                        <option value="5014">5014:SCB</option>
                                        <option value="5015">5015:CCB</option>
                                    </select>
                                </td>

                            </tr>
                            <tr>
                                <td>Credit Comp1:</td>
                                <td><input type="text"  name="creditComp1" id="creditComp1" size="15" /></td>
                            </tr>
                            <tr>
                                <td>Credit Comp2:</td>
                                <td><input type="text"  name="creditComp2" id="creditComp2" size="15" /></td>
                            </tr>
                            <tr>
                                <td>Debit Comp1:</td>
                                <td><input type="text"  name="debitComp1" id="debitComp1" size="15" /></td>
                            </tr>
                            <tr>
                                <td>Debit Comp2:</td>
                                <td><input type="text"  name="debitComp2" id="debitComp2" size="15" /></td>
                            </tr>
                            <tr>
                                <td>Status:</td>
                                <td><select name="status" id="status" >
                                        <option value="" disabled selected style="display:none;">--Select--</option>
                                        <option value="A">Active</option>
                                        <option value="I">Inactive</option>

                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>MIN BAL:</td>
                                <td><input type="text"  name="minbal" id="minbal"  size="10"/></td>
                            </tr>
                            <tr>
                                <td>MAX BAL:</td>
                                <td><input type="text"  name="maxbal" id="maxbal" size="10" /></td>
                            </tr>
                            <tr>
                                <td>MIN WDL:</td>
                                <td><input type="text"  name="minwdl" id="minwdl"  size="10"/></td>
                            </tr>
                            <tr>
                                <td>MAX WDL:</td>
                                <td><input type="text"  name="maxwdl" id="maxwdl" size="10" /></td>
                            </tr>
                            <tr>
                                <td>INTT Rate:</td>
                                <td><input type="text" name="intrate" id="intrate" size="10" /></td>
                            </tr>
                            <tr>
                                <td>INTT Method: </td>
                                <td>
                                    <select name="inttmethod" id="inttmethod">
                                        <option value="" disabled selected style="display:none;">--Select--</option>
                                        <option value="S">Simple</option>
                                        <option value="C">Compound</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>INTT Frequency: </td>
                                <td>
                                    <select name="inttfrequency" id="inttfrequency" >
                                        <option value="" disabled selected style="display:none;">--Select--</option>
                                        <option value="D">Daily</option>
                                        <option value="M">Monthly</option>
                                        <option value="Q">Quaterly</option>
                                        <option value="H">Half-Yearly</option>
                                        <option value="Y">Yearly</option>


                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>INTT Capitalization Frequency: </td>
                                <td>
                                    <select name="inttcapfrequency" id="inttcapfrequency" >
                                        <option value="" disabled selected style="display:none;">--Select--</option>
                                        <option value="D">Daily</option>
                                        <option value="M">Monthly</option>
                                        <option value="Q">Quaterly</option>
                                        <option value="H">Half-Yearly</option>
                                        <option value="Y">Yearly</option>



                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>INTT Payout Frequency: </td>
                                <td>
                                    <select name="inttpayoutfrequency" id="inttpayoutfrequency" >
                                        <option value="" disabled selected style="display:none;">--Select--</option>
                                        <option value="D">Daily</option>
                                        <option value="M">Monthly</option>
                                        <option value="Q">Quaterly</option>
                                        <option value="H">Half-Yearly</option>
                                        <option value="Y">Yearly</option>
                                        <option value="O">On Maturity</option>


                                    </select>
                                </td>
                            </tr>
                            <tr style="display:none">
                                <td>Principal Balance GL Code:</td>
                                <td><input type="text" readonly name="glCodeShow" id="glCodeShow" /><input type="hidden" name="glCode" id="glCode" /> <input type="button" name="glCodeSearchButton1" id="glCodeSearchButton1" value="Search" onclick="javascript:popup_PrinBalGL(420, 280);"/>

                                </td>
                            </tr>
                            <tr>
                                <td>Interest Payable GL Code:</td>
                                <td><input type="text" readonly name="glCodeInttPAYABLEShow" id="glCodeInttPAYABLEShow" />
                                    <input type="hidden" name="glCodeInttPAYABLE" id="glCodeInttPAYABLE" />
                                    <input type="button" name="glCodeInttPAYABLESearchButton" id="glCodeInttPAYABLESearchButton" value="Search" onclick="javascript:popup_InttPayBalGL(420, 280);"/>

                                </td>
                            </tr>
                            <tr>
                                <td>Interest Paid GL Code:</td>
                                <td><input type="text" readonly name="glCodeInttPAIDShow" id="glCodeInttPAIDShow" />
                                    <input type="hidden"  name="glCodeInttPAID" id="glCodeInttPAID" />
                                    <input type="button" name="glCodeInttPAIDSearchButton" id="glCodeInttPAIDSearchButton" value="Search" onclick="javascript:popup_InttPaidGL(420, 280);"/>

                                </td>
                            </tr>
                            <tr>
                                <td>OD Indicator:</td>
                                <td>
                                    <select name="odindicator" id="odindicator" >
                                        <option value="" disabled selected style="display:none;">--Select--</option>
                                        <option value="Y">Yes</option>
                                        <option value="N">No</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>Allow Debit Transaction:</td>
                                <td>
                                    <select name="allowdr" id="allowdr" >
                                        <option value="" disabled selected style="display:none;">--Select--</option>
                                        <option value="Y">Yes</option>
                                        <option value="N">No</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>Allow Credit Transaction:</td>
                                <td>
                                    <select name="allowcr" id="allowcr" >
                                        <option value="" disabled selected style="display:none;">--Select--</option>
                                        <option value="Y">Yes</option>
                                        <option value="N">No</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>Dormancy Period(Days):</td>
                                <td><input type="text" maxlength="15"  name="dormancypr" id="dormancypr"/></td>
                            </tr>
                            <tr>
                                <td>Minimum Term(Days):</td>
                                <td>
                                    <input type="text" id="minterm" name="minterm" />
                                </td>
                            </tr>
                            <tr>
                                <td>Maximum Term(Days):</td>
                                <td>
                                    <input type="text" id="maxterm" name="maxterm" />
                                </td>
                            </tr>
                            <tr>
                                <td>Dormancy Trigger:</td>
                                <td>
                                    <select name="dormancytrigger" id="dormancytrigger">
                                        <option value="" >--Select--</option>
                                        <option value="d">Debit</option>
                                        <option value="c" >Credit</option>
                                        <option value="b" >Both</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>RD Flag:</td>
                                <td>
                                    <select name="rdFlag" id="rdFlag">
                                        <option value="" >--Select--</option>
                                        <option value="Y" >Yes</option>
                                        <option value="N" >No</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>OverDue Rate:</td>
                                <td>
                                    <input type="text" id="overduerate" name="overduerate" />
                                </td>
                            </tr>
                            <tr>
                                <td>PreClosure Charges(%):</td>
                                <td>
                                    <input type="text" id="preClosure" name="preClosure" />
                                </td>
                            </tr>
                            <tr>
                                <td>Head of A/c Type:</td>
                                <td><select name="headAccType" id="headAccType" >
                                        <option value="" disabled selected style="display:none;">--Select--</option>
                                        <option value="1">1: Liabilities</option>
                                        <option value="2">2: Asset</option>
                                        <option value="3">3: Purchase</option>
                                        <option value="4">4: Sell</option>
                                        <option value="5">5: Income</option>
                                        <option value="6">6: Expenditure</option>

                                    </select>
                                </td>
                            </tr>

                        </tbody>
                    </table><br><br>
                    <center>
                        <input type="button" value="Submit" onclick="javascript:submitform(pacsOperation)">
                        <input type="reset" value="Reset" name="reset" />
                    </center>
                    <p style=" font-family: Berlin Sans FB; font-weight:  normal;"> All fields are mandatory </p>

                </div>

                <div id="amend" style="display: none;">
                    <center>
                        <lable style=" font-family: Berlin Sans FB; font-weight:  normal;">Enter Product Code: </lable>
                        <input type="text" name="productcodeSearch" id="productcodeSearch"/> &nbsp;&nbsp;&nbsp;&nbsp;
                        <lable style=" font-family: Berlin Sans FB; font-weight:  normal;">Enter INTT Category: </lable>
                        <input type="text" name="intcatSearch" id="intcatSearch"/><input type="button"  value="Search" onclick="javascript:popup_Product(220, 180, document.pacsOperation.productcodeSearch.value,document.pacsOperation.intcatSearch.value)" />
                        <br><br><br>
                        <input type="button"  value="Submit" onclick="javascript:searchProduct()" />
                    </center><br>
                </div>

                <%if (displayFlag.equalsIgnoreCase("Y")) {%>

                <div id="amend2" >

                    <table>
                        <tbody>
                            <tr>
                                <td>Product Name:</td>
                                <td><input type="text"  name="productnameAmend" id="productnameAmend" size="20" value="<%=blankNull(oDepositProductCreationBean.getProductname())%>" /></td>
                            </tr>
                            <tr>
                                <td>Product Description:</td>
                                <td><input type="text" readonly="true"  name="productdescriptionAmend" id="productdescriptionAmend" size="20" value="<%=blankNull(oDepositProductCreationBean.getProductdescription())%>"/></td>
                            </tr>
                            <tr>
                                <td>Product Code:</td>
                                <td><input type="text" readonly="true"  name="productcodeAmend" id="productcodeAmend" maxlength="4" size="10"  value="<%=blankNull(oDepositProductCreationBean.getProductcode())%>" /></td>
                            </tr>
                            <tr>
                                <td>INTT Category:</td>
                                <td><input type="text" readonly="true"  name="inttcategoryAmend" id="inttcategoryAmend" maxlength="4" size="10" value="<%=blankNull(oDepositProductCreationBean.getInttcategory())%>"/></td>
                            </tr>
                            <tr>
                                <td>INTCAT Description:</td>
                                <td><input type="text" readonly="true"  name="intcatdescriptionAmend" id="intcatdescriptionAmend" size="15" value="<%=blankNull(oDepositProductCreationBean.getIntcatdescription())%>" /></td>
                            </tr>
                            <tr>
                                <td>Segment Code:</td>
                                <td><select id="segmentCodeAmend" name="segmentCodeAmend" id="segmentCodeAmend" >
                                        <option value="" disabled selected style="display:none;" <%if (blankNull(oDepositProductCreationBean.getSegmentCode()).equals("")) {%> selected <%}%>>--Select--</option>
                                        <option value="0706" <%if (blankNull(oDepositProductCreationBean.getSegmentCode()).equals("0706")) {%> selected <%}%>>0706:INDIVIDUAL</option>
                                        <option value="0306" <%if (blankNull(oDepositProductCreationBean.getSegmentCode()).equals("0306")) {%> selected <%}%>>0306:STAFF</option>
                                        <option value="5003" <%if (blankNull(oDepositProductCreationBean.getSegmentCode()).equals("5003")) {%> selected <%}%>>5003:SENIOR CITIZEN</option>
                                        <option value="5010" <%if (blankNull(oDepositProductCreationBean.getSegmentCode()).equals("5010")) {%> selected <%}%>>5010:SHG</option>
                                        <option value="5000" <%if (blankNull(oDepositProductCreationBean.getSegmentCode()).equals("5000")) {%> selected <%}%>>5000:BANKS</option>
                                        <option value="5009" <%if (blankNull(oDepositProductCreationBean.getSegmentCode()).equals("5009")) {%> selected <%}%>>5009:INSTITUTIONS</option>
                                        <option value="5050" <%if (blankNull(oDepositProductCreationBean.getSegmentCode()).equals("5050")) {%> selected <%}%>>5050:OTHERS</option>
                                        <option value="5007" <%if (blankNull(oDepositProductCreationBean.getSegmentCode()).equals("5007")) {%> selected <%}%>>5007:SOCIETY</option>
                                        <option value="5011" <%if (blankNull(oDepositProductCreationBean.getSegmentCode()).equals("5011")) {%> selected <%}%>>5011:GOV/SEMI GOV</option>
                                        <option value="5012" <%if (blankNull(oDepositProductCreationBean.getSegmentCode()).equals("5012")) {%> selected <%}%>>5012:PACS</option>
                                        <option value="5013" <%if (blankNull(oDepositProductCreationBean.getSegmentCode()).equals("5013")) {%> selected <%}%>>5013:UCB</option>
                                        <option value="5014" <%if (blankNull(oDepositProductCreationBean.getSegmentCode()).equals("5014")) {%> selected <%}%>>5014:SCB</option>
                                        <option value="5015" <%if (blankNull(oDepositProductCreationBean.getSegmentCode()).equals("5015")) {%> selected <%}%>>5015:CCB</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>Credit Comp1:</td>
                                <td><input type="text"  name="creditComp1Amend" id="creditComp1Amend" size="15" value="<%=blankNull(oDepositProductCreationBean.getCreditComp1())%>"/></td>
                            </tr>
                            <tr>
                                <td>Credit Comp2:</td>
                                <td><input type="text"  name="creditComp2Amend" id="creditComp2Amend" size="15" value="<%=blankNull(oDepositProductCreationBean.getCreditComp2())%>"/></td>
                            </tr>
                            <tr>
                                <td>Debit Comp1:</td>
                                <td><input type="text"  name="debitComp1Amend" id="debitComp1Amend" size="15" value="<%=blankNull(oDepositProductCreationBean.getDebitComp1())%>"/></td>
                            </tr>
                            <tr>
                                <td>Debit Comp2:</td>
                                <td><input type="text"  name="debitComp2Amend" id="debitComp2Amend" size="15" value="<%=blankNull(oDepositProductCreationBean.getDebitComp2())%>"/></td>
                            </tr>
                            <tr>
                                <td>Status:</td>
                                <td><select name="statusAmend" id="statusAmend"  readonly="true" >
                                        <option value="" disabled selected style="display:none;" <%if (blankNull(oDepositProductCreationBean.getStatus()).equals("")) {%> selected <%}%>>--Select--</option>
                                        <option value="A" <%if (blankNull(oDepositProductCreationBean.getStatus()).equals("A")) {%> selected <%}%>>Active</option>
                                        <option value="I" <%if (blankNull(oDepositProductCreationBean.getStatus()).equals("I")) {%> selected <%}%>>Inactive</option>

                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>Effective Date:</td>
                                <td><input type="text"  name="effectDateAmend" id="effectDateAmend" maxlength="11" size="10" readonly="true" value="<%=blankNull(oDepositProductCreationBean.getEffectDate())%>"/></td>
                            </tr>
                            <tr>
                                <td>MIN BAL:</td>
                                <td><input type="text" size="10"  name="minbalAmend" id="minbalAmend" value="<%=blankNull(oDepositProductCreationBean.getMinbal())%>" /></td>
                            </tr>
                            <tr>
                                <td>MAX BAL:</td>
                                <td><input type="text" size="10"  name="maxbalAmend" id="maxbalAmend" value="<%=blankNull(oDepositProductCreationBean.getMaxbal())%>" /></td>
                            </tr>
                            <tr>
                                <td>MIN WDL:</td>
                                <td><input type="text" size="10"  name="minwdlAmend" id="minwdlAmend" value="<%=blankNull(oDepositProductCreationBean.getMinwdl())%>" /></td>
                            </tr>
                            <tr>
                                <td>MAX WDL:</td>
                                <td><input type="text" size="10"  name="maxwdlAmend" id="maxwdlAmend" value="<%=blankNull(oDepositProductCreationBean.getMaxwdl())%>" /></td>
                            </tr>
                            <tr>
                                <td>INTT Rate:</td>
                                <td><input type="text" size="10"  name="intrateAmend" id="intrateAmend" value="<%=blankNull(oDepositProductCreationBean.getIntrate())%>" /></td>
                            </tr>
                            <tr>
                                <td>INTT Method: </td>
                                <td>
                                    <select name="inttmethodAmend" id="inttmethodAmend" >
                                        <option value="" disabled selected style="display:none;" <%if (blankNull(oDepositProductCreationBean.getInttmethod()).equals("")) {%> selected <%}%>>--Select--</option>
                                        <option value="S" <%if (blankNull(oDepositProductCreationBean.getInttmethod()).equals("S")) {%> selected <%}%>>Simple</option>
                                        <option value="C" <%if (blankNull(oDepositProductCreationBean.getInttmethod()).equals("C")) {%> selected <%}%>>Compound</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>INTT Frequency: </td>
                                <td>
                                    <select name="inttfrequencyAmend" id="inttfrequencyAmend" >
                                        <option value="" disabled selected style="display:none;" <%if (blankNull(oDepositProductCreationBean.getInttfrequency()).equals("")) {%> selected <%}%>>--Select--</option>
                                        <option value="D" <%if (blankNull(oDepositProductCreationBean.getInttfrequency()).equals("D")) {%> selected <%}%>>Daily</option>
                                        <option value="M" <%if (blankNull(oDepositProductCreationBean.getInttfrequency()).equals("M")) {%> selected <%}%>>Monthly</option>
                                        <option value="Q" <%if (blankNull(oDepositProductCreationBean.getInttfrequency()).equals("Q")) {%> selected <%}%>>Quaterly</option>
                                        <option value="H" <%if (blankNull(oDepositProductCreationBean.getInttfrequency()).equals("H")) {%> selected <%}%>>Half-Yearly</option>
                                        <option value="Y" <%if (blankNull(oDepositProductCreationBean.getInttfrequency()).equals("Y")) {%> selected <%}%>>Yearly</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>INTT Capitalization Frequency: </td>
                                <td>
                                    <select name="inttcapfrequencyAmend" id="inttcapfrequencyAmend" >
                                        <option value="" disabled selected style="display:none;" <%if (blankNull(oDepositProductCreationBean.getInttcapfrequency()).equals("")) {%> selected <%}%>>--Select--</option>
                                        <option value="D" <%if (blankNull(oDepositProductCreationBean.getInttcapfrequency()).equals("D")) {%> selected <%}%>>Daily</option>
                                        <option value="M" <%if (blankNull(oDepositProductCreationBean.getInttcapfrequency()).equals("M")) {%> selected <%}%>>Monthly</option>
                                        <option value="Q" <%if (blankNull(oDepositProductCreationBean.getInttcapfrequency()).equals("Q")) {%> selected <%}%>>Quaterly</option>
                                        <option value="H" <%if (blankNull(oDepositProductCreationBean.getInttcapfrequency()).equals("H")) {%> selected <%}%>>Half-Yearly</option>
                                        <option value="Y" <%if (blankNull(oDepositProductCreationBean.getInttcapfrequency()).equals("Y")) {%> selected <%}%>>Yearly</option>
                                        <option value="O" <%if (blankNull(oDepositProductCreationBean.getInttcapfrequency()).equals("O")) {%> selected <%}%>>On Maturity</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>INTT Payout Frequency: </td>
                                <td>
                                    <select name="inttpayoutfrequencyAmend" id="inttpayoutfrequencyAmend" >
                                        <option value="" disabled selected style="display:none;" <%if (blankNull(oDepositProductCreationBean.getInttpayoutfrequency()).equals("")) {%> selected <%}%>>--Select--</option>
                                        <option value="D" <%if (blankNull(oDepositProductCreationBean.getInttpayoutfrequency()).equals("D")) {%> selected <%}%>>Daily</option>
                                        <option value="M" <%if (blankNull(oDepositProductCreationBean.getInttpayoutfrequency()).equals("M")) {%> selected <%}%>>Monthly</option>
                                        <option value="Q" <%if (blankNull(oDepositProductCreationBean.getInttpayoutfrequency()).equals("Q")) {%> selected <%}%>>Quaterly</option>
                                        <option value="H" <%if (blankNull(oDepositProductCreationBean.getInttpayoutfrequency()).equals("H")) {%> selected <%}%>>Half-Yearly</option>
                                        <option value="Y" <%if (blankNull(oDepositProductCreationBean.getInttpayoutfrequency()).equals("Y")) {%> selected <%}%>>Yearly</option>
                                        <option value="O" <%if (blankNull(oDepositProductCreationBean.getInttpayoutfrequency()).equals("O")) {%> selected <%}%>>On Maturity</option>


                                    </select>
                                </td>
                            </tr>
                            <tr style="display:none">
                                <td>Principal Balance GL Code:</td>
                                <td>
                                    <%
                                        Connection connection = null;
                                        ResultSet rs = null;
                                        Statement statement = null;
                                        connection = DbHandler.getDBConnection();
                                        try {
                                            statement = connection.createStatement();
                                            rs = statement.executeQuery("select distinct(gl_code),gl_name,id from gl_product where id='" + oDepositProductCreationBean.getGlCode() + "'");
                                    %>
                                    <input type="text" readonly name="glCodeShowAmend" id="glCodeShowAmend" value="<%=rs.getString(1) + ":" + rs.getString(2)%>" />
                                    <input type="hidden" name="glCodeAmend" id="glCodeAmend" value="<%=rs.getString(3)%>" />



                                    <%
                                           // statement.close();
                                           // connection.close();
                                        } catch (Exception e) {
                System.out.println("Error occurred during processing.");
            } finally {
                try {
                    if(statement !=null)
                        statement.close();
                    if (connection != null)
                    connection.close();

            } catch (Exception e) {               
               System.out.println("Error Occurred during connection close.");
            }

            }
                                    %>
                                    <input type="button" name="Amend1" id="Amend1" value="Search" onclick="javascript:popup_PrinBalGL(420, 280);"/>
                                </td>
                            </tr>
                            <tr>
                                <td>Interest Payable GL Code:</td>
                                <td>
                                    <% String InttPAYABLE_Amend = "";
                                        String InttPAYABLE_AmendID = "";
                                        Connection connection1 = null;
                                        ResultSet rs1 = null;
                                        Statement statement1 = null;
                                        connection1 = DbHandler.getDBConnection();
                                        try {
                                            statement1 = connection1.createStatement();
                                            rs1 = statement1.executeQuery("select distinct(gl_code) as gl_code,gl_name,id from gl_product where id='" + oDepositProductCreationBean.getGlCodeInttPAYABLE() + "'");
                                            while (rs1.next()) {
                                                InttPAYABLE_Amend = rs1.getString("gl_code") + ":" + rs1.getString("gl_name");
                                                InttPAYABLE_AmendID = rs1.getString("id");
                                            }

                                           // statement1.close();
                                           // connection1.close();
                                        } catch (Exception e) {
                System.out.println("Error occurred during processing.");
            } finally {
                try {
                    if(statement1 !=null)
                        statement1.close();
                    if (connection1 != null)
                    connection1.close();

            } catch (Exception e) {               
               System.out.println("Error Occurred during connection close.");
            }

            }
                                    %>
                                    <input type="text" size="" readonly name="glCodeInttPAYABLE_AmendShow" id="glCodeInttPAYABLE_AmendShow" value="<%=InttPAYABLE_Amend%>" />
                                    <input type="hidden" style="display:none" name="glCodeInttPAYABLE_Amend" id="glCodeInttPAYABLE_Amend" value="<%=InttPAYABLE_AmendID%>" />


                                    <input type="button" name="Amend2" id="Amend2" value="Search" onclick="javascript:popup_InttPayBalGLAmend(420, 280);"/>
                                </td>
                            </tr>
                            <tr>
                                <td>Interest Paid GL Code:</td>
                                <td>
                                    <% String glCodeInttPAID_AmendShow = "";
                                        String glCodeInttPAID_Amend = "";
                                        Connection connection2 = null;
                                        ResultSet rs2 = null;
                                        Statement statement2 = null;
                                        connection2 = DbHandler.getDBConnection();
                                        try {
                                            statement2 = connection2.createStatement();
                                            rs2 = statement2.executeQuery("select distinct(gl_code) as gl_code,gl_name,id from gl_product where id='" + oDepositProductCreationBean.getGlCodeInttPAID() + "'");
                                            while (rs2.next()) {
                                                glCodeInttPAID_AmendShow = rs2.getString("gl_code") + ":" + rs2.getString("gl_name");
                                                glCodeInttPAID_Amend = rs2.getString("id");
                                            }

                                           // statement2.close();
                                           // connection2.close();
                                        } catch (Exception e) {
                System.out.println("Error occurred during processing.");
            } finally {
                try {
                    if(statement2 !=null)
                        statement2.close();
                    if (connection2 != null)
                    connection2.close();

            } catch (Exception e) {               
               System.out.println("Error Occurred during connection close.");
            }

            }
                                    %>
                                    <input type="text" readonly name="glCodeInttPAID_AmendShow" id="glCodeInttPAID_AmendShow" value="<%=glCodeInttPAID_AmendShow%>" />
                                    <input type="hidden" style="display:none" name="glCodeInttPAID_Amend" id="glCodeInttPAID_Amend" value="<%=glCodeInttPAID_Amend%>" />


                                    <input type="button" name="Amend3" id="Amend3" value="Search" onclick="javascript:popup_InttPaidGLAmend(420, 280);"/>
                                </td>
                            </tr>

                            <tr>
                                <td>OD Indicator:</td>
                                <td>
                                    <select name="odindicatorAmend" id="odindicatorAmend" >
                                        <option value="" disabled selected style="display:none;" <%if (blankNull(oDepositProductCreationBean.getOdindicator()).equals("")) {%> selected <%}%>>--Select--</option>
                                        <option value="Y" <%if (blankNull(oDepositProductCreationBean.getOdindicator()).equals("Y")) {%> selected <%}%>>Yes</option>
                                        <option value="N" <%if (blankNull(oDepositProductCreationBean.getOdindicator()).equals("N")) {%> selected <%}%>>No</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>Allow Debit Transaction:</td>
                                <td>
                                    <select name="allowdrAmend" id="allowdrAmend" >
                                        <option value="" disabled selected style="display:none;" <%if (blankNull(oDepositProductCreationBean.getAllowdr()).equals("")) {%> selected <%}%>>--Select--</option>
                                        <option value="Y" <%if (blankNull(oDepositProductCreationBean.getAllowdr()).equals("Y")) {%> selected<%}%>>Yes</option>
                                        <option value="N" <%if (blankNull(oDepositProductCreationBean.getAllowdr()).equals("N")) {%> selected<%}%>>No</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>Allow Credit Transaction:</td>
                                <td>
                                    <select name="allowcrAmend" id="allowcrAmend" >
                                        <option value="" disabled selected style="display:none;" <%if (blankNull(oDepositProductCreationBean.getAllowcr()).equals("")) {%> selected <%}%>>--Select--</option>
                                        <option value="Y" <%if (blankNull(oDepositProductCreationBean.getAllowcr()).equals("Y")) {%> selected<%}%>>Yes</option>
                                        <option value="N" <%if (blankNull(oDepositProductCreationBean.getAllowcr()).equals("N")) {%> selected<%}%>>No</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>Dormancy Period(Days):</td>
                                <td><input type="text" maxlength="15"  name="dormancyprAmend" id="dormancyprAmend" value="<%=blankNull(oDepositProductCreationBean.getDormancypr())%>" /></td>
                            </tr>
                            <tr>
                                <td>Minimum Term(Days):</td>
                                <td>
                                    <input type="text" id="mintermAmend" name="mintermAmend" value="<%=blankNull(oDepositProductCreationBean.getMinterm())%>"/>
                                </td>
                            </tr>
                            <tr>
                                <td>Maximum Term(Days):</td>
                                <td>
                                    <input type="text" id="maxtermAmend" name="maxtermAmend" value="<%=blankNull(oDepositProductCreationBean.getMaxterm())%>"/>
                                </td>
                            </tr>
                            <tr>
                                <td>Dormancy Trigger</td>
                                <td>
                                    <select name="dormancytriggerAmend" id="dormancytriggerAmend">
                                        <option value="" disabled selected style="display:none;" <%if (blankNull(oDepositProductCreationBean.getDormancytrigger()).equals("")) {%> selected <%}%>>--Select--</option>
                                        <option value="d" <%if (blankNull(oDepositProductCreationBean.getDormancytrigger()).equals("d")) {%> selected<%}%>>Debit</option>
                                        <option value="c" <%if (blankNull(oDepositProductCreationBean.getDormancytrigger()).equals("c")) {%> selected<%}%>>Credit</option>
                                        <option value="b" <%if (blankNull(oDepositProductCreationBean.getDormancytrigger()).equals("b")) {%> selected<%}%>>Both</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>RD Flag</td>
                                <td>
                                    <select name="rdFlagAmend" id="rdFlagAmend">
                                        <option value="" disabled selected style="display:none;" <%if (blankNull(oDepositProductCreationBean.getRdFlag()).equals("")) {%> selected <%}%>>--Select--</option>
                                        <option value="Y" <%if (blankNull(oDepositProductCreationBean.getRdFlag()).equals("Y")) {%> selected<%}%>>Yes</option>
                                        <option value="N" <%if (blankNull(oDepositProductCreationBean.getRdFlag()).equals("N")) {%> selected<%}%>>No</option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>OverDue Rate</td>
                                <td>
                                    <input type="text" id="overduerateAmend" name="overduerateAmend" value="<%=blankNull(oDepositProductCreationBean.getOverduerate())%>"/>
                                </td>
                            </tr>
                            <tr>
                                <td>PreClosure Charges(%):</td>
                                <td>
                                    <input type="text" id="preClosureAmend" name="preClosureAmend" value="<%=blankNull(oDepositProductCreationBean.getPreClosure())%>" />
                                </td>
                            </tr>
                            <tr>
                                <td>Head of A/c Type:</td>
                                <td><select name="headAccTypeAmend" id="headAccTypeAmend" >
                                        <option value="" disabled <%if (blankNull(oDepositProductCreationBean.getHeadAccType()).equals("")) {%> selected <%}%>>--Select--</option>
                                        <option value="1" <%if (blankNull(oDepositProductCreationBean.getHeadAccType()).equals("1")) {%> selected <%}%>>1: Liabilities</option>
                                        <option value="2" <%if (blankNull(oDepositProductCreationBean.getHeadAccType()).equals("2")) {%> selected <%}%>>2: Asset</option>
                                        <option value="3" <%if (blankNull(oDepositProductCreationBean.getHeadAccType()).equals("3")) {%> selected <%}%>>3: Purchase</option>
                                        <option value="4" <%if (blankNull(oDepositProductCreationBean.getHeadAccType()).equals("4")) {%> selected <%}%>>4: Sell</option>
                                        <option value="5" <%if (blankNull(oDepositProductCreationBean.getHeadAccType()).equals("5")) {%> selected <%}%>>5: Income</option>
                                        <option value="6" <%if (blankNull(oDepositProductCreationBean.getHeadAccType()).equals("6")) {%> selected <%}%>>6: Expenditure</option>
                                    </select>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <br><br>
                    <input type="hidden" name="dep_product_id" value="<%=blankNull(oDepositProductCreationBean.getDep_product_id())%>"/>
                    <center>
                        <input type="button" value="Update" onclick="javascript:updateform(pacsOperation)">
                    </center>
                    <p>All fields are mandatory</p>
                </div>
                <%}%>

                <div id="active" style="display: none;">
                    <center>
                        <lable style=" font-family: Berlin Sans FB; font-weight:  normal;">Enter Product Code: </lable>
                        <input type="text" name="productCodeActivation" id="productCodeActivation"/>
                        <lable style=" font-family: Berlin Sans FB; font-weight:  normal;">Enter INTT Category: </lable>
                        <input type="text" name="inttCategoryActivation" id="inttCategoryActivation"/>
                        <lable style=" font-family: Berlin Sans FB; font-weight:  normal;">Status:</lable>
                        <select id="PacsproductstatusFlag" name="PacsproductstatusFlag" id="PacsproductstatusFlag">
                            <option value="select" >--Select--</option>
                            <option value="A">Active</option>
                            <option value="I">Inactive</option>
                        </select>
                        <input type="button" value="Sumbit" onclick="javascript:ActvDeactv()">
                    </center>
                </div>

                <input type="hidden" name="handle_id" value="" />
            </form>
        </fieldset>
    </body>
</html>
<% 	} catch (Exception e) {
               
            }
%>