
<%
/************************************************************@@
  * Program Name	: popup_inform_preview.jsp
  * Description		: 집계문서 셀정의(등록과, 변경에서 같이 사용
  * Author			: 기현테크
  * Create Date		: 2010.11.25
  * History			:
@@************************************************************/
%>
<%@ page contentType="text/html; charset=UTF-8"
	import="java.net.URLEncoder" import="java.net.URLDecoder"
	import="javax.jdo.PersistenceManager"
	import="kr.co.kihyun.beans.entity.util.*"
	import="kr.co.kihyun.beans.entity.TotDoc"
	import="kr.co.kihyun.beans.user.HttpSSOLogin"
	import="kr.co.kihyun.lang.MString" import="kr.co.kihyun.lang.MLong"
	import="kr.co.kihyun.lang.Encoder" import="kr.co.kihyun.lang.MInteger"
	import="kr.co.kihyun.text.html.TagFilter"
	import="kr.co.kihyun.moumi.doc.MDocPreview"
	import="kr.co.kihyun.moumi.doc.table.item.MItem"
	import="kr.co.kihyun.beans.totsys.doc.table.item.ItemList"
	import="kr.co.kihyun.moumi.Moumi"
    import="javax.jdo.Transaction"
	import="kr.co.kihyun.beans.user.HttpSSOLogin"
	import="kr.co.kihyun.beans.totsys.report.Report"
	import="kr.co.kihyun.text.html.CallbackHandler" import="java.util.*"%>
<%@page import="kr.co.kihyun.beans.entity.TotReport"%>
<%@page import="kr.co.kihyun.beans.entity.TotReportProcess"%>
<%@page import="kr.co.kihyun.beans.entity.TotDoc"%>

<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%>

