<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="java.util.*,java.io.*,java.text.*"%>
<%@page import="com.csc.library.util.download.*"%>
<%@page import="com.csc.library.util.ManageDocument"%>
<%@page import="com.csc.library.approve.*,com.csc.library.databean.*"%>
<%@page import="com.csc.library.entry.*,com.csc.library.utilities.*,com.csc.library.report.*"%>
<%@page import="com.csc.library.session.*"%>

<%request.setCharacterEncoding("UTF-8");%>

<jsp:useBean id="TEMPLATE_WORKFLOW" class="com.csc.library.system.Task" scope="page"/>

<%
TEMPLATE_WORKFLOW.setChannel(request,response);
TEMPLATE_WORKFLOW.checkProfile();
if( TEMPLATE_WORKFLOW.getUProfile() != null ){
TEMPLATE_WORKFLOW.getUProfile().set("appname","WELFARE");
	UIManager screenSingle = (UIManager) TEMPLATE_WORKFLOW.process("SingleEntry","TEMPLATE_WORKFLOW");
	
	DecimalFormat df = new DecimalFormat("#,##0.00");
%>

	<%
	String wf = null;
	CheckNull chkNull = new CheckNull();
		String dss1 = "none";
		String dss2 = "none";
		String dss3 = "none";
		String dss4 = "none";
		String dss5 = "none";
	String stp= chkNull.chkNullString(request.getParameter("step_id"));
	if(stp.equals("2") || stp.equals("3")){ 
		dss1 ="";
		dss2 ="";
		dss3 ="";
		dss4 ="";
		dss5 ="";
	}
	Organization og = new Masfactor(screenSingle.getUProfile());
	String subject = null;
	String remark = null;
	String emp_fullname = null;
	String bossid = og.getBoss(screenSingle.getUProfile().get("employeeid"),screenSingle.getUProfile().get("job")).get(0).toString();
	String bossjob = bossid.substring(bossid.indexOf(":")+1);
	CscCalendar calendar = new CscCalendar();
	long attach_time = Long.parseLong(chkNull.chkNullString(request.getParameter("attach_time"),String.valueOf(calendar.getTimeInMillis())));
	
	if( !chkNull.chkNullString(request.getParameter("__cmd")).equals("save") ){
		subject = chkNull.chkNullString(request.getParameter("subject"));
		remark = chkNull.chkNullString(request.getParameter("__remark"));
		emp_fullname = chkNull.chkNullString(request.getParameter("emp_fullname"));
	}else if( chkNull.chkNullString(request.getParameter("__cmd")).equals("save") ){
		if(chkNull.chkNullString(request.getParameter("step_id")).equals("0")){
				ThaiUtilities th=new ThaiUtilities();
				String doclist=chkNull.chkNullString(th.ASCII2Unicode(request.getParameter("__wf__attachdesc1")));
				doclist+=chkNull.chkNullString(th.ASCII2Unicode(request.getParameter("__wf__attachdesc2")));
				doclist+=chkNull.chkNullString(th.ASCII2Unicode(request.getParameter("__wf__attachdesc3")));
				doclist+=chkNull.chkNullString(th.ASCII2Unicode(request.getParameter("__wf__attachdesc4")));
				doclist+=chkNull.chkNullString(th.ASCII2Unicode(request.getParameter("__wf__attachdesc5")));
				
				response.sendRedirect("../WELFARE/WELSENT_COMPLETE.jsp?doc_no="+screenSingle.getRecord().getParam("doc_no")+"&doclist="+java.net.URLEncoder.encode(doclist));
		}else{
				response.sendRedirect("../MYNOTE/SENT_COMPLETE.jsp");
		}
	}else{
		subject = "";
		remark = "";
		emp_fullname = "";
	}
	
	bossid = bossid.substring(0,bossid.indexOf(":"));
	DbRecord memployee_dr = new InitialRecord(screenSingle.getUProfile()).getDbRecord("Memployee");
	memployee_dr.setColumn("*");
	memployee_dr.set("COMPANYID",screenSingle.getUProfile().get("companyid"));
	memployee_dr.set("EMPLOYEEID",bossid);
	memployee_dr.search();
	
	//WF_STATUS 1 = รอการอนุมัติ
	//          3 = ยกเลิกการอนุมัติ
	//          4 = อนุมัติแล้ว
	//          5 = ไม่อนุมัติ
	//          6 = แก้ไขโดย HR
	//          7 = ส่งกลับ
	//          8 = ยกเลิกเอกสาร
	//          9 = ประวัติ
	if( (!screenSingle.getDataLabel("WF_STATUS").equals("1")) && (!screenSingle.getDataLabel("WF_STATUS").equals("4")) &&
		(!screenSingle.getDataLabel("WF_STATUS").equals("7")) ){
		wf = "false";
	}else{
		wf = "true";
	}
	
	if( request.getParameter("downfile") != null ){
		ThaiUtilities tu = new ThaiUtilities();
		String filePath = request.getParameter("downfile");
		File f = new File(tu.ASCII2Unicode(filePath));
		String fileName = f.getName();
		String fileType = fileName.substring(fileName.indexOf(".")+1,fileName.length());
		if ( f.exists() && f.canRead() ) {			
			response.setContentType("application/octet-stream");
			response.setHeader("Content-Disposition", "attachment; filename="+tu.Unicode2ASCII(f.getName()));
			response.setHeader("cache-control", "no-cache");
			response.setContentLength((int) f.length());
			BufferedInputStream fileInput = new BufferedInputStream(new FileInputStream(f));
			byte buffer[] = new byte[8 * 1024];
			out.clearBuffer();
			OutputStream out_s = response.getOutputStream();
			CopyStreams.copyStreamsWithoutClose(fileInput, out_s, buffer);
			out_s.flush();
			out_s.close();
			fileInput.close();
		}
	}
%>

<jsp:useBean id="LOG_SENTHELP" class="com.csc.library.system.Task" scope="page"/>

<%
	LOG_SENTHELP.setChannel(request, response);
	HelpEntry screenHelp = (HelpEntry) LOG_SENTHELP.process("HelpEntry","LOG_SENTHELP");
	screenHelp.getInquiry().setFilter("COMPANYID = '"+screenHelp.getUProfile().get("companyid")+"' AND "+
									  "WF_ID = '"+chkNull.chkNullString(request.getParameter("wf_id"),"302")+"' AND "+
									  "WF_VER = '"+chkNull.chkNullString(request.getParameter("wf_ver"),"1")+"'"
									 );
	screenHelp.referLangOn();
	screenHelp.process();
%>

<!-- Insert useBean -->

<HTML>
	<HEAD>
		<TITLE>myNOTE : Business Process Management Service</TITLE>
		<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
		<!-- Insert Link -->
		<LINK HREF="../CSS/MYNOTE.css" REL="stylesheet" TYPE="text/css">
		<LINK HREF="../CSS/MYNOTE_MENU.css" REL="stylesheet" TYPE="text/css">
		<!-- Insert Script Import -->
		<SCRIPT TYPE='text/JavaScript' SRC='../JS/MYNOTE_SCREEN.js'></SCRIPT>
		<SCRIPT TYPE='text/JavaScript' SRC='../JS/MYNOTE_MENU.js'></SCRIPT>
		<SCRIPT TYPE='text/JavaScript' SRC='../JS/SCREEN.js'></SCRIPT>
		<script src="../JS/PRINTPAGE.js"></script>		
		<SCRIPT TYPE='text/JavaScript' SRC='../JS/WELSCREEN.js'></SCRIPT>
		<SCRIPT LANGUAGE="JavaScript">setLang('<%=screenSingle.getUProfile().get("lang")%>');</SCRIPT>
				<!--DWR INCLUDE-->
		<script src="../JS/VIEWCALENDAR.js"></script>
  <script type='text/javascript' src='/hr/dwr/interface/SearchDWR.js'></script>
  <script type='text/javascript' src='/hr/dwr/engine.js'></script>
  <script type='text/javascript' src='/hr/dwr/util.js'></script>
  <script type="text/javascript" src="/hr/dwr/interface/SystemCode.js"></script>
  <script type="text/javascript" src="/hr/dwr/interface/CscCalendar.js"></script>
        <script type="text/javascript" src="/hr/dwr/interface/CheckRequisition.js"></script>
<!--DWR INCLUDE-->
		
		<script language="javascript">
var empdata;
var familydata;
var relationdata=new Array();

function setSpanEmployee(empid){	
		SearchDWR.search1(new Array("memployee","employeeid,companyid,fname,lname,efname,elname,emp_prefix,fullname,tel_ext,bossid,bu1,bu2,bu3,positionname,bu2name,emp_type,emp_position","employeeid = '"+empid+"'","employeeid","langon"),spanEmp);
		SearchDWR.searchAll(new Array("mempl_family","fullname,employeeid,companyid,relationid,fnameid,lname,efname,elname,line_no,prefix","employeeid = '"+empid+"'","employeeid","langon"),setfamilydata);		
}


var spanEmp=function (data1){
        empdata=data1;
		DWRUtil.setValue("spfullname",empdata[7]);
		DWRUtil.setValue("sppositionname",empdata[13]);
		DWRUtil.setValue("spemployeeid",empdata[0]);
		DWRUtil.setValue("spbu2name",empdata[14]);
		DWRUtil.setValue("sptel_ext",empdata[8]);
}

var setfamilydata=function(data){
	familydata=null;
	familydata=data;
	SearchDWR.searchAll(new Array("mrelation","relationid,tdesc,edesc","","relationid","langon"),relationdesc);		
}

var relationdesc=function (data){	
		for(var i=0;i<familydata.length;i++){
					for(var j=0;j<data.length;j++){
								if(data[j][0]==familydata[i][3]){
											relationdata[i]=data[j][1];
											break;
								}			
			     }						
	     }
		 
}

function setempUsed(fname,lineno){
			for(var i=0;i<familydata.length;i++){
					if(familydata[i][8]==lineno){						
					     DWRUtil.setValue(fname,relationdata[i]+"  "+familydata[i][0]);
						  break;
					}
	     }
	}

</script>
	    <style type="text/css">
<!--
.style1 {
	font-family: AngsanaUPC, "MS Sans Serif";
	font-size: 16px;
	font-weight: bold;
}
.style4 {
font-family: AngsanaUPC, "MS Sans Serif";
font-size: 14px;
}

.tablelayout{
	width:500;
	text-align:justify;
	font-family: AngsanaUPC, "MS Sans Serif";
	font-size: 14px;
}

-->
        </style>
</HEAD>
	<BODY BGCOLOR=#FFFFFF onLoad="MM_preloadImages('../IMAGES/BUTTON/SWAP/EDIT_SWAP20.gif','../IMAGES/BUTTON/SWAP/EXIT_SWAP20.gif')">
	<!-- ImageReady Slices (02.psd) -->
		<FORM NAME="cscform" METHOD="post" ACTION="WEL202_NSTDA.jsp">
			<!----------BEGIN CSC INITIAL ZONE ------------------------>
<%=screenSingle.InitialVariable()%>
<!----------END CSC INITIAL ZONE -------------------------->
			<SPAN id="message1" ></SPAN>
			<INPUT TYPE="hidden" NAME="__screen" VALUE="WEL202_NSTDA">
			<INPUT TYPE="hidden" NAME="__cmd" VALUE="">
			<INPUT TYPE="hidden" NAME="__help" VALUE="">
			<INPUT TYPE="hidden" NAME="__fixCon" VALUE="">
			
			<INPUT TYPE="hidden" NAME="__notNull" VALUE="<%=screenSingle.getRequire()%>">
			<INPUT TYPE="hidden" NAME="__companyid" VALUE="<%=screenSingle.getUProfile().get("companyid")%>">

			<INPUT TYPE="hidden" NAME="wf_id" VALUE="302">
			<INPUT TYPE="hidden" NAME="wf_ver" VALUE="<%=chkNull.chkNullString(request.getParameter("wf_ver"),"1")%>">
			<INPUT TYPE="hidden" NAME="__wf_id" VALUE="302">
			<INPUT TYPE="hidden" NAME="__wf_ver" VALUE="<%=chkNull.chkNullString(request.getParameter("wf_ver"),"1")%>">
			<INPUT TYPE="hidden" NAME="wf_seq_no" VALUE="<%=chkNull.chkNullString(request.getParameter("wf_seq_no"),"0")%>">
			<INPUT TYPE="hidden" NAME="step_id" VALUE="<%=chkNull.chkNullString(request.getParameter("step_id"),"0")%>">
			<INPUT TYPE="hidden" NAME="step_seq_no" VALUE="<%=chkNull.chkNullString(request.getParameter("step_seq_no"),"0")%>">
			<INPUT TYPE="hidden" NAME="wf_return_actor" VALUE="IINIT">
			<INPUT TYPE="hidden" NAME="__oldDocumentID" VALUE="<%=screenSingle.getDataLabel("DOC_NO")%>">
			<INPUT TYPE="hidden" NAME="__oldWF" VALUE="<%=screenSingle.getDataLabel("WF_STATUS")%>">
			
			<INPUT TYPE="hidden" NAME="__wf" VALUE="<%=wf%>">
			<INPUT TYPE="hidden" NAME="__wfcmd" VALUE="false">
			<!-- Insert Hidden Field -->
			  <input type="hidden" name="__calendar">
    <script language="javascript">getInputFormatDate();</script>
<input type="hidden" name="__language"  value="<%= TEMPLATE_WORKFLOW.getUProfile().get("lang") %>">
			<%//=screenSingle.getTagConfirm()%>
			  <div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
</div>
			
			
			<DIV ID="toolTipLayer" STYLE="position:absolute; visibility: hidden"></DIV>
			<SCRIPT LANGUAGE="JavaScript">initToolTips();</SCRIPT>
			
<%
							String screen_value = chkNull.chkNullString(screenSingle.getDataLabel("SCREEN_VALUE"));
							HashMap hm = new HashMap();
							ManageDocument md = new ManageDocument();
							
							hm.put("WF_ID",request.getParameter("wf_id"));
							hm.put("WF_VER",request.getParameter("wf_ver"));
							hm.put("WF_SEQ_NO",request.getParameter("wf_seq_no"));
							hm.put("STEP_ID",request.getParameter("step_id"));
							hm.put("STEP_SEQ_NO",request.getParameter("step_seq_no"));
							hm.put("ACTOR_ID",screenSingle.getUProfile().getActor());
							hm.put("POSITION_CODE",screenSingle.getUProfile().get("job"));
							
							md.setUProfile(screenSingle.getUProfile());
							md.setParam(hm);
							md.setVW_Incident();
							md.setWFDataValue(screen_value);
							ReportUDF rf=new ReportUDF();
							
							memployee_dr.set("COMPANYID",screenSingle.getUProfile().get("companyid"));
							memployee_dr.set("EMPLOYEEID",md.getWFDataValue("__wf__employeeid"));
							memployee_dr.search();
							String none="";
						%>
										<!-- Insert Code Step 3 -->
										<input type="hidden" name="__wf__attdesc" value="<%= md.getWFDataValue("__wf__attdesc") %>">
										<input type="hidden" name="__wf__at1" value="<%= md.getWFDataValue("__wf__at1") %>">
										<input type="hidden" name="__wf__at2" value="<%= md.getWFDataValue("__wf__at2") %>">
										<input type="hidden" name="__wf__at3" value="<%= md.getWFDataValue("__wf__at3") %>">
										<input type="hidden" name="__wf__at4" value="<%= md.getWFDataValue("__wf__at4") %>">
										<input type="hidden" name="__wf__at5" value="<%= md.getWFDataValue("__wf__at5") %>">
										<input type="hidden" name="__wf__attach1" value="<%= md.getWFDataValue("__wf__attach1") %>">
										<input type="hidden" name="__wf__attach2" value="<%= md.getWFDataValue("__wf__attach2") %>">
										<input type="hidden" name="__wf__attach3" value="<%= md.getWFDataValue("__wf__attach3") %>">
										<input type="hidden" name="__wf__attach4" value="<%= md.getWFDataValue("__wf__attach4") %>">
										<input type="hidden" name="__wf__attach5" value="<%= md.getWFDataValue("__wf__attach5") %>">
										<input type="hidden" name="__wf__attachdesc1" value="<%= md.getWFDataValue("__wf__attachdesc1") %>">
										<input type="hidden" name="__wf__attachdesc2" value="<%= md.getWFDataValue("__wf__attachdesc2") %>">
										<input type="hidden" name="__wf__attachdesc3" value="<%= md.getWFDataValue("__wf__attachdesc3") %>">
										<input type="hidden" name="__wf__attachdesc4" value="<%= md.getWFDataValue("__wf__attachdesc4") %>">
										<input type="hidden" name="__wf__attachdesc5" value="<%= md.getWFDataValue("__wf__attachdesc5") %>">										
										<input  type="hidden" name="__wf__addval" value="<%= md.getWFDataValue("__wf__addval") %>">
							<input type="hidden" name="__wf__employeeid" value="<%= md.getWFDataValue("__wf__employeeid") %>">
           					<BR>							
			<!-- initial Report -->
			<%
			String reqtype=md.getWFDataValue("__wf__requisition_type");
			String emtype=memployee_dr.getString("emp_type");
			
							/* เอาออกเพราะตอนนี้พนักงานโครงการสามารถเบิกให้คนในครับครัวได้
							if(!emtype.equals("1")){
									none="none";
							}*/
			
			%>
			<TABLE WIDTH="700" BORDER=0 ALIGN="center" CELLPADDING=0 CELLSPACING=0     onMouseover="showmenu(event,linkset[0])" onMouseout="delayhidemenu()">
			<tr>
			<td><TABLE WIDTH="95%" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="0">
		<TR>
				<TD WIDTH="5" HEIGHT="5"><IMG SRC="../IMAGES/MYNOTE/C-T-L.gif" WIDTH="5" HEIGHT="5"></TD>
				<TD HEIGHT="5"><IMG SRC="../IMAGES/MYNOTE/T.gif" WIDTH="100%" HEIGHT="5"></TD>
				<TD WIDTH="5" HEIGHT="5"><IMG SRC="../IMAGES/MYNOTE/C-T-R.gif" WIDTH="5" HEIGHT="5"></TD>
		</TR>
		<TR>
		<TD WIDTH="5" BACKGROUND="../IMAGES/MYNOTE/L2.gif"><FONT COLOR="#FFFFFF"></FONT></TD>
		<TD VALIGN="middle">	
			<TABLE WIDTH="100%" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="0">
              <TR>
                <TD width="27%"><img src="../IMAGES/LOGO_NSTDA.gif"></TD>
                <TD width="50%" valign="top">
				<table width="99%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td height="25"  class="style4"><div align="center" >สำนักงานพัฒนาวิทยาศาสตร์และเทคโนโลยีแห่งชาติ</div></td>
                  </tr>
                  <tr>
                    <td  class="style4"><div align="center" >ใบเบิกเงินสวัสดิการเกี่ยวกับการรักษาพยาบาล</div></td>
                  </tr>
                  <tr>
                    <td  class="style4"><div align="center" >กรณี<%if(reqtype.equals("2")){%>จ่ายตรงให้สถานพยาบาล<%}else{%>เบิกเป็นเงินสด/ผ่านบัญชีธนาคาร<%}%> สำหรับ<%if(emtype.equals("1")){%>พนักงาน<%} else{%>พนักงานโครงการ<%}%></div></td>
                  </tr>
                  <tr>
                    <td><div align="center"></div></td>
                  </tr>
                </table></TD>
                <TD width="23%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td  class="style4" nowrap><div align="left">(<%=screenSingle.getDataLabel("DOC_NO")%>)
                        <%if(reqtype.equals("2")){%>แบบ พว.บค.24 <%}else{%>แบบ พว.บค.23 <%}%></div></td>
                  </tr>
                  <tr>
                    <td  class="style4"><div align="left"><%if(reqtype.equals("2")){%>(สีเหลือง)<%}else if(emtype.equals("1")){%>(สีเขียว)<%} else{%>(สีฟ้า)<%}%></div></td>
                  </tr>
                  <tr>
                    <td><div align="left"></div></td>
                  </tr>
                  <tr>
                    <td><div align="left"></div></td>
                  </tr>
                </table></TD>
              </TR>
            </TABLE>
			<br>
			<br>
			<br>
			<TABLE WIDTH="100%" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="0">
              <TR>
                <TD width="5%" nowrap   >1.<strong>ผู้เบิกชื่อ</strong></TD>
                <TD width="16%" nowrap class="style4" ><span id="spfullname"/></TD>
                <TD width="4%" nowrap class="style4"  ><strong>ตำแหน่ง</strong></TD>
                <TD width="15%"   nowrap class="style4"  ><span id="sppositionname"/></TD>
                <TD width="4%" nowrap class="style4"  ><strong>รหัส</strong></TD>
                <TD width="16%"  nowrap class="style4"  ><span id="spemployeeid"/></TD>
                <TD width="4%" nowrap class="style4"  ><strong>สังกัด</strong></TD>
                <TD width="24%" nowrap class="style4"   ><span id="spbu2name"/></TD>
                <TD width="6%" nowrap class="style4"  ><strong>เบอร์ติดต่อ</strong></TD>
                <TD width="6%" nowrap class="style4"  ><span id="sptel_ext"/></TD>
              </TR>
            </TABLE>
			<br>
			<script language="javascript">setSpanEmployee('<%=md.getWFDataValue("__wf__employeeid")%>')</script>
			<table width="100%" border="0" cellpadding="1" cellspacing="0" bgcolor="#000000">
              <tr>
                <td><TABLE WIDTH="100%" height="20" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="1" class="inframe">
                  <TR>
                    <TD width="20%" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center"><strong>2.ขอเบิกเงินค่ารักษาพยาบาลสำหรับ</strong></div></TD>
                    <TD width="30%" valign="top" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center"><strong>ป่วยเป็นโรค</strong></div></TD>
                    <TD width="29%" valign="top" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center"><strong>ชื่อสถานพยาบาล</strong></div></TD>
                    <TD width="11%" valign="top" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center"><strong>วันที่รักษา</strong></div></TD>
                    <TD width="10%" valign="top" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center"><strong>จำนวนเงิน</strong></div></TD>
                  </TR>
				  <%
				  int item=Integer.parseInt(md.getWFDataValue("__wf__addval"));
				  %>
                  <TR>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4" >
					  <span id="empuse1"/>					</TD>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4"   >&nbsp;<span><%= md.getWFDataValue("__wf__diseasedesc1") %></span></TD>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4"  >&nbsp;<span><%String wel1=md.getWFDataValue("__wf__welfare1");if(wel1.length()>0){  if(md.getWFDataValue("__wf__other_sitewel1").trim().length()>0){out.println(md.getWFDataValue("__wf__other_sitewel1"));}else{out.print(md.getWFDataValue("__wf__sitewel_name1"));}} %></span></TD>
                    <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center">
                        <%if(md.getWFDataValue("__wf__welfare1").length()>0){ 
						out.println(md.getWFDataValue("__wf__receipt_date1"));
						}%>
                    </div></TD>
                    <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  >
                      <div align="right">
                        <%if(md.getWFDataValue("__wf__welfare1").length()>0){ out.println(md.getWFDataValue("__wf__amount1"));}%>                      
                      </div></TD>
                  </TR>
                  <TR>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4" >
					  <span id="empuse2"/>					</TD>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4"  >&nbsp;<span><%if(md.getWFDataValue("__wf__welfare2").length()>0){out.print(md.getWFDataValue("__wf__diseasedesc2"));}%></span></TD>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4"  >&nbsp;<span><%String wel2=md.getWFDataValue("__wf__welfare2");if(wel2.length()>0){  if(md.getWFDataValue("__wf__other_sitewel2").trim().length()>0){out.println(md.getWFDataValue("__wf__other_sitewel2"));}else{out.print(md.getWFDataValue("__wf__sitewel_name2"));}} %></span></TD>
                    <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center">
                        <%if(md.getWFDataValue("__wf__welfare2").length()>0){ 
						out.println(md.getWFDataValue("__wf__receipt_date2"));}%>
                    </div></TD>
                  <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  >
                    <div align="right">
                      <%if(md.getWFDataValue("__wf__welfare2").length()>0){ out.println(md.getWFDataValue("__wf__amount2"));}%>                    
                    </div></TD>
                  </TR>
                  <TR>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4" >
					  <span id="empuse3"/>					</TD>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4"  >&nbsp;<span><%if(md.getWFDataValue("__wf__welfare3").length()>0){out.print(md.getWFDataValue("__wf__diseasedesc3"));}%></span></TD>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4"  >&nbsp;<span><%String wel3=md.getWFDataValue("__wf__welfare3");if(wel3.length()>0){  if(md.getWFDataValue("__wf__other_sitewel3").trim().length()>0){out.println(md.getWFDataValue("__wf__other_sitewel3"));}else{out.print(md.getWFDataValue("__wf__sitewel_name3"));}} %>
</span></TD>
                    <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center">
                        <%if(md.getWFDataValue("__wf__welfare3").length()>0){ out.println(md.getWFDataValue("__wf__receipt_date3"));}%>
                    </div></TD>
                    <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  >
                      <div align="right">
                        <%if(md.getWFDataValue("__wf__welfare3").length()>0){ out.println(md.getWFDataValue("__wf__amount3"));}%>                      
                      </div></TD>
                  </TR>
                  <TR>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4" >
					  <span id="empuse4"/>					</TD>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4"  >&nbsp;<span><%if(md.getWFDataValue("__wf__welfare4").length()>0){out.print(md.getWFDataValue("__wf__diseasedesc4"));}%></span></TD>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4"  >&nbsp;<span><%String wel4=md.getWFDataValue("__wf__welfare4");if(wel4.length()>0){  if(md.getWFDataValue("__wf__other_sitewel4").trim().length()>0){out.println(md.getWFDataValue("__wf__other_sitewel4"));}else{out.print(md.getWFDataValue("__wf__sitewel_name4"));}} %>
</span></TD>
                    <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center">
                        <%if(md.getWFDataValue("__wf__welfare4").length()>0){ out.println(md.getWFDataValue("__wf__receipt_date4"));}%>
                    </div></TD>
                    <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  >
                      <div align="right">
                        <%if(md.getWFDataValue("__wf__welfare4").length()>0){ out.println(md.getWFDataValue("__wf__amount4"));}%>                      
                      </div></TD>
                  </TR>
                  <TR>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4" >
					  <span id="empuse5"/>					</TD>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4"  >&nbsp;<span><%if(md.getWFDataValue("__wf__welfare5").length()>0){out.print(md.getWFDataValue("__wf__diseasedesc5"));}%></span></TD>
                    <TD valign="middle" bgcolor="#FFFFFF" class="style4"  >&nbsp;<span><%String wel5=md.getWFDataValue("__wf__welfare5");if(wel5.length()>0){  if(md.getWFDataValue("__wf__other_sitewel5").trim().length()>0){out.println(md.getWFDataValue("__wf__other_sitewel5"));}else{out.print(md.getWFDataValue("__wf__sitewel_name5"));}} %>
</span></TD>
                    <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center">
                        <%if(md.getWFDataValue("__wf__welfare5").length()>0){ out.println(md.getWFDataValue("__wf__receipt_date5"));}%>
                    </div></TD>
                    <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  >
                      <div align="right">
                        <%if(md.getWFDataValue("__wf__welfare5").length()>0){ out.println(md.getWFDataValue("__wf__amount5"));}%>                      
                      </div></TD>
                  </TR>
                </TABLE></td>
              </tr>
            </table>		
			<%
				String str[]=md.getWFDataValue("__wf__percentlist").split(",");
				int pay100=0;
				int pay000=0;
				int pay075=0;
				int pay050=0;
				int payfull=0;
				
				for(int i=0;i<str.length;i++){
						if(str[i].equals("100")){
								pay100++;
						}else  if(str[i].equals("75")){
								pay075++;
						}else if(str[i].equals("50")){
								pay050++;
						}else if(str[i].equals("0")){
								pay000++;
						}else if(str[i].equals("-1")){
								payfull++;
						}
				}
				
			%>
			<%
				double personcost1=0,personcost2=0,familycost1=0,familycost2=0;
				double cost01p=0,cost02p=0,cost03p=0,cost04p=0,cost05p=0,cost06p=0;
				double cost01f=0,cost02f=0,cost03f=0,cost04f=0,cost05f=0,cost06f=0;
				double cost01p2=0,cost02p2=0,cost03p2=0,cost04p2=0,cost05p2=0,cost06p2=0;
				double cost01f2=0,cost02f2=0,cost03f2=0,cost04f2=0,cost05f2=0,cost06f2=0;
			%>
			<script language="javascript">
			     setTimeout("setspObject()",2000);
				 
				 function 	setspObject(){	
								<%
								  if(md.getWFDataValue("__wf__welfare1").length()>0 && md.getWFDataValue("__wf__family1").length()>0){														  
								  		if(md.getWFDataValue("__wf__sitewelgid1").equals("01")){
												familycost1+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount1").replace(",",""),"0"));
														/*****  01  *****/
														if(md.getWFDataValue("__wf__detail11").equals("01")){
															cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail12").equals("01")){
															cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail13").equals("01")){
															cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail14").equals("01")){
															cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail15").equals("01")){
															cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
														}									
														
														/*****  02  *****/
														if(md.getWFDataValue("__wf__detail11").equals("02")){
															cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail12").equals("02")){
															cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail13").equals("02")){
															cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail14").equals("02")){
															cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail15").equals("02")){
															cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
														}									
				
														/*****  03  *****/
														if(md.getWFDataValue("__wf__detail11").equals("03")){
															cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail12").equals("03")){
															cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail13").equals("03")){
															cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail14").equals("03")){
															cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail15").equals("03")){
															cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
														}									
				
														/*****  04  *****/
														if(md.getWFDataValue("__wf__detail11").equals("04")){
															cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail12").equals("04")){
															cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail13").equals("04")){
															cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail14").equals("04")){
															cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail15").equals("04")){
															cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
														}									
				
														/*****  05  *****/
														if(md.getWFDataValue("__wf__detail11").equals("05")){
															cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail12").equals("05")){
															cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail13").equals("05")){
															cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail14").equals("05")){
															cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
														}
														if(md.getWFDataValue("__wf__detail15").equals("05")){
															cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
														}									

														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail11").equals("01"))&&(!md.getWFDataValue("__wf__detail11").equals("02"))&&(!md.getWFDataValue("__wf__detail11").equals("03"))&&(!md.getWFDataValue("__wf__detail11").equals("04"))&&(!md.getWFDataValue("__wf__detail11").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail12").equals("01"))&&(!md.getWFDataValue("__wf__detail12").equals("02"))&&(!md.getWFDataValue("__wf__detail12").equals("03"))&&(!md.getWFDataValue("__wf__detail12").equals("04"))&&(!md.getWFDataValue("__wf__detail12").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail13").equals("01"))&&(!md.getWFDataValue("__wf__detail13").equals("02"))&&(!md.getWFDataValue("__wf__detail13").equals("03"))&&(!md.getWFDataValue("__wf__detail13").equals("04"))&&(!md.getWFDataValue("__wf__detail13").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail14").equals("01"))&&(!md.getWFDataValue("__wf__detail14").equals("02"))&&(!md.getWFDataValue("__wf__detail14").equals("03"))&&(!md.getWFDataValue("__wf__detail14").equals("04"))&&(!md.getWFDataValue("__wf__detail14").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail15").equals("01"))&&(!md.getWFDataValue("__wf__detail15").equals("02"))&&(!md.getWFDataValue("__wf__detail15").equals("03"))&&(!md.getWFDataValue("__wf__detail15").equals("04"))&&(!md.getWFDataValue("__wf__detail15").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
														}	
													/***** END 1*****/
													
											}else{
												familycost2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount1").replace(",",""),"0"));
															/*****  01  *****/
															if(md.getWFDataValue("__wf__detail11").equals("01")){
																cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail12").equals("01")){
																cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail13").equals("01")){
																cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail14").equals("01")){
																cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail15").equals("01")){
																cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
															}									
															
															/*****  02  *****/
															if(md.getWFDataValue("__wf__detail11").equals("02")){
																cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail12").equals("02")){
																cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail13").equals("02")){
																cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail14").equals("02")){
																cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail15").equals("02")){
																cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
															}									
					
															/*****  03  *****/
															if(md.getWFDataValue("__wf__detail11").equals("03")){
																cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail12").equals("03")){
																cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail13").equals("03")){
																cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail14").equals("03")){
																cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail15").equals("03")){
																cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
															}									
					
															/*****  04  *****/
															if(md.getWFDataValue("__wf__detail11").equals("04")){
																cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail12").equals("04")){
																cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail13").equals("04")){
																cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail14").equals("04")){
																cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail15").equals("04")){
																cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
															}									
					
															/*****  05  *****/
															if(md.getWFDataValue("__wf__detail11").equals("05")){
																cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail12").equals("05")){
																cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail13").equals("05")){
																cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail14").equals("05")){
																cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
															}
															if(md.getWFDataValue("__wf__detail15").equals("05")){
																cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
															}		
															
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail11").equals("01"))&&(!md.getWFDataValue("__wf__detail11").equals("02"))&&(!md.getWFDataValue("__wf__detail11").equals("03"))&&(!md.getWFDataValue("__wf__detail11").equals("04"))&&(!md.getWFDataValue("__wf__detail11").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail12").equals("01"))&&(!md.getWFDataValue("__wf__detail12").equals("02"))&&(!md.getWFDataValue("__wf__detail12").equals("03"))&&(!md.getWFDataValue("__wf__detail12").equals("04"))&&(!md.getWFDataValue("__wf__detail12").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail13").equals("01"))&&(!md.getWFDataValue("__wf__detail13").equals("02"))&&(!md.getWFDataValue("__wf__detail13").equals("03"))&&(!md.getWFDataValue("__wf__detail13").equals("04"))&&(!md.getWFDataValue("__wf__detail13").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail14").equals("01"))&&(!md.getWFDataValue("__wf__detail14").equals("02"))&&(!md.getWFDataValue("__wf__detail14").equals("03"))&&(!md.getWFDataValue("__wf__detail14").equals("04"))&&(!md.getWFDataValue("__wf__detail14").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail15").equals("01"))&&(!md.getWFDataValue("__wf__detail15").equals("02"))&&(!md.getWFDataValue("__wf__detail15").equals("03"))&&(!md.getWFDataValue("__wf__detail15").equals("04"))&&(!md.getWFDataValue("__wf__detail15").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
														}	
																						
														
														/***** END 1*****/												
										}
								  %>
								  setempUsed('empuse1','<%=md.getWFDataValue("__wf__family1")%>');
								  <%
								  }else if(md.getWFDataValue("__wf__welfare1").length()>0 ){
								  		if(md.getWFDataValue("__wf__sitewelgid1").equals("01")){
												personcost1+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount1").replace(",",""),"0"));
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail11").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail12").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail13").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail14").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail15").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail11").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail12").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail13").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail14").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail15").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail11").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail12").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail13").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail14").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail15").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail11").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail12").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail13").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail14").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail15").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail11").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail12").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail13").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail14").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail15").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
										}									
									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail11").equals("01"))&&(!md.getWFDataValue("__wf__detail11").equals("02"))&&(!md.getWFDataValue("__wf__detail11").equals("03"))&&(!md.getWFDataValue("__wf__detail11").equals("04"))&&(!md.getWFDataValue("__wf__detail11").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail12").equals("01"))&&(!md.getWFDataValue("__wf__detail12").equals("02"))&&(!md.getWFDataValue("__wf__detail12").equals("03"))&&(!md.getWFDataValue("__wf__detail12").equals("04"))&&(!md.getWFDataValue("__wf__detail12").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail13").equals("01"))&&(!md.getWFDataValue("__wf__detail13").equals("02"))&&(!md.getWFDataValue("__wf__detail13").equals("03"))&&(!md.getWFDataValue("__wf__detail13").equals("04"))&&(!md.getWFDataValue("__wf__detail13").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail14").equals("01"))&&(!md.getWFDataValue("__wf__detail14").equals("02"))&&(!md.getWFDataValue("__wf__detail14").equals("03"))&&(!md.getWFDataValue("__wf__detail14").equals("04"))&&(!md.getWFDataValue("__wf__detail14").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail15").equals("01"))&&(!md.getWFDataValue("__wf__detail15").equals("02"))&&(!md.getWFDataValue("__wf__detail15").equals("03"))&&(!md.getWFDataValue("__wf__detail15").equals("04"))&&(!md.getWFDataValue("__wf__detail15").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
														}	
									
									/***** END 1*****/
																						
										}else{
												personcost2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount1").replace(",",""),"0"));
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail11").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail12").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail13").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail14").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail15").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail11").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail12").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail13").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail14").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail15").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail11").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail12").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail13").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail14").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail15").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail11").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail12").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail13").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail14").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail15").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail11").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail12").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail13").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail14").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail15").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
										}									
									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail11").equals("01"))&&(!md.getWFDataValue("__wf__detail11").equals("02"))&&(!md.getWFDataValue("__wf__detail11").equals("03"))&&(!md.getWFDataValue("__wf__detail11").equals("04"))&&(!md.getWFDataValue("__wf__detail11").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open11").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail12").equals("01"))&&(!md.getWFDataValue("__wf__detail12").equals("02"))&&(!md.getWFDataValue("__wf__detail12").equals("03"))&&(!md.getWFDataValue("__wf__detail12").equals("04"))&&(!md.getWFDataValue("__wf__detail12").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open12").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail13").equals("01"))&&(!md.getWFDataValue("__wf__detail13").equals("02"))&&(!md.getWFDataValue("__wf__detail13").equals("03"))&&(!md.getWFDataValue("__wf__detail13").equals("04"))&&(!md.getWFDataValue("__wf__detail13").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open13").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail14").equals("01"))&&(!md.getWFDataValue("__wf__detail14").equals("02"))&&(!md.getWFDataValue("__wf__detail14").equals("03"))&&(!md.getWFDataValue("__wf__detail14").equals("04"))&&(!md.getWFDataValue("__wf__detail14").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open14").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail15").equals("01"))&&(!md.getWFDataValue("__wf__detail15").equals("02"))&&(!md.getWFDataValue("__wf__detail15").equals("03"))&&(!md.getWFDataValue("__wf__detail15").equals("04"))&&(!md.getWFDataValue("__wf__detail15").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open15").replace(",",""),"0"));
														}	
									/***** END 1*****/													
										}
								  %>
								  DWRUtil.setValue("empuse1",""+empdata[7]+"");
								  <%
								  }					  
								%>
								<%
								  if(md.getWFDataValue("__wf__welfare2").length()>0 && md.getWFDataValue("__wf__family2").length()>0){
								  		if(md.getWFDataValue("__wf__sitewelgid2").equals("01")){
												familycost1+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount2").replace(",",""),"0"));					
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail21").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail21").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail21").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail21").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail21").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									
									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail21").equals("01"))&&(!md.getWFDataValue("__wf__detail21").equals("02"))&&(!md.getWFDataValue("__wf__detail21").equals("03"))&&(!md.getWFDataValue("__wf__detail21").equals("04"))&&(!md.getWFDataValue("__wf__detail21").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail22").equals("01"))&&(!md.getWFDataValue("__wf__detail22").equals("02"))&&(!md.getWFDataValue("__wf__detail22").equals("03"))&&(!md.getWFDataValue("__wf__detail22").equals("04"))&&(!md.getWFDataValue("__wf__detail22").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail23").equals("01"))&&(!md.getWFDataValue("__wf__detail23").equals("02"))&&(!md.getWFDataValue("__wf__detail23").equals("03"))&&(!md.getWFDataValue("__wf__detail23").equals("04"))&&(!md.getWFDataValue("__wf__detail23").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail24").equals("01"))&&(!md.getWFDataValue("__wf__detail24").equals("02"))&&(!md.getWFDataValue("__wf__detail24").equals("03"))&&(!md.getWFDataValue("__wf__detail24").equals("04"))&&(!md.getWFDataValue("__wf__detail24").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail25").equals("01"))&&(!md.getWFDataValue("__wf__detail25").equals("02"))&&(!md.getWFDataValue("__wf__detail25").equals("03"))&&(!md.getWFDataValue("__wf__detail25").equals("04"))&&(!md.getWFDataValue("__wf__detail25").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
														}										
									/***** END 2*****/																					
										}else{
												familycost2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount2").replace(",",""),"0"));								
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail21").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail21").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail21").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail21").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail21").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									
									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail21").equals("01"))&&(!md.getWFDataValue("__wf__detail21").equals("02"))&&(!md.getWFDataValue("__wf__detail21").equals("03"))&&(!md.getWFDataValue("__wf__detail21").equals("04"))&&(!md.getWFDataValue("__wf__detail21").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail22").equals("01"))&&(!md.getWFDataValue("__wf__detail22").equals("02"))&&(!md.getWFDataValue("__wf__detail22").equals("03"))&&(!md.getWFDataValue("__wf__detail22").equals("04"))&&(!md.getWFDataValue("__wf__detail22").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail23").equals("01"))&&(!md.getWFDataValue("__wf__detail23").equals("02"))&&(!md.getWFDataValue("__wf__detail23").equals("03"))&&(!md.getWFDataValue("__wf__detail23").equals("04"))&&(!md.getWFDataValue("__wf__detail23").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail24").equals("01"))&&(!md.getWFDataValue("__wf__detail24").equals("02"))&&(!md.getWFDataValue("__wf__detail24").equals("03"))&&(!md.getWFDataValue("__wf__detail24").equals("04"))&&(!md.getWFDataValue("__wf__detail24").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail25").equals("01"))&&(!md.getWFDataValue("__wf__detail25").equals("02"))&&(!md.getWFDataValue("__wf__detail25").equals("03"))&&(!md.getWFDataValue("__wf__detail25").equals("04"))&&(!md.getWFDataValue("__wf__detail25").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
														}										
									/***** END 2*****/												
										}								  
								  %>
								  setempUsed('empuse2','<%=md.getWFDataValue("__wf__family2")%>');
								  <%
								  }else if(md.getWFDataValue("__wf__welfare2").length()>0 ){
								  		if(md.getWFDataValue("__wf__sitewelgid2").equals("01")){
												personcost1+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount2").replace(",",""),"0"));									
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail21").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail21").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail21").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail21").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail21").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail21").equals("01"))&&(!md.getWFDataValue("__wf__detail21").equals("02"))&&(!md.getWFDataValue("__wf__detail21").equals("03"))&&(!md.getWFDataValue("__wf__detail21").equals("04"))&&(!md.getWFDataValue("__wf__detail21").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail22").equals("01"))&&(!md.getWFDataValue("__wf__detail22").equals("02"))&&(!md.getWFDataValue("__wf__detail22").equals("03"))&&(!md.getWFDataValue("__wf__detail22").equals("04"))&&(!md.getWFDataValue("__wf__detail22").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail23").equals("01"))&&(!md.getWFDataValue("__wf__detail23").equals("02"))&&(!md.getWFDataValue("__wf__detail23").equals("03"))&&(!md.getWFDataValue("__wf__detail23").equals("04"))&&(!md.getWFDataValue("__wf__detail23").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail24").equals("01"))&&(!md.getWFDataValue("__wf__detail24").equals("02"))&&(!md.getWFDataValue("__wf__detail24").equals("03"))&&(!md.getWFDataValue("__wf__detail24").equals("04"))&&(!md.getWFDataValue("__wf__detail24").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail25").equals("01"))&&(!md.getWFDataValue("__wf__detail25").equals("02"))&&(!md.getWFDataValue("__wf__detail25").equals("03"))&&(!md.getWFDataValue("__wf__detail25").equals("04"))&&(!md.getWFDataValue("__wf__detail25").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
														}										
									/***** END 2*****/																							
										}else{
												personcost2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount2").replace(",",""),"0"));
									
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail21").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail21").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail21").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail21").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail21").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail22").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail23").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail24").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail25").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
										}									
									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail21").equals("01"))&&(!md.getWFDataValue("__wf__detail21").equals("02"))&&(!md.getWFDataValue("__wf__detail21").equals("03"))&&(!md.getWFDataValue("__wf__detail21").equals("04"))&&(!md.getWFDataValue("__wf__detail21").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open21").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail22").equals("01"))&&(!md.getWFDataValue("__wf__detail22").equals("02"))&&(!md.getWFDataValue("__wf__detail22").equals("03"))&&(!md.getWFDataValue("__wf__detail22").equals("04"))&&(!md.getWFDataValue("__wf__detail22").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open22").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail23").equals("01"))&&(!md.getWFDataValue("__wf__detail23").equals("02"))&&(!md.getWFDataValue("__wf__detail23").equals("03"))&&(!md.getWFDataValue("__wf__detail23").equals("04"))&&(!md.getWFDataValue("__wf__detail23").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open23").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail24").equals("01"))&&(!md.getWFDataValue("__wf__detail24").equals("02"))&&(!md.getWFDataValue("__wf__detail24").equals("03"))&&(!md.getWFDataValue("__wf__detail24").equals("04"))&&(!md.getWFDataValue("__wf__detail24").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open24").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail25").equals("01"))&&(!md.getWFDataValue("__wf__detail25").equals("02"))&&(!md.getWFDataValue("__wf__detail25").equals("03"))&&(!md.getWFDataValue("__wf__detail25").equals("04"))&&(!md.getWFDataValue("__wf__detail25").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open25").replace(",",""),"0"));
														}										
									/***** END 2*****/										
										}								  
								  %>
								  DWRUtil.setValue("empuse2",""+empdata[7]+"");
								  <%
								  }					  
								%>
								<%
								  if(md.getWFDataValue("__wf__welfare3").length()>0 && md.getWFDataValue("__wf__family3").length()>0){
								  		if(md.getWFDataValue("__wf__sitewelgid3").equals("01")){
												familycost1+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount3").replace(",",""),"0"));									
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail31").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail31").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail31").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail31").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open322").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail31").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}		
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail31").equals("01"))&&(!md.getWFDataValue("__wf__detail31").equals("02"))&&(!md.getWFDataValue("__wf__detail31").equals("03"))&&(!md.getWFDataValue("__wf__detail31").equals("04"))&&(!md.getWFDataValue("__wf__detail31").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail32").equals("01"))&&(!md.getWFDataValue("__wf__detail32").equals("02"))&&(!md.getWFDataValue("__wf__detail32").equals("03"))&&(!md.getWFDataValue("__wf__detail32").equals("04"))&&(!md.getWFDataValue("__wf__detail32").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail33").equals("01"))&&(!md.getWFDataValue("__wf__detail33").equals("02"))&&(!md.getWFDataValue("__wf__detail33").equals("03"))&&(!md.getWFDataValue("__wf__detail33").equals("04"))&&(!md.getWFDataValue("__wf__detail33").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail34").equals("01"))&&(!md.getWFDataValue("__wf__detail34").equals("02"))&&(!md.getWFDataValue("__wf__detail34").equals("03"))&&(!md.getWFDataValue("__wf__detail34").equals("04"))&&(!md.getWFDataValue("__wf__detail34").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail35").equals("01"))&&(!md.getWFDataValue("__wf__detail35").equals("02"))&&(!md.getWFDataValue("__wf__detail35").equals("03"))&&(!md.getWFDataValue("__wf__detail35").equals("04"))&&(!md.getWFDataValue("__wf__detail35").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
														}																	
									
									/***** END 3*****/																	
										}else{
												familycost2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount3").replace(",",""),"0"));
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail31").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail31").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail31").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail31").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open322").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail31").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail31").equals("01"))&&(!md.getWFDataValue("__wf__detail31").equals("02"))&&(!md.getWFDataValue("__wf__detail31").equals("03"))&&(!md.getWFDataValue("__wf__detail31").equals("04"))&&(!md.getWFDataValue("__wf__detail31").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail32").equals("01"))&&(!md.getWFDataValue("__wf__detail32").equals("02"))&&(!md.getWFDataValue("__wf__detail32").equals("03"))&&(!md.getWFDataValue("__wf__detail32").equals("04"))&&(!md.getWFDataValue("__wf__detail32").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail33").equals("01"))&&(!md.getWFDataValue("__wf__detail33").equals("02"))&&(!md.getWFDataValue("__wf__detail33").equals("03"))&&(!md.getWFDataValue("__wf__detail33").equals("04"))&&(!md.getWFDataValue("__wf__detail33").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail34").equals("01"))&&(!md.getWFDataValue("__wf__detail34").equals("02"))&&(!md.getWFDataValue("__wf__detail34").equals("03"))&&(!md.getWFDataValue("__wf__detail34").equals("04"))&&(!md.getWFDataValue("__wf__detail34").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail35").equals("01"))&&(!md.getWFDataValue("__wf__detail35").equals("02"))&&(!md.getWFDataValue("__wf__detail35").equals("03"))&&(!md.getWFDataValue("__wf__detail35").equals("04"))&&(!md.getWFDataValue("__wf__detail35").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
														}									
									/***** END 3*****/																
										}								  
								  %>
								  setempUsed('empuse3','<%=md.getWFDataValue("__wf__family3")%>');
								  <%
								  }else if(md.getWFDataValue("__wf__welfare3").length()>0 ){
								  		if(md.getWFDataValue("__wf__sitewelgid3").equals("01")){
												personcost1+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount3").replace(",",""),"0"));									
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail31").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail31").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail31").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail31").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open322").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail31").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									
									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail31").equals("01"))&&(!md.getWFDataValue("__wf__detail31").equals("02"))&&(!md.getWFDataValue("__wf__detail31").equals("03"))&&(!md.getWFDataValue("__wf__detail31").equals("04"))&&(!md.getWFDataValue("__wf__detail31").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail32").equals("01"))&&(!md.getWFDataValue("__wf__detail32").equals("02"))&&(!md.getWFDataValue("__wf__detail32").equals("03"))&&(!md.getWFDataValue("__wf__detail32").equals("04"))&&(!md.getWFDataValue("__wf__detail32").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail33").equals("01"))&&(!md.getWFDataValue("__wf__detail33").equals("02"))&&(!md.getWFDataValue("__wf__detail33").equals("03"))&&(!md.getWFDataValue("__wf__detail33").equals("04"))&&(!md.getWFDataValue("__wf__detail33").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail34").equals("01"))&&(!md.getWFDataValue("__wf__detail34").equals("02"))&&(!md.getWFDataValue("__wf__detail34").equals("03"))&&(!md.getWFDataValue("__wf__detail34").equals("04"))&&(!md.getWFDataValue("__wf__detail34").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail35").equals("01"))&&(!md.getWFDataValue("__wf__detail35").equals("02"))&&(!md.getWFDataValue("__wf__detail35").equals("03"))&&(!md.getWFDataValue("__wf__detail35").equals("04"))&&(!md.getWFDataValue("__wf__detail35").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
														}									
									/***** END 3*****/																			
										}else{
												personcost2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount3").replace(",",""),"0"));								
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail31").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail31").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail31").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail31").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open322").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail31").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail32").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail33").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail34").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail35").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
										}									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail31").equals("01"))&&(!md.getWFDataValue("__wf__detail31").equals("02"))&&(!md.getWFDataValue("__wf__detail31").equals("03"))&&(!md.getWFDataValue("__wf__detail31").equals("04"))&&(!md.getWFDataValue("__wf__detail31").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open31").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail32").equals("01"))&&(!md.getWFDataValue("__wf__detail32").equals("02"))&&(!md.getWFDataValue("__wf__detail32").equals("03"))&&(!md.getWFDataValue("__wf__detail32").equals("04"))&&(!md.getWFDataValue("__wf__detail32").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open32").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail33").equals("01"))&&(!md.getWFDataValue("__wf__detail33").equals("02"))&&(!md.getWFDataValue("__wf__detail33").equals("03"))&&(!md.getWFDataValue("__wf__detail33").equals("04"))&&(!md.getWFDataValue("__wf__detail33").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open33").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail34").equals("01"))&&(!md.getWFDataValue("__wf__detail34").equals("02"))&&(!md.getWFDataValue("__wf__detail34").equals("03"))&&(!md.getWFDataValue("__wf__detail34").equals("04"))&&(!md.getWFDataValue("__wf__detail34").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open34").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail35").equals("01"))&&(!md.getWFDataValue("__wf__detail35").equals("02"))&&(!md.getWFDataValue("__wf__detail35").equals("03"))&&(!md.getWFDataValue("__wf__detail35").equals("04"))&&(!md.getWFDataValue("__wf__detail35").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open35").replace(",",""),"0"));
														}									
									/***** END 3*****/																		
										}								  
								  %>
								  DWRUtil.setValue("empuse3",""+empdata[7]+"");
								  <%
								  }					  
								%>
								<%
								  if(md.getWFDataValue("__wf__welfare4").length()>0 && md.getWFDataValue("__wf__family4").length()>0){
								  		if(md.getWFDataValue("__wf__sitewelgid4").equals("01")){
												familycost1+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount4").replace(",",""),"0"));					
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail41").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail41").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail41").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail41").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail41").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									
									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail41").equals("01"))&&(!md.getWFDataValue("__wf__detail41").equals("02"))&&(!md.getWFDataValue("__wf__detail41").equals("03"))&&(!md.getWFDataValue("__wf__detail41").equals("04"))&&(!md.getWFDataValue("__wf__detail41").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail42").equals("01"))&&(!md.getWFDataValue("__wf__detail42").equals("02"))&&(!md.getWFDataValue("__wf__detail42").equals("03"))&&(!md.getWFDataValue("__wf__detail42").equals("04"))&&(!md.getWFDataValue("__wf__detail42").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail43").equals("01"))&&(!md.getWFDataValue("__wf__detail43").equals("02"))&&(!md.getWFDataValue("__wf__detail43").equals("03"))&&(!md.getWFDataValue("__wf__detail43").equals("04"))&&(!md.getWFDataValue("__wf__detail43").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail44").equals("01"))&&(!md.getWFDataValue("__wf__detail44").equals("02"))&&(!md.getWFDataValue("__wf__detail44").equals("03"))&&(!md.getWFDataValue("__wf__detail44").equals("04"))&&(!md.getWFDataValue("__wf__detail44").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail45").equals("01"))&&(!md.getWFDataValue("__wf__detail45").equals("02"))&&(!md.getWFDataValue("__wf__detail45").equals("03"))&&(!md.getWFDataValue("__wf__detail45").equals("04"))&&(!md.getWFDataValue("__wf__detail45").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
														}	
																	
									/***** END 4*****/												
												
										}else{
												familycost2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount4").replace(",",""),"0"));			
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail41").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail41").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail41").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail41").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail41").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}								
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail41").equals("01"))&&(!md.getWFDataValue("__wf__detail41").equals("02"))&&(!md.getWFDataValue("__wf__detail41").equals("03"))&&(!md.getWFDataValue("__wf__detail41").equals("04"))&&(!md.getWFDataValue("__wf__detail41").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail42").equals("01"))&&(!md.getWFDataValue("__wf__detail42").equals("02"))&&(!md.getWFDataValue("__wf__detail42").equals("03"))&&(!md.getWFDataValue("__wf__detail42").equals("04"))&&(!md.getWFDataValue("__wf__detail42").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail43").equals("01"))&&(!md.getWFDataValue("__wf__detail43").equals("02"))&&(!md.getWFDataValue("__wf__detail43").equals("03"))&&(!md.getWFDataValue("__wf__detail43").equals("04"))&&(!md.getWFDataValue("__wf__detail43").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail44").equals("01"))&&(!md.getWFDataValue("__wf__detail44").equals("02"))&&(!md.getWFDataValue("__wf__detail44").equals("03"))&&(!md.getWFDataValue("__wf__detail44").equals("04"))&&(!md.getWFDataValue("__wf__detail44").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail45").equals("01"))&&(!md.getWFDataValue("__wf__detail45").equals("02"))&&(!md.getWFDataValue("__wf__detail45").equals("03"))&&(!md.getWFDataValue("__wf__detail45").equals("04"))&&(!md.getWFDataValue("__wf__detail45").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
														}	
									
									/***** END 4*****/																							
										}								  
								  %>
								  setempUsed('empuse4','<%=md.getWFDataValue("__wf__family4")%>');
								  <%
								  }else if(md.getWFDataValue("__wf__welfare4").length()>0 ){
								  		if(md.getWFDataValue("__wf__sitewelgid4").equals("01")){
												personcost1+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount4").replace(",",""),"0"));					
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail41").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail41").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail41").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail41").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail41").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail41").equals("01"))&&(!md.getWFDataValue("__wf__detail41").equals("02"))&&(!md.getWFDataValue("__wf__detail41").equals("03"))&&(!md.getWFDataValue("__wf__detail41").equals("04"))&&(!md.getWFDataValue("__wf__detail41").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail42").equals("01"))&&(!md.getWFDataValue("__wf__detail42").equals("02"))&&(!md.getWFDataValue("__wf__detail42").equals("03"))&&(!md.getWFDataValue("__wf__detail42").equals("04"))&&(!md.getWFDataValue("__wf__detail42").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail43").equals("01"))&&(!md.getWFDataValue("__wf__detail43").equals("02"))&&(!md.getWFDataValue("__wf__detail43").equals("03"))&&(!md.getWFDataValue("__wf__detail43").equals("04"))&&(!md.getWFDataValue("__wf__detail43").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail44").equals("01"))&&(!md.getWFDataValue("__wf__detail44").equals("02"))&&(!md.getWFDataValue("__wf__detail44").equals("03"))&&(!md.getWFDataValue("__wf__detail44").equals("04"))&&(!md.getWFDataValue("__wf__detail44").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail45").equals("01"))&&(!md.getWFDataValue("__wf__detail45").equals("02"))&&(!md.getWFDataValue("__wf__detail45").equals("03"))&&(!md.getWFDataValue("__wf__detail45").equals("04"))&&(!md.getWFDataValue("__wf__detail45").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
														}	
																	
									
									/***** END 4*****/																								
										}else{
												personcost2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount4").replace(",",""),"0"));	
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail41").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail41").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail41").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail41").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail41").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail42").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail43").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail44").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail45").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
										}									
									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail41").equals("01"))&&(!md.getWFDataValue("__wf__detail41").equals("02"))&&(!md.getWFDataValue("__wf__detail41").equals("03"))&&(!md.getWFDataValue("__wf__detail41").equals("04"))&&(!md.getWFDataValue("__wf__detail41").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open41").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail42").equals("01"))&&(!md.getWFDataValue("__wf__detail42").equals("02"))&&(!md.getWFDataValue("__wf__detail42").equals("03"))&&(!md.getWFDataValue("__wf__detail42").equals("04"))&&(!md.getWFDataValue("__wf__detail42").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open42").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail43").equals("01"))&&(!md.getWFDataValue("__wf__detail43").equals("02"))&&(!md.getWFDataValue("__wf__detail43").equals("03"))&&(!md.getWFDataValue("__wf__detail43").equals("04"))&&(!md.getWFDataValue("__wf__detail43").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open43").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail44").equals("01"))&&(!md.getWFDataValue("__wf__detail44").equals("02"))&&(!md.getWFDataValue("__wf__detail44").equals("03"))&&(!md.getWFDataValue("__wf__detail44").equals("04"))&&(!md.getWFDataValue("__wf__detail44").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open44").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail45").equals("01"))&&(!md.getWFDataValue("__wf__detail45").equals("02"))&&(!md.getWFDataValue("__wf__detail45").equals("03"))&&(!md.getWFDataValue("__wf__detail45").equals("04"))&&(!md.getWFDataValue("__wf__detail45").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open45").replace(",",""),"0"));
														}	
																										
									/***** END 4*****/													
										}
								  
								  %>
								  DWRUtil.setValue("empuse4",""+empdata[7]+"");
								  <%
								  }					  
								%>
								<%
								  if(md.getWFDataValue("__wf__welfare5").length()>0 && md.getWFDataValue("__wf__family5").length()>0){
								  		if(md.getWFDataValue("__wf__sitewelgid5").equals("01")){
												familycost1+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount5").replace(",",""),"0"));											
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail51").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("01")){
											cost01f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail51").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("02")){
											cost02f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail51").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("03")){
											cost03f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail51").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("04")){
											cost04f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail51").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("05")){
											cost05f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									
									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail51").equals("01"))&&(!md.getWFDataValue("__wf__detail51").equals("02"))&&(!md.getWFDataValue("__wf__detail51").equals("03"))&&(!md.getWFDataValue("__wf__detail51").equals("04"))&&(!md.getWFDataValue("__wf__detail51").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail52").equals("01"))&&(!md.getWFDataValue("__wf__detail52").equals("02"))&&(!md.getWFDataValue("__wf__detail52").equals("03"))&&(!md.getWFDataValue("__wf__detail52").equals("04"))&&(!md.getWFDataValue("__wf__detail52").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail53").equals("01"))&&(!md.getWFDataValue("__wf__detail53").equals("02"))&&(!md.getWFDataValue("__wf__detail53").equals("03"))&&(!md.getWFDataValue("__wf__detail53").equals("04"))&&(!md.getWFDataValue("__wf__detail53").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail54").equals("01"))&&(!md.getWFDataValue("__wf__detail54").equals("02"))&&(!md.getWFDataValue("__wf__detail54").equals("03"))&&(!md.getWFDataValue("__wf__detail54").equals("04"))&&(!md.getWFDataValue("__wf__detail54").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail55").equals("01"))&&(!md.getWFDataValue("__wf__detail55").equals("02"))&&(!md.getWFDataValue("__wf__detail55").equals("03"))&&(!md.getWFDataValue("__wf__detail55").equals("04"))&&(!md.getWFDataValue("__wf__detail55").equals("05"))){
															cost06f+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
														}									
									/***** END 5*****/		
										}else{
												familycost2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount5").replace(",",""),"0"));									
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail51").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("01")){
											cost01f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail51").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("02")){
											cost02f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail51").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("03")){
											cost03f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail51").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("04")){
											cost04f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail51").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("05")){
											cost05f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									
									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail51").equals("01"))&&(!md.getWFDataValue("__wf__detail51").equals("02"))&&(!md.getWFDataValue("__wf__detail51").equals("03"))&&(!md.getWFDataValue("__wf__detail51").equals("04"))&&(!md.getWFDataValue("__wf__detail51").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail52").equals("01"))&&(!md.getWFDataValue("__wf__detail52").equals("02"))&&(!md.getWFDataValue("__wf__detail52").equals("03"))&&(!md.getWFDataValue("__wf__detail52").equals("04"))&&(!md.getWFDataValue("__wf__detail52").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail53").equals("01"))&&(!md.getWFDataValue("__wf__detail53").equals("02"))&&(!md.getWFDataValue("__wf__detail53").equals("03"))&&(!md.getWFDataValue("__wf__detail53").equals("04"))&&(!md.getWFDataValue("__wf__detail53").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail54").equals("01"))&&(!md.getWFDataValue("__wf__detail54").equals("02"))&&(!md.getWFDataValue("__wf__detail54").equals("03"))&&(!md.getWFDataValue("__wf__detail54").equals("04"))&&(!md.getWFDataValue("__wf__detail54").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail55").equals("01"))&&(!md.getWFDataValue("__wf__detail55").equals("02"))&&(!md.getWFDataValue("__wf__detail55").equals("03"))&&(!md.getWFDataValue("__wf__detail55").equals("04"))&&(!md.getWFDataValue("__wf__detail55").equals("05"))){
															cost06f2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
														}									
									/***** END 5*****/														
										}							  
								  %>
								  setempUsed('empuse5','<%=md.getWFDataValue("__wf__family5")%>');
								  <%
								  }else if(md.getWFDataValue("__wf__welfare5").length()>0 ){
								  		if(md.getWFDataValue("__wf__sitewelgid5").equals("01")){
												personcost1+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount5").replace(",",""),"0"));										
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail51").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("01")){
											cost01p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail51").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("02")){
											cost02p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail51").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("03")){
											cost03p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail51").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("04")){
											cost04p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail51").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("05")){
											cost05p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									

														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail51").equals("01"))&&(!md.getWFDataValue("__wf__detail51").equals("02"))&&(!md.getWFDataValue("__wf__detail51").equals("03"))&&(!md.getWFDataValue("__wf__detail51").equals("04"))&&(!md.getWFDataValue("__wf__detail51").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail52").equals("01"))&&(!md.getWFDataValue("__wf__detail52").equals("02"))&&(!md.getWFDataValue("__wf__detail52").equals("03"))&&(!md.getWFDataValue("__wf__detail52").equals("04"))&&(!md.getWFDataValue("__wf__detail52").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail53").equals("01"))&&(!md.getWFDataValue("__wf__detail53").equals("02"))&&(!md.getWFDataValue("__wf__detail53").equals("03"))&&(!md.getWFDataValue("__wf__detail53").equals("04"))&&(!md.getWFDataValue("__wf__detail53").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail54").equals("01"))&&(!md.getWFDataValue("__wf__detail54").equals("02"))&&(!md.getWFDataValue("__wf__detail54").equals("03"))&&(!md.getWFDataValue("__wf__detail54").equals("04"))&&(!md.getWFDataValue("__wf__detail54").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail55").equals("01"))&&(!md.getWFDataValue("__wf__detail55").equals("02"))&&(!md.getWFDataValue("__wf__detail55").equals("03"))&&(!md.getWFDataValue("__wf__detail55").equals("04"))&&(!md.getWFDataValue("__wf__detail55").equals("05"))){
															cost06p+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
														}									
									/***** END 5*****/															
										}else{
												personcost2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__amount5").replace(",",""),"0"));										
										/*****  01  *****/
										if(md.getWFDataValue("__wf__detail51").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("01")){
											cost01p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									
										
										/*****  02  *****/
										if(md.getWFDataValue("__wf__detail51").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("02")){
											cost02p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									

										/*****  03  *****/
										if(md.getWFDataValue("__wf__detail51").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("03")){
											cost03p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									

										/*****  04  *****/
										if(md.getWFDataValue("__wf__detail51").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("04")){
											cost04p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									

										/*****  05  *****/
										if(md.getWFDataValue("__wf__detail51").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail52").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail53").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail54").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
										}
										if(md.getWFDataValue("__wf__detail55").equals("05")){
											cost05p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
										}									
														/*****  06  *****/
														if((!md.getWFDataValue("__wf__detail51").equals("01"))&&(!md.getWFDataValue("__wf__detail51").equals("02"))&&(!md.getWFDataValue("__wf__detail51").equals("03"))&&(!md.getWFDataValue("__wf__detail51").equals("04"))&&(!md.getWFDataValue("__wf__detail51").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open51").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail52").equals("01"))&&(!md.getWFDataValue("__wf__detail52").equals("02"))&&(!md.getWFDataValue("__wf__detail52").equals("03"))&&(!md.getWFDataValue("__wf__detail52").equals("04"))&&(!md.getWFDataValue("__wf__detail52").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open52").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail53").equals("01"))&&(!md.getWFDataValue("__wf__detail53").equals("02"))&&(!md.getWFDataValue("__wf__detail53").equals("03"))&&(!md.getWFDataValue("__wf__detail53").equals("04"))&&(!md.getWFDataValue("__wf__detail53").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open53").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail54").equals("01"))&&(!md.getWFDataValue("__wf__detail54").equals("02"))&&(!md.getWFDataValue("__wf__detail54").equals("03"))&&(!md.getWFDataValue("__wf__detail54").equals("04"))&&(!md.getWFDataValue("__wf__detail54").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open54").replace(",",""),"0"));
														}
														if((!md.getWFDataValue("__wf__detail55").equals("01"))&&(!md.getWFDataValue("__wf__detail55").equals("02"))&&(!md.getWFDataValue("__wf__detail55").equals("03"))&&(!md.getWFDataValue("__wf__detail55").equals("04"))&&(!md.getWFDataValue("__wf__detail55").equals("05"))){
															cost06p2+=Double.parseDouble(chkNull.chkNullString(md.getWFDataValue("__wf__open55").replace(",",""),"0"));
														}									
									/***** END 5*****/															
										}								  
								  %>
								  DWRUtil.setValue("empuse5",""+empdata[7]+"");
								  <%
								  }					  
								%>
								DWRUtil.setValue("empname2",""+empdata[7]+"");

					}
			</script>
			<br>
			<table width="100%" border="0" cellpadding="1" cellspacing="0" bgcolor="#000000">
              <tr>
                <td><TABLE WIDTH="100%" height="20" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="1" class="inframe">
                    <TR>
                      <TD width="13%" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="left"><strong>3.จำนวนเงินที่ขอเบิก</strong></div></TD>
                      <TD width="9%" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center"><strong>ผู้เบิก</strong></div></TD>
                      <TD colspan="7" nowrap bgcolor="#CCCCCC" class="style4"  ><div align="center"><strong>เฉพาะเจ้าหน้าที่บริหารงานบุคคล</strong></div></TD>
                    </TR>
                    <TR>
                      <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="left"><strong>สถานพยาบาลของรัฐ</strong></div></TD>
                      <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center"><strong>จำนวนเงิน</strong></div></TD>
                      <TD width="11%" valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center"><strong>ค่าห้อง/อาหาร</strong></div></TD>
                      <TD width="9%" valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center"><strong>ค่าบำบัดโรค</strong></div></TD>
                      <TD width="11%" valign="middle" nowrap bgcolor="#FFFFFF" class="style4" ><div align="center"><strong>ค่าอุปกรณ์</strong></div></TD>
                      <TD width="11%" valign="middle" nowrap bgcolor="#FFFFFF" class="style4" ><div align="center"><strong>ค่าโรคฟัน</strong></div></TD>
                      <TD width="12%" valign="middle" nowrap bgcolor="#FFFFFF" class="style4" ><div align="center"><strong>ตรวจสุขภาพ</strong></div></TD>
                      <TD width="12%" valign="middle" nowrap bgcolor="#FFFFFF" class="style4" ><div align="center"><strong>อื่นๆ</strong></div></TD>
                      <TD width="12%" valign="middle" nowrap bgcolor="#FFFFFF" class="style4" ><div align="center"><strong>รวม</strong></div></TD>
                    </TR>
                    <TR>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="left">ข้าพเจ้า</div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(personcost1>0)?df.format(personcost1):""%></div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost04p>0)?df.format(cost04p):""%></div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost01p>0)?df.format(cost01p):""%></div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost06p>0)?df.format(cost06p):""%></div></TD>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost02p>0)?df.format(cost02p):""%></div></TD>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost03p>0)?df.format(cost03p):""%></div></TD>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost05p>0)?df.format(cost05p):""%></div></TD>
					  <%
							double sum1=(cost01p+cost02p+cost03p+cost04p+cost05p+cost06p);					  
					  %>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(sum1>0)?df.format(sum1):""%>&nbsp;</div></TD>
                    </TR>
                    <TR style="display:<%=none%>">
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="left">บุคคลในครอบครัว</div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(familycost1>0)?df.format(familycost1):""%></div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost04f>0)?df.format(cost04f):""%></div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost01f>0)?df.format(cost01f):""%></div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost06f>0)?df.format(cost06f):""%></div></TD>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost02f>0)?df.format(cost02f):""%></div></TD>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost03f>0)?df.format(cost03f):""%></div></TD>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost05f>0)?df.format(cost05f):""%></div></TD>
					  <%
					  	double sum2=(cost01f+cost02f+cost03f+cost04f+cost05f+cost06f);
					  %>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(sum2>0)?df.format(sum2):""%>&nbsp;</div></TD>
                    </TR>
                    <TR>
                      <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4" ><div align="left"><strong>สถานพยาบาลของเอกชน</strong></div></TD>
                      <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4" ><div align="center"><strong>จำนวนเงิน</strong></div></TD>
                      <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center"><strong>ค่าห้อง/อาหาร</strong></div></TD>
                      <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4"  ><div align="center"><strong>ค่าบำบัดโรค</strong></div></TD>
                      <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4" ><div align="center"><strong>ค่าอุปกรณ์</strong></div></TD>
                      <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4" ><div align="center"><strong>ค่าโรคฟัน</strong></div></TD>
                      <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4" ><div align="center"><strong>ตรวจสุขภาพ</strong></div></TD>
                      <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4" ><div align="center"><strong>อื่นๆ</strong></div></TD>
                      <TD valign="middle" nowrap bgcolor="#FFFFFF" class="style4" ><div align="center"><strong>รวม</strong></div></TD>
                    </TR>
                    <TR>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="left">ข้าพเจ้า</div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(personcost2>0)?df.format(personcost2):""%></div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost04p2>0)?df.format(cost04p2):""%></div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost01p2>0)?df.format(cost01p2):""%></div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost06p2>0)?df.format(cost06p2):""%></div></TD>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost02p2>0)?df.format(cost02p2):""%></div></TD>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost03p2>0)?df.format(cost03p2):""%></div></TD>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost05p2>0)?df.format(cost05p2):""%></div></TD>
					  <%
					  double sum3=(cost01p2+cost02p2+cost03p2+cost04p2+cost05p2+cost06p2);
					  %>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=df.format(sum3)%>&nbsp;</div></TD>
                    </TR>
                    <TR style="display:<%=none%>">
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="left">บุคคลในครอบครัว</div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(familycost2>0)?df.format(familycost2):""%></div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost04f2>0)?df.format(cost04f2):""%></div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost01f2>0)?df.format(cost01f2):""%></div></TD>
                      <TD bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost06f2>0)?df.format(cost06f2):""%></div></TD>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost02f2>0)?df.format(cost02f2):""%></div></TD>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost03f2>0)?df.format(cost03f2):""%></div></TD>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(cost05f2>0)?df.format(cost05f2):""%></div></TD>
					  <%
					      double sum4=(cost01f2+cost02f2+cost03f2+cost04f2+cost05f2+cost06f2);
					  %>
                      <TD valign="top" bgcolor="#FFFFFF" class="style4"  ><div align="right"><%=(sum4>0)?df.format(sum4):""%>&nbsp;</div></TD>
                    </TR>
                    <TR>
                      <TD bgcolor="#CCCCCC" class="style4"  ><div align="left"><strong>รวมทั้งสิ้น</strong></div></TD>
                      <TD bgcolor="#CCCCCC" class="style4"  ><div align="right"><%=((familycost2+familycost1+personcost1+personcost2)>0)?df.format(familycost2+familycost1+personcost1+personcost2):""%></div></TD>
                      <TD bgcolor="#CCCCCC" class="style4"  ><div align="right"><%=((cost04f2+cost04f+cost04p+cost04p2)>0)?df.format(cost04f2+cost04f+cost04p+cost04p2):""%></div></TD>
                      <TD bgcolor="#CCCCCC" class="style4"  ><div align="right"><%=((cost01f2+cost01f+cost01p+cost01p2)>0)?df.format(cost01f2+cost01f+cost01p+cost01p2):""%></div></TD>
                      <TD bgcolor="#CCCCCC" class="style4"  ><div align="right"><%=((cost06f2+cost06f+cost06p+cost06p2)>0)?df.format(cost06f2+cost06f+cost06p+cost06p2):""%></div></TD>
                      <TD valign="top" bgcolor="#CCCCCC" class="style4"  ><div align="right"><%=((cost02f2+cost02f+cost02p+cost02p2)>0)?df.format(cost02f2+cost02f+cost02p+cost02p2):""%></div></TD>
                      <TD valign="top" bgcolor="#CCCCCC" class="style4"  ><div align="right"><%=((cost03f2+cost03f+cost03p+cost03p2)>0)?df.format(cost03f2+cost03f+cost03p+cost03p2):""%></div></TD>
                      <TD valign="top" bgcolor="#CCCCCC" class="style4"  ><div align="right"><%=((cost05f2+cost05f+cost05p+cost05p2)>0)?df.format(cost05f2+cost05f+cost05p+cost05p2):""%></div></TD>
                      <TD valign="top" bgcolor="#CCCCCC" class="style4"  ><div align="right"><%=((sum1+sum2+sum3+sum4)>0)?df.format(sum1+sum2+sum3+sum4):""%>&nbsp;</div></TD>
                    </TR>
                </TABLE></td>
              </tr>
            </table>
			<%
					double approvecost=(cost04f2+cost04f+cost04p+cost04p2)+(cost01f2+cost01f+cost01p+cost01p2)+(cost05f2+cost05f+cost05p+cost05p2)+(cost02f2+cost02f+cost02p+cost02p2)+(cost03f2+cost03f+cost03p+cost03p2)+(cost06f2+cost06f+cost06p+cost06p2);
					CurrencyToThai ct=new CurrencyToThai();					
			%>
			<%if(!reqtype.equals("2")){%>
			<div>*กรณีเข้ารับการรักษาพยาบาลในสถานพยาบาลเอกชนและสถานพยาบาลคลีนิกหรือโพลีคลีนิกต้องแนบใบรับรองแพทย์ระบุโรคทุกครั้ง</div>
			<br>
			<%}%>
			<% if(reqtype.equals("x")&&emtype.equals("xyz")){%>
			<table width="100%" border="0" cellpadding="1" cellspacing="0" bgcolor="#000000">
              <tr>
                <td>
								
				<TABLE WIDTH="100%" height="20" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="1" class="inframe">
                    <TR>
                      <TD width="47%" valign="top" nowrap bgcolor="#FFFFFF"  class="style4"><div align="left" ><br>
                        4.ข้าพเจ้าขอรับรองว่าข้าพเจ้ามีสิทธิได้รับ
                        เงินสวัสดิการเกี่ยวกับ<br>
                        การรักษาพยาบาลตามระเบียบสำนักงานพัฒนาวิทยาศาสตร์และเทคโนโลยีแห่งชาติ <br>
                        ว่าด้วยรักษาพยาบาล พ.ศ. 2551 
						<br>
					  <%if(reqtype.equals("0")){%>
					    <input type="checkbox" name="checkbox" value="checkbox" checked>
                      <%}else{%>
					    <input type="checkbox" name="checkbox" value="checkbox">
					  <%}%>
                      &nbsp;&nbsp;ข้าพเจ้าประสงค์ขอรับเงินจำนวนดังกล่าวเป็นเงินสด
                      <br>
                      <%if(reqtype.equals("0")){%>
					    <input type="checkbox" name="checkbox" value="checkbox">
                      <%}else{%>
					    <input type="checkbox" name="checkbox" value="checkbox" checked>
					  <%}%>
                      &nbsp;&nbsp;ข้าพเจ้าประสงค์ให้โอนเงินจำนวนดังกล่าวเข้าบัญชีเงินเดือน
                      <br>
                      <br>
                      <br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ลงชื่อ.................................................ผู้รับเงินสวัสดิการ<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;<span id="empname2"></span>&nbsp;)<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;วันที่ ..<%=new CscCalendar(screenSingle.getDataLabel("CREATE_DATE")).getDDMMYYYY()%>...</div></TD>
                      <TD width="53%"  valign="top" nowrap bgcolor="#FFFFFF"  class="style4"><div align="left"><br>
                        5.การตรวจสอบสิทธิการเบิกจ่าย<br>
                      &nbsp;&nbsp;ได้ตรวจสอบหลักฐานเรียบร้อยแล้ว ขออนุมัติเบิกจ่ายค่ารกษาพยาบาล<br>
