<%--
    Document   : CommonSearchInformationDepositLOV
    Created on : Mar 10, 2016, 2:30:36 PM
    Author     : 986137
--%>

<%@page import="java.sql.PreparedStatement"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="LoginDb.DbHandler"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.io.*"%>
<%@page import="java.util.*"%>
<%@page import="java.sql.Connection"%>


<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Search</title>
        <link rel="shortcut icon" href="${pageContext.request.contextPath}/img/favicon.ico" type="image/x-icon" />
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/ButtonAndText.css" />
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/style1.css">
            <!--Only for demo purpose - no need to add.-->
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/demo.css" />
        <script src="${pageContext.request.contextPath}/jquery-ui-1.10.4.custom/development-bundle/jquery-1.10.2.js"></script>
       <style> 
          
           * { 
			box-sizing: border-box; 
		} 
		.sudo:hover { 
			-ms-transform: scale(4.6); 
			/* IE 9 */ 
			-webkit-transform: scale(1.5); 
			/* Safari 3-8 */ 
			-moz-transform:  scale(3.0); 
		} 
	</style>       
        
        <script type="text/javascript">
            function AppendDivAfteriFrame(passed_value) {

                var firstChar = passed_value.substr(0, 4);
                window.opener.$('#intttransacc').val('');
                window.opener.$('#inttrepmethod').val('');
                if (firstChar === "2001")
                {
                    window.opener.$('#memNo').remove();
                    window.opener.$('#matVal').remove();
                    window.opener.$('#inttrepmethod').prop('disabled', false);
                    var iFrame = window.opener.document.getElementById('depositAccTableID');
                    var newDivInParent = window.opener.document.createElement('tr');
                    newDivInParent.setAttribute("Id", "fdTermValue");
                    iFrame.appendChild(newDivInParent);
                    opener.document.getElementById('fdTermValue').innerHTML = '<tr><td>Term Value:</td><td><input type="text" id="termValue" name="termValue"></td></tr>';

                    var iFrame2 = window.opener.document.getElementById('depositAccTableID');
                    var newDivInParent2 = window.opener.document.createElement('tr');
                    newDivInParent2.setAttribute("Id", "fdTermDurations");
                    iFrame2.appendChild(newDivInParent2);
                    opener.document.getElementById('fdTermDurations').innerHTML = '<tr><td>Term Length:</td><td><input type="text" size="1" id="termYears" name="termYears"><label> Years</label><input type="text" size="1" id="termMonth" name="termMonth"><label> Months</label><input type="text" size="1" id="termDays" name="termDays"><label> Days</label></td></tr>';

                    var iFrame3 = window.opener.document.getElementById('depositAccTableID');
                    var newDivInParent3 = window.opener.document.createElement('tr');
                    newDivInParent3.setAttribute("Id", "matVal");
                    iFrame3.appendChild(newDivInParent3);
                    opener.document.getElementById('matVal').innerHTML = '<tr><td>MIS/Maturity Amount:</td><td><input type="text" id="matAmt" name="matAmt" readonly> &nbsp &nbsp  &nbsp &nbsp <input type="button" id="getMatAmt" name="getMatAmt" Value="Calculate Maturity" onclick="javascript:popup_FDMaturity(220, 220, document.accCreatForm.termValue.value, document.accCreatForm.termYears.value, document.accCreatForm.termMonth.value, document.accCreatForm.termDays.value, document.accCreatForm.productCodeDetails.value, document.accCreatForm.inttCatDetails.value);"/></td></tr><br>';

                    window.opener.$('#rdInstAmt').remove();
                    window.opener.$('#rdTrmLen').remove();


                }else if (firstChar === "3001")
                {
                    window.opener.$('#memNo').remove();
                    window.opener.$('#matVal').remove();
                    window.opener.$('#inttrepmethod').prop('disabled', false);
                    window.opener.$('#transferbutton').prop('disabled', false);
                    window.opener.$('#fdTermValue').hide();
                    window.opener.$('#fdTermDurations').hide();
                    var iFrame = window.opener.document.getElementById('depositAccTableID');
                    var newDivInParent = window.opener.document.createElement('tr');
                    newDivInParent.setAttribute("Id", "rdInstAmt");
                    iFrame.appendChild(newDivInParent);
                    opener.document.getElementById('rdInstAmt').innerHTML = '<tr><td>Installment Amount:</td><td><input type="text" id="instAmt" name="instAmt"></td></tr>';

                    var iFrame2 = window.opener.document.getElementById('depositAccTableID');
                    var newDivInParent2 = window.opener.document.createElement('tr');
                    newDivInParent2.setAttribute("Id", "rdTrmLen");
                    iFrame2.appendChild(newDivInParent2);
                    opener.document.getElementById('rdTrmLen').innerHTML = '<tr><td>Term Length (In Months):</td><td><input type="text" size="1" id="termMonth" name="termMonth"></td></tr>';

                    var iFrame3 = window.opener.document.getElementById('depositAccTableID');
                    var newDivInParent3 = window.opener.document.createElement('tr');
                    newDivInParent3.setAttribute("Id", "matVal");
                    iFrame3.appendChild(newDivInParent3);
                    opener.document.getElementById('matVal').innerHTML = '<tr><td>Maturity Amount:</td><td><input type="text" id="matAmt" name="matAmt" readonly> &nbsp &nbsp  &nbsp &nbsp <input type="button" id="getMatAmt" name="getMatAmt" Value="Calculate Maturity" onclick="javascript:popup_Maturity(220, 220, document.accCreatForm.instAmt.value, document.accCreatForm.termMonth.value, document.accCreatForm.inttCatDetails.value);"/></td></tr><br>';


                    window.opener.$('#fdTermValue').remove();
                    window.opener.$('#fdTermDurations').remove();


                }
                else if (firstChar === "2002")
                {
                    window.opener.$('#memNo').remove();
                    window.opener.$('#matVal').remove();
                    window.opener.$('#inttrepmethod').prop('disabled', false);
                    var iFrame = window.opener.document.getElementById('depositAccTableID');
                    var newDivInParent = window.opener.document.createElement('tr');
                    newDivInParent.setAttribute("Id", "fdTermValue");
                    iFrame.appendChild(newDivInParent);
                    opener.document.getElementById('fdTermValue').innerHTML = '<tr><td>Term Value:</td><td><input type="text" id="termValue" name="termValue"></td></tr>';

                    var iFrame2 = window.opener.document.getElementById('depositAccTableID');
                    var newDivInParent2 = window.opener.document.createElement('tr');
                    newDivInParent2.setAttribute("Id", "fdTermDurations");
                    iFrame2.appendChild(newDivInParent2);
                    opener.document.getElementById('fdTermDurations').innerHTML = '<tr><td>Term Length:</td><td><input type="text" size="1" id="termYears" name="termYears"><label> Years</label><input type="text" size="1" id="termMonth" name="termMonth"><label> Months</label><input type="text" size="1" id="termDays" name="termDays"><label> Days</label></td></tr>';

                    var iFrame3 = window.opener.document.getElementById('depositAccTableID');
                    var newDivInParent3 = window.opener.document.createElement('tr');
                    newDivInParent3.setAttribute("Id", "matVal");
                    iFrame3.appendChild(newDivInParent3);
                    opener.document.getElementById('matVal').innerHTML = '<tr><td>Maturity Amount:</td><td><input type="text" id="matAmt" name="matAmt" readonly> &nbsp &nbsp  &nbsp &nbsp <input type="button" id="getMatAmt" name="getMatAmt" Value="Calculate Maturity" onclick="javascript:popup_FDMaturity(220, 220, document.accCreatForm.termValue.value, document.accCreatForm.termYears.value, document.accCreatForm.termMonth.value, document.accCreatForm.termDays.value, document.accCreatForm.productCodeDetails.value);"/></td></tr><br>';

                    window.opener.$('#rdInstAmt').remove();
                    window.opener.$('#rdTrmLen').remove();


                }else if (firstChar === "1017")
                {
                    window.opener.$('#matVal').remove();
                    window.opener.$('#inttrepmethod').prop('disabled', true);
                    var iFrame = window.opener.document.getElementById('depositAccTableID');
                    var newDivInParent = window.opener.document.createElement('tr');
                    newDivInParent.setAttribute("Id", "memNo");
                    iFrame.appendChild(newDivInParent);
                    opener.document.getElementById('memNo').innerHTML = '<tr><td>Membership Number:</td><td><input type="text" id="memberno" name="memberno"></td></tr>';




                    window.opener.$('#fdTermValue').remove();
                    window.opener.$('#fdTermDurations').remove();
                    window.opener.$('#rdInstAmt').remove();
                    window.opener.$('#rdTrmLen').remove();


                }else{
                    window.opener.$('#intttransacc').prop('disabled', true);
                    window.opener.$('#transferbutton').prop('disabled', true);
                    window.opener.$('#inttrepmethod').prop('disabled', true);
                    window.opener.$('#inttrepmethod').val('');
                    window.opener.$('#fdTermValue').remove();
                    window.opener.$('#fdTermDurations').remove();
                    window.opener.$('#rdInstAmt').remove();
                    window.opener.$('#rdTrmLen').remove();
                    window.opener.$('#matVal').remove();
                    window.opener.$('#memNo').remove();

                }

            }

            function hideRow(){
                window.opener.$('.hideRow').show();
            }

            function popup_RDRateSlab(width, height) {

                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 = "DepositAccountCreation.jsp";
                var  lovKey="RDRateSlab"
                popWin = open('/PacsApplication/CommonSearchInformationDepositLOV.jsp?screenName=' + screenName +'&lovKey='+lovKey, 'RDRateSlab', attr);
                popWin.focus();

            }

            function popup_FDRateSlab(width, height) {

                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 = "DepositAccountCreation.jsp";
                var  lovKey="FDRateSlab"
                popWin = open('/PacsApplication/CommonSearchInformationDepositLOV.jsp?screenName=' + screenName + '&lovKey='+lovKey, 'FDRateSlab', attr);
                popWin.focus();

            }
          
        </script>
        <%
                    String searchString1 = "";
                    String screenName = "";
                    String searchString2 = "";
                    String lovKey = "";
                    String textIndex = "";
                    String tranType = "";
                    String productCode = "";
                    String searchString3 = "";
                    String Counter="";/*Added by Bitan for multiple Joint CIF */
                    String Option="";

                    screenName = request.getParameter("screenName");
                    lovKey = request.getParameter("lovKey");
                    String pacsId = session.getAttribute("pacsId").toString();
                    textIndex = request.getParameter("textIndex");
                    String subPacsFlag = (String) session.getAttribute("subPacsFlag");
                    String headPacsId = (String) session.getAttribute("headPacsId").toString();
                    String user = session.getAttribute("user").toString();

                    String headerQry = null;
                  
                    if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) {
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }
                       // searchString1 = request.getParameter("cifNumber");
                        productCode = request.getParameter("productCode");
                        if (productCode.equalsIgnoreCase("1017")) {

                            headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(customer_type,' '),t.address_1,nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,'') from kyc_hdr t "
                                    + "  where t.cif_no = '" + searchString1.replace(' ', '%') + "'  and t.pacs_id in (select m.pacs_id from pacs_master m where m.head_pacs_id=(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))";

                        } else {
                            headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(customer_type,' '),t.address_1,nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,'') from kyc_hdr t "
                                    + "  where t.cif_no = '" + searchString1.replace(' ', '%') + "'  and t.pacs_id in (select m.pacs_id from pacs_master m where m.head_pacs_id= (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "' ))";
                        }

                    } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails2"))) {
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }
                       // searchString1 = request.getParameter("cifNumber");
                        productCode = request.getParameter("productCode");
                        Counter = request.getParameter("Counter");
                      
                        if (productCode.equalsIgnoreCase("1017")) {

                            headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(customer_type,' '),t.address_1,nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,'') from kyc_hdr t "
                                    + "  where t.cif_no = '" + searchString1.replace(' ', '%') + "'  and t.pacs_id in (select m.pacs_id from pacs_master m where m.head_pacs_id=(select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))";

                        } else {
                            headerQry = "select t.cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(customer_type,' '),t.address_1,nvl(t.address_1,' '),nvl(t.address_2,' '), nvl(t.address_3,'') from kyc_hdr t "
                                    + "  where t.cif_no = '" + searchString1.replace(' ', '%') + "' and t.pacs_id in (select m.pacs_id from pacs_master m where m.head_pacs_id=(select head_pacs_id from pacs_master where pacs_id= '" + pacsId + "') )";
                        }

                    } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("nominee"))) {
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }
                      //  searchString1 = request.getParameter("cifNumber");
                        headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,nvl(customer_type,' '),address_1,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,'') from kyc_hdr t "
                                + "  where cif_no = '" + searchString1.replace(' ', '%') + "' and t.pacs_id in (select m.pacs_id from pacs_master m where m.head_pacs_id=(select head_pacs_id from pacs_master where pacs_id= '" + pacsId + "' ))";

                    } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("productCodeSearch"))) {

                        searchString1 = request.getParameter("productCodeDetails");

                        headerQry = "select prod_code, prod_desc, int_cat, intt_cat_desc, nvl((select gp.gl_code from gl_product gp where gp.id = GL_ID_INTT_PAYABLE), 'NA') PAYABLE_BGL, nvl((select gp.gl_code from gl_product gp where gp.id = GL_ID_INTT_PAID), 'NA') PAID_GL from dep_product where prod_code<>'6001' and pacs_id like '%" + pacsId + "#%'";

                    } else if ((screenName.equalsIgnoreCase("DepositTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {

                       // searchString1 = request.getParameter("accNo");
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }

                       // headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,t.avail_bal,k.sig_photo,k.photo_path,k.guardian_name,p.prod_code,(select count(m.member_id) from basic_info b, member_information m where b.shg_id = m.shg_id and b.cif = t.customer_no) memberCount,(case when t.cif_no2 is null then 'Single' else 'Joint' end)"
                               // + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and (p.prod_code in ('1051','1101','1102')) and t.curr_status not in ('C','S') and substr(t.GL_CLASS_CODE,9,2)='14' and (t.key_1 like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in(select pm.head_pacs_id from pacs_master pm where pm.pacs_id='" + pacsId + "'))   ";
                        headerQry = " select t.key_1, (k.first_name || ' ' || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')), "
                                        +" t.customer_no as cif1,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,"
                                        +" t.avail_bal, k.sig_photo,k.photo_path,"
                                        +" k.guardian_name,p.prod_code,(select count(m.member_id) from basic_info b, member_information m"
                                        +" where b.shg_id = m.shg_id and b.cif = t.customer_no) memberCount,"
                                        +" nvl((select k.mop_name from acc_mop_map k where k.mop_code= t.mop),'NA'),"
                                    // +" nvl((select nvl2(r.first_name,r.first_name, 'NA' )|| nvl2(r.middle_name, ' ' || r.middle_name, 'NA') || nvl2(r.last_name, ' ' || r.last_name, 'NA')"
                                        +" nvl((select nvl(r.first_name, ' ') ||' '|| nvl(r.middle_name, ' ') ||' '||nvl(r.last_name, ' ' ) "
                                        +" from kyc_hdr r where r.cif_no=t.cif_no2),'NA') as cust_name2 ,nvl(t.cif_no2,'NA') as cif2,"
					+" (select r.photo_path from kyc_hdr r where r.cif_no=t.cif_no2) as pic2,"
                                        +" (select r.sig_photo from kyc_hdr r where r.cif_no=t.cif_no2) as sig2"
                                        +" from dep_account t, kyc_hdr k, dep_product p"
                                        +" where k.cif_no = t.customer_no and t.dep_prod_id = p.id and (p.prod_code in ('1051', '1101', '1102')) and substr(t.GL_CLASS_CODE,9,2)='14' and t.curr_status not in ('C', 'S')"
                                        +" and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%'  or upper(k.first_name) like upper('" + searchString1 + "%') or t.old_accno = '" + searchString1 + "')"
                                        +" and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in (select pm.head_pacs_id from pacs_master pm where pm.pacs_id ='" + pacsId + "'))";
                       
                    } else if ((screenName.equalsIgnoreCase("ShareTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) {

                       // searchString1 = request.getParameter("accNo");
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }

                        headerQry = "select da.key_1, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, (dp.prod_code || ':' || dp.int_cat || '-' || dp.prod_name) product, s.share_value, round(da.avail_bal/s.share_value) number_of_share, (case when da.share_amount_due is null then 0 else da.share_amount_due end) shareAmtDue, da.customer_no from dep_account da, kyc_hdr k, dep_product dp, share_value_mst s where da.customer_no = k.cif_no and da.dep_prod_id = dp.id and dp.id = s.product_id and dp.prod_code = '1017' and substr(da.GL_CLASS_CODE,9,2)='11' and da.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') and (da.key_1 like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%')) ";


                    } else if ((screenName.equalsIgnoreCase("BatchTransaction.jsp")) && (lovKey.equalsIgnoreCase("AccountSearch"))) {

                        searchString1 = request.getParameter("accType");
                        searchString2 = request.getParameter("textIndex");
                      //  searchString3 = request.getParameter("accNo");

                        if (searchString1.equalsIgnoreCase("G")) {
                            headerQry = "select g.key_1,p.gl_code,g.ledger_name from gl_account g, gl_product p where g.pacs_id='" + pacsId + "' and g.status='A' and p.gl_code<>'28101' and g.gl_prod_id=p.id and (g.key_1 like '%" + searchString3 + "%' or p.gl_code like upper('%" + searchString3 + "%') or p.gl_name like upper('%" + searchString3 + "%'))";
                        } else if (searchString1.equalsIgnoreCase("S")) {
                            headerQry = "select d.key_1,d.customer_no,d.avail_bal, kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name C_name from dep_account d, dep_product dp,kyc_hdr kh where d.dep_prod_id = dp.id and d.customer_no=kh.cif_no and d.pacs_id = '" + pacsId + "' and d.curr_status='O' and substr(dp.prod_code,1,1) ='1' and substr(d.GL_CLASS_CODE,9,2) in ('14','11') and (d.key_1 like '%" + searchString3 + "%' or d.link_accno like '%" + searchString3 + "%' or upper(kh.first_name) like upper('" + searchString3 + "%'))";
                        } else if (searchString1.equalsIgnoreCase("R")) {
                            headerQry = "select d.key_1,d.customer_no,d.avail_bal, d.no_inst_paid, d.install_amt, kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name C_name from dep_account d, dep_product dp,kyc_hdr kh where d.dep_prod_id = dp.id and d.customer_no=kh.cif_no and d.pacs_id = '" + pacsId + "' and d.curr_status='O' and dp.prod_code ='3001' and substr(d.GL_CLASS_CODE,9,2) ='14' and (d.key_1 like '%" + searchString3 + "%' or upper(kh.first_name) like upper('" + searchString3 + "%'))";
                        }else if (searchString1.equalsIgnoreCase("L")) {
                            headerQry = "select l.key_1,l.customer_no,l.disb_amt,l.outst_bal,l.prin_outst,l.intt_outst,l.penal_intt_outst,l.npa_intt_outst,kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name C_name from loan_account l, loan_product lp, kyc_hdr kh where l.loan_prod_id = lp.id and substr(l.GL_CLASS_CODE,9,2) ='23' and l.customer_no = kh.cif_no and lp.int_method<>'C' and l.pacs_id = '" + pacsId + "' and l.curr_status in ('01','02','03') and (l.key_1 like '%" + searchString3 + "%' or upper(kh.first_name) like upper('" + searchString3 + "%'))";
                        }


                    } else if ((screenName.equalsIgnoreCase("DepositKYCCreation.jsp")) && (lovKey.equalsIgnoreCase("IDTypeScoreSearch"))) {

                        headerQry = "select ID,DOCUMENT_DTL,SCORE from Kyc_Document_Mst ";

                    } else if (screenName.equalsIgnoreCase("DepositKYCInquiry.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) {

                       // searchString1 = request.getParameter("cifNumber");
                       // searchString2 = request.getParameter("cifName");
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }

                        if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) {
                            headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,' '),t.guardian_name from kyc_hdr t where t.cif_no='1' and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "')";
                        } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) {
                            headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,' '),t.guardian_name from kyc_hdr t where first_name like ('" + searchString2.replace(' ', '%') + "%') and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "')";
                        } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) {
                            headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,''),t.guardian_name from kyc_hdr t  where cif_no like '%" + searchString1.replace(' ', '%') + "%' and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "')";
                        } else {
                            headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,' '),t.guardian_name from kyc_hdr t  where (cif_no like '%" + searchString1.replace(' ', '%') + "%' or first_name like ('" + searchString2.replace(' ', '%') + "%')) and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "')";
                        }

                    } else if ((screenName.equalsIgnoreCase("DepositKYCInquiry.jsp")) && (lovKey.equalsIgnoreCase("IDTypeScoreSearch"))) {

                        headerQry = "select ID,DOCUMENT_DTL,SCORE from Kyc_Document_Mst ";

                    } else if ((screenName.equalsIgnoreCase("DepositMiscellaneousOperation.jsp")) && (lovKey.equalsIgnoreCase("DepositAccLOB"))) {

                       // searchString1 = request.getParameter("depositAccSearch");

                        headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,k.photo_path,k.sig_photo"
                                + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and t.curr_status <>'C' and substr(t.GL_CLASS_CODE,9,2) in ('14','11','23')and p.prod_code in ('1101','1017','3001','2002','2001')and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper ('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "'   ";


                    } else if (screenName.equalsIgnoreCase("DepositKYCDocumentUpload.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) {

                       // searchString1 = request.getParameter("cifNumber");
                       // searchString2 = request.getParameter("cifName");

                        if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) {
                            headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,' ') from kyc_hdr t where t.cif_no='1' and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "')";
                        } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) {
                            headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,' ') from kyc_hdr t where (trim(first_name)) like '" + searchString2.replace(' ', '%') + "%' and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "') ";
                        } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) {
                            headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,address_1,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,'') from kyc_hdr t  where cif_no like '%" + searchString1.replace(' ', '%') + "%' and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "') ";
                        } else {
                            headerQry = "select cif_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,' ') from kyc_hdr t  where (cif_no like '%" + searchString1.replace(' ', '%') + "%' or (trim(first_name)) like '" + searchString2.replace(' ', '%') + "%') and t.pacs_id in (select pacs_id from pacs_master where head_pacs_id='" + pacsId + "') ";
                        }

                    } else if (screenName.equalsIgnoreCase("DepositRateSlab.jsp")) {

                        headerQry = " select p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,p.id from dep_product p where  substr(p.prod_code,1,1) in ('2','3') and p.pacs_id like '%"+ pacsId +"%'";

                    } else if ((screenName.equalsIgnoreCase("TDOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {

                       // searchString1 = request.getParameter("accNo");
                        tranType = request.getParameter("tranType");

                        if (tranType.equalsIgnoreCase("P")) {
                            headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,round(operations.calcPreClosTranAmt(t.key_1),2),t.intt_cap_amt as INTEREST,decode(t.CURR_STATUS,'I','Initiated','M','Matured','C','Closed','O','Open/Active'), nvl(t.nominee_cif,'')";
                            headerQry = headerQry + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) ='2' and substr(t.GL_CLASS_CODE,9,2)='14' and t.curr_status = 'O' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name ) like upper('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "'   ";
                        } else if (tranType.equalsIgnoreCase("D")) {
                            headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,t.term_value as PRINCIPAL,round(t.intt_cap_amt,2) as INTEREST,decode(t.CURR_STATUS,'I','Initiated','M','Matured','C','Closed','O','Open/Active'), nvl(t.nominee_cif,'')";
                            headerQry = headerQry + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) ='2' and substr(t.GL_CLASS_CODE,9,2)='14' and t.curr_status ='I' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name ) like upper('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "'   ";
                        } else if (tranType.equalsIgnoreCase("W")) {
                            headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,round(t.avail_bal) as PRINCIPAL,round(t.intt_cap_amt,2) as INTEREST,decode(t.CURR_STATUS,'I','Initiated','M','Matured','C','Closed','O','Open/Active'), nvl(t.nominee_cif,'')";
                            headerQry = headerQry + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) ='2' and substr(t.GL_CLASS_CODE,9,2)='14' and t.curr_status ='M' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name ) like upper('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "'   ";
                        } else if (tranType.equalsIgnoreCase("R")) {
                            headerQry = "select da.td_intt_rate,da.key_1,da.avail_bal,da.mat_dt,(k.first_name || ' ' || k.middle_name || ' ' || k.last_name) CustName,k.guardian_name,(calcMatAmt_TD(d.int_method,(case d.int_method when 'S' then d.intt_payout_freq else d.int_cap_freq end),da.td_intt_rate,da.avail_bal,0,(select system_date from system_date) - da.mat_dt) - da.avail_bal) IntOust,da.customer_no, nvl(da.nominee_cif,'') from dep_account da, dep_product d, kyc_hdr k where da.dep_prod_id = d.id and da.customer_no = k.cif_no and da.curr_status = 'M' and substr(d.prod_code,1,1) = '2' and substr(da.GL_CLASS_CODE,9,2)='14' and to_number((select system_date from system_date) - da.mat_dt) <=14";
                            headerQry = headerQry + " and (da.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name ) like upper('" + searchString1.replace(' ', '%') + "%')) and da.pacs_id= '" + pacsId + "'   ";
                        } else if (tranType.equalsIgnoreCase("TDCert")) {
                            headerQry = "select da.key_1 as account_no,dp.prod_desc,(CASE WHEN da.cif_no2 = '' or da.cif_no2 is null THEN kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name ELSE (select kh.first_name || ' ' || kh.middle_name || ' ' || kh.last_name || ' && ' || khh.first_name || ' ' || khh.middle_name || ' ' || khh.last_name from kyc_hdr khh where khh.cif_no = da.cif_no2) END) as cust_name,kh.cif_no, case when da.cif_no2 is null then 'Single' else 'Joint' end as mode_acc, nvl(da.nominee_cif,'') from dep_account da, kyc_hdr kh, pacs_master pm, dep_product dp where da.customer_no = kh.cif_no and da.pacs_id = pm.pacs_id and da.dep_prod_id = dp.id and substr(dp.prod_code,1,1) = '2' and substr(da.GL_CLASS_CODE,9,2)='14' ";
                            headerQry = headerQry + " and (da.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(kh.first_name) like upper('" + searchString1.replace(' ', '%') + "%')) and da.pacs_id= '" + pacsId + "'   ";
                        }

                    } else if ((screenName.equalsIgnoreCase("AssignToCashDrawer.jsp")) && (lovKey.equalsIgnoreCase("PopupTellers"))) {

                      //  searchString1 = request.getParameter("teller_id");
                        headerQry = "select login_id,login_name from login_details where user_role_id in ( '201603000004022','201603000006020', '201603000007020' ) and pacs_id ='" + pacsId + "' and login_id like '%" + searchString1.replace(' ', '%') + "%' ";

                    } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearch"))) {
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }
                       // searchString1 = request.getParameter("cifNumber");
                        headerQry = "select key_1,p.prod_desc,(h.first_name||nvl2(h.middle_name,' '||h.middle_name,'')||nvl2(h.last_name,' '||h.last_name,'')) name from dep_account t,dep_product p,kyc_hdr h "
                                + "  where  t.dep_prod_id = p.id and t.customer_no = h.cif_no and p.prod_code in ('1101','1102') and substr(p.int_cat,1,1)='1' and substr(t.GL_CLASS_CODE,9,2)='14' and  t.curr_status ='O' and (t.customer_no like '%" + searchString1.replace(' ', '%') + "%' or t.cif_no2 like '%" + searchString1.replace(' ', '%') + "%' ) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') ";

                    } else if ((screenName.equalsIgnoreCase("CashDrawerEnquiry.jsp")) && (lovKey.equalsIgnoreCase("PopupTellers"))) {

                        //searchString1 = request.getParameter("tellerid");
                        headerQry = "select login_id,login_name from login_details where user_role_id = '201603000004022' and pacs_id ='" + pacsId + "' and login_id like '%" + searchString1.replace(' ', '%') + "%' ";

                    } else if ((screenName.equalsIgnoreCase("TDOperation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) {
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }
                       // searchString1 = request.getParameter("accNo");
                        headerQry = "select d.customer_no,d.key_1,(h.first_name||nvl2(h.middle_name,' '||h.middle_name,'')||nvl2(h.last_name,' '||h.last_name,'')) Customer_Name,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,d.avail_bal from dep_account d,dep_product p,kyc_hdr h where d.dep_prod_id =p.id and d.curr_status <>'C' and d.customer_no = h.cif_no and p.prod_code in ('1051','1101','1102')  and substr(p.int_cat,1,1)='1' and substr(d.GL_CLASS_CODE,9,2)='14' and d.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') and (d.customer_no in (select a.customer_no from dep_account a where a.key_1 = '" + searchString1 + "' union select da.cif_no2 from dep_account da where da.key_1 = '" + searchString1 + "' ) or d.cif_no2 in (select a.customer_no from dep_account a where a.key_1 = '" + searchString1 + "' union select da.cif_no2 from dep_account da where da.key_1 = '" + searchString1 + "' ) )";

                    } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {

                        //searchString1 = request.getParameter("accNo");
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }

                        headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,t.avail_bal"
                                + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '1' and substr(t.GL_CLASS_CODE,9,2) in ('14','11') and t.curr_status <>'C' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "')   ";


                    } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("glAccount"))) {

                       // searchString1 = request.getParameter("gl_accNo");

                        headerQry = "select ga.key_1, ga.ledger_name,gp.gl_code,gp.id,gp.gl_name from gl_account ga, gl_product gp where ga.gl_prod_id<>'201611000001184' and ga.gl_prod_id=gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') ";

                    } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount1"))) {

                       // searchString1 = request.getParameter("accNo_dd_from");
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }

                        headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,t.avail_bal"
                                + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '1' and substr(t.GL_CLASS_CODE,9,2) in ('14','11') and t.curr_status <>'C' and (t.key_1 like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "')     ";


                    } else if ((screenName.equalsIgnoreCase("LoanAccountCreation1.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {

                       // searchString1 = request.getParameter("depositAccount");

                        headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,t.avail_bal from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and (p.prod_code in ('1051','1101')) and substr(t.GL_CLASS_CODE,9,2)='14' and t.curr_status <>'C' and t.key_1 like '%" + searchString1.replace(' ', '%') + "%' and t.pacs_id= '" + pacsId + "'   ";


                    } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount2"))) {

                       // searchString1 = request.getParameter("accNo_dd_to");

                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }

                        headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,t.avail_bal"
                                + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '1' and substr(t.GL_CLASS_CODE,9,2)='14' and t.curr_status <>'C' and (t.key_1 like '%" + searchString1 + "%' or t.link_accno like '%" + searchString1 + "%' or upper(k.first_name) like upper('" + searchString1 + "%')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') ";

                    } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("glAccount1"))) {

                       // searchString1 = request.getParameter("accNo_gg_from");
                        headerQry = "select ga.key_1, ga.ledger_name,gp.gl_code,gp.id,gp.gl_name from gl_account ga, gl_product gp where ga.gl_prod_id<>'201611000001184' and ga.gl_prod_id=gp.id and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') ";


                    } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("glAccount2"))) {

                      //  searchString1 = request.getParameter("accNo_gg_to");

                        headerQry = "select ga.key_1, ga.ledger_name,gp.gl_code,gp.id,gp.gl_name from gl_account ga, gl_product gp where ga.gl_prod_id=gp.id and gp.id <>'201611000001184' and ga.pacs_id= '" + pacsId + "' and (gp.gl_code like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') ";

                    } else if ((screenName.equalsIgnoreCase("DepositTransferClosure.jsp")) && (lovKey.equalsIgnoreCase("depositAccount2"))) {

                       // searchString1 = request.getParameter("accNo_dd_to");
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }

                        headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,avail_bal"
                                + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '1' and substr(p.int_cat,1,1) = '1' and t.curr_status <>'C' and substr(t.GL_CLASS_CODE,9,2) in ('14','11') and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or t.link_accno like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name ) like upper ('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "')   ";

                    } else if ((screenName.equalsIgnoreCase("DepositTransferClosure.jsp")) && (lovKey.equalsIgnoreCase("depositAccount1"))) {

                       // searchString1 = request.getParameter("accNo_dd_from");

                        headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,round(t.avail_bal),round(t.intt_outst)"
                                + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '1' and t.curr_status <>'C' and substr(t.GL_CLASS_CODE,9,2) in ('14','11') and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or t.link_accno like '%" + searchString1.replace(' ', '%') + "%'    or upper(k.first_name) like upper ('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "'   ";

                    } else if ((screenName.equalsIgnoreCase("DepositTransferClosure.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {

                      //  searchString1 = request.getParameter("accNo");

                        headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,round(t.avail_bal),round(t.intt_outst)"
                                + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '1' and t.curr_status <> 'C' and substr(t.GL_CLASS_CODE,9,2) in ('14','11') and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper ('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "'   ";


                    } else if ((screenName.equalsIgnoreCase("RDOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {

                       // searchString1 = request.getParameter("accNo");
                        tranType = request.getParameter("tranType");

                        if (subPacsFlag.equalsIgnoreCase("Y") && tranType.equalsIgnoreCase("D")) {
                            pacsId = headPacsId;
                        }

                        if (tranType.equalsIgnoreCase("W")) {
                            headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,nvl(t.install_amt,0)install_amt,operations.getRDMatAmt(t.avail_bal,nvl(t.intt_cap_amt,0)+nvl(t.Intt_Outst,0), (case substr(p.int_cat, 1, 1) "
                                       + " when '2' then 0 else nvl(t.pen_count, 0) end)),(p.pre_closure_charge*t.term_value)/100"
                                    + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '3' and substr(t.GL_CLASS_CODE,9,2) ='14' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name ) like upper('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id = '" + pacsId + "' and t.curr_status = 'M'";
                        } else if (tranType.equalsIgnoreCase("P")) {
                            headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,nvl(t.install_amt,0)install_amt, (case substr(p.int_cat, 1, 1) "
                                        +" when '2' then round(t.avail_bal + nvl(t.intt_outst, 0) + nvl(t.intt_cap_amt, 0)) else "
                                        +" operations.getRDMatAmt_jh(t.avail_bal, nvl(t.intt_cap_amt, 0) + nvl(t.Intt_Outst, 0), "
                                        +" nvl(t.pen_count, 0), nvl(t.install_amt,0)) end),(p.pre_closure_charge*t.term_value)/100 "
                                        + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '3' and substr(t.GL_CLASS_CODE,9,2) ='14'  and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id = '" + pacsId + "' and t.curr_status = 'O'";
                        } else {
                            headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,nvl(t.install_amt,0)install_amt,operations.getRDMatAmt(t.avail_bal,t.intt_cap_amt+t.Intt_Outst,t.pen_count),(p.pre_closure_charge*t.term_value)/100, t.no_inst_paid, t.theo_inst_no, NVL(to_char(t.nxt_due_date, 'DD-MON-YY'), 'NA') nxt_due_date "
                                    + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and substr(p.prod_code,1,1) = '3' and substr(t.GL_CLASS_CODE,9,2) ='14'  and t.CURR_STATUS = 'O' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "')   ";
                        }


                    } else if ((screenName.equalsIgnoreCase("RDOperation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) {
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }
                       // searchString1 = request.getParameter("accNo");
                        headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,t.avail_bal"
                                + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and p.prod_code in ('1051','1101','1102') and substr(t.GL_CLASS_CODE,9,2) ='14' and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') and  (t.customer_no in (select customer_no from dep_account where key_1 = '" + searchString1 + "' and t.curr_status <>'C' union select da.cif_no2 from dep_account da where da.key_1 = '" + searchString1 + "') or t.cif_no2 in (select customer_no from dep_account where key_1 = '" + searchString1 + "' and t.curr_status <>'C' union select da.cif_no2 from dep_account da where da.key_1 = '" + searchString1 + "')) ";

                    } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CalcMaturity"))) {

                       // searchString1 = request.getParameter("instAmt");
                       // searchString2 = request.getParameter("termMonth");
                        //searchString3 = request.getParameter("inttCatDetails").substring(0, 4);
                        String prodCode=request.getParameter("prodCodeDetails").substring(0, 4);
                        String intCat=request.getParameter("inttCatDetails").substring(0, 1);

                        System.out.println(prodCode + " " + intCat);
                        if((prodCode.equalsIgnoreCase("3001")) && (intCat.equalsIgnoreCase("2")))
                            {
                                headerQry = "select t.rate,getDDSMatAmt(t.rate," + searchString1 + "," + searchString2 + "),d.prod_code from td_rate_slab t, dep_product d where t.product_id=d.id and t.pacs_id='"+pacsId+"' and substr(d.prod_code,1,1) = '3'  and d.int_cat ='" + searchString3 + "' and " + searchString2 + " between t.term_from and t.term_to and " + searchString1 + " between t.from_amt and t.to_amt "
                                + " and (select system_date from system_date) between t.eff_from_date and t.eff_to_date";

                            }

                        else
                            {
                                headerQry = "select t.rate,getRDMatAmt('Q',t.rate," + searchString1 + "," + searchString2 + "),d.prod_code from td_rate_slab t, dep_product d where t.product_id=d.id and t.pacs_id='"+pacsId+"' and substr(d.prod_code,1,1) = '3' and d.int_cat ='" + searchString3 + "' and " + searchString2 + " between t.term_from and t.term_to and " + searchString1 + " between t.from_amt and t.to_amt "
                                + " and (select system_date from system_date) between t.eff_from_date and t.eff_to_date";
                            }

                    } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CalcFDMaturity"))) {

                       // searchString1 = request.getParameter("termValue");
                        //searchString2 = request.getParameter("productCodeDetails").substring(0, 4);
                       // searchString3 = request.getParameter("inttCatDetails").substring(0, 4);
                        //int termYears = Integer.parseInt(request.getParameter("termYears"));
                        //int termMonth = Integer.parseInt(request.getParameter("termMonth"));
                        //int termDays = Integer.parseInt(request.getParameter("termDays"));

                        termMonth = termMonth + (termYears * 12);
                        /*if(searchString2.equalsIgnoreCase("2002")){
                        termDays = termDays - 1;
                        }*/
                        if(searchString2.equalsIgnoreCase("2001")){
                            headerQry = "select t.rate,calcMISAmt_TD((case d.int_method when 'S' then d.intt_payout_freq else d.int_cap_freq end),t.rate," + searchString1 + "),d.prod_code,d.int_cat,d.prod_desc from td_rate_slab t, dep_product d where t.product_id=d.id and t.pacs_id='"+pacsId+"' and d.prod_code ='" + searchString2 + "' and d.int_cat ='" + searchString3 + "' and to_number((add_months((select system_date from system_date)," + termMonth + ") + " + termDays + ") - (select system_date from system_date)) between t.term_from and t.term_to and " + searchString1 + " between t.from_amt and t.to_amt and (select system_date from system_date) between t.eff_from_date and t.eff_to_date";
                        }else{
                             headerQry = "select t.rate,calcMatAmt_TD(d.int_method,(case d.int_method when 'S' then d.intt_payout_freq else d.int_cap_freq end),t.rate," + searchString1 + "," + termMonth + "," + termDays + "),d.prod_code,d.int_cat,d.prod_desc from td_rate_slab t, dep_product d where t.product_id=d.id and t.pacs_id='"+pacsId+"' and d.prod_code ='" + searchString2 + "' and d.int_cat ='" + searchString3 + "' and to_number((add_months((select system_date from system_date)," + termMonth + ") + " + termDays + ") - (select system_date from system_date)) between t.term_from and t.term_to and " + searchString1 + " between t.from_amt and t.to_amt and (select system_date from system_date) between t.eff_from_date and t.eff_to_date";
                        }

                    } else if ((screenName.equalsIgnoreCase("dividendpayout.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) {

                       // searchString1 = request.getParameter("shareAcc");
                        headerQry = "select t.key_1, (k.first_name || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')) as name, t.customer_no, t.membership_no, d.prod_code, d.prod_desc, m.share_value, t.avail_bal, m.dividend_percentage divident_percentage, ((t.avail_bal * m.dividend_percentage) / 100) Divident_amt from dep_account t, dep_product d, kyc_hdr k, share_value_mst m where t.dep_prod_id = d.id and d.prod_code='1017' and substr(t.GL_CLASS_CODE,9,2)='11' and t.customer_no = k.cif_no and d.id = m.product_id and d.prod_code = m.prod_code and t.avail_bal <> 0 and t.pacs_id = '" + pacsId + "' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper('" + searchString1.replace(' ', '%') + "%')) ";

                    } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("FDRateSlab"))) {

                        //searchString1 = request.getParameter("productCodeDetails").substring(0, 4);

                        headerQry = "select t.rate,t.term_from,t.term_to,t.from_amt,t.to_amt,d.prod_code,d.int_cat,d.prod_desc from td_rate_slab t, dep_product d where t.product_id=d.id and substr(d.prod_code,1,1) ='2' order by d.prod_code,t.rate ";

                    } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("RDRateSlab"))) {

                        headerQry = "select t.rate,t.term_from,t.term_to,t.from_amt,t.to_amt,d.prod_code,d.int_cat,d.prod_desc from td_rate_slab t, dep_product d where t.product_id=d.id and substr(d.prod_code,1,1) ='3' and (select system_date from system_date) between t.eff_from_date and t.eff_to_date order by t.term_from";

                    } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("ParameterPdAmend"))) {

                       // searchString1 = request.getParameter("productcodeSearch");
                       // searchString2 = request.getParameter("intcatSearch");

                        if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) {
                            headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from dep_product dp where to_number(substr(dp.prod_code,1,1)) < 5";
                        } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) {
                            headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from dep_product dp where to_number(substr(dp.prod_code,1,1)) < 5 and dp.int_cat like '%" + searchString2.replace(' ', '%') + "%'";
                        } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) {
                            headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from dep_product dp where to_number(substr(dp.prod_code,1,1)) < 5 and dp.prod_code like '%" + searchString1.replace(' ', '%') + "%'";
                        } else {
                            headerQry = "select dp.prod_code,dp.prod_desc,dp.int_cat,dp.intt_cat_desc from dep_product dp where to_number(substr(dp.prod_code,1,1)) < 5 and dp.prod_code like '%" + searchString1.replace(' ', '%') + "%' and dp.int_cat like '%" + searchString2.replace(' ', '%') + "%'";
                        }


                    } else if ((screenName.equalsIgnoreCase("shareOperations.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) {

                        headerQry = "select t.key_1, (k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')) as name,t.customer_no,t.membership_no,d.prod_code,d.prod_desc,m.share_value from dep_account t, dep_product d,kyc_hdr k,share_value_mst m where t.dep_prod_id = d.id and k.cif_no=t.customer_no and d.prod_desc=m.prod_desc and d.prod_code='1017' and substr(t.GL_CLASS_CODE,9,2)='11' and t.pacs_id='" + pacsId + "' ";

                    } else if ((screenName.equalsIgnoreCase("shareOperations.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {

                       // searchString1 = request.getParameter("shareNo");

                        headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,t.avail_bal"
                                + " from dep_account t,kyc_hdr k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and (p.prod_code in ('1051','1101')) and t.curr_status not in ('C','S') and substr(t.GL_CLASS_CODE,9,2)='14' and t.customer_no in (select a.customer_no from dep_account a  where a.key_1 = '" + searchString1.replace(' ', '%') + "') and t.pacs_id= '" + pacsId + "'   ";


                    } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("productCodeShare"))) {

                        searchString1 = request.getParameter("productCodeDetails");

                        headerQry = "select prod_code,prod_desc,int_cat,intt_cat_desc from dep_product where prod_code ='1017' ";

                    } else if (screenName.equalsIgnoreCase("DepositTransferOperation.jsp") && (lovKey.equalsIgnoreCase("glAccountCashInHand"))) {

                       // searchString1 = request.getParameter("acc_gl_to_cash");

                        headerQry = "select ga.key_1, ga.ledger_name,ga.gl_prod_id,gp.id,gp.gl_name from gl_account ga, gl_product gp where ga.gl_prod_id=gp.id and ga.gl_prod_id = '201611000001184' and ga.pacs_id= '" + pacsId + "' and (gp.id like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_name like upper('%" + searchString1.replace(' ', '%') + "%') or ga.key_1 like '%" + searchString1.replace(' ', '%') + "%') ";
                    } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKey"))) {

                        //searchString1 = request.getParameter("acc_gl_to_cash");

                        headerQry = "select gl_code,gl_name,id from gl_product";
                    } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKey"))) {

                        //searchString1 = request.getParameter("acc_gl_to_cash");

                        headerQry = "select gl_code,gl_name,id from gl_product";
                    } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKeyAmend"))) {

                        //searchString1 = request.getParameter("acc_gl_to_cash");

                        headerQry = "select gl_code,gl_name,id from gl_product";
                    } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKeyAmend"))) {

                        //searchString1 = request.getParameter("acc_gl_to_cash");

                        headerQry = "select gl_code,gl_name,id from gl_product";
                    }  else if ((screenName.equalsIgnoreCase("transactionOperation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) {
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }
                        //searchString1 = request.getParameter("accNo");
                        headerQry = "select t.key_1,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),t.customer_no,p.prod_code,p.prod_desc,p.int_cat,t.avail_bal"
                                + " from dep_account t,kyc_details k,dep_product p where k.cif_no=t.customer_no and t.dep_prod_id = p.id and p.prod_code in ('1102','1101') and substr(t.GL_CLASS_CODE,9,2)='14' and (t.customer_no in (select a.customer_no from dep_account a where a.key_1 = '" + searchString1 + "' union select b.cif_no2 from dep_account b where b.key_1 = '" + searchString1 + "' ) or t.cif_no2 in (select a.customer_no from dep_account a where a.key_1 = '" + searchString1 + "' union select b.cif_no2 from dep_account b where b.key_1 = '" + searchString1 + "' ) )  and t.curr_status not in ('C')  and t.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') ";

                    } else if ((screenName.equalsIgnoreCase("shareaccounttransaction.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) {
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }
                       // searchString1 = request.getParameter("accNo");
                        headerQry = "select d.customer_no,d.key_1,(h.first_name||nvl2(h.middle_name,' '||h.middle_name,'')||nvl2(h.last_name,' '||h.last_name,'')) Customer_Name,p.prod_code,p.prod_desc,p.int_cat,p.intt_cat_desc,d.avail_bal from dep_account d,dep_product p,kyc_hdr h where d.dep_prod_id =p.id and d.curr_status <>'C'  and substr(d.GL_CLASS_CODE,9,2)='14' and d.customer_no = h.cif_no and p.prod_code in ('1051','1101') and d.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = '" + pacsId + "') and (d.customer_no in (select a.customer_no from dep_account a where a.key_1 = '" + searchString1 + "' union select da.cif_no2 from dep_account da where da.key_1 = '" + searchString1 + "' ) or d.cif_no2 in (select a.customer_no from dep_account a where a.key_1 = '" + searchString1 + "' union select da.cif_no2 from dep_account da where da.key_1 = '" + searchString1 + "' ) )";

                    } else if ((screenName.equalsIgnoreCase("DepositTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("depositShgMember"))) {

                        //searchString1 = request.getParameter("accNo");
                        if (subPacsFlag.equalsIgnoreCase("Y")) {
                            pacsId = headPacsId;
                        }

                        headerQry = "select m.member_id,m.member_name from member_information m,basic_info b,kyc_hdr k where b.shg_code=m.shg_code and k.cif_no=b.cif and k.cif_no like '%" + searchString1 + "%' and k.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id in (select head_pacs_id from pacs_master where pacs_id='" + pacsId + "'))   ";

                    } else if ((screenName.equalsIgnoreCase("DepositMiscellaneousOperation.jsp")) && (lovKey.equalsIgnoreCase("SecondCifLOB")|| lovKey.equalsIgnoreCase("nomineeLov"))) {

                       // searchString1 = request.getParameter("depositAccSearch");

                        headerQry = "select k.cif_no,(k.first_name || nvl2(k.middle_name, ' ' || k.middle_name, '') || nvl2(k.last_name, ' ' || k.last_name, '')),k.guardian_name from kyc_hdr k"
                                + " where (k.cif_no like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper ('" + searchString1.replace(' ', '%') + "%')) and k.pacs_id in (select pacs_id from pacs_master where head_pacs_id in(select pm.head_pacs_id from pacs_master pm where pm.pacs_id='" + pacsId + "') )";

                    } else if ((screenName.equalsIgnoreCase("mocOperations.jsp")) && (lovKey.equalsIgnoreCase("AccountSearch"))) {

                        searchString1 = request.getParameter("textIndex");
                       // searchString2 = request.getParameter("accNo");

                            headerQry = "select g.key_1,p.gl_code,g.ledger_name,g.cum_curr_val from gl_account g, gl_product p where g.pacs_id='" + pacsId + "' and g.status='A' and p.gl_code<>'28101' and g.gl_prod_id=p.id and (g.key_1 like '%" + searchString2 + "%' or p.gl_code like upper('%" + searchString2 + "%') or p.gl_name like upper('%" + searchString2 + "%'))";

                    } else if ((screenName.equalsIgnoreCase("mocOperations.jsp")) && (lovKey.equalsIgnoreCase("SecondAccountSearch"))) {

                        searchString1 = request.getParameter("textIndex");
                       // searchString2 = request.getParameter("accNo");

                            headerQry = "select g.key_1,p.gl_code,g.ledger_name,g.cum_curr_val from gl_account g, gl_product p where g.pacs_id='" + pacsId + "' and g.status='A' and p.gl_code<>'28101' and g.gl_prod_id=p.id and (g.key_1 like '%" + searchString2 + "%' or p.gl_code like upper('%" + searchString2 + "%') or p.gl_name like upper('%" + searchString2 + "%'))";

                    } else if ((screenName.equalsIgnoreCase("CashWidrawlDeposit.jsp")) && (lovKey.equalsIgnoreCase("ddsCash"))) {

                        searchString1 = pacsId;
                        searchString3= user;
                       // searchString2=request.getParameter("accountNo");
                        String trnType = request.getParameter("trnType");
                        String searchFlag = request.getParameter("sflag");
                        if(searchFlag.equalsIgnoreCase("true")){
                            if(trnType.equalsIgnoreCase("CR")){
                        headerQry = "select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ')"
			 +" from kyc_hdr r where r.cif_no = d.customer_no), d.avail_bal, 'DEPOSIT' accType  from dep_account d, "
			 +" dds_agent_acct a where d.pacs_id = '" + searchString1 + "'  and d.key_1=a.dds_acct and d.customer_no in "
			 +" (select r.cif_no from kyc_hdr r where upper(r.first_name) like upper(  '" + searchString2 + "%' ) and r.pacs_id in (select pacs_id from pacs_master where head_pacs_id= (select head_pacs_id from pacs_master where pacs_id='" + searchString1 + "')))"
			 +" and substr(d.GL_CLASS_CODE,9,2)='14' and d.dep_prod_id in (select id from dep_product dp where dp.prod_code in ('3001', '1101') and substr(dp.int_cat,1,1) ='2') "
			 +" and a.agent_id='" + searchString3 + "'  union all "
			 +" select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ')  from kyc_hdr r "
			 +" where r.cif_no = d.customer_no),  d.outst_bal, 'LOAN' accType  from loan_account d,dds_agent_acct a "
			 +" where a.dds_acct=d.key_1 and d.pacs_id= '" + searchString1 + "' and  d.customer_no in (select r.cif_no from kyc_hdr r where "
			 +" upper(r.first_name) like upper( '" + searchString2 + "%' ) and r.pacs_id in (select pacs_id from pacs_master where head_pacs_id= (select head_pacs_id from pacs_master where pacs_id='" + searchString1 + "')) ) and substr(d.GL_CLASS_CODE,9,2)='23' and d.loan_prod_id in (select id from loan_product dp "
			 +" where dp.prod_code in ('8000','7002') and dp.int_method='S' )  and a.agent_id='" + searchString3 + "' "  ;

                        }else if (trnType.equalsIgnoreCase("DR")){
                        headerQry =  "select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ')"
			 +" from kyc_hdr r where r.cif_no = d.customer_no), d.avail_bal, 'DEPOSIT' accType  from dep_account d, "
			 +" dds_agent_acct a where d.pacs_id = '" + searchString1 + "'  and d.key_1=a.dds_acct and d.customer_no in "
			 +" (select r.cif_no from kyc_hdr r where  upper(r.first_name) like upper( '" + searchString2 + "%' ) and r.pacs_id in (select pacs_id from pacs_master where head_pacs_id= (select head_pacs_id from pacs_master where pacs_id='" + searchString1 + "')) )"
			 +" and substr(d.GL_CLASS_CODE,9,2)='14' and d.dep_prod_id in (select id from dep_product dp where dp.prod_code in ('3001', '1101') and substr(dp.int_cat,1,1) ='2') "
			 +" and a.agent_id='" + searchString3 + "' ";
                            }
                            }
                        else
                            {
                        if(trnType.equalsIgnoreCase("CR")){
                        headerQry =   "select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ') from kyc_hdr r"
                                                + " where r.cif_no = d.customer_no),d.avail_bal ,'DEPOSIT' accType from dep_account d, DDS_AGENT_ACCT a where d.key_1 = a.dds_acct "
                                                + " and substr(d.GL_CLASS_CODE,9,2)='14'and d.dep_prod_id in (select p.id from dep_product p where p.prod_code in ('3001', '1101')  and substr(p.int_cat, 1, 1) = '2')"
                                                + " and d.pacs_id = '" + searchString1 + "' and d.customer_no in (select r.cif_no from kyc_hdr r where r.pacs_id = '" + searchString1 + "') and d.key_1 like '%" + searchString2 + "%'"
                                                + " and a.agent_id = '" + searchString3 + "'"
                                                + " union all select l.key_1, (select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ')"
                                                + " from kyc_hdr r where r.cif_no = l.customer_no), l.outst_bal,'LOAN' accType from loan_account l, DDS_AGENT_ACCT a "
                                                + " where    l.pacs_id = '" + searchString1 + "' and l.customer_no in (select r.cif_no from kyc_hdr r where r.pacs_id = '" + searchString1 + "') and l.key_1 like '%" + searchString2 + "%'"
                                                + " and a.agent_id = '" + searchString3 + "'"
                                                + " and l.key_1 = a.dds_acct and substr(l.GL_CLASS_CODE,9,2)='23' and l.loan_prod_id in  (select p.id from loan_product p where p.prod_code in ('8000','7002') and p.int_method='S')"    
                                                + " and l.pacs_id ='" + searchString1 + "'  and a.agent_id = '" + searchString3 + "' order by 1 ";
                        }else if (trnType.equalsIgnoreCase("DR")){
                        headerQry =  "select d.key_1,(select r.first_name || nvl(r.middle_name, ' ') || nvl(r.last_name, ' ') from kyc_hdr r"
                                                        + " where r.cif_no = d.customer_no),d.avail_bal ,'DEPOSIT' accType from dep_account d, DDS_AGENT_ACCT a where d.key_1 = a.dds_acct "
                                                        + " and substr(d.GL_CLASS_CODE,9,2)='14' and d.dep_prod_id in (select p.id from dep_product p where p.prod_code in ('3001', '1101')  and substr(p.int_cat, 1, 1) = '2')"
                                                        + " and d.pacs_id = '" + searchString1 + "' and d.customer_no in (select r.cif_no from kyc_hdr r where r.pacs_id = '" + searchString1 + "') and d.key_1 like '%" + searchString2 + "%'"
                                                        + " and a.agent_id = '" + searchString3 + "'order by 1 ";

                          }
                         }
                        }
                       else if ((screenName.equalsIgnoreCase("AgentMapping.jsp")) && (lovKey.equalsIgnoreCase("agntMap"))) {


                        searchString1 = pacsId;
                        searchString2= user;
                       // searchString3=request.getParameter("agentName");

                        headerQry =  "  select d.login_id,d.login_name "
                                    +"  from login_details d where d.user_role_id ='201603000004020' and d.pacs_id='"+searchString1+"'"
                                    +"  and to_char(d.login_id) like '%"+searchString3+"%'";
                        }
                        
         
                    Connection conn = DbHandler.getDBConnection();
                    
                    PreparedStatement pstmt = null;

                    ResultSet resultSet = null;
                    String bgColor = null;
                    int flag = 1;
                    


                    try {
                        pstmt = conn.prepareStatement(headerQry);
                        System.out.println(headerQry);
                        resultSet = pstmt.executeQuery();
                        System.out.println(headerQry);

                       

        %>
    </head>
    <body style="background-image: url('/PacsApplication/img/download.jpg');">
        <form name="commonSearch" action="">

            <% if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Customer found! Close this window & Please recheck the Customer Name selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>CIF Number</b></th><th style="background-color: #99FF99;"><b>Name</b></th><th style="background-color: #99FF99;"><b>Customer Type</b></th><th style="background-color: #99FF99;"><b>Address1</b></th><th style="background-color: #99FF99;"><b>Address2</b></th><th style="background-color: #99FF99;"><b>Address3</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.accCreatForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.accCreatForm.name1.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('name1').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.accCreatForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.name1.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('name1').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>

                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.accCreatForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.name1.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('name1').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.accCreatForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.name1.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('name1').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.accCreatForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.name1.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('name1').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.accCreatForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.name1.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('name1').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                    
                </tr>
                <%}%>
            </table>

            <%}
             } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails2"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Customer found! Close this window & Please recheck the Customer Name selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>CIF Number</b></th><th style="background-color: #99FF99;"><b>Name</b></th><th style="background-color: #99FF99;"><b>Customer Type</b></th><th style="background-color: #99FF99;"><b>Address1</b></th><th style="background-color: #99FF99;"><b>Address2</b></th><th style="background-color: #99FF99;"><b>Address3</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <%--Changed 'document.accCreatForm.cifNumber2.value' to 'document.accCreatForm.cifNumber2.value' by Bitan for Multiple CIF --%>
                <%--Changed 'document.accCreatForm.name2.value' to 'opener.document.accCreatForm.jt_name'+Counter+'.value' by Bitan for Multiple CIF --%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.accCreatForm.jt_cifNumber<%=Counter%>.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.accCreatForm.jt_name<%=Counter%>.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('jt_name<%=Counter%>').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.accCreatForm.jt_cifNumber<%=Counter%>.value = document.getElementById('x<%=i%>').innerHTML;
                       opener.document.accCreatForm.jt_name<%=Counter%>.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('jt_name<%=Counter%>').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.accCreatForm.jt_cifNumber<%=Counter%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.jt_name<%=Counter%>.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('jt_name<%=Counter%>').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.accCreatForm.jt_cifNumber<%=Counter%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.jt_name<%=Counter%>.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('jt_name<%=Counter%>').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.accCreatForm.jt_cifNumber<%=Counter%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.jt_name<%=Counter%>.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('jt_name<%=Counter%>').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.accCreatForm.jt_cifNumber<%=Counter%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.jt_name<%=Counter%>.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('jt_name<%=Counter%>').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                </tr>
                <%}%>
            </table>

            <%}
             } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("nominee"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Customer found! Close this window & Please recheck the Customer Name selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>CIF Number</b></th><th style="background-color: #99FF99;"><b>Name</b></th><th style="background-color: #99FF99;"><b>Customer Type</b></th><th style="background-color: #99FF99;"><b>Address1</b></th><th style="background-color: #99FF99;"><b>Address2</b></th><th style="background-color: #99FF99;"><b>Address3</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.accCreatForm.nominee.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.accCreatForm.nomineeName.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('nomineeName').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.accCreatForm.nominee.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.nomineeName.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('nomineeName').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.accCreatForm.nominee.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.nomineeName.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('nomineeName').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.accCreatForm.nominee.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.nomineeName.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('nomineeName').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.accCreatForm.nominee.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.nomineeName.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('nomineeName').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.accCreatForm.nominee.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.nomineeName.value = document.getElementById('y<%=i%>').innerHTML; opener.document.getElementById('nomineeName').style.display = 'block'; self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                </tr>
                <%}%>
            </table>


            <%}
             } else if ((screenName.equalsIgnoreCase("mocOperations.jsp")) && (lovKey.equalsIgnoreCase("AccountSearch"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No A/C found! Close this window & Please retry!.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>GL Account No.</b></th><th style="background-color: #99FF99;"><b>GL Code</b></th><th style="background-color: #99FF99;"><b>GL Ledger Name</b></th><th style="background-color: #99FF99;"><b>Balance</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.mocForm.accNo<%=searchString1%>.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.mocForm.searched.value ='1';
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.mocForm.accNo<%=searchString1%>.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.mocForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.mocForm.accNo<%=searchString1%>.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.mocForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.mocForm.accNo<%=searchString1%>.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.mocForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("mocOperations.jsp")) && (lovKey.equalsIgnoreCase("SecondAccountSearch"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No A/C found! Close this window & Please retry!.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>GL Account No.</b></th><th style="background-color: #99FF99;"><b>GL Code</b></th><th style="background-color: #99FF99;"><b>GL Ledger Name</b></th><th style="background-color: #99FF99;"><b>Balance</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.mocForm.secAccNo<%=searchString1%>.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.mocForm.searchedTwo.value ='1';
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.mocForm.secAccNo<%=searchString1%>.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.mocForm.searchedTwo.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.mocForm.secAccNo<%=searchString1%>.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.mocForm.searchedTwo.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.mocForm.secAccNo<%=searchString1%>.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.mocForm.searchedTwo.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>

                </tr>
                <%}%>
            </table>
            
            <%}
             } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("productCodeSearch"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Product found! Close this window & Please recheck the Product Code selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Product Code</b></th><th style="background-color: #99FF99;"><b>Description</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Description</b></th><th style="background-color: #99FF99;"><b>PAYABLE_BGL</b></th><th style="background-color: #99FF99;"><b>PAID_GL</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.accCreatForm.productCodeDetails.value = document.getElementById('x<%=i%>').innerHTML + ':' + document.getElementById('y<%=i%>').innerHTML;
                    opener.document.accCreatForm.inttCatDetails.value = document.getElementById('z<%=i%>').innerHTML + ':' + document.getElementById('a<%=i%>').innerHTML;
                    opener.document.accCreatForm.productCode.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.accCreatForm.inttCategory.value = document.getElementById('z<%=i%>').innerHTML;
                    AppendDivAfteriFrame($(this).text());self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.accCreatForm.productCodeDetails.value = document.getElementById('x<%=i%>').innerHTML + ':' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.accCreatForm.inttCatDetails.value = document.getElementById('z<%=i%>').innerHTML + ':' + document.getElementById('a<%=i%>').innerHTML;
                        opener.document.accCreatForm.productCode.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.inttCategory.value = document.getElementById('z<%=i%>').innerHTML;
                        AppendDivAfteriFrame($(this).parents('tr:first').find('td:first').text());self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.accCreatForm.productCodeDetails.value = document.getElementById('x<%=i%>').innerHTML + ':' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.accCreatForm.inttCatDetails.value = document.getElementById('z<%=i%>').innerHTML + ':' + document.getElementById('a<%=i%>').innerHTML;
                        opener.document.accCreatForm.productCode.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.inttCategory.value = document.getElementById('z<%=i%>').innerHTML;
                        AppendDivAfteriFrame($(this).parents('tr:first').find('td:first').text());self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.accCreatForm.productCodeDetails.value = document.getElementById('x<%=i%>').innerHTML + ':' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.accCreatForm.inttCatDetails.value = document.getElementById('z<%=i%>').innerHTML + ':' + document.getElementById('a<%=i%>').innerHTML;
                        opener.document.accCreatForm.productCode.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.inttCategory.value = document.getElementById('z<%=i%>').innerHTML;
                        AppendDivAfteriFrame($(this).parents('tr:first').find('td:first').text());self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.accCreatForm.productCodeDetails.value = document.getElementById('x<%=i%>').innerHTML + ':' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.accCreatForm.inttCatDetails.value = document.getElementById('z<%=i%>').innerHTML + ':' + document.getElementById('a<%=i%>').innerHTML;
                        opener.document.accCreatForm.productCode.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.inttCategory.value = document.getElementById('z<%=i%>').innerHTML;
                        AppendDivAfteriFrame($(this).parents('tr:first').find('td:first').text());self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.accCreatForm.productCodeDetails.value = document.getElementById('x<%=i%>').innerHTML + ':' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.accCreatForm.inttCatDetails.value = document.getElementById('z<%=i%>').innerHTML + ':' + document.getElementById('a<%=i%>').innerHTML;
                        opener.document.accCreatForm.productCode.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.inttCategory.value = document.getElementById('z<%=i%>').innerHTML;
                        AppendDivAfteriFrame($(this).parents('tr:first').find('td:first').text());self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>


                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("productCodeShare"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Product found! Close this window & Please recheck the Product Code selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Product Code</b></th><th style="background-color: #99FF99;"><b>Description</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Description</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.sharevalForm.productCodeDetails.value = document.getElementById('y<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.sharevalForm.productCodeDetails.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.sharevalForm.productCodeDetails.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.sharevalForm.productCodeDetails.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>



                </tr>
                <%}%>
            </table>


            <%}
             } else if ((screenName.equalsIgnoreCase("DepositTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No A/C found! Close this window & Please retry!.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Mode Of Operation</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Guardian Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product Code</b></th><th style="background-color: #99FF99;"><b>Product Details</b></th><th style="background-color: #99FF99;"><b>Interest Details</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th><th style="background-color: #99FF99;"><b>Photo</b></th><th style="background-color: #99FF99;"><b>Signature</b></th><th style="background-color: #99FF99;"><b>Secendary Cif</b></th><th style="background-color: #99FF99;"><b>Secendary Holder Name</b></th><th style="background-color: #99FF99;"><b>Secendary Holder Photo</b></th><th style="background-color: #99FF99;"><b>Secendary Holder Sign</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                    opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                    opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                    if(document.getElementById('a<%=i%>').innerHTML=='1102')
                    {
                        opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                    }

                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>

                    <td bgcolor='<%=bgColor%>' id='h<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                        if(document.getElementById('a<%=i%>').innerHTML=='1102')
                        {
                            opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                        }

                        self.close();" style="cursor:pointer;"><%=resultSet.getString(14)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                        if(document.getElementById('a<%=i%>').innerHTML=='1102')
                        {
                            opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                        }
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='g<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                        if(document.getElementById('a<%=i%>').innerHTML=='1102')
                        {
                            opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                        }
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(11)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                        if(document.getElementById('a<%=i%>').innerHTML=='1102')
                        {
                            opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                        }
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                        if(document.getElementById('a<%=i%>').innerHTML=='1102')
                        {
                            opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                        }
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(12)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                        if(document.getElementById('a<%=i%>').innerHTML=='1102')
                        {
                            opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                        }
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                        if(document.getElementById('a<%=i%>').innerHTML=='1102')
                        {
                            opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                        }
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                        if(document.getElementById('a<%=i%>').innerHTML=='1102')
                        {
                            opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                        }
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>
                    <td bgcolor='<%=bgColor%>' id='e<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                        if(document.getElementById('a<%=i%>').innerHTML=='1102')
                        {
                            opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                        }
                        self.close();" style="cursor:pointer;"><%if (resultSet.getString(10) == null || resultSet.getString(10).isEmpty()) {%><img src="${pageContext.request.contextPath}/img/faceDefault - Copy.jpg" height="100" width="140" border="1px" /><%} else {%> <img src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(10)%>" height="100" width="140" border="1px" /> <%}%></td>
                    <td bgcolor='<%=bgColor%>' id='f<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                        if(document.getElementById('a<%=i%>').innerHTML=='1102')
                        {
                            opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                        }
                        self.close();" style="cursor:pointer;"><%if (resultSet.getString(9) == null || resultSet.getString(9).isEmpty()) {%><b align="middle">No Signature Found</b><%} else {%> <img class ="sudo" src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(9)%>" height="50" width="140" border="1px" /> <%}%></td>

                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                        if(document.getElementById('a<%=i%>').innerHTML=='1102')
                        {
                            opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                        }
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(16)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                        if(document.getElementById('a<%=i%>').innerHTML=='1102')
                        {
                            opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                        }
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(15)%></td>
                     <td bgcolor='<%=bgColor%>' id='e<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                        if(document.getElementById('a<%=i%>').innerHTML=='1102')
                        {
                            opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                        }
                        self.close();" style="cursor:pointer;"><%if (resultSet.getString(17) == null || resultSet.getString(17).isEmpty()) {%><img src="${pageContext.request.contextPath}/img/faceDefault - Copy.jpg" height="100" width="140" border="1px" /><%} else {%> <img src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(17)%>" height="100" width="140" border="1px" /> <%}%></td>
                    <td bgcolor='<%=bgColor%>' id='f<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.product_id.value=document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.cust_no.value=document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.member_count.value=<%=resultSet.getString(13)%>;
                        if(document.getElementById('a<%=i%>').innerHTML=='1102')
                        {
                            opener.document.getElementById('shg_dtl_btn').style.display = 'block';
                        }
                        self.close();" style="cursor:pointer;"><%if (resultSet.getString(18) == null || resultSet.getString(18).isEmpty()) {%><b align="middle">No Siganture Found</b><%} else {%> <img class ="sudo" src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(18)%>" height="50" width="140" border="1px" /> <%}%></td>
                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("ShareTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No A/C found! Close this window & Please retry!.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Share Value</b></th><th style="background-color: #99FF99;"><b>Number of Share already Brought</b></th><th style="background-color: #99FF99;"><b>Share Amount Due</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.transactionForm.shareVal.value = document.getElementById('a<%=i%>').innerHTML;
                    opener.document.transactionForm.shareBrgt.value = document.getElementById('b<%=i%>').innerHTML;opener.document.transactionForm.custName.value = document.getElementById('y<%=i%>').innerHTML;opener.document.transactionForm.amtDue.value = document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.custNo.value = document.getElementById('d<%=i%>').innerHTML;hideRow();self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.transactionForm.shareVal.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.shareBrgt.value = document.getElementById('b<%=i%>').innerHTML;opener.document.transactionForm.custName.value = document.getElementById('y<%=i%>').innerHTML;opener.document.transactionForm.amtDue.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('d<%=i%>').innerHTML;hideRow();self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.transactionForm.shareVal.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.shareBrgt.value = document.getElementById('b<%=i%>').innerHTML;opener.document.transactionForm.custName.value = document.getElementById('y<%=i%>').innerHTML;opener.document.transactionForm.amtDue.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('d<%=i%>').innerHTML;hideRow();self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.transactionForm.shareVal.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.shareBrgt.value = document.getElementById('b<%=i%>').innerHTML;opener.document.transactionForm.custName.value = document.getElementById('y<%=i%>').innerHTML;opener.document.transactionForm.amtDue.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('d<%=i%>').innerHTML;hideRow();self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.transactionForm.shareVal.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.shareBrgt.value = document.getElementById('b<%=i%>').innerHTML;opener.document.transactionForm.custName.value = document.getElementById('y<%=i%>').innerHTML;opener.document.transactionForm.amtDue.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('d<%=i%>').innerHTML;hideRow();self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.transactionForm.shareVal.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.shareBrgt.value = document.getElementById('b<%=i%>').innerHTML;opener.document.transactionForm.custName.value = document.getElementById('y<%=i%>').innerHTML;opener.document.transactionForm.amtDue.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('d<%=i%>').innerHTML;hideRow();self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.transactionForm.shareVal.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.shareBrgt.value = document.getElementById('b<%=i%>').innerHTML;opener.document.transactionForm.custName.value = document.getElementById('y<%=i%>').innerHTML;opener.document.transactionForm.amtDue.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('d<%=i%>').innerHTML;hideRow();self.close();" style="cursor:pointer;display: none"><%=resultSet.getString(7)%></td>


                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("BatchTransaction.jsp")) && (lovKey.equalsIgnoreCase("AccountSearch"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No A/C found! Close this window & Please recheck the input provided.  Note: Only Simple Loan A/C can be re-payed from Batch.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <% if (searchString1.equalsIgnoreCase("G")) {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>GL Account No.</b></th><th style="background-color: #99FF99;"><b>GL Code</b></th><th style="background-color: #99FF99;"><b>GL Ledger Name</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.batchForm.searched.value ='1';
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>

                </tr>
                <%}%>
            </table>
            <% } else if (searchString1.equalsIgnoreCase("S")) {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer No</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.batchForm.searched.value ='1';
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                       opener.document.batchForm.searched.value ='1';
                       self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                </tr>
                <%}%>
            </table>
            <% } else if (searchString1.equalsIgnoreCase("L")) {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer No</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Disb Amount</b></th><th style="background-color: #99FF99;"><b>Outstanding Balance</b></th><th style="background-color: #99FF99;"><b>Prin. Outstanding</b></th><th style="background-color: #99FF99;"><b>Interest Outstanding</b></th><th style="background-color: #99FF99;"><b>Penal Interest Outstanding</b></th><th style="background-color: #99FF99;"><b>NPA Interest Outstanding</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.batchForm.searched.value ='1';
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                       opener.document.batchForm.searched.value ='1';
                       self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(9)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                    <td bgcolor='<%=bgColor%>' id='e<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='f<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>
                </tr>
                <%}%>
            </table>
            <%} else if (searchString1.equalsIgnoreCase("R")) {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer No</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th><th style="background-color: #99FF99;"><b>Number of Installments Paid</b></th><th style="background-color: #99FF99;"><b>Installment Amount</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.batchForm.searched.value ='1';
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.batchForm.accNo<%=searchString2%>.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.batchForm.searched.value ='1';
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>

                </tr>
                <%}%>
            </table>
            <%}
                 }
             } else if (screenName.equalsIgnoreCase("DepositTransferOperation.jsp") && (lovKey.equalsIgnoreCase("glAccountCashInHand"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No GL A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Ledger Name</b></th><th style="background-color: #99FF99;"><b>GL Code</b></th><th style="background-color: #99FF99;"><b>GL Name</b></th>

                    <%int i = 0;
                         while (resultSet.next()) {
                             i++;
                             if (flag == 1) {
                                 flag = 0;
                                 bgColor = "#AFC7C7";
                             } else {
                                 flag = 1;
                                 bgColor = "#95B9C7";
                             }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transferForm.acc_gl_to_cash.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transferForm.acc_gl_to_cash.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>

                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transferForm.acc_gl_to_cash.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transferForm.acc_gl_to_cash.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("DepositKYCCreation.jsp")) && (lovKey.equalsIgnoreCase("IDTypeScoreSearch"))) {%>

            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>ID No.</b></th><th style="background-color: #99FF99;"><b>Proof of Identity.</b></th><th style="background-color: #99FF99;"><b>Score</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.getElementById('idType<%=textIndex%>').value = document.getElementById('y<%=i%>').innerHTML;
                    opener.document.getElementById('Score<%=textIndex%>').value = document.getElementById('z<%=i%>').innerHTML;
                    opener.document.getElementById('document_mst_id<%=textIndex%>').value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.getElementById('grandTotal').value = parseInt(opener.document.getElementById('grandTotal').value) + parseInt(document.getElementById('z<%=i%>').innerHTML);
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.getElementById('idType<%=textIndex%>').value = document.getElementById('y<%=i%>').innerHTML;
                        opener.document.getElementById('Score<%=textIndex%>').value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.getElementById('document_mst_id<%=textIndex%>').value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.getElementById('grandTotal').value = parseInt(opener.document.getElementById('grandTotal').value) + parseInt(document.getElementById('z<%=i%>').innerHTML);
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.getElementById('idType<%=textIndex%>').value = document.getElementById('y<%=i%>').innerHTML;
                        opener.document.getElementById('Score<%=textIndex%>').value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.getElementById('document_mst_id<%=textIndex%>').value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.getElementById('grandTotal').value = parseInt(opener.document.getElementById('grandTotal').value) + parseInt(document.getElementById('z<%=i%>').innerHTML);
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>




                </tr>
                <%}%>
            </table>
            <%} else if (screenName.equalsIgnoreCase("DepositKYCInquiry.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Customer found! Close this window & Please recheck the Customer Name selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>CIF Number</b></th><th style="background-color: #99FF99;"><b>Name</b></th><th style="background-color: #99FF99;"><b>Customer Type</b></th><th style="background-color: #99FF99;"><b>Address1</b></th><th style="background-color: #99FF99;"><b>Address2</b></th><th style="background-color: #99FF99;"><b>Address3</b></th><th style="background-color: #99FF99;"><b>Guardian Name</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.customerEnquiry.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.customerEnquiry.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.customerEnquiry.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.customerEnquiry.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.customerEnquiry.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.customerEnquiry.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.customerEnquiry.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.customerEnquiry.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.customerEnquiry.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.customerEnquiry.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.customerEnquiry.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.customerEnquiry.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.customerEnquiry.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.customerEnquiry.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%></td>

                </tr>
                <%}%>
            </table>

            <%}
             } else if ((screenName.equalsIgnoreCase("DepositKYCInquiry.jsp")) && (lovKey.equalsIgnoreCase("IDTypeScoreSearch"))) {%>

            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>ID No.</b></th><th style="background-color: #99FF99;"><b>Proof of Identity.</b></th><th style="background-color: #99FF99;"><b>Score</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.getElementById('idTypeAmend<%=textIndex%>').value = document.getElementById('y<%=i%>').innerHTML;
                    opener.document.getElementById('ScoreAmend<%=textIndex%>').value = document.getElementById('z<%=i%>').innerHTML;
                    opener.document.getElementById('document_mst_idAmend<%=textIndex%>').value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.getElementById('grandTotal').value = parseInt(opener.document.getElementById('grandTotal').value) + parseInt(document.getElementById('z<%=i%>').innerHTML);
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.getElementById('idTypeAmend<%=textIndex%>').value = document.getElementById('y<%=i%>').innerHTML;
                        opener.document.getElementById('ScoreAmend<%=textIndex%>').value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.getElementById('document_mst_idAmend<%=textIndex%>').value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.getElementById('grandTotal').value = parseInt(opener.document.getElementById('grandTotal').value) + parseInt(document.getElementById('z<%=i%>').innerHTML);
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.getElementById('idTypeAmend<%=textIndex%>').value = document.getElementById('y<%=i%>').innerHTML;
                        opener.document.getElementById('ScoreAmend<%=textIndex%>').value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.getElementById('document_mst_idAmend<%=textIndex%>').value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.getElementById('grandTotal').value = parseInt(opener.document.getElementById('grandTotal').value) + parseInt(document.getElementById('z<%=i%>').innerHTML);
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>




                </tr>
                <%}%>
            </table>

            <%} else if ((screenName.equalsIgnoreCase("DepositMiscellaneousOperation.jsp")) && (lovKey.equalsIgnoreCase("DepositAccLOB"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No A/C found! Close this window & Please recheck the input provided.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Photo</b></th><th style="background-color: #99FF99;"><b>Signature</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.DepositMiscellaneousForm.depositAccSearch.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.DepositMiscellaneousForm.depositAccSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.DepositMiscellaneousForm.depositAccSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.DepositMiscellaneousForm.depositAccSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.DepositMiscellaneousForm.depositAccSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><% if ((resultSet.getString(6) == null) || resultSet.getString(6).isEmpty()) {%><img src="${pageContext.request.contextPath}/img/faceDefault - Copy.jpg" height="100" width="140" border="1px" /><%} else {%> <img src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(6)%>" height="100" width="140" border="1px" /> <%}%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.DepositMiscellaneousForm.depositAccSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><% if ((resultSet.getString(7) == null) || resultSet.getString(7).isEmpty()) {%><b align="middle">No Siganture Found</b><%} else {%> <img class ="sudo" src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(7)%>" onclick="javascript:clickFunc()" style="cursor:pointer;" height="50" width="140" border="1px" /> <%}%></td>
                </tr>  
               
                <%}%>
            </table>

            <%}
             } else if (screenName.equalsIgnoreCase("DepositKYCDocumentUpload.jsp") && (lovKey.equalsIgnoreCase("PickUPCustomer"))) {%>

            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>CIF Number</b></th><th style="background-color: #99FF99;"><b>Name</b></th><th style="background-color: #99FF99;"><b>Customer Type</b></th><th style="background-color: #99FF99;"><b>Address1</b></th><th style="background-color: #99FF99;"><b>Address2</b></th><th style="background-color: #99FF99;"><b>Address3</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.kycDocumentUploadForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();
                    opener.document.kycDocumentUploadForm.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.kycDocumentUploadForm.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();
                        opener.document.kycDocumentUploadForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.kycDocumentUploadForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.kycDocumentUploadForm.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.kycDocumentUploadForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.kycDocumentUploadForm.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.kycDocumentUploadForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.kycDocumentUploadForm.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.kycDocumentUploadForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.kycDocumentUploadForm.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>

                </tr>
                <%}%>
            </table>

            <%} else if (screenName.equalsIgnoreCase("DepositRateSlab.jsp") && (lovKey.equalsIgnoreCase("PickUPProduct"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Product found! Close this window & Please recheck the input provided.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Product Code</b></th><th style="background-color: #99FF99;"><b>Product Code Description</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Interest Category Description</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.tdRateSlabForm.pCode.value = document.getElementById('x<%=i%>').innerHTML +' : '+ document.getElementById('y<%=i%>').innerHTML;
                    opener.document.tdRateSlabForm.iCat.value = document.getElementById('z<%=i%>').innerHTML +' : '+ document.getElementById('a<%=i%>').innerHTML;
                    opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.tdRateSlabForm.pCode.value = document.getElementById('x<%=i%>').innerHTML+' : '+ document.getElementById('y<%=i%>').innerHTML;
                        opener.document.tdRateSlabForm.iCat.value = document.getElementById('z<%=i%>').innerHTML+' : '+ document.getElementById('a<%=i%>').innerHTML;opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.tdRateSlabForm.pCode.value = document.getElementById('x<%=i%>').innerHTML+' : '+ document.getElementById('y<%=i%>').innerHTML;
                        opener.document.tdRateSlabForm.iCat.value = document.getElementById('z<%=i%>').innerHTML+' : '+ document.getElementById('a<%=i%>').innerHTML;opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.tdRateSlabForm.pCode.value = document.getElementById('x<%=i%>').innerHTML+' : '+ document.getElementById('y<%=i%>').innerHTML;
                        opener.document.tdRateSlabForm.iCat.value = document.getElementById('z<%=i%>').innerHTML+' : '+ document.getElementById('a<%=i%>').innerHTML;opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.tdRateSlabForm.pCode.value = document.getElementById('x<%=i%>').innerHTML+' : '+ document.getElementById('y<%=i%>').innerHTML;
                        opener.document.tdRateSlabForm.iCat.value = document.getElementById('z<%=i%>').innerHTML+' : '+ document.getElementById('a<%=i%>').innerHTML;opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                        self.close();" style="display:none"><%=resultSet.getString(5)%></td>


                </tr>
                <%}%>
            </table>

            <%}
             } else if (screenName.equalsIgnoreCase("DepositRateSlab.jsp") && (lovKey.equalsIgnoreCase("PickUPProductAmend"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Product found! Close this window & Please recheck the input provided.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Product Code</b></th><th style="background-color: #99FF99;"><b>Product Code Description</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Interest Category Description</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.tdRateSlabForm.pCodeSearch.value = document.getElementById('x<%=i%>').innerHTML+' : '+ document.getElementById('y<%=i%>').innerHTML;
                    opener.document.tdRateSlabForm.iCatSearch.value = document.getElementById('z<%=i%>').innerHTML+' : '+ document.getElementById('a<%=i%>').innerHTML;opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.tdRateSlabForm.pCodeSearch.value = document.getElementById('x<%=i%>').innerHTML+' : '+ document.getElementById('y<%=i%>').innerHTML;
                        opener.document.tdRateSlabForm.iCatSearch.value = document.getElementById('z<%=i%>').innerHTML+' : '+ document.getElementById('a<%=i%>').innerHTML;opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.tdRateSlabForm.pCodeSearch.value = document.getElementById('x<%=i%>').innerHTML+' : '+ document.getElementById('y<%=i%>').innerHTML;
                        opener.document.tdRateSlabForm.iCatSearch.value = document.getElementById('z<%=i%>').innerHTML+' : '+ document.getElementById('a<%=i%>').innerHTML;opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.tdRateSlabForm.pCodeSearch.value = document.getElementById('x<%=i%>').innerHTML+' : '+ document.getElementById('y<%=i%>').innerHTML;
                        opener.document.tdRateSlabForm.iCatSearch.value = document.getElementById('z<%=i%>').innerHTML+' : '+ document.getElementById('a<%=i%>').innerHTML;opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.tdRateSlabForm.pCodeSearch.value = document.getElementById('x<%=i%>').innerHTML+' : '+ document.getElementById('y<%=i%>').innerHTML;
                        opener.document.tdRateSlabForm.iCatSearch.value = document.getElementById('z<%=i%>').innerHTML+' : '+ document.getElementById('a<%=i%>').innerHTML;opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                        self.close();" style="display:none;"><%=resultSet.getString(5)%></td>


                </tr>
                <%}%>
            </table>

            <%}
             } else if (screenName.equalsIgnoreCase("DepositRateSlab.jsp") && (lovKey.equalsIgnoreCase("PickUPProductAmend2"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Product found! Close this window & Please recheck the input provided.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Product Code</b></th><th style="background-color: #99FF99;"><b>Product Code Description</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Interest Category Description</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.tdRateSlabForm.pCodeSearch.value = document.getElementById('x<%=i%>').innerHTML+' : '+ document.getElementById('y<%=i%>').innerHTML;
                    opener.document.tdRateSlabForm.iCatSearch.value = document.getElementById('z<%=i%>').innerHTML+' : '+ document.getElementById('a<%=i%>').innerHTML;opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.tdRateSlabForm.pCodeSearch.value = document.getElementById('x<%=i%>').innerHTML+' : '+ document.getElementById('y<%=i%>').innerHTML;
                        opener.document.tdRateSlabForm.iCatSearch.value = document.getElementById('z<%=i%>').innerHTML+' : '+ document.getElementById('a<%=i%>').innerHTML;opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.tdRateSlabForm.pCodeSearch.value = document.getElementById('x<%=i%>').innerHTML+' : '+ document.getElementById('y<%=i%>').innerHTML;
                        opener.document.tdRateSlabForm.iCatSearch.value = document.getElementById('z<%=i%>').innerHTML+' : '+ document.getElementById('a<%=i%>').innerHTML;opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.tdRateSlabForm.pCodeSearch.value = document.getElementById('x<%=i%>').innerHTML+' : '+ document.getElementById('y<%=i%>').innerHTML;
                        opener.document.tdRateSlabForm.iCatSearch.value = document.getElementById('z<%=i%>').innerHTML+' : '+ document.getElementById('a<%=i%>').innerHTML;opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.tdRateSlabForm.pCodeSearch.value = document.getElementById('x<%=i%>').innerHTML+' : '+ document.getElementById('y<%=i%>').innerHTML;
                        opener.document.tdRateSlabForm.iCatSearch.value = document.getElementById('z<%=i%>').innerHTML+' : '+ document.getElementById('a<%=i%>').innerHTML;opener.document.tdRateSlabForm.dep_product_id.value = document.getElementById('b<%=i%>').innerHTML;
                        self.close();" style="display:none;"><%=resultSet.getString(5)%></td>


                </tr>
                <%}%>
            </table>

            <%}
             } else if ((screenName.equalsIgnoreCase("TDOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Deposit A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <%if (tranType.equalsIgnoreCase("R")) {%>
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Number</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Guardian Name</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th><th style="background-color: #99FF99;"><b>Interest Rate</b></th><th style="background-color: #99FF99;"><b>Interest Outstanding</b></th></tr>
                <%} else if (tranType.equalsIgnoreCase("D")) {%>
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer Number</b></th><th style="background-color: #99FF99;"><b>Product Name</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Term Value</b></th><th style="background-color: #99FF99;"><b>Interest</b></th><th style="background-color: #99FF99;"><b>Status</b></th></tr>
                <%} else if (tranType.equalsIgnoreCase("TDCert")) {%>
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Account Type</b></th></tr>
                <%} else {%>
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><%if (tranType.equalsIgnoreCase("P")) {%><b>Transaction Amount</b><%} else {%><b>Available Balance</b><%}%></th><th style="background-color: #99FF99;"><b>Capitalized Interest</b></th><th style="background-color: #99FF99;"><b>Status</b></th></tr>
                <%}%>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>

                <%if (tranType.equalsIgnoreCase("R")) {%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.transactionForm.prinAmt.value = document.getElementById('a<%=i%>').innerHTML;
                    opener.document.transactionForm.inttAmount.value = document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.custNo.value = document.getElementById('d<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.prinAmt.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.inttAmount.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('d<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.prinAmt.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.inttAmount.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('d<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.prinAmt.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.inttAmount.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('d<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.prinAmt.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.inttAmount.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('d<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.prinAmt.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.inttAmount.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('d<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.prinAmt.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.transactionForm.inttAmount.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('d<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%></td>


                </tr>
                <%} else if (tranType.equalsIgnoreCase("TDCert")) {%>

                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='zz<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>



                </tr>

                <%} else {%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.transactionForm.trAmount.value = document.getElementById('c<%=i%>').innerHTML;
                        <%if (tranType.equalsIgnoreCase("W")) {%>
                            opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML;
                            opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                        <%} else if (tranType.equalsIgnoreCase("P")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        <%} else if (tranType.equalsIgnoreCase("D")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        <%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.trAmount.value = document.getElementById('c<%=i%>').innerHTML;
                        <%if (tranType.equalsIgnoreCase("W")) {%>
                            opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML;
                            opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                        <%} else if (tranType.equalsIgnoreCase("P")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        <%} else if (tranType.equalsIgnoreCase("D")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        <%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.trAmount.value = document.getElementById('c<%=i%>').innerHTML;
                        <%if (tranType.equalsIgnoreCase("W")) {%>
                            opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML;
                            opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                        <%} else if (tranType.equalsIgnoreCase("P")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        <%} else if (tranType.equalsIgnoreCase("D")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        <%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.trAmount.value = document.getElementById('c<%=i%>').innerHTML;
                        <%if (tranType.equalsIgnoreCase("W")) {%>
                            opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML;
                            opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                        <%} else if (tranType.equalsIgnoreCase("P")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        <%} else if (tranType.equalsIgnoreCase("D")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        <%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.trAmount.value = document.getElementById('c<%=i%>').innerHTML;
                        <%if (tranType.equalsIgnoreCase("W")) {%>
                            opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML;
                            opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                        <%} else if (tranType.equalsIgnoreCase("P")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        <%} else if (tranType.equalsIgnoreCase("D")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        <%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.trAmount.value = document.getElementById('c<%=i%>').innerHTML;
                        <%if (tranType.equalsIgnoreCase("W")) {%>
                            opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML;
                            opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                        <%} else if (tranType.equalsIgnoreCase("P")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        <%} else if (tranType.equalsIgnoreCase("D")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        <%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.trAmount.value = document.getElementById('c<%=i%>').innerHTML;
                        <%if (tranType.equalsIgnoreCase("W")) {%>
                            opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML;
                            opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                        <%} else if (tranType.equalsIgnoreCase("P")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        <%} else if (tranType.equalsIgnoreCase("D")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        <%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>
                    <td bgcolor='<%=bgColor%>' id='e<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.trAmount.value = document.getElementById('c<%=i%>').innerHTML;
                        <%if (tranType.equalsIgnoreCase("W")) {%>
                            opener.document.transactionForm.prinAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                            opener.document.transactionForm.inttAmount.value = document.getElementById('d<%=i%>').innerHTML;
                            opener.document.transactionForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                        <%} else if (tranType.equalsIgnoreCase("P")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                            opener.document.transactionForm.intAdjAmt.value ='0';
                            opener.document.transactionForm.netAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        <%} else if (tranType.equalsIgnoreCase("D")) {%>
                            opener.document.transactionForm.trAmount.value = Number(document.getElementById('c<%=i%>').innerHTML);
                            opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        <%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(9)%></td>
                    
                </tr>
                <%}%>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("AssignToCashDrawer.jsp")) && (lovKey.equalsIgnoreCase("PopupTellers"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Teller found! Close this window & Please recheck the input provided.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Teller ID</b></th><th style="background-color: #99FF99;"><b>Teller Name</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transactionForm.teller_id.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transactionForm.teller_id.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearch"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No A/C found! Close this window and Please recheck the input provided.</p>
                <input type="button" value="Close" onclick="self.close();">
            </center>

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Product Description</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.accCreatForm.intttransacc.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.accCreatForm.intttransacc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.accCreatForm.intttransacc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("CashDrawerEnquiry.jsp")) && (lovKey.equalsIgnoreCase("PopupTellers"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Teller found! Close this window and Please recheck the input provided.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Teller ID</b></th><th style="background-color: #99FF99;"><b>Teller Name</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.teller.tellerid.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.teller.tellerid.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("TDOperation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Savings A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>A/C NO.</b></th><th style="background-color: #99FF99;"><b>CIF No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Int Cat Desc</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%> : <%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%> : <%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>


                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Deposit A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product Details</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transferForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transferForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transferForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transferForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transferForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transferForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>
                        

                </tr>
                <%}%>
            </table>

            <%}
             } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("glAccount"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No GL A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Ledger Name</b></th><th style="background-color: #99FF99;"><b>Gl Code</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transferForm.gl_accNo.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transferForm.gl_accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>

                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transferForm.gl_accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount1"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Deposit A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product Details</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transferForm.accNo_dd_from.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transferForm.accNo_dd_from.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transferForm.accNo_dd_from.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transferForm.accNo_dd_from.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transferForm.accNo_dd_from.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transferForm.accNo_dd_from.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>


                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("LoanAccountCreation1.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Deposit A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product Details</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.accCreatForm.dep_acc_no.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.accCreatForm.dep_acc_no.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.accCreatForm.dep_acc_no.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.accCreatForm.dep_acc_no.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.accCreatForm.dep_acc_no.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.accCreatForm.dep_acc_no.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>


                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("glAccount1"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No GL A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Ledger Name</b></th><th style="background-color: #99FF99;"><b>Gl Code</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transferForm.accNo_gg_from.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transferForm.accNo_gg_from.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>

                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transferForm.accNo_gg_from.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount2"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Deposit A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product Details</b></th><th style="background-color: #99FF99;"><b>Interest Details</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transferForm.accNo_dd_to.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transferForm.accNo_dd_to.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transferForm.accNo_dd_to.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transferForm.accNo_dd_to.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transferForm.accNo_dd_to.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transferForm.accNo_dd_to.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>


                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("shareOperations.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Savings A/C found tagged to this Share account! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product Details</b></th><th style="background-color: #99FF99;"><b>Interest Details</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.shareform.accNo.value = document.getElementById('x<%=i%>').innerHTML;

                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.shareform.accNo.value = document.getElementById('x<%=i%>').innerHTML;

                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.shareform.accNo.value = document.getElementById('x<%=i%>').innerHTML;

                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.shareform.accNo.value = document.getElementById('x<%=i%>').innerHTML;

                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.shareform.accNo.value = document.getElementById('x<%=i%>').innerHTML;

                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%></td>



                </tr>
                <%}%>
            </table>

            <%}
             } else if ((screenName.equalsIgnoreCase("DepositTransferOperation.jsp")) && (lovKey.equalsIgnoreCase("glAccount2"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No GL A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Ledger Name</b></th><th style="background-color: #99FF99;"><b>Gl Code</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transferForm.accNo_gg_to.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transferForm.accNo_gg_to.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>

                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transferForm.accNo_gg_to.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("DepositTransferClosure.jsp")) && (lovKey.equalsIgnoreCase("depositAccount2"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Savings A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product Details</b></th><th style="background-color: #99FF99;"><b>Interest Details</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transferForm.accNo_dd_to.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transferForm.accNo_dd_to.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transferForm.accNo_dd_to.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transferForm.accNo_dd_to.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transferForm.accNo_dd_to.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transferForm.accNo_dd_to.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>


                </tr>
                <%}%>
            </table>

            <%}
             } else if ((screenName.equalsIgnoreCase("DepositTransactionOperation.jsp")) && (lovKey.equalsIgnoreCase("depositShgMember"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No A/C found! Close this window & Please retry!.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Member ID</b></th><th style="background-color: #99FF99;"><b>Member Name</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transactionForm.memberName.value = document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.memberId.value= document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transactionForm.memberName.value = document.getElementById('y<%=i%>').innerHTML;
                        opener.document.transactionForm.memberId.value= document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                </tr>
                <%}%>
            </table>

            <%}
             } else if ((screenName.equalsIgnoreCase("shareOperations.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Savings A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Membership No.</b></th><th style="background-color: #99FF99;"><b>Product Code.</b></th><th style="background-color: #99FF99;"><b>Share Class.</b></th><th style="background-color: #99FF99;"><b>Share Value</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.shareform.memNo.value = document.getElementById('a<%=i%>').innerHTML;
                    opener.document.shareform.shareval.value = document.getElementById('d<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.memNo.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.shareform.shareval.value = document.getElementById('d<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.memNo.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.shareform.shareval.value = document.getElementById('d<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.memNo.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.shareform.shareval.value = document.getElementById('d<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.memNo.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.shareform.shareval.value = document.getElementById('d<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.memNo.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.shareform.shareval.value = document.getElementById('d<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.memNo.value = document.getElementById('a<%=i%>').innerHTML;
                        opener.document.shareform.shareval.value = document.getElementById('d<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%></td>


                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("dividendpayout.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Share A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Membership No.</b></th><th style="background-color: #99FF99;"><b>Product Code</b></th><th style="background-color: #99FF99;"><b>Product Description</b></th><th style="background-color: #99FF99;"><b>Share Value</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th><th style="background-color: #99FF99;"><b>Divident Percentage</b></th><th style="background-color: #99FF99;"><b>Divident Amount</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.shareform.shareamt.value = document.getElementById('e<%=i%>').innerHTML;
                    opener.document.shareform.divamt.value = document.getElementById('g<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.shareamt.value = document.getElementById('e<%=i%>').innerHTML;
                        opener.document.shareform.divamt.value = document.getElementById('g<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.shareamt.value = document.getElementById('e<%=i%>').innerHTML;
                        opener.document.shareform.divamt.value = document.getElementById('g<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.shareamt.value = document.getElementById('e<%=i%>').innerHTML;
                        opener.document.shareform.divamt.value = document.getElementById('g<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.shareamt.value = document.getElementById('e<%=i%>').innerHTML;
                        opener.document.shareform.divamt.value = document.getElementById('g<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.shareamt.value = document.getElementById('e<%=i%>').innerHTML;
                        opener.document.shareform.divamt.value = document.getElementById('g<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.shareamt.value = document.getElementById('e<%=i%>').innerHTML;
                        opener.document.shareform.divamt.value = document.getElementById('g<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='e<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.shareamt.value = document.getElementById('e<%=i%>').innerHTML;
                        opener.document.shareform.divamt.value = document.getElementById('g<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>
                    <td bgcolor='<%=bgColor%>' id='f<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.shareamt.value = document.getElementById('e<%=i%>').innerHTML;
                        opener.document.shareform.divamt.value = document.getElementById('g<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(9)%></td>
                    <td bgcolor='<%=bgColor%>' id='g<%=i%>' onclick="opener.document.shareform.shareNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.shareform.shareamt.value = document.getElementById('e<%=i%>').innerHTML;
                        opener.document.shareform.divamt.value = document.getElementById('g<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(10)%></td>


                </tr>
                <%}%>
            </table>

            <%}
             } else if ((screenName.equalsIgnoreCase("DepositTransferClosure.jsp")) && (lovKey.equalsIgnoreCase("depositAccount1"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Savings A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th><th style="background-color: #99FF99;"><b>Interest Outstanding</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transferForm.accNo_dd_from.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.transferForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML)+parseFloat(document.getElementById('d<%=i%>').innerHTML);
                    opener.document.transferForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transferForm.accNo_dd_from.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transferForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML)+parseFloat(document.getElementById('d<%=i%>').innerHTML);
                        opener.document.transferForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transferForm.accNo_dd_from.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transferForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML)+parseFloat(document.getElementById('d<%=i%>').innerHTML);
                        opener.document.transferForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transferForm.accNo_dd_from.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transferForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML)+parseFloat(document.getElementById('d<%=i%>').innerHTML);
                        opener.document.transferForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transferForm.accNo_dd_from.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transferForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML)+parseFloat(document.getElementById('d<%=i%>').innerHTML);
                        opener.document.transferForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.transferForm.accNo_dd_from.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transferForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML)+parseFloat(document.getElementById('d<%=i%>').innerHTML);
                        opener.document.transferForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.transferForm.accNo_dd_from.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transferForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML)+parseFloat(document.getElementById('d<%=i%>').innerHTML);
                        opener.document.transferForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(9)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("DepositTransferClosure.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Savings A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th><th style="background-color: #99FF99;"><b>Interest Outstanding</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transferForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.transferForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML)+parseFloat(document.getElementById('d<%=i%>').innerHTML);
                    opener.document.transferForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transferForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transferForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML)+parseFloat(document.getElementById('d<%=i%>').innerHTML);
                        opener.document.transferForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transferForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transferForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML)+parseFloat(document.getElementById('d<%=i%>').innerHTML);
                        opener.document.transferForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transferForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transferForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML)+parseFloat(document.getElementById('d<%=i%>').innerHTML);
                        opener.document.transferForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transferForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transferForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML)+parseFloat(document.getElementById('d<%=i%>').innerHTML);
                        opener.document.transferForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.transferForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transferForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML)+parseFloat(document.getElementById('d<%=i%>').innerHTML);
                        opener.document.transferForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.transferForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transferForm.trAmount.value = parseFloat(document.getElementById('c<%=i%>').innerHTML)+parseFloat(document.getElementById('d<%=i%>').innerHTML);
                        opener.document.transferForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(9)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("RDOperation.jsp")) && (lovKey.equalsIgnoreCase("depositAccount"))) {%>                
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <% if(tranType.equalsIgnoreCase("D")) {%>
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Installment Amount</b></th><th style="background-color: #99FF99;"><b>No of Installment Paid</b></th><th style="background-color: #99FF99;"><b>NextDueDate</b></th><th style="background-color: #99FF99;"><b>Theoretical Installment No</b></th></tr>
                <%} else {%> <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Installment Amount</b></th><%if (tranType.equalsIgnoreCase("P")) {%><th style="background-color: #99FF99;"><b>Pre-Close Amount</b></th><%}%></tr> <%}%>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.transactionForm.instAmt.value = document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                    opener.document.transactionForm.intAdjAmt.value ='0';
                        <%if (tranType.equalsIgnoreCase("P")) {%>opener.document.transactionForm.txnamt.value = document.getElementById('matvalue<%=i%>').innerHTML;opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%} else {%>
                            opener.document.transactionForm.matVal.value = document.getElementById('matvalue<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.instAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.intAdjAmt.value ='0';
                        <%if (tranType.equalsIgnoreCase("P")) {%>opener.document.transactionForm.txnamt.value = document.getElementById('matvalue<%=i%>').innerHTML;opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%} else {%>
                            opener.document.transactionForm.matVal.value = document.getElementById('matvalue<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.instAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.intAdjAmt.value ='0';
                        <%if (tranType.equalsIgnoreCase("P")) {%>opener.document.transactionForm.txnamt.value = document.getElementById('matvalue<%=i%>').innerHTML;opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%} else {%>
                            opener.document.transactionForm.matVal.value = document.getElementById('matvalue<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.instAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.intAdjAmt.value ='0';
                        <%if (tranType.equalsIgnoreCase("P")) {%>opener.document.transactionForm.txnamt.value = document.getElementById('matvalue<%=i%>').innerHTML;opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%} else {%>
                            opener.document.transactionForm.matVal.value = document.getElementById('matvalue<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.instAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.intAdjAmt.value ='0';
                        <%if (tranType.equalsIgnoreCase("P")) {%>opener.document.transactionForm.txnamt.value = document.getElementById('matvalue<%=i%>').innerHTML;opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%} else {%>
                            opener.document.transactionForm.matVal.value = document.getElementById('matvalue<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.instAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.intAdjAmt.value ='0';
                        <%if (tranType.equalsIgnoreCase("P")) {%>opener.document.transactionForm.txnamt.value = document.getElementById('matvalue<%=i%>').innerHTML;opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%} else {%>
                            opener.document.transactionForm.matVal.value = document.getElementById('matvalue<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%></td>                    
                    <td bgcolor='<%=bgColor%>' id='matvalue<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.instAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.intAdjAmt.value ='0';
                        <%if (tranType.equalsIgnoreCase("P")) {%>opener.document.transactionForm.txnamt.value = document.getElementById('matvalue<%=i%>').innerHTML;opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%} else {%>
                            opener.document.transactionForm.matVal.value = document.getElementById('matvalue<%=i%>').innerHTML;
                            opener.document.transactionForm.netAmt.value = document.getElementById('matvalue<%=i%>').innerHTML;<%}%>
                            self.close();" <%if (!tranType.equalsIgnoreCase("P")) {%>style="cursor:pointer; display: none"<%}%>><%=resultSet.getString(8)%></td>

                    <% if (tranType.equalsIgnoreCase("D")) {%>
                        <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.instAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.intAdjAmt.value ='0';                        
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(10)%></td>
                    <td bgcolor='<%=bgColor%>' id='e<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.instAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.intAdjAmt.value ='0';                        
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(12)%></td>
                    <td bgcolor='<%=bgColor%>' id='f<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.instAmt.value = document.getElementById('c<%=i%>').innerHTML;
                        opener.document.transactionForm.custNo.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.transactionForm.intAdjAmt.value ='0';                        
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(11)%></td>
                    <%}%>
                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("RDOperation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) {%>

            <%if (!resultSet.isBeforeFirst()) {%>
            <center><p>No savings a/c found for this customer</p>
                <input type="button" value="Close Window" onclick="self.close();"></center><%} else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th></tr>
                <%int i = 0;

                    while (resultSet.next()) {

                        i++;

                        if (flag == 1) {
                            flag = 0;
                            bgColor = "#AFC7C7";
                        } else {
                            flag = 1;
                            bgColor = "#95B9C7";
                        }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CalcMaturity"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No rate slab defined for this installment amount and term length</p>
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<input type="button" value="Veiw Rate Slab" onclick="self.close();javascript:popup_RDRateSlab(560, 280);">
            </center>

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Interest Rate</b></th><th style="background-color: #99FF99;"><b>Maturity Amount</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.accCreatForm.matAmt.value = document.getElementById('y<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.accCreatForm.matAmt.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("CalcFDMaturity"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No rate slab defined for this term value and term length</p>
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<input type="button" value="Veiw Rate Slab" onclick="self.close();javascript:popup_FDRateSlab(600, 450);">
            </center>

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Interest Rate</b></th><th style="background-color: #99FF99;"><b>Maturity Amount</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.accCreatForm.matAmt.value = document.getElementById('y<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.accCreatForm.matAmt.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("RDRateSlab"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No rate slab defined for RD</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Interest Rate</b></th><th style="background-color: #99FF99;"><b>From Term Month</b></th><th style="background-color: #99FF99;"><b>To Term Month</b></th><th style="background-color: #99FF99;"><b>From Installment Amount</b></th><th style="background-color: #99FF99;"><b>To Installment Amount</b></th><th style="background-color: #99FF99;"><b>Product Desc</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='a<%=i%>'><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>'><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>'><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>'><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='e<%=i%>'><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='e<%=i%>'><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%>:<%=resultSet.getString(8)%></td>

                </tr>
                <%}%>
            </table>
            <br>
            <center><input type="button" value="Close Window" onclick="self.close();"></center>
                <%}
                 } else if ((screenName.equalsIgnoreCase("DepositAccountCreation.jsp")) && (lovKey.equalsIgnoreCase("FDRateSlab"))) {%>
                <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No rate slab defined for FD</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Interest Rate</b></th><th style="background-color: #99FF99;"><b>From Term Days</b></th><th style="background-color: #99FF99;"><b>To Term Days</b></th><th style="background-color: #99FF99;"><b>From Amount</b></th><th style="background-color: #99FF99;"><b>To Amount</b></th><th style="background-color: #99FF99;"><b>Product Desc</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='a<%=i%>'><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>'><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>'><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>'><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='e<%=i%>'><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='e<%=i%>'><%=resultSet.getString(6)%>:<%=resultSet.getString(7)%>:<%=resultSet.getString(8)%></td>

                </tr>
                <%}%>
            </table>
            <br>
            <center><input type="button" value="Close Window" onclick="self.close();"></center>
                <%}
                 } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("ParameterPdAmend"))) {%>
                <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Result found! Please try again.</p>
                <input type="button" value="Close Window" onclick="self.close();opener.document.pacsOperation.productcodeSearch.value ='';opener.document.pacsOperation.intcatSearch.value ='';">
            </center>

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Product Code</b></th><th style="background-color: #99FF99;"><b>Product Description</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Interest Description</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.pacsOperation.productcodeSearch.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.pacsOperation.intcatSearch.value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.pacsOperation.productcodeSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.pacsOperation.intcatSearch.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.pacsOperation.productcodeSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.pacsOperation.intcatSearch.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.pacsOperation.productcodeSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.pacsOperation.intcatSearch.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>



                </tr>
                <%}%>
            </table>
            <%}
             } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKey"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Result found! Please try again.</p>
                <input type="button" value="Close Window" onclick="self.close();opener.document.pacsOperation.productcodeSearch.value ='';opener.document.pacsOperation.intcatSearch.value ='';">
            </center>

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>GL Code</b></th><th style="background-color: #99FF99;"><b>GL Description</b></th><th style="display:none"><b>ID</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.pacsOperation.glCodeInttPAYABLEShow.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                    opener.document.pacsOperation.glCodeInttPAYABLE.value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.pacsOperation.glCodeInttPAYABLEShow.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.pacsOperation.glCodeInttPAYABLE.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="self.close();" style="display:none"><%=resultSet.getString(3)%></td>
                </tr>
                <%}%>
            </table>
            <%}
             } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKey"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Result found! Please try again.</p>
                <input type="button" value="Close Window" onclick="self.close();opener.document.pacsOperation.productcodeSearch.value ='';opener.document.pacsOperation.intcatSearch.value ='';">
            </center>

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>GL Code</b></th><th style="background-color: #99FF99;"><b>GL Description</b></th><th style="display:none"><b>ID</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.pacsOperation.glCodeInttPAIDShow.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                    opener.document.pacsOperation.glCodeInttPAID.value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.pacsOperation.glCodeInttPAIDShow.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.pacsOperation.glCodeInttPAID.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="self.close();" style="display:none"><%=resultSet.getString(3)%></td>
                </tr>
                <%}%>
            </table>
            <%}
             } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKeyAmend"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Result found! Please try again.</p>
                <input type="button" value="Close Window" onclick="self.close();opener.document.pacsOperation.productcodeSearch.value ='';opener.document.pacsOperation.intcatSearch.value ='';">
            </center>

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>GL Code</b></th><th style="background-color: #99FF99;"><b>GL Description</b></th><th style="display:none"><b>ID</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.pacsOperation.glCodeInttPAYABLE_AmendShow.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                    opener.document.pacsOperation.glCodeInttPAYABLE_Amend.value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.pacsOperation.glCodeInttPAYABLE_AmendShow.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.pacsOperation.glCodeInttPAYABLE_Amend.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="self.close();" style="display:none"><%=resultSet.getString(3)%></td>
                </tr>
                <%}%>
            </table>
            <%}
             } else if (screenName.equalsIgnoreCase("ProductCreation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKeyAmend"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Result found! Please try again.</p>
                <input type="button" value="Close Window" onclick="self.close();opener.document.pacsOperation.productcodeSearch.value ='';opener.document.pacsOperation.intcatSearch.value ='';">
            </center>

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>GL Code</b></th><th style="background-color: #99FF99;"><b>GL Description</b></th><th style="display:none"><b>ID</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.pacsOperation.glCodeInttPAID_AmendShow.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                    opener.document.pacsOperation.glCodeInttPAID_Amend.value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.pacsOperation.glCodeInttPAID_AmendShow.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.pacsOperation.glCodeInttPAID_Amend.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="self.close();" style="display:none"><%=resultSet.getString(3)%></td>
                </tr>
                <%}%>
            </table>
            <%}
             }  else if ((screenName.equalsIgnoreCase("transactionOperation.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) {%>

            <%if (!resultSet.isBeforeFirst()) {%>
            <center><p>No savings a/c found for this customer</p>
                <input type="button" value="Close Window" onclick="self.close();"></center><%} else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Customer No.</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Interest Category</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th></tr>
                <%int i = 0;

                    while (resultSet.next()) {

                        i++;

                        if (flag == 1) {
                            flag = 0;
                            bgColor = "#AFC7C7";
                        } else {
                            flag = 1;
                            bgColor = "#95B9C7";
                        }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%>:<%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("shareaccounttransaction.jsp")) && (lovKey.equalsIgnoreCase("SavingsAccSearchTransfer"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Savings A/C found! Close this window & Please recheck the A/C No. selected.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>A/C NO.</b></th><th style="background-color: #99FF99;"><b>CIF No.</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Int Cat Desc</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%> : <%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%> : <%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.transactionForm.transferAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>


                </tr>
                <%}%>
            </table>
            <%}
             } else if ((screenName.equalsIgnoreCase("DepositMiscellaneousOperation.jsp")) && (lovKey.equalsIgnoreCase("SecondCifLOB") ||lovKey.equalsIgnoreCase("nomineeLov"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No CIF found! Close this window & Please Try Again.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
           <tr><th style="background-color: #99FF99;"><b>CIF NO</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Gurdian Name</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }

                if(lovKey.equalsIgnoreCase("SecondCifLOB")){%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.DepositMiscellaneousForm.secondCifSearch.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.DepositMiscellaneousForm.secondCifSearchFlag.value = 'Y';
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.DepositMiscellaneousForm.secondCifSearch.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.DepositMiscellaneousForm.secondCifSearchFlag.value = 'Y';
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.DepositMiscellaneousForm.secondCifSearch.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.DepositMiscellaneousForm.secondCifSearchFlag.value = 'Y';
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>

                </tr>
                <%}else if(lovKey.equalsIgnoreCase("nomineeLov")){%>
                 <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.DepositMiscellaneousForm.nomId.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.DepositMiscellaneousForm.secondCifSearchFlag.value = 'Y';
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.DepositMiscellaneousForm.nomId.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.DepositMiscellaneousForm.secondCifSearchFlag.value = 'Y';
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.DepositMiscellaneousForm.nomId.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.DepositMiscellaneousForm.secondCifSearchFlag.value = 'Y';
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>

                </tr>
                <%}
                }%>
            </table>


             <%}
            }else if ((screenName.equalsIgnoreCase("CashWidrawlDeposit.jsp")) && (lovKey.equalsIgnoreCase("ddsCash"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Account found! Close this window & Please Try Again.</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
           <tr><th style="background-color: #99FF99;"><b>Account No</b></th><th style="background-color: #99FF99;"><b>Customer Name</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th><th style="background-color: #99FF99;"><b>Account Type</b></th></tr>
                <%int i = 0;
                     while (resultSet.next()) {
                         i++;
                         if (flag == 1) {
                             flag = 0;
                             bgColor = "#AFC7C7";
                         } else {
                             flag = 1;
                             bgColor = "#95B9C7";
                         }%>
                <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.cashForm.accName.value = document.getElementById('y<%=i%>').innerHTML;opener.document.cashForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.cashForm.avlBal.value = document.getElementById('z<%=i%>').innerHTML;opener.document.cashForm.accntTypeId.value = document.getElementById('p<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.cashForm.accName.value = document.getElementById('y<%=i%>').innerHTML;opener.document.cashForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.cashForm.avlBal.value = document.getElementById('z<%=i%>').innerHTML;opener.document.cashForm.accntTypeId.value = document.getElementById('p<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.cashForm.accName.value = document.getElementById('y<%=i%>').innerHTML;opener.document.cashForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.cashForm.avlBal.value = document.getElementById('z<%=i%>').innerHTML;opener.document.cashForm.accntTypeId.value = document.getElementById('p<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                     <td bgcolor='<%=bgColor%>' id='p<%=i%>' onclick="opener.document.cashForm.accName.value = document.getElementById('y<%=i%>').innerHTML;opener.document.cashForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.cashForm.avlBal.value = document.getElementById('z<%=i%>').innerHTML;opener.document.cashForm.accntTypeId.value = document.getElementById('p<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString("acctype")%></td>
                </tr>
                <%}%>
            </table>

           <%}%>
           <%}%>

          
            

        </form>
    </body>
    <%
                } catch (Exception ex) {
                 //   System.out.println(ex);
                } finally {
                    if (resultSet != null) {
                        resultSet.close();
                    }
                    if (pstmt != null) {
                        pstmt.close();
                    }
                    if (conn != null) {
                        conn.close();
                    }
                }
    %>

</html>