<%
PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager());
Transaction tx = pm.currentTransaction();
try{
	/********** session내의 userId **********/
	String usID = HttpSSOLogin.getLoginID(request);
	String dpID = HttpSSOLogin.getDeptID(request);
	int sysAuth = HttpSSOLogin.getSysAuth(request);

	int defItemSize = MInteger.parseInt(MString.checkNull(request.getParameter("defItemSize")));

	Long docID = MLong.parseLong(request.getParameter("docID"),null);
	String choice = clearXSS(request.getParameter("choice"),"");
	String deptIDs = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("deptIDs"))),"");
	String deptNames = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("deptNames"))),"");
	String userIDs = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("userIDs"))),"");
	String userNames = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("userNames"))),"");

	String docName = clearXSS(Encoder.toJava(request.getParameter("docName")),"");
	String stDate = clearXSS(request.getParameter("stDate"),"");
	String edDate = clearXSS(request.getParameter("edDate"),"");
	String accAuth = clearXSS(request.getParameter("accAuth"),"");
	Long repDocID = MLong.parseLong(request.getParameter("repDocID"),null);
	String docGroupID = clearXSS(request.getParameter("docGroupID"),"");
	String isFromFormBox = clearXSS(request.getParameter("isFromFormBox"),"");
	String tableCount  = clearXSS(request.getParameter("tableCount"),"");
	String isDynaTable = clearXSS(request.getParameter("isDynaTable"),"");
	String mode = clearXSS(request.getParameter("mode"),"");
	String tableDefines = clearXSS(request.getParameter("tableDefines"),"");
	String itemNames = clearXSS(Encoder.toJava(request.getParameter("itemNames")),"");
	String tableNums = clearXSS(Encoder.toJava(request.getParameter("tableNums")),"");
	String colNums = clearXSS(Encoder.toJava(request.getParameter("colNums")),"");
	String rowNums = clearXSS(Encoder.toJava(request.getParameter("rowNums")),"");
	String itemSizes = clearXSS(Encoder.toJava(request.getParameter("itemSizes")),"");
	String itemDescs = clearXSS(Encoder.toJava(request.getParameter("itemDescs")),"");
	String itemExprs = clearXSS(Encoder.toJava(request.getParameter("itemExprs")),"");
	String itemTypes = clearXSS(Encoder.toJava(request.getParameter("itemTypes")),"");
	//String docForm = clearXSS(request.getParameter("docForm"),"");

	String tableType  = clearXSS(request.getParameter("tableType"),"");
	String tableTypes  = clearXSS(request.getParameter("tableTypes"),"");

	// 사용자 화면
	String strPage  = clearXSS(request.getParameter("strPage"),"");
	String findOption = clearXSS(request.getParameter("findOption"),"");
	String findWord = clearXSS(Encoder.toJava(request.getParameter("findWord")),"");
	String url = "form";

	if(defItemSize < 1 ) defItemSize = 10;

	/************ doc values ************/
	TotDoc totDoc = docID == null ? null : pm.getObjectById(TotDoc.class, docID);
	String docForm = "";

	/************* item values ***********/
	StringBuffer itemNamesBuf = new StringBuffer();
	StringBuffer itemSizesBuf = new StringBuffer();
	StringBuffer itemDescsBuf = new StringBuffer();
	StringBuffer itemExprsBuf = new StringBuffer();
	StringBuffer itemTypesBuf = new StringBuffer();
	StringBuilder insertInputCellName = new StringBuilder();

	if(mode != null && mode.equals("regist")){
		docForm = (String)session.getAttribute("docForm");
	}else if(mode != null && mode.equals("modify")){
		docForm = totDoc.getForm();
	}else	if(mode != null && mode.equals("preview")){
		docForm = totDoc.getForm();
		docName = totDoc.getName();
		if(totDoc.getTotTables().iterator().hasNext())
			defItemSize = totDoc.getTotTables().iterator().next().getItemSize();

		/********** Item values **********/
		ItemList itemList = new ItemList();
                //v2. 13.SQL 삽입 : itemList.executeQuery()에서 prepare SQL 문으로 되어 있다.
		itemList.executeQuery(docID);
                //=================
		int itemCount = itemList.getCount();
		String[] itemNameList = itemList.getNameList();
		String[] itemDescList = itemList.getDescList();
		String[] itemExprList = itemList.getExprList();
		int[] itemTypeList = itemList.getTypeList();
		int[] itemNumList = itemList.getNumList();
		int[] itemSizeList = itemList.getSizeList();
		int[] tableNumList = itemList.getTableNumList();
		int[] colNumList = itemList.getFieldNumList();
		int[] rowNumList = itemList.getRecordNumList();
		int[] itemBNWList = itemList.getBNWList();
		String[] itemTypeNameList = itemList.getTypeNameList();

		//dform.itemNames.value = dform.itemNames.value + i + ':' + itemNameList[i] + 'MItem.LIST_DELIM';

		for(int i=0; i<itemCount; i++){
			if(insertInputCellName.toString().length() == 0){
				if("empty".equals(itemDescList[i].trim()))
					insertInputCellName.append(itemNameList[i]);
			}else{
				if("empty".equals(itemDescList[i].trim()))
					insertInputCellName.append(","+itemNameList[i]);
			}
			itemNamesBuf.append(i + ":" + itemNameList[i] + MItem.LIST_DELIM);
			itemSizesBuf.append(i + ":" + itemSizeList[i] + MItem.LIST_DELIM);
			itemDescsBuf.append(i + ":" + itemDescList[i] + MItem.LIST_DELIM);
			itemExprsBuf.append(itemExprs);
			itemTypesBuf.append(itemTypes);
		}

		itemNames = itemNamesBuf.toString();
		itemSizes = itemSizesBuf.toString();
		itemDescs = itemDescsBuf.toString();
		itemExprs = itemExprsBuf.toString();
		itemTypes = itemTypesBuf.toString();
	}

	/*********** preview로 docForm 변환 ***********/
	String putValScript = "";
	String changeAllScript = "";
	String docBodyForm = "";
	String docTitleForm = "";
	String inputForm = "";

	MDocPreview docPreView = new MDocPreview();
	docPreView.convert(docForm, itemNames, itemSizes, itemExprs, itemTypes, itemDescs, defItemSize);
	docForm = docPreView.getInputForm();
	putValScript = docPreView.getPutValScript();
	changeAllScript = docPreView.getChangeAllScript();
	changeAllScript = changeAllScript.replaceAll("[$]",".");
	inputForm = docPreView.getInputForm();
	
	
	int allReportCount = 0;
	int sendReportCount = 0;
	Report report = new Report();
	allReportCount = report.getAllCount(docID);
	sendReportCount = report.getSendCount(docID);
	
	
	if(mode != null && !mode.equals("preview")){
		StringTokenizer stkNames = new StringTokenizer(itemNames,(MItem.LIST_DELIM));
		StringTokenizer stkDesc = new StringTokenizer(itemDescs,(MItem.LIST_DELIM));
		
		int itemCount = stkNames.countTokens();
		String strTmp;
		String[] itemNameListScript = new String[itemCount];
		String[] itemDescListScript = new String[itemCount];
		
		for (int i=0; i < itemCount; i++) {
			strTmp = stkNames.nextToken();
			itemNameListScript[i] = strTmp.substring(strTmp.indexOf(":")+1, strTmp.length()).trim();
			
			strTmp = stkDesc.nextToken();
			itemDescListScript[i] = strTmp.substring(strTmp.indexOf(":")+1, strTmp.length()).trim();
			
			if("empty".equals(itemDescListScript[i].trim())){
				if(insertInputCellName.toString().length() == 0)
					insertInputCellName.append(itemNameListScript[i]);
				else
					insertInputCellName.append(","+itemNameListScript[i]);
			}
		}
	}