&nbsp;&nbsp;&nbsp;&nbsp;จำนวนเงิน&nbsp;<%=df.format(approvecost)%> &nbsp;บาท<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;(...<%=ct.getStringAvancedDesc(approvecost,"###.00")%>...)<br>
                      <br>
                      <br>
                      &nbsp;&nbsp;ลงชื่อ..............................................ผู้ตรวจสอบ<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(..<%
										DbInquiry history_di = (DbInquiry)screenSingle.getRecord().getChild("VW_INCIDENT");
										while(history_di.next()){};
										if(history_di.getString("ai_status").equals("2") &&history_di.getString("step_id").equals("2") ){
												DbRecord vwactor = new InitialRecord(screenSingle.getUProfile()).getDbRecord("Memployee");
												vwactor.setColumn("employeeid,fname,lname,efname,elname,emp_prefix");
												vwactor.set("COMPANYID",screenSingle.getUProfile().get("companyid"));
												vwactor.set("EMPLOYEEID",history_di.getString("ACTOR_ID"));
												vwactor.search();		
												out.print(vwactor.getString("fullname"));
										}					  
					  %>...)<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;วันที่ ...<%=new CscCalendar().getDDMMYYYY()%>... <br>
                      <br>
                      <br>
                      &nbsp;&nbsp;&nbsp;ลงชื่อ..........................................หัวหน้างาน บริหารผลประโยชน์และ <br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(................................................)ประเมินผล/หรือผู้ที่ได้รับมอบหมาย<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;วันที่ ................................................. </div></TD>
                    </TR>
                    <TR>
                      <TD valign="top" nowrap bgcolor="#FFFFFF"  class="style4"><span>6.ใบรับเงิน<br>
