<%--
    Document   : CommonSearchInformationLOV
    Created on : Mar 10, 2016, 2:30:36 AM
    Modified on : Jan 9,2024,12:20:45 PM

--%>

<%@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>Common Information Search</title>
        <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
        <link rel="stylesheet" type="text/css" href="/PacsApplication/css/ButtonAndText.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>       
        
        <%!
            String blankNull(String s) {
                return (s == null) ? "" : s;
            }

            String blankNA(String s) {
                return (s == null) ? "NA" : s;
            }
        %>
        <%
                    String searchString1 = "";
                    String screenName = "";
                    String searchString2 = "";
                    String lovKey = "";
                    String choice="";
                    String tranType="";

                     choice= request.getParameter("choice");
                    screenName = request.getParameter("screenName");
                    lovKey = request.getParameter("lovKey");
                    String pacsId = session.getAttribute("pacsId").toString();
                    String index = null;

                    String headerQry = null;

                    if ((screenName.equalsIgnoreCase("accountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) {

                       // 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(linked_sb_accno,'NA'),nvl(customer_type,' '),address_1,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,''),nvl(t.GUARDIAN_NAME,'NA') from kyc_details t"
                                + "  where t.cif_no = (select cif_no from kyc_hdr kd where kd.cif_no = '" + searchString1.replace(' ', '%') + "' and kd.pacs_id in (select p.pacs_id from pacs_master p where p.head_pacs_id = (select m.head_pacs_id "
                                +" from pacs_master m where m.pacs_id = '" + pacsId + "')))";

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

                       // 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,(select nvl(s.linked_sb_accno,'NA') from kyc_details s where s.cif_no=t.cif_no) linked_sb_accno,customer_type,nvl(address_1,' '),nvl(address_2,' '), nvl(address_3,' ') , GUARDIAN_NAME from kyc_hdr t where t.cif_no='1' and t.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, (select nvl(s.linked_sb_accno,'NA') from kyc_details s where s.cif_no=t.cif_no) linked_sb_accno,customer_type,nvl(address_1, ' '),nvl(address_2, ' '),nvl(address_3, ' ') ,GUARDIAN_NAME from kyc_hdr t where t.pacs_id='" + pacsId + "' and upper(trim(first_name)) like upper('" + searchString2.replace(' ', '%') + "%') ";


			} 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, (select nvl(s.linked_sb_accno,'NA') from kyc_details s where s.cif_no=t.cif_no) linked_sb_accno, customer_type,nvl(address_1, ' '),nvl(address_2, ' '),nvl(address_3, ' '), GUARDIAN_NAME from kyc_hdr t where t.pacs_id='" + pacsId + "' and t.cif_no like '%" + searchString1.replace(' ', '%') + "%' ";


			} else {
                            headerQry = "select cif_no, (t.first_name || nvl2(t.middle_name, ' ' || t.middle_name, '') || nvl2(t.last_name, ' ' || t.last_name, '')) name,(select nvl(s.linked_sb_accno,'NA') from kyc_details s where s.cif_no=t.cif_no)  linked_sb_accno, customer_type, nvl(address_1, ' '), nvl(address_2, ' '), nvl(address_3, ' '), GUARDIAN_NAME from kyc_hdr t where t.pacs_id='" + pacsId + "' and ( t.cif_no like '%" + searchString1.replace(' ', '%') + "%' or upper(trim(first_name)) like upper( '" + searchString2.replace(' ', '%') + "%' ))";
                        }

                    } else if ((screenName.equalsIgnoreCase("accountCreation.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') RCVBL_GL, nvl((select gp.gl_code from gl_product gp where gp.id = GL_ID_INTT_PAID), 'NA') RCVBD_GL from dep_product where prod_code='6001' and pacs_id like '%" + pacsId + "#%'";

                    }
                    else if ((screenName.equalsIgnoreCase("EditServices.jsp")) && (lovKey.equalsIgnoreCase("FetchAccountList"))) {

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

                        headerQry = "select d.key_1,UPPER(k.first_name || ' ' || k.middle_name || ' ' || k.last_name) CUST_NAME,UPPER(k.guardian_name) GURDIAN_NAME,'DEP' ACCOUNT_TYPE from dep_account d, kyc_hdr k where d.customer_no = k.cif_no "
                                    + "and (UPPER(k.first_name) like upper('" + searchString1 + "%') or  d.key_1 like '%" + searchString1 + "%') and d.pacs_id = '" + pacsId + "' and substr(d.GL_CLASS_CODE,9,2) in ('14','11','23') and d.curr_status = 'O' Union All "
                                    + "select l.key_1,UPPER(k.first_name || ' ' || k.middle_name || ' ' || k.last_name) CUST_NAME,UPPER(k.guardian_name) GURDIAN_NAME,'LOAN' ACCOUNT_TYPE from loan_account l, kyc_hdr k where l.customer_no = k.cif_no "
                                    + "and (UPPER(k.first_name) like upper('" + searchString1 + "%') or l.key_1 like '%" + searchString1 + "%') and l.pacs_id = '" + pacsId + "' and substr(l.GL_CLASS_CODE,9,2)='23' and l.curr_status in ('02', '03')";
                    }
                    else if ((screenName.equalsIgnoreCase("AdhocReport.jsp")) && (lovKey.equalsIgnoreCase("reportSearch"))) {

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

                        headerQry = "select report_id,report_name from pacs_adhoc_report where report_id like '%" + searchString1.replace(' ', '%') + "%' ";

                    } else if ((screenName.equalsIgnoreCase("transactionOperation.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,k.guardian_name,t.link_accno,nvl(t.avail_bal,0),nvl(t.prin_outst,0),  (case p.int_method "
                                    +" when 'S' then nvl(t.intt_outst, 0) else 0 end), (case p.int_method when 'S' then nvl(t.penal_intt_outst, 0) "
                                    +" else 0 end),   (case p.int_method when 'S' then nvl(t.npa_intt_outst, 0) else 0 "
                                    +" end),nvl(t.sanction_amt,0),nvl(to_char(t.acct_open_dt,'YYYY-MM-DD'),'NA'),nvl(t.old_accno,0),nvl(t.limit,0),((case p.int_method "
                                    +" when 'S' then nvl(t.intt_outst, 0) else 0 end)+ (case p.int_method when 'S' then nvl(t.penal_intt_outst, 0) else 0 end)+(case p.int_method when 'S' then "
                                    +" (nvl(t.npa_intt_outst, 0)) else 0 end)) int_oust,(select max(d.key_1) from dep_account d,dep_product dp where d.dep_prod_id=dp.id and dp.prod_code='1017' and d.pacs_id= '" + pacsId + "' and d.customer_no =t.customer_no and substr(d.GL_CLASS_CODE,9,2)='11' ) share_ac_no, 1 prod_count, round(t.prin_outst+round((intt_outst+penal_intt_outst+npa_intt_outst),2)) total_outst "
                                    +" from dep_account t,kyc_details k,dep_product p where p.ID = t.DEP_PROD_ID and k.cif_no=t.customer_no and /*t.link_accno=k.linked_sb_accno and*/ p.prod_code='6001' and substr(t.GL_CLASS_CODE,9,2)='23' and t.curr_status <>'C' and (t.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(k.first_name) like upper ('" + searchString1.replace(' ', '%') + "%')) and t.pacs_id= '" + pacsId + "'   ";

                        //System.out.println(headerQry);
                    } else if ((screenName.equalsIgnoreCase("accountRenewal.jsp")) && (lovKey.equalsIgnoreCase("renewalAccNumberSearch"))) {

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

                        if (searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) {
                            headerQry = "select a.customer_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,a.key_1, nvl(a.link_accno,'NA') "
                                    + " from dep_account a,kyc_details t where a.customer_no=t.cif_no and a.curr_status!='O' and substr(a.GL_CLASS_CODE,9,2)='23' and a.pacs_id= '" + pacsId + "' "
                                    + " and a.key_1 in (select d.key_1 from dep_account d where d.pacs_id='" + pacsId + "' and  d.dep_prod_id in (select p.id from dep_product p where p.prod_code = '6001') and substr(d.GL_CLASS_CODE,9,2)='23')";
                        } else if (searchString1.equalsIgnoreCase("") && !searchString2.equalsIgnoreCase("")) {
                            headerQry = "select a.customer_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,a.key_1, nvl(a.link_accno,'NA') "
                                    + " from dep_account a,kyc_details t where a.customer_no=t.cif_no and a.curr_status!='O' and substr(a.GL_CLASS_CODE,9,2)='23' and a.pacs_id= '" + pacsId + "' and a.key_1 in (select d.key_1 from dep_account d"
                                    + " where d.pacs_id='" + pacsId + "' and  d.dep_prod_id in (select p.id from dep_product p where p.prod_code = '6001') and substr(d.GL_CLASS_CODE,9,2)='23' ) and a.key_1 like '%" + searchString2.replace(' ', '%') + "%' ";


                        } else if (!searchString1.equalsIgnoreCase("") && searchString2.equalsIgnoreCase("")) {
                            headerQry = "select a.customer_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,a.key_1,nvl(a.link_accno,'NA') "
                                    + " from dep_account a,kyc_details t where a.customer_no=t.cif_no and a.curr_status!='O'  and a.pacs_id= '" + pacsId + "' and substr(a.GL_CLASS_CODE,9,2)='23' and a.key_1 in (select d.key_1 from dep_account d"
                                    + " where d.pacs_id='" + pacsId + "' and  d.dep_prod_id in (select p.id from dep_product p where p.prod_code = '6001') and substr(d.GL_CLASS_CODE,9,2)='23' ) and a.customer_no like '%" + searchString1.replace(' ', '%') + "%' ";
                        } else {
                            headerQry = "select a.customer_no,(t.first_name||nvl2(t.middle_name,' '||t.middle_name,'')||nvl2(t.last_name,' '||t.last_name,'')) name,a.key_1, nvl(a.link_accno,'NA') "
                                    + " from dep_account a,kyc_details t where a.customer_no=t.cif_no and a.curr_status!='O' and a.pacs_id= '" + pacsId + "' and substr(a.GL_CLASS_CODE,9,2)='23' and a.key_1 in(select d.key_1 from dep_account d"
                                    + " where d.pacs_id='" + pacsId + "' and  d.dep_prod_id in (select p.id from dep_product p where p.prod_code = '6001') and substr(d.GL_CLASS_CODE,9,2)='23' ) and  a.key_1 like '%" + searchString2.replace(' ', '%') + "%' and a.customer_no like '%" + searchString1.replace(' ', '%') + "%' ";
                        }

                    } else if ((screenName.equalsIgnoreCase("mark_unmark_NPA_Operations.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,nvl(t.link_accno,'NA') link_accno  "
                                + " from dep_account t,kyc_details k where k.cif_no=t.customer_no and t.curr_status='O' and substr(t.GL_CLASS_CODE,9,2)='23' and t.dep_prod_id in (select p.id from dep_product p where p.prod_code = '6001') and t.key_1 like '%" + searchString1.replace(' ', '%') + "%' and t.pacs_id= '" + pacsId + "'   ";

                    } else if (screenName.equalsIgnoreCase("pacsProductOperation.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 dp.prod_code='6001' ";
                        } 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 dp.prod_code='6001' 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 dp.prod_code='6001' 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 dp.prod_code='6001' and dp.prod_code like '%" + searchString1.replace(' ', '%') + "%' and dp.int_cat like '%" + searchString2.replace(' ', '%') + "%'";
                        }

                    } else if ((screenName.equalsIgnoreCase("StandingInstructionCreation.jsp")) && (lovKey.equalsIgnoreCase("SIAccFroms"))) {

                        //searchString1 = request.getParameter("fromAcc");
                        //searchString2 = request.getParameter("moduleName");

                        if (searchString1.equalsIgnoreCase("")) {
                            headerQry = "select a.key_1,k.cif_no,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),p.prod_code,p.prod_desc from dep_account a,dep_product p,kyc_hdr k where a.dep_prod_id = p.id and a.customer_no = k.cif_no and p.prod_code in ('1102','1101') and substr(a.GL_CLASS_CODE,9,2)='14' and a.curr_status = 'O' and a.pacs_id in (select pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id = '" + pacsId + "')) ";
                        } else if (!searchString1.equalsIgnoreCase("")) {
                            headerQry = "select a.key_1,k.cif_no,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),p.prod_code,p.prod_desc from dep_account a,dep_product p,kyc_hdr k where a.dep_prod_id = p.id and a.customer_no = k.cif_no and p.prod_code in ('1102','1101') and substr(a.GL_CLASS_CODE,9,2)='14' and a.curr_status = 'O' and a.key_1 like '%" + searchString1.replace(' ', '%') + "%'  and a.pacs_id in (select pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id = '" + pacsId + "')) ";
                        } else {
                        }

                    } else if ((screenName.equalsIgnoreCase("StandingInstructionCreation.jsp")) && (lovKey.equalsIgnoreCase("SIAccTos"))) {

                       // searchString1 = request.getParameter("toAcc");
                        searchString2 = request.getParameter("opsType");

                        if (searchString2.equalsIgnoreCase("s2s")) {
                            headerQry = "select a.key_1,k.cif_no,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),p.prod_code,p.prod_desc from dep_account a,dep_product p,kyc_hdr k where a.dep_prod_id = p.id and a.customer_no = k.cif_no and a.curr_status='O' and p.prod_code in ('1101','1102') and substr(a.GL_CLASS_CODE,9,2)='14' and a.key_1 like '%" + searchString1.replace(' ', '%') + "%'  and a.pacs_id in (select pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id = '" + pacsId + "')) ";
                        } else if (searchString2.equalsIgnoreCase("s2r")) {
                            headerQry = "select a.key_1,k.cif_no,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),p.prod_code,p.prod_desc,a.INSTALL_AMT from dep_account a,dep_product p,kyc_hdr k where a.dep_prod_id = p.id and a.customer_no = k.cif_no and a.curr_status='O' and p.prod_code ='3001' and substr(p.int_cat,1,1) = '1' and substr(a.GL_CLASS_CODE,9,2)='14' and a.key_1 like '%" + searchString1.replace(' ', '%') + "%'  and a.pacs_id in (select pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id = '" + pacsId + "')) ";
                        } else if (searchString2.equalsIgnoreCase("s2l")) {
                            headerQry = "select a.key_1,k.cif_no,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),p.prod_code,p.prod_desc from loan_account a,loan_product p,kyc_hdr k where a.loan_prod_id = p.id and a.customer_no = k.cif_no and a.curr_status not in ('01','04') and substr(a.GL_CLASS_CODE,9,2)='23' and a.key_1 like '%" + searchString1.replace(' ', '%') + "%'  and a.pacs_id in (select pacs_id from pacs_master p where p.head_pacs_id = (select head_pacs_id from pacs_master where pacs_id = '" + pacsId + "')) ";
                        }

                    } else if ((screenName.equalsIgnoreCase("StandingInstructionCreation.jsp")) && (lovKey.equalsIgnoreCase("SIAccFromsSearch"))) {

                       // searchString1 = request.getParameter("fromAccSearch");
                        searchString2 = request.getParameter("opsTypeSearch");

                        if (searchString2.equalsIgnoreCase("s2s")) {
                            headerQry = "select distinct s.from_acct, (select d.customer_no from dep_account d where d.key_1=s.from_acct) CIF_NO,(select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from dep_account d where d.key_1=s.from_acct)) cust_name, (select p.prod_code from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_code, (select p.prod_name from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_desc from si_details s where s.pacs_id='"+ pacsId  +"' and s.operation_type='s2s' and s.from_acct like '%" + searchString1.replace(' ', '%') + "%'";
                        } else if (searchString2.equalsIgnoreCase("s2r")) {
                            headerQry = "select distinct s.from_acct, (select d.customer_no from dep_account d where d.key_1=s.from_acct) CIF_NO, (select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from dep_account d where d.key_1=s.from_acct)) cust_name, (select p.prod_code from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_code, (select p.prod_name from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_desc from si_details s where s.pacs_id='"+ pacsId  +"' and s.operation_type='s2r' and s.from_acct like '%" + searchString1.replace(' ', '%') + "%'";
                        } else if (searchString2.equalsIgnoreCase("s2l")) {
                            headerQry = "select distinct s.from_acct, (select d.customer_no from dep_account d where d.key_1=s.from_acct) CIF_NO, (select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from dep_account d where d.key_1=s.from_acct)) cust_name, (select p.prod_code from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_code, (select p.prod_name from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_desc from si_details s where s.pacs_id='"+ pacsId  +"' and s.operation_type='s2l' and s.from_acct like '%" + searchString1.replace(' ', '%') + "%'";
                        }
                        //if (searchString1.equalsIgnoreCase("")) {
                          //  headerQry = "select a.key_1,k.cif_no,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),p.prod_code,p.prod_desc from dep_account a,dep_product p,kyc_hdr k where a.dep_prod_id = p.id and a.customer_no = k.cif_no and p.prod_code in ('1102','1101') and substr(p.int_cat,1,1) = '1' and substr(a.GL_CLASS_CODE,9,2)='14'   and a.pacs_id= '" + pacsId + "'";
                       // } else if (!searchString1.equalsIgnoreCase("")) {
                         //   headerQry = "select a.key_1,k.cif_no,(k.first_name||nvl2(k.middle_name,' '||k.middle_name,'')||nvl2(k.last_name,' '||k.last_name,'')),p.prod_code,p.prod_desc from dep_account a,dep_product p,kyc_hdr k where a.dep_prod_id = p.id and a.customer_no = k.cif_no and p.prod_code in ('1102','1101') and substr(p.int_cat,1,1) = '1' and substr(a.GL_CLASS_CODE,9,2)='14'  and a.key_1 like '%" + searchString1.replace(' ', '%') + "%'   and a.pacs_id= '" + pacsId + "'";
                       // } else {
                       // }

                    } else if ((screenName.equalsIgnoreCase("StandingInstructionCreation.jsp")) && (lovKey.equalsIgnoreCase("SIAccTosSearch"))) {

                       // searchString1 = request.getParameter("toAccSearch");
                        searchString2 = request.getParameter("opsTypeSearch");

                        if (searchString2.equalsIgnoreCase("s2s")) {
                            headerQry = "select distinct s.to_acct, (select d.customer_no from dep_account d where d.key_1=s.to_acct) CIF_NO, (select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from dep_account d where d.key_1=s.to_acct)) cust_name, (select p.prod_code from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.to_acct)) prod_code, (select p.prod_name from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.to_acct)) prod_desc from si_details s where s.pacs_id='" + pacsId + "' and s.operation_type='s2s' and s.to_acct like '%" + searchString1.replace(' ', '%') + "%'";
                        } else if (searchString2.equalsIgnoreCase("s2r")) {
                            headerQry = "select distinct s.to_acct, (select d.customer_no from dep_account d where d.key_1=s.to_acct) CIF_NO, (select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from dep_account d where d.key_1=s.to_acct)) cust_name, (select p.prod_code from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.to_acct)) prod_code, (select p.prod_name from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.to_acct)) prod_desc  from si_details s where s.pacs_id='" + pacsId + "' and s.operation_type='s2r' and s.to_acct like '%" + searchString1.replace(' ', '%') + "%'";
                        } else if (searchString2.equalsIgnoreCase("s2l")) {
                            headerQry = "select distinct s.to_acct, (select d.customer_no from loan_account d where d.key_1=s.to_acct) CIF_NO, (select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from loan_account d where d.key_1=s.to_acct)) cust_name, (select p.prod_code from loan_product p where p.id= (select d.loan_prod_id from loan_account d where d.key_1=s.to_acct)) prod_code, (select p.prod_name from loan_product p where p.id= (select d.loan_prod_id from loan_account d where d.key_1=s.to_acct)) prod_desc from si_details s where s.pacs_id='" + pacsId + "' and s.operation_type='s2l' and s.to_acct like '%" + searchString1.replace(' ', '%') + "%'";
                        }

                    } else if ((screenName.equalsIgnoreCase("StandingInstructionCreation.jsp")) && (lovKey.equalsIgnoreCase("SIAccSearchDiv"))) {
                        //searchString1 = request.getParameter("accSearch");

                        if (searchString1.equalsIgnoreCase("")) {
                            headerQry = "select distinct s.from_acct, (select d.customer_no from dep_account d where d.key_1=s.from_acct) CIF_NO, (select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from dep_account d where d.key_1=s.from_acct)) cust_name, (select p.prod_code from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_code, (select p.prod_name from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_desc from si_details s where s.pacs_id='" + pacsId + "' and s.operation_type='s2r'";
                        } else if (!searchString1.equalsIgnoreCase("")) {
                            headerQry = "select distinct s.from_acct, (select d.customer_no from dep_account d where d.key_1=s.from_acct) CIF_NO, (select nvl(trim(e.first_name),' ')||' '|| nvl(trim(e.middle_name),' ')||' '|| nvl(trim(e.last_name),' ') from kyc_hdr e where e.cif_no= (select d.customer_no from dep_account d where d.key_1=s.from_acct)) cust_name, (select p.prod_code from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_code, (select p.prod_name from dep_product p where p.id= (select d.dep_prod_id from dep_account d where d.key_1=s.from_acct)) prod_desc from si_details s where s.pacs_id='" + pacsId + "' and s.operation_type='s2r' and s.from_acct like '%" + searchString1.replace(' ', '%') + "%'";
                        } else {
                        }

                    }
                    else if (screenName.equalsIgnoreCase("pacsProductOperation.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("pacsProductOperation.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("pacsProductOperation.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("pacsProductOperation.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("glAccountEnquiry.jsp")) && (lovKey.equalsIgnoreCase("PopupGlAcc"))) {

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

                        headerQry = "select gp.gl_code,gp.gl_desc, gp.gl_name,gp.id from gl_product gp where (upper(gp.gl_name) like upper('%" + searchString1 + "%') or upper(gp.gl_desc) like upper('%" + searchString1 + "%') or gp.gl_code like '%" + searchString1 + "%')";

                    } else if ((screenName.equalsIgnoreCase("glTransactionEnquiry.jsp")) && (lovKey.equalsIgnoreCase("PopupGlAcc"))) {

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

                        headerQry = "select gp.gl_code,gp.gl_desc, gp.gl_name,gp.id from gl_product gp where (upper(gp.gl_name) like upper('%" + searchString1 + "%') or upper(gp.gl_desc) like upper('%" + searchString1 + "%') or gp.gl_code like '%" + searchString1 + "%')";

                    } else if ((screenName.equalsIgnoreCase("AccountAmendment.jsp")) && (lovKey.equalsIgnoreCase("accNoSrch"))) {

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

                        headerQry = "select da.key_1 as account_no,da.customer_no as cif,kh.first_name||' '||kh.middle_name||' '||kh.last_name as customer_name,dp.prod_name as product_type,NVL(da.int_trf_accno,'NA') as transfer_acc_no from dep_account da join kyc_hdr kh on da.customer_no=kh.cif_no join dep_product dp on da.dep_prod_id =dp.id"
                                + "  where da.pacs_id= '" + pacsId + "' and da.key_1 = '" + searchString1.replace(' ', '%') + "' ";

                    } else if ((screenName.equalsIgnoreCase("AccountAmendment.jsp")) && (lovKey.equalsIgnoreCase("newCifNoSrch"))) {

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

                        headerQry = "select kh.cif_no,kh.first_name||' '||kh.middle_name||' '||kh.last_name as customer_name from kyc_hdr kh"
                                + "  where kh.pacs_id= '" + pacsId + "' and kh.cif_no = '" + searchString1.replace(' ', '%') + "' ";

                    } else if ((screenName.equalsIgnoreCase("AccountAmendment.jsp")) && (lovKey.equalsIgnoreCase("custName1Srch"))) {

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

                        headerQry = "select kh.cif_no as cif,kh.first_name||' '||kh.middle_name||' '||kh.last_name as customer_name,kh.guardian_name as guardian,kh.address_1 || ',' || kh.address_2 || ',' || kh.address_3 || ',' || kh.district || ',' || kh.city || ',' || kh.state as address from kyc_hdr kh "
                                + "  where kh.pacs_id= '" + pacsId + "' and kh.first_name like '" + searchString1.replace(' ', '%') + "%'";

                    } else if ((screenName.equalsIgnoreCase("AccountAmendment.jsp")) && (lovKey.equalsIgnoreCase("newTransferAccNoSrch"))) {

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

                        headerQry = "select da.key_1 as account_no,dp.prod_name as account_type,kh.first_name||' '||kh.middle_name||' '||kh.last_name as customer_name from dep_account da join kyc_hdr kh on da.customer_no=kh.cif_no join dep_product dp on da.dep_prod_id=dp.id"
                                + "  where da.pacs_id= '" + pacsId + "' and da.key_1 = '" + searchString1.replace(' ', '%') + "' ";

                    } else if ((screenName.equalsIgnoreCase("TransactionAuthorization.jsp")) && (lovKey.equalsIgnoreCase("custDetails"))) {

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

                        headerQry = "select 'CUST', k.cif_no,(k.first_name||' '||k.middle_name||' '||k.last_name) cust_name,k.guardian_name,k.photo_path,k.sig_photo from kyc_hdr k where k.cif_no = '"
                                + searchString1.replace(' ', '%') + "' union select 'GL',ga.key_1,ga.ledger_name,ga.ledger_desc,null,null  from gl_account ga where ga.pacs_id= '" + pacsId + "' and ga.key_1 = '" + searchString1.replace(' ', '%') + "' ";

                    } else if ((screenName.equalsIgnoreCase("TransactionAuthorization.jsp")) && (lovKey.equalsIgnoreCase("accDetails1"))) {

                       // searchString1 = request.getParameter("account_no");
                       // searchString2 = request.getParameter("tranInd");
                        headerQry = "select 'DEPOSIT' acct_type, da.key_1 accNo, (dp.prod_code || ':' || dp.int_cat || ' ' || dp.prod_name) product, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, trim(da.acct_open_dt) accOpenDt, da.avail_bal availBal, nvl(da.intt_outst, 0) intOust, nvl(da.intt_cap_amt, 0) intCapAmt, (case when '" + searchString2 + "' = 'CR' then  'To be CREDITED' when '" + searchString2 + "' = 'DR' then  'To be DEBITED' end) Remark, k.sig_photo custSign, k.photo_path custPhoto, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = da.cif_no2), 'NA') custName2, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = da.cif_no2) custSign2, (select ki.photo_path from kyc_hdr ki where ki.cif_no = da.cif_no2) custPhoto2, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = da.cif_no3), 'NA') custName3, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = da.cif_no3) custSign3, (select ki.photo_path from kyc_hdr ki where ki.cif_no = da.cif_no3) custPhoto3, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = da.cif_no4), 'NA') custName4, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = da.cif_no4) custSign4, (select ki.photo_path from kyc_hdr ki where ki.cif_no = da.cif_no4) custPhoto4, nvl((select u.mop_name from acc_mop_map u where u.mop_code = da.mop), 'NA') mop from dep_account da, dep_product dp, kyc_hdr k where da.dep_prod_id = dp.id and da.customer_no = k.cif_no and da.key_1 = '" + searchString1.replace(' ', '%') + "' and dp.prod_code <>'6001' union select 'KCC' acct_type, da.key_1 accNo, (dp.prod_code || ':' || dp.int_cat || ' ' || dp.prod_name) product, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, trim(da.acct_open_dt) accOpenDt, da.prin_outst prinOust, nvl(da.intt_outst, 0) intOust, nvl(da.penal_intt_outst, 0) penalOust, (case when '" + searchString2 + "' = 'CR' then  'To be CREDITED' when '" + searchString2 + "' = 'DR' then  'To be DEBITED' end) Remark, k.sig_photo custSign, k.photo_path custPhoto, "
                                   +" nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = da.cif_no2), 'NA') custName2, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = da.cif_no2) custSign2, (select ki.photo_path from kyc_hdr ki where ki.cif_no = da.cif_no2) custPhoto2, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = da.cif_no3), 'NA') custName3, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = da.cif_no3) custSign3, (select ki.photo_path from kyc_hdr ki where ki.cif_no = da.cif_no3) custPhoto3, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = da.cif_no4), 'NA') custName4, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = da.cif_no4) custSign4, (select ki.photo_path from kyc_hdr ki where ki.cif_no = da.cif_no4) custPhoto4, 'NA' from dep_account da, dep_product dp, kyc_hdr k where "
                                   +" da.dep_prod_id = dp.id and da.customer_no = k.cif_no and da.key_1 = '" + searchString1.replace(' ', '%') + "' and dp.prod_code ='6001' union select 'LOAN' acct_type, la.key_1 accNo, (lp.prod_code || ':' || lp.int_cat || ' ' || lp.prod_name) product, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, trim(la.acct_open_dt) accOpenDt, la.prin_outst prinOust, la.intt_outst intOust, la.penal_intt_outst, (case when '" + searchString2 + "' = 'CR' then  'To be CREDITED' when '" + searchString2 + "' = 'DR' then  'To be DEBITED' end) Remark, k.sig_photo custSign, k.photo_path custPhoto, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = la.customer_no), 'NA') custName2, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = la.customer_no) custSign2, (select ki.photo_path from kyc_hdr ki where ki.cif_no = la.customer_no) custPhoto2, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = la.customer_no), 'NA') custName3, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = la.customer_no) custSign3, (select ki.photo_path from kyc_hdr ki where ki.cif_no = la.customer_no) custPhoto3, nvl((select ki.first_name || ' ' || nvl2(ki.middle_name, ' ' || ki.middle_name, '') || nvl2(ki.last_name, ' ' || ki.last_name, '') from kyc_hdr ki where ki.cif_no = la.customer_no), 'NA') custName4, (select ki.sig_photo from kyc_hdr ki where ki.cif_no = la.customer_no) custSign4, (select ki.photo_path from kyc_hdr ki where ki.cif_no = la.customer_no) custPhoto4, 'NA' from loan_account la, loan_product lp, kyc_hdr k where la.loan_prod_id = lp.id and la.customer_no = k.cif_no and la.key_1 = '" + searchString1.replace(' ', '%') + "' union select 'GL' acct_type, ga.key_1, (gp.gl_code || ':' || gp.interest_cat || ' ' || gp.gl_name) product, ga.ledger_name, trim(ga.acct_open_date), ga.cum_curr_val, 0,ga.cum_curr_val, (case when '" + searchString2 + "' = 'CR' then  'To be CREDITED' when '" + searchString2 + "' = 'DR' then  'To be DEBITED' end) Remark,  'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA', 'NA' from gl_account ga, gl_product gp where ga.gl_prod_id = gp.id and ga.key_1 = '" + searchString1.replace(' ', '%') + "' ";

                    } else if ((screenName.equalsIgnoreCase("TransactionAuthorization.jsp")) && (lovKey.equalsIgnoreCase("accDetails2"))) {

                       // searchString1 = request.getParameter("account_no2");
                        //searchString2 = request.getParameter("tranInd");
                        headerQry = "select 'DEPOSIT' acct_type, da.key_1 accNo, (dp.prod_code || ':' || dp.int_cat || ' ' || dp.prod_name) product, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, trim(da.acct_open_dt) accOpenDt, da.avail_bal availBal, nvl(da.intt_outst, 0) intOust, nvl(da.intt_cap_amt, 0) intCapAmt, (case when '" + searchString2 + "' = 'DR' then  'To be CREDITED' when '" + searchString2 + "' = 'CR' then  'To be DEBITED' end) Remark from dep_account da, dep_product dp, kyc_hdr k where da.dep_prod_id = dp.id and da.customer_no = k.cif_no and da.key_1 = '" + searchString1.replace(' ', '%') + "' and dp.prod_code <>'6001' union select 'KCC' acct_type, da.key_1 accNo, (dp.prod_code || ':' || dp.int_cat || ' ' || dp.prod_name) product, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, trim(da.acct_open_dt) accOpenDt, da.prin_outst prinOust, nvl(da.intt_outst, 0) intOust, nvl(da.penal_intt_outst, 0) penalOust, (case when '" + searchString2 + "' = 'DR' then  'To be CREDITED' when '" + searchString2 + "' = 'CR' then  'To be DEBITED' end) Remark from dep_account da, dep_product dp, kyc_details k where da.dep_prod_id = dp.id and da.customer_no = k.cif_no and da.key_1 = '" + searchString1.replace(' ', '%') + "' and dp.prod_code ='6001' union select 'LOAN' acct_type, la.key_1 accNo, (lp.prod_code || ':' || lp.int_cat || ' ' || lp.prod_name) product, (k.first_name || ' ' || k.middle_name || ' ' || k.last_name) custName, trim(la.acct_open_dt) accOpenDt, la.prin_outst prinOust, la.intt_outst intOust, la.penal_intt_outst, (case when '" + searchString2 + "' = 'DR' then  'To be CREDITED' when '" + searchString2 + "' = 'CR' then  'To be DEBITED' end) Remark from loan_account la, loan_product lp, kyc_hdr k where la.loan_prod_id = lp.id and la.customer_no = k.cif_no and la.key_1 = '" + searchString1.replace(' ', '%') + "' union select 'GL' acct_type, ga.key_1, (gp.gl_code || ':' || gp.interest_cat || ' ' || gp.gl_name) product, ga.ledger_name, trim(ga.acct_open_date), ga.cum_curr_val, 0,ga.cum_curr_val, (case when '" + searchString2 + "' = 'DR' then  'To be CREDITED' when '" + searchString2 + "' = 'CR' then  'To be DEBITED' end) Remark  from gl_account ga, gl_product gp where ga.gl_prod_id = gp.id and ga.key_1 = '" + searchString1.replace(' ', '%') + "' ";

                    } else if ((screenName.equalsIgnoreCase("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("accNoSrch"))) {
                        //searchString1 = request.getParameter("accNo");
                        headerQry = "select d.key_1,(kd.title || ' ' || kd.first_name || ' ' || kd.middle_name || ' ' ||kd.last_name) as full_name,NVL(d.link_accno,' '),pm.pacs_name,d.avail_bal,kd.photo_path,kd.sig_photo from dep_account d,dep_product dp, kyc_hdr kd,pacs_master pm where d.customer_no = kd.cif_no  and d.pacs_id=pm.pacs_id and dp.id=d.dep_prod_id and dp.prod_code='1101' and substr(dp.int_cat,1,1)='1' and substr(d.GL_CLASS_CODE,9,2)='14' and d.curr_status='O' and trim(d.link_accno) is not null and "
                               + "(d.key_1 like  '%" + searchString1.replace(' ', '%') + "%' or d.link_accno like  '%" + searchString1.replace(' ', '%') + "%' ) and d.pacs_id = '" + pacsId.replace(' ', '%') + "' ";
                    } else if ((screenName.equalsIgnoreCase("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("ifscNoSrch"))) {
                       // searchString1 = request.getParameter("ifscNo");
                        headerQry = "select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name,i.idi_addrs from idi_ifsc_dir_info i where i.idi_ifsc_code like  '%" + searchString1.replace(' ', '%') + "%' ";
                    } else if ((screenName.equalsIgnoreCase("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("SrcAccNoSrch2"))) {
                       // searchString1 = request.getParameter("accNo2");
                        headerQry = "select d.key_1,(kd.title || ' ' || kd.first_name || ' ' || kd.middle_name || ' ' ||kd.last_name) as full_name,NVL(d.link_accno,' '),pm.pacs_name,d.avail_bal,kd.photo_path,kd.sig_photo from dep_account d,dep_product dp, kyc_hdr kd,pacs_master pm where d.customer_no = kd.cif_no and d.pacs_id=pm.pacs_id and kd.pacs_id=d.pacs_id and dp.id=d.dep_prod_id and dp.prod_code='1101' and substr(dp.int_cat,1,1)='1' and substr(d.GL_CLASS_CODE,9,2)='14' and d.curr_status='O' and dp.intt_rate<>0 and trim(d.link_accno) is not null and d.key_1 like  '%" + searchString1.replace(' ', '%') + "%' and d.pacs_id = '" + pacsId.replace(' ', '%') + "' ";
                    } else if ((screenName.equalsIgnoreCase("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("ifscNoSrch2"))) {
                       // searchString1 = request.getParameter("ifscNo2");
                        headerQry = "select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name,i.idi_addrs from idi_ifsc_dir_info i where i.idi_ifsc_code like  '%" + searchString1.replace(' ', '%') + "%' ";
                    } else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGl"))) {
                       // searchString1 = request.getParameter("acNo");
                        headerQry = "select g.key_1,g.ledger_name,g.cum_curr_val,trim(g.acct_open_date),g.gl_class_code from gl_account g, gl_product gp where g.gl_prod_id=gp.id and g.gl_prod_id <> '201611000001184' and g.key_1 not in(select i.GL_ID from investment_dtl i where pacs_id='" + pacsId + "') and g.pacs_id='" + pacsId + "' and substr(g.gl_class_code,9,2) in ('22','20','21','28') and (g.key_1 like '%" + searchString1.replace(' ', '%') + "%' or g.ledger_name like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_code like '%" + searchString1.replace(' ', '%') + "%')";
                    } else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGlAmend"))) {
                        //searchString1 = request.getParameter("acNo");
                        headerQry = "select g.key_1,g.ledger_name,g.cum_curr_val,trim(g.acct_open_date),g.gl_class_code from gl_account g, gl_product gp where g.gl_prod_id=gp.id and g.gl_prod_id <> '201611000001184' and g.key_1 in (select i.GL_ID from investment_dtl i where pacs_id='" + pacsId + "') and g.pacs_id='" + pacsId + "'and (g.key_1 like '%" + searchString1.replace(' ', '%') + "%'  or gp.gl_code like '%" + searchString1.replace(' ', '%') + "%')";
                    } else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBank"))) {

                        index = request.getParameter("index");
                       // searchString1 = request.getParameter("bank_name");
                        headerQry = "select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name from IDI_IFSC_DIR_INFO i where i.idi_bank_name like '%" + searchString1.replace(' ', '%') + "%' or i.idi_ifsc_code like '%" + searchString1.replace(' ', '%') + "%' order by i.idi_bank_name,i.idi_branch_name ";
                    } else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBankAmend"))) {
                        index = request.getParameter("index");
                       // searchString1 = request.getParameter("bank_name");
                        headerQry = "select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name from IDI_IFSC_DIR_INFO i where i.idi_bank_name like '%" + searchString1.replace(' ', '%') + "%'  or i.idi_ifsc_code like '%" + searchString1.replace(' ', '%') + "%' order by i.idi_bank_name,i.idi_branch_name";
                    } else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGl"))) {
                      //  searchString1 = request.getParameter("acNo");
                        if (searchString1.matches("[a-zA-Z]+")) {
                            headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),gp.gl_code from gl_account g,gl_product gp where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and substr(g.gl_class_code,9,2) ='13' and upper(g.ledger_name) like upper('%" + searchString1.replace(' ', '%') + "%') and g.key_1 not in (select b.gl_id from borrowing_dtl b where pacs_id='" + pacsId + "') and g.gl_prod_id = gp.id";
                        } else {
                            headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),gp.gl_code from gl_account g,gl_product gp where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and substr(g.gl_class_code,9,2) ='13' and (g.key_1 like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_code like '%" + searchString1.replace(' ', '%') + "%')  and g.key_1 not in (select b.gl_id from borrowing_dtl b where pacs_id='" + pacsId + "') and g.gl_prod_id = gp.id";
                        }
                    } else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGlAmend"))) {
                       // searchString1 = request.getParameter("acNo");
                        if (searchString1.matches("[a-zA-Z]+")) {
                            headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),gp.gl_code from gl_account g,gl_product gp where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and upper(g.ledger_name) like upper('%" + searchString1.replace(' ', '%') + "%') and g.key_1 in (select b.gl_id from borrowing_dtl b where pacs_id='" + pacsId + "') and g.gl_prod_id = gp.id";
                        } else {
                            headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),gp.gl_code from gl_account g,gl_product gp where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and (g.key_1 like '%" + searchString1.replace(' ', '%') + "%' or gp.gl_code like '%" + searchString1.replace(' ', '%') + "%')  and g.key_1 in (select b.gl_id from borrowing_dtl b where pacs_id='" + pacsId + "') and g.gl_prod_id = gp.id";
                        }
                    } else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBank"))) {
                        index = request.getParameter("index");
                        //searchString1 = request.getParameter("bank");
                        headerQry = "select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name from IDI_IFSC_DIR_INFO i where i.idi_bank_name like upper('%" + searchString1.replace(' ', '%') + "%') union all select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name from IDI_IFSC_DIR_INFO i where i.idi_ifsc_code like upper('%" + searchString1.replace(' ', '%') + "%') order by 2,3";
                    } else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBankAmend"))) {
                        index = request.getParameter("index");
                       // searchString1 = request.getParameter("bank");
                        headerQry = "select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name from IDI_IFSC_DIR_INFO i where i.idi_bank_name like upper('%" + searchString1.replace(' ', '%') + "%') union all select i.idi_ifsc_code,i.idi_bank_name,i.idi_branch_name from IDI_IFSC_DIR_INFO i where i.idi_ifsc_code like upper('%" + searchString1.replace(' ', '%') + "%') order by 2,3";
                    } else if ((screenName.equalsIgnoreCase("inv_borr_rep.jsp")) && (lovKey.equalsIgnoreCase("searchGl"))) {
                        //searchString1 = request.getParameter("acNo");
                        searchString2 = request.getParameter("searchKey");
                        if (searchString2.endsWith("i")) {
                            if (searchString1.matches("[a-zA-Z]+")) {
                                headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),g.gl_class_code from gl_account g where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and upper(g.ledger_name) like upper('%" + searchString1.replace(' ', '%') + "%') and g.key_1 in (select b.gl_id from investment_dtl b where pacs_id='" + pacsId + "')";
                            } else {
                                headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),g.gl_class_code from gl_account g where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and g.key_1 like '%" + searchString1.replace(' ', '%') + "%' and g.key_1 in (select b.gl_id from investment_dtl b where pacs_id='" + pacsId + "') ";
                            }
                        } else if (searchString2.endsWith("b")) {
                            if (searchString1.matches("[a-zA-Z]+")) {
                                headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),g.gl_class_code from gl_account g where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and upper(g.ledger_name) like upper('%" + searchString1.replace(' ', '%') + "%') and g.key_1 in (select b.gl_id from borrowing_dtl b where pacs_id='" + pacsId + "')";
                            } else {
                                headerQry = "select g.key_1,g.ledger_name,abs(g.cum_curr_val),trim(g.acct_open_date),g.gl_class_code from gl_account g where g.gl_prod_id <> '201611000001184' and g.pacs_id='" + pacsId + "' and g.key_1 like '%" + searchString1.replace(' ', '%') + "%' and g.key_1 in (select b.gl_id from borrowing_dtl b where pacs_id='" + pacsId + "') ";
                            }
                        }
                    } else if ((screenName.equalsIgnoreCase("share_reports.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) {

                        //searchString1 = request.getParameter("accNo");
                        
                            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 dp.prod_code = '1017' and substr(da.GL_CLASS_CODE,9,2)='11' ";
                            headerQry = headerQry + " and (da.key_1 like '%" + searchString1.replace(' ', '%') + "%' or upper(kh.first_name) like upper('" + searchString1.replace(' ', '%') + "%')) and da.pacs_id= '" + pacsId + "'   ";                        

                    }


                    Connection conn = DbHandler.getDBConnection();
                    PreparedStatement pstmt = null;
                    System.out.println(headerQry);

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

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

        %>

        <script type="text/javascript">
            function read(){
                window.opener.$('#siAmount').prop('disabled', true);
            }

           function hideRow()
           {
               var ch = window.opener.$('#tranTypeOrg').val();
               var acno=window.opener.$('#shareAccount').val();
               var shareCount=window.opener.$('#prodCount').val();
               //alert("Choice="+ch);
               //alert("Ac No="+acno);
               //alert("Share Count="+shareCount);
                window.opener.$('.hideRow').show();
                window.opener.$('#accNoSearch').hide();
                 window.opener.$('#submitDiv').show();
                window.opener.$('#tranTypeOrg').prop('disabled', 'true');
                window.opener.$('#accNo').prop('readonly','true');
                if(ch==1)
                window.opener.$('#intAdjAmtTr').show();
                //if((ch==2)&&(acno==null)&&(shareCount>0)){

                if(ch==2)
                {
                    //alert("IN3");
                    if(shareCount>0)
                        {
                            //alert("IN2");
                            if(acno!='null')
                                {
                                    //window.opener.$('#chkShareAmt').val='O';
                                    //alert("IN");
                                    //window.opener.$('#autoDeductTr').show();
                            }
                            else
                                {
                                    //window.opener.$('#chkShareAmt').val='F';
                                    alert("Share A/c Does Not Exists.");
                                }
                        }

                }


           }
           function calcShare()
           {
               var sancAmt=parseFloat(window.opener.$('#txtSancAmt').val());
               var shareAmt=parseFloat(window.opener.$('#sharePercentage').val());
               var shareAmt=(sancAmt*shareAmt)/100;
               window.opener.$('#shareAmount').val(shareAmt);
           }

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

            <% if ((screenName.equalsIgnoreCase("accountCreation.jsp")) && (lovKey.equalsIgnoreCase("CifDetails"))) {%>
            <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>Guardian Name</b></th><th style="background-color: #99FF99;"><b>Linked CBS Account No.</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;
                        self.close();
                       // opener.document.accCreatForm.cbsSavingsAccount.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.accCreatForm.customerName.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.cbsSavingsAccount.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();
                        opener.document.accCreatForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.accCreatForm.customerName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='e<%=i%>' onclick="opener.document.accCreatForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        //opener.document.accCreatForm.cbsSavingsAccount.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.accCreatForm.customerName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(9)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.accCreatForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                       // opener.document.accCreatForm.cbsSavingsAccount.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.accCreatForm.customerName.value = document.getElementById('y<%=i%>').innerHTML;
                        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;
                        self.close();
                       // opener.document.accCreatForm.cbsSavingsAccount.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.accCreatForm.customerName.value = document.getElementById('y<%=i%>').innerHTML;
                        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;
                        self.close();
                       // opener.document.accCreatForm.cbsSavingsAccount.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.accCreatForm.customerName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>' onclick="opener.document.accCreatForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                       // opener.document.accCreatForm.cbsSavingsAccount.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.accCreatForm.customerName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.accCreatForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                       // opener.document.accCreatForm.cbsSavingsAccount.value = document.getElementById('z<%=i%>').innerHTML;
                        opener.document.accCreatForm.customerName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>
                </tr>
                <%}%>
            </table>
            <%} else if (screenName.equalsIgnoreCase("customerEnquiry.jsp")) {%>

            <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>Linked CBS Account No.</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>Guradian 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;
                    self.close();
                    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.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                    self.close();
                    opener.document.customerEnquiry.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.customerEnquiry.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        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;
                        self.close();
                        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;
                        self.close();
                        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;
                        self.close();
                        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;
                        self.close();
                        opener.document.customerEnquiry.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%></td>
                     <td bgcolor='<%=bgColor%>' id='e<%=i%>' onclick="opener.document.customerEnquiry.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.customerEnquiry.cifName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>
                </tr>
                <%}%>
            </table>

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

            <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>RCVBL_GL</b></th><th style="background-color: #99FF99;"><b>RCVBD_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;
                    self.close();
                    opener.document.accCreatForm.inttCatDetails.value = document.getElementById('z<%=i%>').innerHTML + ':' + document.getElementById('a<%=i%>').innerHTML;
                    self.close();
                    opener.document.accCreatForm.productCode.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();
                    opener.document.accCreatForm.inttCategory.value = document.getElementById('z<%=i%>').innerHTML;
                    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;
                        self.close();
                        opener.document.accCreatForm.inttCatDetails.value = document.getElementById('z<%=i%>').innerHTML + ':' + document.getElementById('a<%=i%>').innerHTML;
                        self.close();
                        opener.document.accCreatForm.productCode.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.accCreatForm.inttCategory.value = document.getElementById('z<%=i%>').innerHTML;
                        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;
                        self.close();
                        opener.document.accCreatForm.inttCatDetails.value = document.getElementById('z<%=i%>').innerHTML + ':' + document.getElementById('a<%=i%>').innerHTML;
                        self.close();
                        opener.document.accCreatForm.productCode.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.accCreatForm.inttCategory.value = document.getElementById('z<%=i%>').innerHTML;
                        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;
                        self.close();
                        opener.document.accCreatForm.inttCatDetails.value = document.getElementById('z<%=i%>').innerHTML + ':' + document.getElementById('a<%=i%>').innerHTML;
                        self.close();
                        opener.document.accCreatForm.productCode.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.accCreatForm.inttCategory.value = document.getElementById('z<%=i%>').innerHTML;
                        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;
                        self.close();
                        opener.document.accCreatForm.inttCatDetails.value = document.getElementById('z<%=i%>').innerHTML + ':' + document.getElementById('a<%=i%>').innerHTML;
                        self.close();
                        opener.document.accCreatForm.productCode.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.accCreatForm.inttCategory.value = document.getElementById('z<%=i%>').innerHTML;
                        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;
                        self.close();
                        opener.document.accCreatForm.inttCatDetails.value = document.getElementById('z<%=i%>').innerHTML + ':' + document.getElementById('a<%=i%>').innerHTML;
                        self.close();
                        opener.document.accCreatForm.productCode.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.accCreatForm.inttCategory.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>


                </tr>
                <%}%>
            </table>
 <%} else if ((screenName.equalsIgnoreCase("EditServices.jsp")) && (lovKey.equalsIgnoreCase("FetchAccountList"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No account found. Please enter correct details and search 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>Guardian Name</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.editServicesForm.accountNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.editServicesForm.acNo.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.getElementById('accountNo').setAttribute('readonly', true); self.close();" style="cursor:pointer;"><%=blankNA(resultSet.getString(1))%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.editServicesForm.accountNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.editServicesForm.acNo.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.getElementById('accountNo').setAttribute('readonly', true);self.close();" style="cursor:pointer;"><%=blankNA(resultSet.getString(2))%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.editServicesForm.accountNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.editServicesForm.acNo.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.getElementById('accountNo').setAttribute('readonly', true);self.close();" style="cursor:pointer;"><%=blankNA(resultSet.getString(3))%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.editServicesForm.accountNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.editServicesForm.acNo.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.getElementById('accountNo').setAttribute('readonly', true);self.close();" style="cursor:pointer;"><%=blankNA(resultSet.getString(4))%></td>

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

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

            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Report ID</b></th><th style="background-color: #99FF99;"><b>Report 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.Adhocreport.reportID.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.Adhocreport.reportName.value = document.getElementById('y<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.Adhocreport.reportID.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.Adhocreport.reportName.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>



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

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

            <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>Guardian Name</b></th><th style="background-color: #99FF99;"><b>Linked SB A/C No</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th><th style="background-color: #99FF99;"><b>Principal Oustanding</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 Outstanding</b></th><th style="background-color: #99FF99;"><b>Sanction Amount</b></th><th style="background-color: #99FF99;"><b>Account Opening Date</b></th><th style="background-color: #99FF99;"><b>Old Account No</b></th><th style="background-color: #99FF99;"><b>Limit</b></th><th style="background-color: #99FF99;"><b>Total 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.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.transactionForm.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=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.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=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.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=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.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=i%>').innerHTML;
                        hideRow();
                        self.close();" style="cursor:pointer;"><%=blankNull(resultSet.getString(4))%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=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.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=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.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=i%>').innerHTML;
                        hideRow();
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(7)%></td>
                    <td bgcolor='<%=bgColor%>' id='e<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=i%>').innerHTML;
                        hideRow();
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(8)%></td>
                    <td bgcolor='<%=bgColor%>' id='f<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=i%>').innerHTML;
                        hideRow();
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(9)%></td>
                    <td bgcolor='<%=bgColor%>' id='g<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=i%>').innerHTML;
                        hideRow();
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(10)%></td>
                    <td bgcolor='<%=bgColor%>' id='h<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=i%>').innerHTML;
                        hideRow();
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(11)%></td>
                    <td bgcolor='<%=bgColor%>' id='i<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=i%>').innerHTML;
                        hideRow();
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(12)%></td>
                    <td bgcolor='<%=bgColor%>' id='j<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=i%>').innerHTML;
                        hideRow();
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(13)%></td>
                    <td bgcolor='<%=bgColor%>' id='k<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=i%>').innerHTML;
                        hideRow();
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(14)%></td>
                    <td bgcolor='<%=bgColor%>' id='l<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=i%>').innerHTML;
                        hideRow();
                        self.close();" style="cursor:pointer; display: none"><%=resultSet.getString(15)%></td>
                    <td bgcolor='<%=bgColor%>' id='m<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=i%>').innerHTML;
                        hideRow();
                        self.close();" style="cursor:pointer; display: none"><%=resultSet.getString(16)%></td>
                    <td bgcolor='<%=bgColor%>' id='n<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=i%>').innerHTML;
                        hideRow();
                        self.close();" style="cursor:pointer; display: none"><%=resultSet.getString(17)%></td>
                    <td bgcolor='<%=bgColor%>' id='o<%=i%>' onclick="opener.document.transactionForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.transactionForm.outAmt.value = parseFloat(parseFloat(document.getElementById('g<%=i%>').innerHTML) + parseFloat(document.getElementById('d<%=i%>').innerHTML) + parseFloat(document.getElementById('e<%=i%>').innerHTML) + parseFloat(document.getElementById('f<%=i%>').innerHTML)).toFixed(0);
                    opener.document.transactionForm.txtCustomer.value=document.getElementById('y<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAvlBal.value=document.getElementById('c<%=i%>').innerHTML;
                    opener.document.transactionForm.txtPrinOut.value=document.getElementById('d<%=i%>').innerHTML;
                    opener.document.transactionForm.txtIntOut.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.txtSancAmt.value=document.getElementById('h<%=i%>').innerHTML;
                    opener.document.transactionForm.txtAcOpnDt.value=document.getElementById('i<%=i%>').innerHTML;
                    opener.document.transactionForm.txtLimit.value=document.getElementById('k<%=i%>').innerHTML;
                    opener.document.transactionForm.txtOldAcNo.value=document.getElementById('j<%=i%>').innerHTML;
                    opener.document.transactionForm.totOutst.value=document.getElementById('o<%=i%>').innerHTML;
                    opener.document.transactionForm.shareAccount.value=document.getElementById('l<%=i%>').innerHTML;
                    opener.document.transactionForm.prodCount.value=document.getElementById('m<%=i%>').innerHTML;
                        hideRow();
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(18)%></td>
                </tr>
                <%}%>
            </table>


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

            <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>CC Account No</b></th><th style="background-color: #99FF99;"><b>Linked CBS Account No.</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.accRenewalForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();
                    opener.document.accRenewalForm.ccAccount.value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>

                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.accRenewalForm.ccAccount.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();
                        opener.document.accRenewalForm.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.accRenewalForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.accRenewalForm.ccAccount.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.accRenewalForm.cifNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.accRenewalForm.ccAccount.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>

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

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

            <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>Linked SB A/C No.</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.mark_unmark_NPA_Operations.accountNumber.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.mark_unmark_NPA_Operations.accountNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.mark_unmark_NPA_Operations.accountNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.mark_unmark_NPA_Operations.accountNumber.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>



                </tr>
                <%}%>
            </table>
            <%} else if (screenName.equalsIgnoreCase("pacsProductOperation.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("StandingInstructionCreation.jsp") && (lovKey.equalsIgnoreCase("SIAccFroms"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Result found! Please try again.</p>
                <input type="button" value="Close Window" onclick="self.close();opener.document.SIOperationForm.fromAcc.value ='';">
            </center>

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account 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 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.SIOperationForm.fromAcc.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.SIOperationForm.fromAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.SIOperationForm.fromAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.SIOperationForm.fromAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%> : <%=resultSet.getString(5)%></td>



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

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account 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 Details</b></th><% if (searchString2.equalsIgnoreCase("s2r")) {%><th style="background-color: #99FF99;"><b>Installment 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.SIOperationForm.toAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        <% if (searchString2.equalsIgnoreCase("s2r")) {%>opener.document.SIOperationForm.siAmount.value = document.getElementById('b<%=i%>').innerHTML;<%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.SIOperationForm.toAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        <% if (searchString2.equalsIgnoreCase("s2r")) {%>opener.document.SIOperationForm.siAmount.value = document.getElementById('b<%=i%>').innerHTML;<%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.SIOperationForm.toAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        <% if (searchString2.equalsIgnoreCase("s2r")) {%>opener.document.SIOperationForm.siAmount.value = document.getElementById('b<%=i%>').innerHTML;<%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.SIOperationForm.toAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        <% if (searchString2.equalsIgnoreCase("s2r")) {%>opener.document.SIOperationForm.siAmount.value = document.getElementById('b<%=i%>').innerHTML;<%}%>
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%> : <%=resultSet.getString(5)%></td>
                    <% if (searchString2.equalsIgnoreCase("s2r")) {%>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.SIOperationForm.toAcc.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.SIOperationForm.siAmount.value = document.getElementById('b<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(6)%></td>
                    <%}%>

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

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account 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 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.SIOperationForm.fromAccSearch.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.SIOperationForm.fromAccSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.SIOperationForm.fromAccSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.SIOperationForm.fromAccSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%> : <%=resultSet.getString(5)%></td>



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

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account 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 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.SIOperationForm.toAccSearch.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.SIOperationForm.toAccSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.SIOperationForm.toAccSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.SIOperationForm.toAccSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%> : <%=resultSet.getString(5)%></td>



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

            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account 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 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.SIOperationForm.accSearch.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.SIOperationForm.accSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.SIOperationForm.accSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.SIOperationForm.accSearch.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%> : <%=resultSet.getString(5)%></td>



                </tr>
                <%}%>
            </table>
            <%}
             } else if (screenName.equalsIgnoreCase("pacsProductOperation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKey"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Result found! Please try again.</p>
                <input type="button" value="Close Window" onclick="">
            </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("glAccountEnquiry.jsp") && (lovKey.equalsIgnoreCase("PopupGlAcc"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Result found! 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>GL Code</b></th><th style="background-color: #99FF99;"><b>GL Description</b></th><th style="background-color: #99FF99;"><b>GL 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.enquiryForm.prodName.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                    opener.document.enquiryForm.productName.value = document.getElementById('a<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.enquiryForm.prodName.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.enquiryForm.productName.value = document.getElementById('a<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.enquiryForm.prodName.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.enquiryForm.productName.value = document.getElementById('a<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' style="display:none" id='a<%=i%>' onclick="opener.document.enquiryForm.prodName.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.enquiryForm.productName.value = document.getElementById('a<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if (screenName.equalsIgnoreCase("glTransactionEnquiry.jsp") && (lovKey.equalsIgnoreCase("PopupGlAcc"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Result found! 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>GL Code</b></th><th style="background-color: #99FF99;"><b>GL Description</b></th><th style="background-color: #99FF99;"><b>GL 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.enquiryForm.prodName.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                    opener.document.enquiryForm.productName.value = document.getElementById('a<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.enquiryForm.prodName.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.enquiryForm.productName.value = document.getElementById('a<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.enquiryForm.prodName.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.enquiryForm.productName.value = document.getElementById('a<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' style="display:none" id='a<%=i%>' onclick="opener.document.enquiryForm.prodName.value = document.getElementById('x<%=i%>').innerHTML +' : ' + document.getElementById('y<%=i%>').innerHTML;
                        opener.document.enquiryForm.productName.value = document.getElementById('a<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>

                </tr>
                <%}%>
            </table>
            <%}
             } else if (screenName.equalsIgnoreCase("pacsProductOperation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAYABLESearchLOVKeyAmend"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Result found! Please try again.</p>
                <input type="button" value="Close Window" onclick="">
            </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("pacsProductOperation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKey"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Result found! Please try again.</p>
                <input type="button" value="Close Window" onclick="">
            </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("pacsProductOperation.jsp") && (lovKey.equalsIgnoreCase("glCodeInttPAIDSearchLOVKeyAmend"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Result found! Please try again.</p>
                <input type="button" value="Close Window" onclick="">
            </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("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("accNoSrch"))) {%>

            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account Number</b></th><th style="background-color: #99FF99;"><b>Name</b></th><th style="background-color: #99FF99;"><b>Linked Account Number</b></th><th style="background-color: #99FF99;"><b>Pacs Name</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></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.NeftRtgsInitiationForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.NeftRtgsInitiationForm.cbsAccNo.value = document.getElementById('z<%=i%>').innerHTML;opener.document.NeftRtgsInitiationForm.imge.src = document.getElementById('imm<%=i%>').src;opener.document.NeftRtgsInitiationForm.sign.src = document.getElementById('sigg<%=i%>').src;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.NeftRtgsInitiationForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.NeftRtgsInitiationForm.cbsAccNo.value = document.getElementById('z<%=i%>').innerHTML;opener.document.NeftRtgsInitiationForm.imge.src = document.getElementById('imm<%=i%>').src;opener.document.NeftRtgsInitiationForm.sign.src = document.getElementById('sigg<%=i%>').src;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.NeftRtgsInitiationForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.NeftRtgsInitiationForm.cbsAccNo.value = document.getElementById('z<%=i%>').innerHTML;opener.document.NeftRtgsInitiationForm.imge.src = document.getElementById('imm<%=i%>').src;opener.document.NeftRtgsInitiationForm.sign.src = document.getElementById('sigg<%=i%>').src;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.NeftRtgsInitiationForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.NeftRtgsInitiationForm.cbsAccNo.value = document.getElementById('z<%=i%>').innerHTML;opener.document.NeftRtgsInitiationForm.imge.src = document.getElementById('imm<%=i%>').src;opener.document.NeftRtgsInitiationForm.sign.src = document.getElementById('sigg<%=i%>').src;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.NeftRtgsInitiationForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;opener.document.NeftRtgsInitiationForm.cbsAccNo.value = document.getElementById('z<%=i%>').innerHTML;opener.document.NeftRtgsInitiationForm.imge.src = document.getElementById('imm<%=i%>').src;opener.document.NeftRtgsInitiationForm.sign.src = document.getElementById('sigg<%=i%>').src;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>'>
                        <% if (resultSet.getString(6) == null || resultSet.getString(6).isEmpty()) {%><img id="imm<%=i%>" src="${pageContext.request.contextPath}/img/faceDefault - Copy.jpg" height="100" width="140" border="1px" /><%} else {%> <img id="imm<%=i%>" src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(6)%>" height="100" width="140" border="1px" /> <%}%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>'>
                        <%if (resultSet.getString(7) == null || resultSet.getString(7).isEmpty()) {%><img id="sigg<%=i%>" src="${pageContext.request.contextPath}/img/faceDefault.jpg" height="100" width="140" border="1px" /><%} else {%> <img class ="sudo" id ="sigg<%=i%>" src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(7)%>" height="50" width="140" border="1px" /> <%}%></td>
                </tr>
               
                <%}%>
            </table>


            <%} else if ((screenName.equalsIgnoreCase("AccountAmendment.jsp")) && (lovKey.equalsIgnoreCase("newCifNoSrch"))) {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>CIF No.</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='y<%=i%>' onclick="opener.document.AccountAmendment.newCifNo.value = document.getElementById('y<%=i%>').innerHTML;
                    self.close();
                    //opener.document.AccountAmendment.newCifNo.value = document.getElementById('y<%=i%>').innerHTML;
                    //self.close();
                    opener.document.AccountAmendment.custName1.value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>

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

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



            <%} else if ((screenName.equalsIgnoreCase("AccountAmendment.jsp")) && (lovKey.equalsIgnoreCase("newTransferAccNoSrch"))) {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Account Type</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='y<%=i%>' onclick="opener.document.AccountAmendment.newTransferAccNo.value = document.getElementById('y<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>

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

                        <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.AccountAmendment.newTransferAccNo.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                </tr>
                <%}%>
            </table>


            <%} else if ((screenName.equalsIgnoreCase("AccountAmendment.jsp")) && (lovKey.equalsIgnoreCase("custName1Srch"))) {%>
            <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>Guardian</b></th><th style="background-color: #99FF99;"><b>Address</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='y<%=i%>' onclick="opener.document.AccountAmendment.newCifNo.value = document.getElementById('y<%=i%>').innerHTML;
                    self.close();
                    //opener.document.AccountAmendment.newCifNo.value = document.getElementById('y<%=i%>').innerHTML;
                    //self.close();
                    opener.document.AccountAmendment.custName1.value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>

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

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

                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.AccountAmendment.newCifNo.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();
                        //opener.document.AccountAmendment.newCifNo.value = document.getElementById('y<%=i%>').innerHTML;
                        //self.close();
                        opener.document.AccountAmendment.custName1.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                </tr>
                <%}%>
            </table>
            <%} else if ((screenName.equalsIgnoreCase("TransactionAuthorization.jsp")) && (lovKey.equalsIgnoreCase("custDetails"))) {%>
            <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>Guardian Name</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";
                         }%>
                <%if (resultSet.getString(1).equalsIgnoreCase("CUST")) {%>
                <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>Guardian Name</b></th><th style="background-color: #99FF99;"><b>Photo</b></th><th style="background-color: #99FF99;"><b>Signature</b></th></tr>
                <% } else if (resultSet.getString(1).equalsIgnoreCase("GL")) {%>
                <tr><th style="background-color: #99FF99;"><b>Account No.</b></th><th style="background-color: #99FF99;"><b>Account Name</b></th><th style="background-color: #99FF99;"><b>Ledger Description</b></th></tr>
                <%}%>
                <tr><td bgcolor='<%=bgColor%>' id='y<%=i%>'><%=resultSet.getString(2)%></td>

                    <td bgcolor='<%=bgColor%>' id='z<%=i%>'><%=resultSet.getString(3)%></td>

                    <td bgcolor='<%=bgColor%>' id='a<%=i%>'><%=resultSet.getString(4)%></td>

                    <% if (!resultSet.getString(1).equalsIgnoreCase("GL")) {%>

                    <td bgcolor='<%=bgColor%>' id='b<%=i%>'><%if (resultSet.getString(5) == null || resultSet.getString(5).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(5)%>" height="100" width="140" border="1px" /> <%}%></td>

                    <td bgcolor='<%=bgColor%>' id='b<%=i%>'><%if (resultSet.getString(6) == null || resultSet.getString(6).isEmpty()) {%><b align="middle">No Signature Found</b><%} else {%> <img class ="sudo" src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(6)%>" height="100" width="140" border="1px" /> <%}%></td>
                        <%}%>
                </tr>
                <%}%>
            </table><br>
            <center><input type="button" onclick="self.close();" value="Close Window"/></center>
                <%} else if ((screenName.equalsIgnoreCase("TransactionAuthorization.jsp")) && (lovKey.equalsIgnoreCase("accDetails1"))) {%>
            <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>Guardian Name</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";
                         }%>
                <%if (resultSet.getString(1).equalsIgnoreCase("DEPOSIT")) {%>
                <tr><th style="background-color: #99FF99;"><b>Account Type</b></th><th style="background-color: #99FF99;"><b>Account Number</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Mode Of Operation</b></th><th style="background-color: #99FF99;"><b>Account Open Date</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th><th style="background-color: #99FF99;"><b>Interest Oustanding</b></th><th style="background-color: #99FF99;"><b>Capitalised Amount</b></th><th style="background-color: #99FF99;"><b>Remark</b></th><th style="background-color: #99FF99;"><b>First Customer Name</b></th><th style="background-color: #99FF99;"><b>First Customer Photo</b></th><th style="background-color: #99FF99;"><b>First Customer Sign</b></th><th style="background-color: #99FF99;"><b>Second Customer Name</b></th><th style="background-color: #99FF99;"><b>Second Customer Photo</b></th><th style="background-color: #99FF99;"><b>Second Customer Sign</b></th><th style="background-color: #99FF99;"><b>Third Customer Name</b></th><th style="background-color: #99FF99;"><b>Third Customer Photo</b></th><th style="background-color: #99FF99;"><b>Third Customer Sign</b></th><th style="background-color: #99FF99;"><b>Fourth Customer Name</b></th><th style="background-color: #99FF99;"><b>Fourth Customer Photo</b></th><th style="background-color: #99FF99;"><b>Fourth Customer Sign</b></th></tr>
                <% } else if (resultSet.getString(1).equalsIgnoreCase("GL")) {%>
                <tr><th style="background-color: #99FF99;"><b>Account Type</b></th><th style="background-color: #99FF99;"><b>Account Number</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Ledger Description</b></th><th style="background-color: #99FF99;"><b>Current Balance</b></th><th style="background-color: #99FF99;"><b>Remark</b></th></tr>
                <%} else if (resultSet.getString(1).equalsIgnoreCase("LOAN")) {%>
                <tr><th style="background-color: #99FF99;"><b>Account Type</b></th><th style="background-color: #99FF99;"><b>Account Number</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>Account Open Date</b></th><th style="background-color: #99FF99;"><b>Principal Ouststanding</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>Remark</b></th></tr>
                <%} else if (resultSet.getString(1).equalsIgnoreCase("KCC")) {%>
                <tr><th style="background-color: #99FF99;"><b>Account Type</b></th><th style="background-color: #99FF99;"><b>Account Number</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>Account Open Date</b></th><th style="background-color: #99FF99;"><b>Principal Ouststanding</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>Remark</b></th></tr>
                <%}%>
                <tr><td bgcolor='<%=bgColor%>' id='y<%=i%>'><%=resultSet.getString(1)%></td>

                    <td bgcolor='<%=bgColor%>' id='z<%=i%>'><%=resultSet.getString(2)%></td>

                    <td bgcolor='<%=bgColor%>' id='a<%=i%>'><%=resultSet.getString(3)%></td>

                    <% if (resultSet.getString(1).equalsIgnoreCase("GL") || resultSet.getString(1).equalsIgnoreCase("LOAN") || resultSet.getString(1).equalsIgnoreCase("KCC")) {%>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>'><%=resultSet.getString(4)%></td>
                    <%}%>
                    <% if (resultSet.getString(1).equalsIgnoreCase("DEPOSIT")) {%>
                         <td bgcolor='<%=bgColor%>' id='b<%=i%>'><%=resultSet.getString(21)%></td>
                    <%}%>

                    <% if (!resultSet.getString(1).equalsIgnoreCase("GL")) {%>
                    <td bgcolor='<%=bgColor%>' id='c<%=i%>'><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>'><%=resultSet.getString(6)%></td>
                    <td bgcolor='<%=bgColor%>' id='e<%=i%>'><%=resultSet.getString(7)%></td>
                    <%}%>

                    <td bgcolor='<%=bgColor%>' id='f<%=i%>'><%=resultSet.getString(8)%></td>
                    <td bgcolor='<%=bgColor%>' id='g<%=i%>'><%=resultSet.getString(9)%></td>

                    <% if (resultSet.getString(1).equalsIgnoreCase("DEPOSIT")) {%>
                    <td bgcolor='<%=bgColor%>' id='h<%=i%>'><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='i<%=i%>'><%if (resultSet.getString(11) == null || resultSet.getString(11).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(11)%>" height="100" width="140" border="1px" /> <%}%></td>
                    <td bgcolor='<%=bgColor%>' id='j<%=i%>'><%if (resultSet.getString(10) == null || resultSet.getString(10).isEmpty()) {%><b align="middle">No Signature Found</b><%} else {%> <img class ="sudo" src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(10)%>" height="50" width="140" border="1px" /> <%}%></td>
                    <td bgcolor='<%=bgColor%>' id='k<%=i%>'><%=resultSet.getString(12)%></td>
                    <td bgcolor='<%=bgColor%>' id='l<%=i%>'><%if (resultSet.getString(14) == null || resultSet.getString(14).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(14)%>" height="100" width="140" border="1px" /> <%}%></td>
                    <td bgcolor='<%=bgColor%>' id='m<%=i%>'><%if (resultSet.getString(13) == null || resultSet.getString(13).isEmpty()) {%><b align="middle">No Signature Found</b><%} else {%> <img class ="sudo" src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(13)%>" height="50" width="140" border="1px" /> <%}%></td>
                    <td bgcolor='<%=bgColor%>' id='n<%=i%>'><%=resultSet.getString(15)%></td>
                    <td bgcolor='<%=bgColor%>' id='o<%=i%>'><%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='p<%=i%>'><%if (resultSet.getString(16) == null || resultSet.getString(16).isEmpty()) {%><b align="middle">No Signature Found</b><%} else {%> <img class ="sudo" src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(16)%>" height="50" width="140" border="1px" /> <%}%></td>
                    <td bgcolor='<%=bgColor%>' id='q<%=i%>'><%=resultSet.getString(18)%></td>
                    <td bgcolor='<%=bgColor%>' id='r<%=i%>'><%if (resultSet.getString(20) == null || resultSet.getString(20).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(20)%>" height="100" width="140" border="1px" /> <%}%></td>
                    <td bgcolor='<%=bgColor%>' id='s<%=i%>'><%if (resultSet.getString(19) == null || resultSet.getString(19).isEmpty()) {%><b align="middle">No Signature Found</b><%} else {%> <img class ="sudo" src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(19)%>" height="50" width="140" border="1px" /> <%}%></td>
                    <%}%>
                </tr>
                <%}%>
            </table><br>
            <center><input type="button" onclick="self.close();" value="Close Window"/></center>
                <%} else if ((screenName.equalsIgnoreCase("TransactionAuthorization.jsp")) && (lovKey.equalsIgnoreCase("accDetails2"))) {%>

            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No Result found! </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>Guardian Name</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";
                         }%>
                <%if (resultSet.getString(1).equalsIgnoreCase("DEPOSIT")) {%>
                <tr><th style="background-color: #99FF99;"><b>Account Type</b></th><th style="background-color: #99FF99;"><b>Account Number</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>Account Open Date</b></th><th style="background-color: #99FF99;"><b>Available Balance</b></th><th style="background-color: #99FF99;"><b>Interest Oustanding</b></th><th style="background-color: #99FF99;"><b>Capitalised Amount</b></th><th style="background-color: #99FF99;"><b>Remark</b></th></tr>
                <% } else if (resultSet.getString(1).equalsIgnoreCase("GL")) {%>
                <tr><th style="background-color: #99FF99;"><b>Account Type</b></th><th style="background-color: #99FF99;"><b>Account Number</b></th><th style="background-color: #99FF99;"><b>Product</b></th><th style="background-color: #99FF99;"><b>Ledger Description</b></th><th style="background-color: #99FF99;"><b>Current Balance</b></th><th style="background-color: #99FF99;"><b>Remark</b></th></tr>
                <%} else if (resultSet.getString(1).equalsIgnoreCase("LOAN")) {%>
                <tr><th style="background-color: #99FF99;"><b>Account Type</b></th><th style="background-color: #99FF99;"><b>Account Number</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>Account Open Date</b></th><th style="background-color: #99FF99;"><b>Principal Ouststanding</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>Remark</b></th></tr>
                <%} else if (resultSet.getString(1).equalsIgnoreCase("KCC")) {%>
                <tr><th style="background-color: #99FF99;"><b>Account Type</b></th><th style="background-color: #99FF99;"><b>Account Number</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>Account Open Date</b></th><th style="background-color: #99FF99;"><b>Principal Ouststanding</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>Remark</b></th></tr>
                <%}%>
                <tr><td bgcolor='<%=bgColor%>' id='y<%=i%>'><%=resultSet.getString(1)%></td>

                    <td bgcolor='<%=bgColor%>' id='z<%=i%>'><%=resultSet.getString(2)%></td>

                    <td bgcolor='<%=bgColor%>' id='a<%=i%>'><%=resultSet.getString(3)%></td>

                    <td bgcolor='<%=bgColor%>' id='b<%=i%>'><%=resultSet.getString(4)%></td>

                    <% if (!resultSet.getString(1).equalsIgnoreCase("GL")) {%>

                    <td bgcolor='<%=bgColor%>' id='c<%=i%>'><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>'><%=resultSet.getString(6)%></td>
                    <td bgcolor='<%=bgColor%>' id='e<%=i%>'><%=resultSet.getString(7)%></td>

                    <%}%>

                    <td bgcolor='<%=bgColor%>' id='f<%=i%>'><%=resultSet.getString(8)%></td>
                    <td bgcolor='<%=bgColor%>' id='g<%=i%>'><%=resultSet.getString(9)%></td>
                </tr>
                <%} %>
            </table><br>
            <center><input type="button" onclick="self.close();" value="Close Window"/></center>
                <%} } else if ((screenName.equalsIgnoreCase("NeftRtgsInitiation.jsp")) && (lovKey.equalsIgnoreCase("accNoSrch"))) {%>

            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account Number</b></th><th style="background-color: #99FF99;"><b>Name</b></th><th style="background-color: #99FF99;"><b>Pacs Name</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></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.NeftRtgsInitiationForm.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.NeftRtgsInitiationForm.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.NeftRtgsInitiationForm.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.NeftRtgsInitiationForm.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='i<%=i%>'><%if (resultSet.getString(5) == null || resultSet.getString(5).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(5)%>" height="100" width="140" border="1px" /> <%}%></td>
                    <td bgcolor='<%=bgColor%>' id='j<%=i%>'><%if (resultSet.getString(6) == null || resultSet.getString(6).isEmpty()) {%><b align="middle">No Signature Found</b><%} else {%> <img class ="sudo" src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(6)%>" height="50" width="140" border="1px" /> <%}%></td>
                </tr>
                <%}%>
            </table>



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

            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>Account Number</b></th><th style="background-color: #99FF99;"><b>Name</b></th><th style="background-color: #99FF99;"><b>Linked Account Number</b></th><th style="background-color: #99FF99;"><b>Pacs Name</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></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.NeftRtgsInitiationForm.srcAccNo.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.NeftRtgsInitiationForm.srcAccNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.NeftRtgsInitiationForm.srcAccNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.NeftRtgsInitiationForm.srcAccNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='b<%=i%>' onclick="opener.document.NeftRtgsInitiationForm.srcAccNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    <td bgcolor='<%=bgColor%>' id='i<%=i%>'><%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='j<%=i%>'><%if (resultSet.getString(7) == null || resultSet.getString(7).isEmpty()) {%><b align="middle">No Signature Found</b><%} else {%> <img class ="sudo" src="${pageContext.request.contextPath}/UploadedFiles/<%=resultSet.getString(7)%>" height="50" width="140" border="1px" /> <%}%></td>
                </tr>
                <%}%>
            </table>


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

            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>IFSC Code</b></th><th style="background-color: #99FF99;"><b>Bank Name</b></th><th style="background-color: #99FF99;"><b>Branch Name</b></th><th style="background-color: #99FF99;"><b>Address</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.NeftRtgsInitiationForm.ifscNoVal.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();
                    opener.document.NeftRtgsInitiationForm.destBankNameVal.value = document.getElementById('y<%=i%>').innerHTML;
                    self.close();
                    opener.document.NeftRtgsInitiationForm.destBranchVal.value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.NeftRtgsInitiationForm.ifscNoVal.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.NeftRtgsInitiationForm.destBankNameVal.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();
                        opener.document.NeftRtgsInitiationForm.destBranchVal.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.NeftRtgsInitiationForm.ifscNoVal.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.NeftRtgsInitiationForm.destBankNameVal.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();
                        opener.document.NeftRtgsInitiationForm.destBranchVal.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.NeftRtgsInitiationForm.ifscNoVal.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();
                        opener.document.NeftRtgsInitiationForm.destBankNameVal.value = document.getElementById('y<%=i%>').innerHTML;
                        self.close();
                        opener.document.NeftRtgsInitiationForm.destBranchVal.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>


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

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

            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>IFSC Code</b></th><th style="background-color: #99FF99;"><b>Bank Name</b></th><th style="background-color: #99FF99;"><b>Branch Name</b></th><th style="background-color: #99FF99;"><b>Address</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.NeftRtgsInitiationForm.ifscNoVal2.value = document.getElementById('x<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.NeftRtgsInitiationForm.ifscNoVal2.value = document.getElementById('x<%=i%>').innerHTML;
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.NeftRtgsInitiationForm.ifscNoVal2.value = document.getElementById('x<%=i%>').innerHTML;
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.NeftRtgsInitiationForm.ifscNoVal2.value = document.getElementById('x<%=i%>').innerHTML;
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                </tr>
                <%}%>
            </table>

            <%} else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBank"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No such Bank found! Close this window & Please recheck again</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>IFSC Number</b></th><th style="background-color: #99FF99;"><b>Bank Name</b></th><th style="background-color: #99FF99;"><b>Branch 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.getElementById('bankName<%=index%>').value = document.getElementById('y<%=i%>').innerHTML;
                    opener.document.getElementById('branchName<%=index%>').value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.getElementById('bankName<%=index%>').value = document.getElementById('y<%=i%>').innerHTML;
                        opener.document.getElementById('branchName<%=index%>').value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.getElementById('bankName<%=index%>').value = document.getElementById('y<%=i%>').innerHTML;
                        opener.document.getElementById('branchName<%=index%>').value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>

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

            <%} } else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBankAmend"))) {%>
            <% if (!resultSet.isBeforeFirst()) {%>
            <center><p>No such Bank found! Close this window & Please recheck again</p>
                <input type="button" value="Close Window" onclick="self.close();">
            </center>
            <% } else {%>
            <table border="2">
                <tr><th style="background-color: #99FF99;"><b>IFSC Number</b></th><th style="background-color: #99FF99;"><b>Bank Name</b></th><th style="background-color: #99FF99;"><b>Branch 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.getElementById('bankNameAmend<%=index%>').value = document.getElementById('y<%=i%>').innerHTML;
                    opener.document.getElementById('branchNameAmend<%=index%>').value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.getElementById('bankName<%=index%>').value = document.getElementById('y<%=i%>').innerHTML;
                        opener.document.getElementById('branchNameAmend<%=index%>').value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.getElementById('bankName<%=index%>').value = document.getElementById('y<%=i%>').innerHTML;
                        opener.document.getElementById('branchNameAmend<%=index%>').value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>

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

            <%} } else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGl"))) {%>
            <% 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 Number</b></th><th style="background-color: #99FF99;"><b>Ledger Name</b></th><th style="background-color: #99FF99;"><b>Balance</b></th><th style="background-color: #99FF99;"><b>A/c Open Date</b></th><th style="background-color: #99FF99;"><b>GLCC</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.investmentCreateForm.glName.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.investmentCreateForm.glBal.value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.investmentCreateForm.glName.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.investmentCreateForm.glBal.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.investmentCreateForm.glName.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.investmentCreateForm.glBal.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.investmentCreateForm.glName.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.investmentCreateForm.glBal.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.investmentCreateForm.glName.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.investmentCreateForm.glBal.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                </tr>
                <%}}%>
            </table>


            <%} else if ((screenName.equalsIgnoreCase("Investment_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGlAmend"))) {%>
            <% 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 Number</b></th><th style="background-color: #99FF99;"><b>Ledger Name</b></th><th style="background-color: #99FF99;"><b>Balance</b></th><th style="background-color: #99FF99;"><b>A/c Open Date</b></th><th style="background-color: #99FF99;"><b>GLCC</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.investmentCreateForm.glNameAmend.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.investmentCreateForm.glBalAmend.value = document.getElementById('z<%=i%>').innerHTML;
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.investmentCreateForm.glNameAmend.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.investmentCreateForm.glBalAmend.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.investmentCreateForm.glNameAmend.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.investmentCreateForm.glBalAmend.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.investmentCreateForm.glNameAmend.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.investmentCreateForm.glBalAmend.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.investmentCreateForm.glNameAmend.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.investmentCreateForm.glBalAmend.value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                </tr>
                <%}%>
                </table>
               <%}
                 } else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchBank"))) {%>

                <table border="2">
                    <tr><th style="background-color: #99FF99;"><b>IFSC Number</b></th><th style="background-color: #99FF99;"><b>Bank Name</b></th><th style="background-color: #99FF99;"><b>Branch 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.getElementById('bankName<%=index%>').value = document.getElementById('y<%=i%>').innerHTML;
                        opener.document.getElementById('branchName<%=index%>').value = document.getElementById('z<%=i%>').innerHTML; opener.document.getElementById('bankName<%=index%>').readOnly = true;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                        <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.getElementById('bankName<%=index%>').value = document.getElementById('y<%=i%>').innerHTML;
                            opener.document.getElementById('branchName<%=index%>').value = document.getElementById('z<%=i%>').innerHTML; opener.document.getElementById('bankName<%=index%>').readOnly = true;
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                        <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.getElementById('bankName<%=index%>').value = document.getElementById('y<%=i%>').innerHTML;
                            opener.document.getElementById('branchName<%=index%>').value = document.getElementById('z<%=i%>').innerHTML; opener.document.getElementById('bankName<%=index%>').readOnly = true;
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>

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

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

                <table border="2">
                    <tr><th style="background-color: #99FF99;"><b>IFSC Number</b></th><th style="background-color: #99FF99;"><b>Bank Name</b></th><th style="background-color: #99FF99;"><b>Branch 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.getElementById('bankNameAmend<%=index%>').value = document.getElementById('y<%=i%>').innerHTML;
                        opener.document.getElementById('branchNameAmend<%=index%>').value = document.getElementById('z<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                        <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.getElementById('bankName<%=index%>').value = document.getElementById('y<%=i%>').innerHTML;
                            opener.document.getElementById('branchNameAmend<%=index%>').value = document.getElementById('z<%=i%>').innerHTML;
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                        <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.getElementById('bankName<%=index%>').value = document.getElementById('y<%=i%>').innerHTML;
                            opener.document.getElementById('branchNameAmend<%=index%>').value = document.getElementById('z<%=i%>').innerHTML;
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>

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

                <%} else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGl"))) {%>
                <% if (!resultSet.isBeforeFirst()) {%>
                <center><p>No Result found! Please try again.</p>
                    <input type="button" value="Close Window" onclick="self.close();opener.document.borrowingCreateForm.glName.value ='';opener.document.borrowingCreateForm.glBal.value ='';">
                </center>

                <% } else {%>
                <table border="2">
                    <tr><th style="background-color: #99FF99;"><b>Account Number</b></th><th style="background-color: #99FF99;"><b>Ledger Name</b></th><th style="background-color: #99FF99;"><b>Balance</b></th><th style="background-color: #99FF99;"><b>A/c Open Date</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.borrowingCreateForm.glName.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.borrowingCreateForm.glBal.value = document.getElementById('z<%=i%>').innerHTML; window.opener.$('#searchindex').val('1');
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                        <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.borrowingCreateForm.glName.value = document.getElementById('x<%=i%>').innerHTML;
                            opener.document.borrowingCreateForm.glBal.value = document.getElementById('z<%=i%>').innerHTML; window.opener.$('#searchindex').val('1');
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                        <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.borrowingCreateForm.glName.value = document.getElementById('x<%=i%>').innerHTML;
                            opener.document.borrowingCreateForm.glBal.value = document.getElementById('z<%=i%>').innerHTML; window.opener.$('#searchindex').val('1');
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                        <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.borrowingCreateForm.glName.value = document.getElementById('x<%=i%>').innerHTML;
                            opener.document.borrowingCreateForm.glBal.value = document.getElementById('z<%=i%>').innerHTML; window.opener.$('#searchindex').val('1');
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                        <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.borrowingCreateForm.glName.value = document.getElementById('x<%=i%>').innerHTML;
                            opener.document.borrowingCreateForm.glBal.value = document.getElementById('z<%=i%>').innerHTML; window.opener.$('#searchindex').val('1');
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    </tr>
                    <%}%>
                </table>

                <%}
                 } else if ((screenName.equalsIgnoreCase("Borrowing_Creation.jsp")) && (lovKey.equalsIgnoreCase("searchGlAmend"))) {%>
                <% if (!resultSet.isBeforeFirst()) {%>
                <center><p>No Result found! Please try again.</p>
                    <input type="button" value="Close Window" onclick="self.close();opener.document.borrowingCreateForm.glName.value ='';opener.document.borrowingCreateForm.glBal.value ='';">
                </center>

                <% } else {%>
                <table border="2">
                    <%int i = 0;
                         while (resultSet.next()) {
                             i++;
                             if (flag == 1) {
                                 flag = 0;
                                 bgColor = "#AFC7C7";
                             } else {
                                 flag = 1;
                                 bgColor = "#95B9C7";
                             }
                             if (i == 1) {%>
                    <tr><th style="background-color: #99FF99;"><b>Account Number</b></th><th style="background-color: #99FF99;"><b>Ledger Name</b></th><th style="background-color: #99FF99;"><b>Balance</b></th><th style="background-color: #99FF99;"><b>A/c Open Date</b></th><th style="background-color: #99FF99;"><b>GL CODE</b></th></tr>
                    <%}%>
                    <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.borrowingCreateForm.glNameAmend.value = document.getElementById('x<%=i%>').innerHTML;
                    opener.document.borrowingCreateForm.glBalAmend.value = document.getElementById('z<%=i%>').innerHTML; window.opener.$('#searchindexAmmend').val('1');
                    self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                        <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.borrowingCreateForm.glNameAmend.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.borrowingCreateForm.glBalAmend.value = document.getElementById('z<%=i%>').innerHTML; window.opener.$('#searchindexAmmend').val('1');
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                        <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.borrowingCreateForm.glNameAmend.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.borrowingCreateForm.glBalAmend.value = document.getElementById('z<%=i%>').innerHTML; window.opener.$('#searchindexAmmend').val('1');
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                        <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.borrowingCreateForm.glNameAmend.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.borrowingCreateForm.glBalAmend.value = document.getElementById('z<%=i%>').innerHTML; window.opener.$('#searchindexAmmend').val('1');
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                        <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.borrowingCreateForm.glNameAmend.value = document.getElementById('x<%=i%>').innerHTML;
                        opener.document.borrowingCreateForm.glBalAmend.value = document.getElementById('z<%=i%>').innerHTML; window.opener.$('#searchindexAmmend').val('1');
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    </tr>
                    <%}%>
                </table>
                <%}
             } else if ((screenName.equalsIgnoreCase("share_reports.jsp")) && (lovKey.equalsIgnoreCase("shareAccount"))) {%>
                <% if (!resultSet.isBeforeFirst()) {%>
                <center><p>No Result found! Please try again.</p>
                    <input type="button" value="Close Window" onclick="self.close();">
                </center>

                <% } else {%>
                <table border="2">
                    <%int i = 0;
                         while (resultSet.next()) {
                             i++;
                             if (flag == 1) {
                                 flag = 0;
                                 bgColor = "#AFC7C7";
                             } else {
                                 flag = 1;
                                 bgColor = "#95B9C7";
                             }
                             if (i == 1) {%>
                    <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>
                    <%}%>
                    <tr><td bgcolor='<%=bgColor%>' id='x<%=i%>' onclick="opener.document.pacsreport.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                            self.close();" style="cursor:pointer;"><%=resultSet.getString(1)%></td>
                    <td bgcolor='<%=bgColor%>' id='d<%=i%>' onclick="opener.document.pacsreport.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                    <td bgcolor='<%=bgColor%>' id='y<%=i%>' onclick="opener.document.pacsreport.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                    <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.pacsreport.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                    <td bgcolor='<%=bgColor%>' id='zz<%=i%>' onclick="opener.document.pacsreport.accNo.value = document.getElementById('x<%=i%>').innerHTML;
                        self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    </tr>
                    <%}%>
                </table>
                <%}
             } else if ((screenName.equalsIgnoreCase("inv_borr_rep.jsp")) && (lovKey.equalsIgnoreCase("searchGl"))) {%>

                <table border="2">
                    <tr><th style="background-color: #99FF99;"><b>Account Number</b></th><th style="background-color: #99FF99;"><b>Ledger Name</b></th><th style="background-color: #99FF99;"><b>Balance</b></th><th style="background-color: #99FF99;"><b>A/c Open Date</b></th><th style="background-color: #99FF99;"><b>GLCC</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.pacsreport.gl_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.pacsreport.gl_id.value = document.getElementById('x<%=i%>').innerHTML;
                                self.close();" style="cursor:pointer;"><%=resultSet.getString(2)%></td>
                            <td bgcolor='<%=bgColor%>' id='z<%=i%>' onclick="opener.document.pacsreport.gl_id.value = document.getElementById('x<%=i%>').innerHTML;
                                self.close();" style="cursor:pointer;"><%=resultSet.getString(3)%></td>
                            <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.pacsreport.gl_id.value = document.getElementById('x<%=i%>').innerHTML;
                                self.close();" style="cursor:pointer;"><%=resultSet.getString(4)%></td>
                            <td bgcolor='<%=bgColor%>' id='a<%=i%>' onclick="opener.document.pacsreport.gl_id.value = document.getElementById('x<%=i%>').innerHTML;
                                self.close();" style="cursor:pointer;"><%=resultSet.getString(5)%></td>
                    </tr>
                         <%}%>
                </table>
                     <%}%>





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

                    </html>