%>


<%@page import="kr.co.kihyun.beans.entity.TotDocType"%><html>
<head>
<title><%=Moumi.getTitle()%></title>
<link rel="stylesheet" href="/totsys/common/css/text.css"
	type="text/css">
<link rel="stylesheet" href="/totsys/common/css/kecttep.css"
	type="text/css">
<link rel="stylesheet" href="/totsys/common/css/tabs.css"
	type="text/css">
<link rel="stylesheet" href="/totsys/common/css/SquareButtons.css"
	type="text/css">
<script src="/totsys/common/js/rollover.js"></script>
<script src="/totsys/common/js/checkNum.js"></script>
<script src="/totsys/common/js/util.js"></script>
<script src="/totsys/common/js/calendar.js"></script>
<script src="/totsys/common/js/drag.js"></script>




<script language='JavaScript'>

			function nextblur(type) {
				var items = "<%=insertInputCellName.toString()%>";
				var count = 0;
				splitItems = items.split(",");
				
				for(i=0; i<splitItems.length; i++){ 
					if(splitItems[i] == type)
						break;
					count++;
				}
				if(splitItems.length <= count+1)
					dform[type].blur();
				else
					dform[splitItems[count+1]].focus();
			}
		
			<%if(sysAuth == Moumi.TOTPER){%>
				function formPreference(){
					location.href="/totsys/sysadm/prssbox/doc_form_modify.jsp?docID=<%=docID%>";
				}
				
				function formContentModify(){
					//location.href="/totsys/totper/mydocbox/prssbox/form_content_modify.jsp?docID=<%=docID%>";
					<%if(sysAuth == Moumi.SYSADM){%>
						location.href="/totsys/sysadm/prssbox/form_content_modify.jsp?docID=<%=docID%>";
					<%}else{%>
						location.href="/totsys/common/web/documents/form_content_modify/form_content_modify.jsp?docID=<%=docID%>&gubun=form";
					<%}%>
				}
			<%}else{%>
				function formContentModify(){
					if(confirm('<%=Moumi.getMessageBundle().getString("moumi.message.popup.presentComp")%> : <%=sendReportCount%><%=Moumi.getMessageBundle().getString("moumi.message.popup.notSubmitCount")%> : <%=(allReportCount-sendReportCount)%><%=Moumi.getMessageBundle().getString("moumi.message.popup.compToAccept")%>')){
						location.href="./form_content_modify.jsp?docID=<%=docID%>";
					}else{
						return;
					}
				}
				function formPreference(){
					if(confirm("<%=Moumi.getMessageBundle().getString("moumi.message.popup.presentComp")%>: <%=sendReportCount%><%=Moumi.getMessageBundle().getString("moumi.message.popup.notSubmitCount")%> : <%=(allReportCount-sendReportCount)%><%=Moumi.getMessageBundle().getString("moumi.message.popup.compToAccept")%>")){
						location.href="./doc_form_modify.jsp?docID=<%= docID %>";
					}else{
						return;
					}
				}
			<%}%>
			
			function formTypeCheck(){
				if(opener.dform.tableCount.value > 1 && opener.dform.tableType[1].checked == true){
					if(confirm('<%=Moumi.getMessageBundle().getString("moumi.message.popup.formTypeTableSet")%>')){
						opener.dform.tableType[0].focus();
						return false;
					}
				}else if(opener.dform.isDynaTable == false && opener.dform.tableType[1].checked == true){
					if(confirm('<%=Moumi.getMessageBundle().getString("moumi.message.popup.formTypeSet")%>')){
						opener.dform.tableType[0].focus();
						return false;
					}
				}

				return true;
			}

			function saveform() {
				if(!formTypeCheck()) return;
				opener.dform.action = '/servlet/kr.co.kihyun.beans.totsys.doc.HttpDocRegister';
				opener.dform.target = '_self';
				opener.dform.submit();
				window.close();
			}

			function modifyform(){
				//if(!formTypeCheck()) return;
				formModify.action = '/servlet/kr.co.kihyun.beans.totsys.doc.HttpDocFormModifyer';
				formModify.target = '_self';
				formModify.submit();
				//window.close();
			}

			<%= putValScript %>

			<%
			if(changeAllScript.length() > 0){	%>
				function changeAll() {
				<%= changeAllScript %>
				}
			<%
			}%>


			function formSubmit(){
				formConfig.action = '/totsys/common/web/report_dept/dept_list.jsp';
				formConfig.target = '_self';
				formConfig.submit();
			}

			function beforeSubmit(){
				formConfig.action = '/totsys/totper/mydocbox/prssbox/doc_form_modify.jsp';
				formConfig.target = '_self';
				formConfig.submit();
			}
			function beforeAdminSubmit(){
				formConfig.action = '/totsys/sysadm/prssbox/doc_form_modify.jsp';
				formConfig.target = '_self';
				formConfig.submit();
			}

			function docDel(){
				var frm = document.Del;
				if(confirm('<%=Moumi.getMessageBundle().getString("moumi.message.popup.formDelete")%>')){
					frm.submit();
				}
			}

			function formView(){
				location.href="/totsys/totper/mydocbox/formbox/doc_view.jsp?docID=<%= docID %>&strPage=<%= strPage %>&findOption=<%= findOption %>&findWord=<%= findWord %>";
			}

			function reg_use(){
				location.href="/totsys/totper/mydocbox/regbox/doc_regist.jsp?reuseDocID=<%= docID %>&reuseDocName=<%= docName %>&isFromFormBox=true";
			}

			function propertiesUpdate(){
				location.href="/totsys/totper/mydocbox/formbox/doc_form_modify.jsp?docID=<%= docID %>&strPage=<%= strPage %>&findOption=<%= findOption %>&findWord=<%= findWord %>";
			}
			<%if(sysAuth != Moumi.TOTPER){%>
			function modify(){
				location.href="/totsys/sysadm/prssbox/doc_modify.jsp?docID=<%= docID %>&url=mmprss";
			}

			function formView(){
				location.href="/totsys/sysadm/prssbox/doc_form_view.jsp?docID=<%=docID%>";
			}

			function reports(){
				location.href="/totsys/sysadm/prssbox/reports/report_list.jsp?docID=<%= docID %>";
			}

			function totReports(){
				location.href="/totsys/sysadm/prssbox/tot_reports/total_reports.jsp?docID=<%= docID %>";
			}

			function totReport(){
				location.href="/totsys/sysadm/prssbox/tot_report/total_report.jsp?docID=<%= docID %>";
			}
			<%}%>
		</script>