ได้รับเช็คจากธนาคาร..........................................หมายเลขเช็ค.....................................<br>
จำนวนเงิน.........................(.............................................................................)<br>
สั่งจ่าย.......................................................................................ไปถูกต้องแล้ว<br>
<br>
<br>
ลงชื่อ .....................................ผู้รับเงิน<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (...............................................) <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;วันที่ ....................................<br>
<br>
<br>
ลงชื่อ .....................................ผู้จ่ายเงิน<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(...............................................)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;วันที่ ....................................</span></TD>
                      <TD  valign="top" nowrap bgcolor="#FFFFFF"  class="style4"><div align="left" >หมายเหตุ:<br>
					  <%if(screenSingle.getDataLabel("remark").length()>0){%>
					  <TABLE  class="tablelayout" BORDER=0 CELLPADDING=0 CELLSPACING=0 >
						<tr>
							<td>
					  <%=screenSingle.getDataLabel("remark")%>
					  </td>
					  </tr>
					  </TABLE>
					  <%}else{%>
...........................................................................................<br>
...........................................................................................<br>
...........................................................................................
					<%}%><br><br>
คำแนะนำ :
<br>
<%if(history_di.getString("comments").length()>0){%>
					  <TABLE  class="tablelayout" BORDER=0 CELLPADDING=0 CELLSPACING=0 >
						<tr>
							<td>
								<%=history_di.getString("comments")%>
							  </td>
							  </tr>
							  </TABLE> 								
<%}else{%>
...........................................................................................<br>
...........................................................................................<br>
...........................................................................................
<%}%>
                      </div>
                        <div align="right"><strong>HRSS : 1124-1128</strong> </div></TD>
                    </TR>
                </TABLE></td>
              </tr>
            </table>
		<br>
		    <strong class="desc2">F-NS-HRSS-04-Rev.1</strong>
			<%}else if(!reqtype.equals("2")&&emtype.equals("1")){%>	
			<table width="100%" border="0" cellpadding="1" cellspacing="0" bgcolor="#000000">
              <tr>
                <td>						
				<TABLE WIDTH="100%" height="20" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="1" class="inframe">
                    <TR>
                      <TD width="50%" valign="top" nowrap bgcolor="#FFFFFF"  class="style4"><div align="left" ><br>
                        4.ข้าพเจ้าขอรับรองว่าข้าพเจ้าและบุคคลในครอบครัวของข้าพเจ้ามีสิทธิได้รับ<br>
                        เงินสวัสดิการเกี่ยวกับการรักษาพยาบาลตามข้อบังคับ กวทช. ว่าด้วยการ<br>
                        รักษาพยาบาล พ.ศ. 2551 โดยประสงค์
                      <br>
                      <%if(reqtype.equals("0")){%>
					    <input type="checkbox" name="checkbox" value="checkbox" checked>
                      <%}else{%>
					    <input type="checkbox" name="checkbox" value="checkbox">
					  <%}%>
                      &nbsp;&nbsp; รับเงินค่าสวัสดิการเป็นเงินสด เนื่องจากจำนวนเงินไม่เกิน 3,000 บาท
                      <br>
                      <%if(reqtype.equals("0")){%>
					    <input type="checkbox" name="checkbox" value="checkbox">
                      <%}else{%>
					    <input type="checkbox" name="checkbox" value="checkbox" checked>
					  <%}%>
                      &nbsp;&nbsp;โอนเงินค่าสวัสดิการเข้าบัญชีเงินเดือนของข้าพเจ้า
                      <br>
                      <br>
                      <br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ลงชื่อ.................................................ผู้ขอเบิกสวัสดิการ<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;<span id="empname2"></span>&nbsp;)<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;วันที่ ..<%=new CscCalendar(screenSingle.getDataLabel("CREATE_DATE")).getDDMMYYYY()%>...</div></TD>
                      <TD width="50%" rowspan="2"  valign="top" nowrap bgcolor="#FFFFFF"  class="style4"><div align="left" ><br>
                        5.เจ้าหน้าที่บริหารงานบุคคล ตรวจสอบ<br>
                      &nbsp;&nbsp;<li>ตรวจสอบหลักฐานประกอบการจ่ายโดยถูกต้องครบถ้วนเรียบร้อยแล้ว</li><br>
&nbsp;&nbsp;
<input type="checkbox" name="checkbox" value="checkbox">
ใบเสร็จรับเงิน&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;จำนวน..................................ฉบับ                     
<br>
&nbsp;&nbsp;
<input type="checkbox" name="checkbox2" value="checkbox">
ใบรับรองแพทย์&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;จำนวน..................................ฉบับ <br>
&nbsp;&nbsp;
<input type="checkbox" name="checkbox3" value="checkbox">
หนังสืออนุญาตจัดตั้งสถานพยาบาล จำนวน..................................ฉบับ <br>
&nbsp;&nbsp;
<input type="checkbox" name="checkbox4" value="checkbox">
อื่นๆ ระบุ................................................................................ <br>
<br>
<li>ตรวจสอบอัตราการเบิกจ่ายเงินสวัสดิการของพนักงานและลูกจ้าง<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(กรณีสถานพยาบาลเอกชน)<br>
  <input type="checkbox" name="checkbox5" value="checkbox" <%if(payfull>0){%> checked<%}%>>
วงเงินเต็ม<br>
  <input type="checkbox" name="checkbox5" value="checkbox" <%if(pay100>0){%> checked<%}%>>
ออกให้เต็มจำนวนเท่าที่จ่ายจริง<br>
<input type="checkbox" name="checkbox52" value="checkbox" <%if(pay050>0){%> checked<%}%>>
ออกให้ครึ่งหนึ่งของเท่าที่จ่ายจริง<br>
<input type="checkbox" name="checkbox53" value="checkbox" <%if(pay075>0){%> checked<%}%>>
ออกให้สามในสี่ของที่จ่ายจริง<br>
<input type="checkbox" name="checkbox54" value="checkbox" <%if(pay000>0){%> checked<%}%>>
ไม่ออกให้ เนื่องจากเกินอัตราให้เบิกตามปีงบประมาณ <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;จำนวนเงินสวัสดิการที่เบิกได้ตามสิทธิ...<%=df.format(approvecost)%>....บาท<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(...<%=ct.getStringAvancedDesc(approvecost,"###.00")%>...)</li>
<br>
                      &nbsp;&nbsp;ลงชื่อ..............................................ผู้ตรวจสอบ<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(..<%
										DbInquiry history_di = (DbInquiry)screenSingle.getRecord().getChild("VW_INCIDENT");
										while(history_di.next()){};
										if(history_di.getString("ai_status").equals("2") &&history_di.getString("step_id").equals("2") ){
												DbRecord vwactor = new InitialRecord(screenSingle.getUProfile()).getDbRecord("Memployee");
												vwactor.setColumn("employeeid,fname,lname,efname,elname,emp_prefix");
												vwactor.set("COMPANYID",screenSingle.getUProfile().get("companyid"));
												vwactor.set("EMPLOYEEID",history_di.getString("ACTOR_ID"));
												vwactor.search();		
												out.print(vwactor.getString("fullname"));
										}
					  
					  %>...)<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;วันที่ ...<%=new CscCalendar().getDDMMYYYY()%>... <br>
                      </div></TD>
                    </TR>
                    <TR>
                      <TD valign="top" nowrap bgcolor="#FFFFFF"  class="style4"><span >หมายเหตุ:<br>
					  <%if(screenSingle.getDataLabel("remark").length()>0){%>
					  <TABLE  class="tablelayout" BORDER=0 CELLPADDING=0 CELLSPACING=0 >
						<tr>
							<td>
					  <%=screenSingle.getDataLabel("remark")%>
					  </td>
					  </tr>
					  </TABLE>
					  <%}else{%>
................................................................................................................................<br>
................................................................................................................................<br>
................................................................................................................................
					<%}%><br><br>