</head>
<div id="SetWin" style="position: absolute; visibility: hidden; width: 100px; height: 100px; background: silver; border: 1px solid #333333; line-height: 1.4em; padding: 3px 3px"></div>
<body style='' bgcolor="#FFFFFF" text="#000000" leftmargin="0"
	topmargin="0" marginwidth="0" marginheight="0"
	onload="scrollObjectContent('formDiv');">
<form name="formConfig" method="post"
	action="/totsys/common/web/report_dept/dept_list.jsp" target="_self">
<input type="hidden" name="docID" value="<%= docID%>"> <input
	type="hidden" name="choice" value="<%= choice%>"> <input
	type="hidden" name="deptIDs" value="<%= deptIDs%>"> <input
	type="hidden" name="deptNames" value="<%= deptNames%>"> <input
	type="hidden" name="userIDs" value="<%= userIDs%>"> <input
	type="hidden" name="userNames" value="<%= userNames%>"> <input
	type="hidden" name="docName"
	value='<%= URLEncoder.encode(docName, "UTF-8")%>'> <input
	type="hidden" name="stDate" value="<%= stDate%>"> <input
	type="hidden" name="edDate" value="<%= edDate%>"> <input
	type="hidden" name="accAuth" value="<%= accAuth%>"> <input
	type="hidden" name="repDocID" value="<%= repDocID%>"> <input
	type="hidden" name="docGroupID" value="<%= docGroupID%>"> <input
	type="hidden" name="isFromFormBox" value="<%= isFromFormBox%>">