คำแนะนำ :
<br>
<%if(history_di.getString("comments").length()>0){%>
					  <TABLE  class="tablelayout" BORDER=0 CELLPADDING=0 CELLSPACING=0 >
						<tr>
							<td>
								<%=history_di.getString("comments")%>
							  </td>
							  </tr>
							  </TABLE> 	<%}else{%>
................................................................................................................................<br>
................................................................................................................................<br>
................................................................................................................................<br>
<%}%>
<br>
<div align="right">

</div>                      </span></TD>
                    </TR>
                </TABLE></td>
              </tr>
            </table>
		<br>
		    <strong class="desc2">F-NS-HRSS-02-Rev.3</strong>
			<%}else if(!reqtype.equals("2")&&!emtype.equals("1")){%>	
			<table width="100%" border="0" cellpadding="1" cellspacing="0" bgcolor="#000000">
              <tr>
                <td>						
				<TABLE WIDTH="100%" height="20" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="1" class="inframe">
                    <TR>
                      <TD width="50%" valign="top" nowrap bgcolor="#FFFFFF"  class="style4"><div align="left" ><br>
                        4.ข้าพเจ้าขอรับรองว่าข้าพเจ้ามีสิทธิได้รับ<br>
                        เงินสวัสดิการเกี่ยวกับการรักษาพยาบาลตามข้อบังคับ กวทช. ว่าด้วยการ<br>
                        รักษาพยาบาล พ.ศ. 2551 โดยประสงค์
						<br>
                      <%if(reqtype.equals("0")){%>
					    <input type="checkbox" name="checkbox" value="checkbox" checked>
                      <%}else{%>
					    <input type="checkbox" name="checkbox" value="checkbox">
					  <%}%>
                      &nbsp;&nbsp; รับเงินค่าสวัสดิการเป็นเงินสด เนื่องจากจำนวนเงินไม่เกิน 3,000 บาท
                      <br>
                      <%if(reqtype.equals("0")){%>
					    <input type="checkbox" name="checkbox" value="checkbox">
                      <%}else{%>
					    <input type="checkbox" name="checkbox" value="checkbox" checked>
					  <%}%>
                      &nbsp;&nbsp;โอนเงินค่าสวัสดิการเข้าบัญชีเงินเดือนของข้าพเจ้า
                      <br>
                      <br>
                      <br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ลงชื่อ.................................................ผู้ขอเบิกสวัสดิการ<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;<span id="empname2"></span>&nbsp;)<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;วันที่ ..<%=new CscCalendar(screenSingle.getDataLabel("CREATE_DATE")).getDDMMYYYY()%>...</div></TD>
                      <TD width="50%" rowspan="2"  valign="top" nowrap bgcolor="#FFFFFF"  class="style4"><div align="left" ><br>
                        5.เจ้าหน้าที่บริหารงานบุคคล ตรวจสอบ<br>
                      &nbsp;&nbsp;<li>ตรวจสอบหลักฐานประกอบการจ่ายโดยถูกต้องครบถ้วนเรียบร้อยแล้ว</li><br>