<input type="hidden" name="tableCount" value="<%= tableCount%>">
<input type="hidden" name="isDynaTable" value="<%= isDynaTable%>">
<input type="hidden" name="mode" value="<%= mode%>"> <input
	type="hidden" name="tableDefines" value="<%= tableDefines%>"> <input
	type="hidden" name="itemNames"
	value='<%= URLEncoder.encode(itemNames, "UTF-8")%>'> <input
	type="hidden" name="tableNums"
	value='<%= URLEncoder.encode(tableNums, "UTF-8")%>'> <input
	type="hidden" name="colNums"
	value='<%= URLEncoder.encode(colNums, "UTF-8")%>'> <input
	type="hidden" name="rowNums"
	value='<%= URLEncoder.encode(rowNums, "UTF-8")%>'> <input
	type="hidden" name="itemSizes"
	value='<%= URLEncoder.encode(itemSizes, "UTF-8")%>'> <input
	type="hidden" name="itemDescs"
	value='<%= URLEncoder.encode(itemDescs, "UTF-8")%>'> <input
	type="hidden" name="itemExprs"
	value='<%= URLEncoder.encode(itemExprs, "UTF-8")%>'> <input
	type="hidden" name="itemTypes"
	value='<%= URLEncoder.encode(itemTypes, "UTF-8")%>'> <input
	type="hidden" name="tableType" value="<%= tableType%>"> <input
	type="hidden" name="defItemSize" value="<%= defItemSize%>"> <input
	type="hidden" name="tableTypes"
	value='<%= URLEncoder.encode(tableTypes, "UTF-8")%>'> <input
	type="hidden" name="backDash" value="back"></form>


<form name="formModify" method="post"><input type="hidden"
	name="docID" value="<%= docID%>"> <input type="hidden"
	name="choice" value="<%= choice%>"> <input type="hidden"
	name="deptIDs" value="<%= deptIDs%>"> <input type="hidden"
	name="deptNames" value="<%= deptNames%>"> <input type="hidden"
	name="userIDs" value="<%= userIDs%>"> <input type="hidden"
	name="userNames" value="<%= userNames%>"> <input type="hidden"
	name="docName" value="<%= docName%>"> <input type="hidden"
	name="stDate" value="<%= stDate%>"> <input type="hidden"
	name="edDate" value="<%= edDate%>"> <input type="hidden"
	name="accAuth" value="<%= accAuth%>"> <input type="hidden"
	name="repDocID" value="<%= repDocID%>"> <input type="hidden"
	name="docGroupID" value="<%= docGroupID%>"> <input
	type="hidden" name="isFromFormBox" value="<%= isFromFormBox%>">
<input type="hidden" name="tableCount" value="<%= tableCount%>">
<input type="hidden" name="isDynaTable" value="<%= isDynaTable%>">
<input type="hidden" name="mode" value="<%= mode%>"> <input
	type="hidden" name="tableDefines" value="<%= tableDefines%>"> <input
	type="hidden" name="itemNames" value="<%= itemNames%>"> <input
	type="hidden" name="tableNums" value="<%=tableNums%>"> <input
	type="hidden" name="colNums" value="<%=colNums%>"> <input
	type="hidden" name="rowNums" value="<%= rowNums%>"> <input
	type="hidden" name="itemSizes" value="<%= itemSizes%>"> <input
	type="hidden" name="itemDescs" value="<%= itemDescs%>"> <input
	type="hidden" name="itemExprs" value="<%= itemExprs%>"> <input
	type="hidden" name="itemTypes" value="<%= itemTypes%>"> <input
	type="hidden" name="tableType" value="<%= tableType%>"> <input
	type="hidden" name="defItemSize" value="<%= defItemSize%>"> <input
	type="hidden" name="tableTypes" value="<%= tableTypes%>"></form>

<div id="header">
<ul id="primary">
	<%if(sysAuth == Moumi.TOTPER){%>
	<li><a href="#" onclick="formView();"><%=TotDocType.FORM_DOC%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.info")%></a></li>
	<li><a href="#" onclick="formContentModify();"><%=TotDocType.FORM_DOC%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.modify")%></a></li>
	<li><span class="kecttep_menu_focous"><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.value")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.modify")%></span></li>
	<%}else{%>
	<li><a href="#" onclick="modify();"><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.information")%></a></li>
	<li><span class="kecttep_menu_focous"><%=TotDocType.FORM_DOC%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.info")%></span></li>
	<%}%>
</ul>
</div>

<div id="main">
<div id="contents">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr class="toolbar">
		<td align="left">
		<table border="0" cellspacing="0" cellpadding="0">
			<tr>
				<%if(sysAuth == Moumi.TOTPER){%>
				<td><a class="simplebutton" href="#" onclick="reg_use();"><span
					class="regist"><%= Moumi.getMessageBundle().getString("moumi.message.button_small.docReprss") %></span></a>
				</td>
				<td class="kecttep_button_td"><a class="simplebutton" href="#"
					onclick="docDel();"><span class="remove"><%= Moumi.getMessageBundle().getString("moumi.message.button_small.docDel") %></span></a>
				</td>
				<%}else{%>
				<td><a class="simplebutton" href="#"
					onclick="javacscript:formContentModify();"><span class="modify">
				<%= Moumi.getMessageBundle().getString("moumi.message.button_small.formModify") %></span>
				</a></td>
				<td class="kecttep_button_td"><a class="simplebutton" href="#"
					onclick="javascript:formPreference();"><span class="modify">
				<%= Moumi.getMessageBundle().getString("moumi.message.button_small.formPreferenceModify") %>
				</span> </a></td>
				<%}%>
			</tr>
		</table>
		</td>
	</tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<form name='dform' method='post' action=''>
	<tr valign="top">
		<td align="left" height="11" valign="top"
			style="padding-left: 10; padding-top: 25;">
		<div id="formDiv"
			style="padding-top: 20; width: <%=session.getAttribute("formWidth") %>; overflow-x: auto;">
		<%= docForm %></div>
		</td>
	</tr>
	<tr valign="bottom">
		<td align="center">
		<table border="0" cellspacing="0" cellpadding="0" align="center">
			<tr>
				<%if(sysAuth == Moumi.SYSADM){%>
				<td><a href="#"><img onclick="beforeAdminSubmit();"
					src="/totsys/common/inc/documents/tot_doc/images/bt_pre.gif"
					name="bt_pre" border="0"></a></td>
				<%}else{%>
				<td><a href="#"><img onclick="history.go(-1);"
					src="/totsys/common/inc/documents/tot_doc/images/bt_pre.gif"
					name="bt_pre" border="0"></a></td>
				<%}%>
				<td>&nbsp;</td>
				<%if ( changeAllScript.length() > 0 ) {%><td align="center"
					valign="top"><a href=# onClick='changeAll();'><img
					src="/totsys/common/web/documents/tot_doc/images/bt_cal.gif"
					border="0"></a></td>
				<td>&nbsp;</td>
				<%}%>
				<td><a href="#"><img onclick="modifyform()"
					src="/totsys/common/inc/documents/tot_doc/images/btn_modify_completed.gif"
					name="bt_next" border="0"></a></td>
				<%//}%>
			</tr>
		</table>
		</td>
	</tr>
	<!--- 버튼 (확인,취소) 끝----></form>
</table>
</div>
</div>
</body>
</html>
<%
}catch(Exception ex){
	ex.printStackTrace();%>
<script language="javascript">
		<!--
		alert('<%=Moumi.getMessageBundle().getString("moumi.message.popup.falseTable")%>');
		window.close();
		//-->
	</script>
<%
}finally{
    if(tx.isActive())
    tx.rollback();
	pm.close();
}
%>