&nbsp;&nbsp;
<input type="checkbox" name="checkbox" value="checkbox">
ใบเสร็จรับเงิน&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;จำนวน..................................ฉบับ                     
<br>
&nbsp;&nbsp;
<input type="checkbox" name="checkbox2" value="checkbox">
ใบรับรองแพทย์&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;จำนวน..................................ฉบับ <br>
&nbsp;&nbsp;
<input type="checkbox" name="checkbox3" value="checkbox">
หนังสืออนุญาตจัดตั้งสถานพยาบาล จำนวน..................................ฉบับ <br>
&nbsp;&nbsp;
<input type="checkbox" name="checkbox4" value="checkbox">
อื่นๆ ระบุ................................................................................ <br>
<br>
<li>ตรวจสอบอัตราการเบิกจ่ายเงินสัวสดิการของพนักงานและลูกจ้าง<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(กรณีสถานพยาบาลเอกชน)<br>
  <input type="checkbox" name="checkbox5" value="checkbox" <%if(payfull>0){%> checked<%}%>>
วงเงินเต็ม<br>
  <input type="checkbox" name="checkbox5" value="checkbox" <%if(pay100>0){%> checked<%}%>>
ออกให้เต็มจำนวนเท่าที่จ่ายจริง<br>
<input type="checkbox" name="checkbox52" value="checkbox" <%if(pay050>0){%> checked<%}%>>
ออกให้ครึ่งหนึ่งของเท่าที่จ่ายจริง<br>
<input type="checkbox" name="checkbox53" value="checkbox" <%if(pay075>0){%> checked<%}%>>
ออกให้สามในสี่ของที่จ่ายจริง<br>
<input type="checkbox" name="checkbox54" value="checkbox" <%if(pay000>0){%> checked<%}%>>
ไม่ออกให้ เนื่องจากเกินอัตราให้เบิกตามปีงบประมาณ <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;จำนวนเงินสวัสดิการที่เบิกได้ตามสิทธิ...<%=df.format(approvecost)%>....บาท<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(...<%=ct.getStringAvancedDesc(approvecost,"###.00")%>...)</li>
<br>
                      &nbsp;&nbsp;ลงชื่อ..............................................ผู้ตรวจสอบ<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(..<%
										DbInquiry history_di = (DbInquiry)screenSingle.getRecord().getChild("VW_INCIDENT");
										while(history_di.next()){};
										if(history_di.getString("ai_status").equals("2") &&history_di.getString("step_id").equals("2") ){
												DbRecord vwactor = new InitialRecord(screenSingle.getUProfile()).getDbRecord("Memployee");
												vwactor.setColumn("employeeid,fname,lname,efname,elname,emp_prefix");
												vwactor.set("COMPANYID",screenSingle.getUProfile().get("companyid"));
												vwactor.set("EMPLOYEEID",history_di.getString("ACTOR_ID"));
												vwactor.search();		
												out.print(vwactor.getString("fullname"));
										}

					  
					  %>...)<br>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;วันที่ ...<%=new CscCalendar().getDDMMYYYY()%>... <br>
                      </div></TD>
                    </TR>
                    <TR>
                      <TD valign="top" nowrap bgcolor="#FFFFFF"  class="style4"><span >หมายเหตุ:<br>
					  <%if(screenSingle.getDataLabel("remark").length()>0){%>
					  <TABLE  class="tablelayout" BORDER=0 CELLPADDING=0 CELLSPACING=0 >
						<tr>
							<td>
					  <%=screenSingle.getDataLabel("remark")%>
					  </td>
					  </tr>
					  </TABLE>
					   <%}else{%>
................................................................................................................................<br>
................................................................................................................................<br>
................................................................................................................................
					<%}%><br><br>
คำแนะนำ :
<br>
<%if(history_di.getString("comments").length()>0){%>
					  <TABLE  class="tablelayout" BORDER=0 CELLPADDING=0 CELLSPACING=0 >
						<tr>
							<td>
								<%=history_di.getString("comments")%>
							  </td>
							  </tr>
							  </TABLE> 	
							  <%}else{%>
................................................................................................................................<br>
................................................................................................................................<br>
................................................................................................................................<br>
<%}%>
                      </span></TD>
                    </TR>
                </TABLE></td>
              </tr>
            </table>
		<br>
		    <strong class="desc2">F-NS-HRSS-04-Rev.3</strong>
			<%}else if(reqtype.equals("2")){%>		
			<table width="100%" border="0" cellpadding="1" cellspacing="0" bgcolor="#000000">
              <tr>
                <td>					
				<TABLE WIDTH="100%" height="20" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="1" class="inframe">
                    <TR>
                      <TD width="50%" valign="top" nowrap bgcolor="#FFFFFF"  class="style4"><div align="left" ><br>
                        4.เจ้าหน้าที่บริหารงานบุคคล ตรวจสอบ<br>
  &nbsp;&nbsp;
  <li>ตรวจสอบหลักฐานประกอบการจ่ายโดยถูกต้องครบถ้วยเรียบร้อยแล้ว</li>
  <br>
  &nbsp;&nbsp;
  <input type="checkbox" name="checkbox6" value="checkbox">
                        ใบเสร็จรับเงิน&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;จำนวน..................................ฉบับ <br>
  &nbsp;&nbsp;
  <input type="checkbox" name="checkbox22" value="checkbox">
                        ใบรับรองแพทย์&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;จำนวน..................................ฉบับ <br>
  &nbsp;&nbsp;
  <input type="checkbox" name="checkbox32" value="checkbox">
                        หนังสืออนุญาตจัดตั้งสถานพยาบาล จำนวน..................................ฉบับ <br>
  &nbsp;&nbsp;
  <input type="checkbox" name="checkbox42" value="checkbox">
                        อื่นๆ ................................................................................ <br>
  <br>
  <li>ตรวจสอบอัตราการเบิกจ่ายเงินสวัสดิการของพนักงานและลูกจ้าง<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(กรณีสถานพยาบาลเอกชน)<br>
  <input type="checkbox" name="checkbox5" value="checkbox" <%if(payfull>0){%> checked<%}%>>
วงเงินเต็ม<br>
  <input type="checkbox" name="checkbox5" value="checkbox" <%if(pay100>0){%> checked<%}%>>
ออกให้เต็มจำนวนเท่าที่จ่ายจริง<br>
<input type="checkbox" name="checkbox52" value="checkbox" <%if(pay050>0){%> checked<%}%>>
ออกให้ครึ่งหนึ่งของเท่าที่จ่ายจริง<br>
<input type="checkbox" name="checkbox53" value="checkbox" <%if(pay075>0){%> checked<%}%>>
ออกให้สามในสี่ของที่จ่ายจริง<br>
<input type="checkbox" name="checkbox54" value="checkbox" <%if(pay000>0){%> checked<%}%>>
ไม่ออกให้ เนื่องจากเกินอัตราให้เบิกตามปีงบประมาณ <br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;จำนวนเงินสวัสดิการที่เบิกได้ตามสิทธิ...<%=df.format(approvecost)%>....บาท<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(...<%=ct.getStringAvancedDesc(approvecost,"###.00")%>...)</li>
  <br>
  &nbsp;&nbsp;ลงชื่อ..............................................ผู้ตรวจสอบ<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(..
  <%
										DbInquiry history_di = (DbInquiry)screenSingle.getRecord().getChild("VW_INCIDENT");
										while(history_di.next()){};
										if(history_di.getString("ai_status").equals("2") &&history_di.getString("step_id").equals("2") ){
												DbRecord vwactor = new InitialRecord(screenSingle.getUProfile()).getDbRecord("Memployee");
												vwactor.setColumn("employeeid,fname,lname,efname,elname,emp_prefix");
												vwactor.set("COMPANYID",screenSingle.getUProfile().get("companyid"));
												vwactor.set("EMPLOYEEID",history_di.getString("ACTOR_ID"));
												vwactor.search();		
												out.print(vwactor.getString("fullname"));
										}
					  
					  %>
                        ...)<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;วันที่ ...<%=new CscCalendar().getDDMMYYYY()%>... <br>
                      </div></TD>
                      <TD width="50%" rowspan="2"  valign="top" nowrap bgcolor="#FFFFFF"  class="style4"><div align="left" >หมายเหตุ:<br>
					  <%if(screenSingle.getDataLabel("remark").length()>0){%>
					  <TABLE  class="tablelayout" BORDER=0 CELLPADDING=0 CELLSPACING=0 >
						<tr>
							<td>
					  <%=screenSingle.getDataLabel("remark")%>
					  </td>
					  </tr>
					  </TABLE>					  
					  <%}else{%>
................................................................................................................................<br>
................................................................................................................................<br>
................................................................................................................................
					<%}%><br><br>
คำแนะนำ :
<br>
<%if(history_di.getString("comments").length()>0){%>
					  <TABLE  class="tablelayout" BORDER=0 CELLPADDING=0 CELLSPACING=0 >
						<tr>
							<td>
								<%=history_di.getString("comments")%>
							  </td>
							  </tr>
							  </TABLE> 	
							  <%}else{%>
................................................................................................................................<br>
................................................................................................................................<br>
................................................................................................................................<br>
<%}%>
                      </div></TD>
                    </TR>
                </TABLE></td>
              </tr>
            </table>
		<br>
		    <strong class="desc2">F-NS-HRSS-03-Rev.3	
		    </strong>
			<input type="hidden" name="empname2">
			<%}%>									
</TD>
									<TD WIDTH="5" BACKGROUND="../IMAGES/MYNOTE/R2.gif"><FONT COLOR="#FFFFFF"></FONT></TD>
		  </TR>
								<TR>
									<TD WIDTH="5" HEIGHT="5"><IMG SRC="../IMAGES/MYNOTE/C-B-L.gif" WIDTH="5" HEIGHT="5"></TD>
									<TD HEIGHT="5"><IMG SRC="../IMAGES/MYNOTE/B.gif" WIDTH="100%" HEIGHT="5"></TD>
									<TD WIDTH="5" HEIGHT="5"><IMG SRC="../IMAGES/MYNOTE/C-B-R.gif" WIDTH="5" HEIGHT="5"></TD>
								</TR>
			  </TABLE>
			  </TD>
			  </TR>				
		  </TABLE>			
			
		</FORM>
</BODY>
</HTML>
<%
}
%>