<%--
  - FileName   : subconPayOutOffPopup.jsp
  - Author(s)  : ok
  - Date       : 2014.09.10
  - Copyright  : Copyright (c) 2013 www.udapsoft.co.kr, Inc.
  - Description: 협력업체포탈 보증증권정보 입력 팝업
--%>

<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
<%@ page import="com.udapsoft.waf.common.ui.*" %>
<%@ page import="kr.co.hsnc.common.util.*"%>
<%@ page import="kr.co.hsnc.common.sql.*" %>
<%@ page import="kr.co.hsnc.common.util.Formatter"%>

<%@ include file="/jsp/work/taglib.jsp" %>
<jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
<%
    ctx.init(request, response);
    HandlerStorage storage = ctx.getHandlerStorage();
    ValueObject params = storage.getParams();
    ValueObject user = storage.getUser();
    String event = storage.getEvent();
    //System.out.println("Outside params : " + event);
    
    RowSet WarrGofficeComboList = storage.getRowSet("WarrGofficeComboList"); //보증기관 ComboList Data
    RowSet WarrPayGbComboList = storage.getRowSet("WarrPayGbComboList"); //보증구문 ComboList Data 240808 추가
    ValueObject contOutWarr = storage.getValueObject("WarrContInfo");		//보증정보
    ValueObject attFile = storage.getValueObject("attFileList");	//첨부파일
    ValueObject attFile1 = storage.getValueObject("attFileList1");	//첨부파일
    
    String sWarrGubun = params.get("warrGubun");
%>
<SCRIPT language="JavaScript">
	var	sGuarOnoffYn	=	"<%=contOutWarr.get("GUAR_ONOFF_YN")%>";

	function _onReady(){
		
		jQuery("#btnSave").click(function() {
		
			//필수 입력항목 check
		//	alert(save());
			if(save()){
				var f = document.form1;
				jQuery("#fevent").val("FORM_SAVE");
				submitXmlRequest("/portal/guar/subconPayOutPopup_form.screen", "FORM_SAVE", f, "SUCCESS");	
			}
		}); 
		
		jQuery("#btnTrans").click(function() {
			
			//필수 입력항목 check
			//	alert(save());
				if(save()){
					var f = document.form1;
					jQuery("#fevent").val("FORM_SAVE");
					submitXmlRequest("/portal/guar/subconPayOutPopup_form.screen", "FORM_SAVE", f, "SUCCESS");	
				}
			
		});		

		jQuery("#btnAgain").click(function() {
			
			//필수 입력항목 check
			//	alert(save());
				if(save()){
					var f = document.form1;
					jQuery("#fevent").val("FORM_SAVE");
					submitXmlRequest("/portal/guar/subconPayOutPopup_form.screen", "FORM_SAVE", f, "SUCCESS");	
				}
			
		});		

	}

	function doResult(resultObj) {
		try {
			
			if( resultObj.getRequestEvent() == "FORM_SAVE" ) {
				if( resultObj.getSuccess() ) {				
					alert("저장되었습니다.");		
					
					returnValue = new Array(0,"OK",<%=params.get("subContModId")%>);
					parent.popContWarrClose(returnValue);
					
				}else {
					
					dlgErrorMsg(resultObj);
				}
				document.form1.isSubmit = false;
			}
		}
		catch(errorObject) {
	        showErrorDlg("doResult()", errorObject);
		}
	}

	function calendar(thisDayObj){
		dlgCalendar(thisDayObj);
	}		

	//첨부파일   
	function doAttachFile(obj,No,gwSeqNM) {
		parent.doAttachFilePop(obj, No, document.form1, gwSeqNM, "cont/purchase/<%=params.get("purContModId")%>/guar");
	} 

	function inputDataSet(){
		
		if(jQuery("#guarOrganCode option:selected").val() == "99"){	//기타
			
			document.getElementById("warrGofficeEtc").style.display	=	"";
			jQuery("#warrGofficeEtc").attr("readonly",false);
			jQuery("#warrGofficeEtc").css({'background-color' : '#ffffff'});
			jQuery("#warrGofficeEtc").css({'border' : '1px solid #595a5a'});

		}else{
			document.getElementById("warrGofficeEtc").style.display	=	"none";
			jQuery("#warrGofficeEtc").attr("readonly",true);
			jQuery("#warrGofficeEtc").css({'background-color' : '#dedede'});
			jQuery("#warrGofficeEtc").css({'border' : '1px solid #bcbcbc'});
			
		}
	}
	
	
	/**********************************************
	발행구분에 따른 입력 내용 보이기, 안보이기
	**********************************************/
	function	showHideTable(bShow)
	{	
		var	form				=	document.form1;
	
		var	sWarrGubun			=	form.warrGubun.value;			//	보증종류
		var	sGuarStatus			=	form.guarStatus.value;		//	보증상태
		var	sGuarOrganCode		=	form.guarOrganCode.value;	//	기관코드
		
		//title 및 변경구분 세팅
		var	sTitle	=	"";
		var	sTitle2	=	"";
		var	sText	=	"";

		document.getElementById("offTableInfo").style.display		=	"";
		if("<%=params.get("USER")%>" == "CORP") 
			document.getElementById("btnSave").style.display		=	"NONE";  //2015.9.17
		else
			document.getElementById("btnSave").style.display		=	"";
		
		document.getElementById("btnTrans").style.display	=	"none";
		document.getElementById("btnAgain").style.display	=	"none";

		if(sGuarStatus == "")
		{
			document.getElementById("btnDel").style.display		=	"none";
		}else
		{
			document.getElementById("btnDel").style.display		=	"none";
		}
		document.getElementById("btnCancel").style.display		=	"none";

		if(sGuarOrganCode == "99")
		{
			document.getElementById("warrGofficeEtc").style.display	=	"";
		}else
		{
			document.getElementById("warrGofficeEtc").style.display	=	"none";
		}
		sTitle	=	"오프라인 ";

		form.guarOrganCode.disabled	=	false;

		if(<%=sWarrGubun%> == 1) 
		{
			sTitle2	=	"계약이행증권";
			sText	=	"계약이행보증서";
		}else if(<%=sWarrGubun%> == 5)
		{
			sTitle2	=	"하자이행증권";
			sText	=	"하자이행보증서";
		}else if(<%=sWarrGubun%> == 3)
		{
			sTitle2	=	"선급금이행증권";
			sText	=	"선급금이행보증서";
		}else
		{
			sTitle2	=	"근재책임보험증권";
			sText	=	"근로자재해보상책임보험";
		}
		// 제목 타이틀
	//	document.getElementById("li_title").innerHTML			=	sTitle + sTitle2;
				
	}	

	/********************************
		보증정보 저장
	********************************/
	function save()
	{
		var	form	=	document.form1;
		
/* 		240813 보증기관 삭제(보증구분으로 대체)
	 	if(form.guarOrganCode.value == ""){
			alert("보증기관을 선택하세요");
			form.guarOrganCode.focus();
			return false;
		} 
										// 오프라인인 경우	
		if(form.guarOrganCode.value == "99"){
			if(!form.warrGofficeEtc.value){
				alert("보증기관명을 입력하세요");
				form.warrGofficeEtc.focus();
				return false;
			}
		}else{
			var	iIndex	=	form.guarOrganCode.selectedIndex;
			var	sText		=	form.guarOrganCode[iIndex].text;
			form.warrGofficeEtc.value	=	sText;
		}
	 */	
		var wgno 	= form.warrWgno1;
		var wamt 	= form.warrWamt1;
		var wcsn 	= form.warrCommsn1;
		var wfrom 	= form.dateStart1; 
		var wto 	= form.dateEnd1;
		var wppd 	= form.paperDate1; 
		var wsize	= form.p_AttachFileGuar1;
		
		if(form.warrPayGb.value == '01'){
			if(wgno.value == ""){
				alert('증권번호를 입력하세요.');
				wgno.focus();
				return false;
			}			
			if(wfrom.value.length <8){
				alert('보증시작일을 입력하세요');
				wfrom.focus();
				return false;
			}		
			if(wto.value.length <8){
				alert('보증종료일을 입력하세요');
				wto.focus();
				return false;
			}		
			if(wfrom.value > wto.value){
				alert('보증종료일이 시작일보다 빠릅니다.');
				wfrom.focus();
				return false;
			}
			if(wamt.value == "0" || wamt.value == ""){
				alert('보증금액을 입력하세요.');
				wamt.focus();
				return false;
			}
			if(wcsn.value == "0" || wcsn.value == ""){
				alert('수수료를 입력하세요.');
				wcsn.focus();
				return false;
			}
			if(wppd.value.length <8){
				alert('발급일을 입력하세요');
				wppd.focus();
				return false;
			}		
		}
			
	 	if(wsize.value == null || wsize.value == "0" || wsize.value == ""){
			if(form.warrPayGb.value == "01" || form.warrPayGb.value == "02"){ 
				alert('첨부파일을 선택하세요.');							
				return false;
			} 
		} 
		
		<%
		if (params.get("CAUSECODE").equals("04")){
		%>
			var wgno2 	= form.warrWgno2;
			var wamt2 	= form.warrWamt2;
			var wcsn2 	= form.warrCommsn2;
			var wfrom2 	= form.dateStart2; 
			var wto2 	= form.dateEnd2;
			var wppd2 	= form.paperDate2; 
			var wsize2	= form.p_AttachFileGuar2;
			
			if(wgno2.value == ""){
				alert('증권번호를 입력하세요.');
				wgno2.focus();
				return false;
			}			
			if(wfrom2.value.length <8){
				alert('보증시작일을 입력하세요');
				wfrom2.focus();
				return false;
			}		
			if(wto2.value.length <8){
				alert('보증종료일을 입력하세요');
				wto2.focus();
				return false;
			}		
			if(wfrom2.value > wto.value){
				alert('보증종료일이 시작일보다 빠릅니다.');
				wfrom2.focus();
				return false;
			}
			if(wamt2.value == "0" || wamt2.value == ""){
				alert('보증금액을 입력하세요.');
				wamt2.focus();
				return false;
			}
			if(wcsn2.value == "0" || wcsn.value == ""){
				alert('수수료를 입력하세요.');
				wcsn2.focus();
				return false;
			}
			if(wppd2.value.length <8){
				alert('발급일을 입력하세요');
				wppd2.focus();
				return false;
			}		
			if(wsize2.value == null || wsize2.value == "0" || wsize2.value == ""){
				alert('첨부파일을 선택하세요.');							
				return false;
			}
		<%
		}
		%>
		form.guarStatus.value = "09";
			
		if(confirm("보증정보를 저장하시겠습니까?"))	 return true;
		
	}
	function doClose()
	{
     	returnValue = null;
     	parent.popContWarrClose(returnValue);
	}	
	
	function onChangeWpb(){
		var form = document.form1;
		if(form.warrPayGb.value == '01'){ //보증구분이 지금보증일 경우
			jQuery("#warrWgno1").attr("readonly", false); //증권번호
			jQuery("#warrWgno1").css({'background-color' : '#ffffff'});
			jQuery("#dateStart1").attr("readonly", false); //보증기간 시작일
			jQuery("#dateStart1").css({'background-color' : '#ffffff'});
			jQuery("#dateEnd1").attr("readonly", false); //보증기간 종료일
			jQuery("#dateEnd1").css({'background-color' : '#ffffff'});
			jQuery("#paperDate1").attr("readonly", false); //발급일
			jQuery("#paperDate1").css({'background-color' : '#ffffff'});
			jQuery("#warrWamt1").attr("readonly", false); //보증금액
			jQuery("#warrWamt1").css({'background-color' : '#ffffff'});
			jQuery("#warrCommsn1").attr("readonly", false); //수수료
			jQuery("#warrCommsn1").css({'background-color' : '#ffffff'});
		}else{
			jQuery("#warrWgno1").attr("readonly", true); //증권번호
			jQuery("#warrWgno1").css({'background-color' : '#f0f0f0'});
			jQuery("#dateStart1").attr("readonly", true); //보증기간 시작일
			jQuery("#dateStart1").css({'background-color' : '#f0f0f0'});
			jQuery("#dateEnd1").attr("readonly", true); //보증기간 종료일
			jQuery("#dateEnd1").css({'background-color' : '#f0f0f0'});
			jQuery("#paperDate1").attr("readonly", true); //발급일
			jQuery("#paperDate1").css({'background-color' : '#f0f0f0'});
			jQuery("#warrWamt1").attr("readonly", true); //보증금액
			jQuery("#warrWamt1").css({'background-color' : '#f0f0f0'});
			jQuery("#warrCommsn1").attr("readonly", true); //수수료
			jQuery("#warrCommsn1").css({'background-color' : '#f0f0f0'});
		}
	}
</SCRIPT>
<STYLE>
BODY {
	padding : 0 0 0 0;
}
</STYLE>
<modular:search id="form1">
	<modular:key id="fevent" />
</modular:search>
<form id="form1" name="form1" method="post" modular:type="search">


<INPUT type="hidden" name="fevent" id="fevent" value="<%= params.get("fevent") %>">

<INPUT type="hidden" name="subContModId" id="subContModId" value="<%=params.get("subContModId") %>">	<!-- 보증증권 ID -->
<INPUT type="hidden" name="warrGubun" id="warrGubun" value="<%=params.get("warrGubun") %>">			<!-- 보증증권 구분 -->
<INPUT type="hidden" name="viewDiv" id="viewDiv" value="<%=params.get("viewDiv") %>">			<!-- 화면구분 -->
<INPUT type="hidden" name="grtreqNo" id="grtreqNo" value="<%=contOutWarr.get("GRTREQNO") %>">			<!-- 원계약번호 -->
<INPUT type="hidden" name="guarStatus" id="guarStatus" value="<%=contOutWarr.get("GUAR_STATUS") %>">			<!--보증 상태 -->
<INPUT type="hidden" name="SUB_CONT_ID" id="SUB_CONT_ID" value="<%=contOutWarr.get("SUB_CONT_ID") %>">			<!--계약서 ID -->
<INPUT type="hidden" name="MOD_NO" id="MOD_NO" value="<%=contOutWarr.get("MOD_NO") %>">			<!--계약 변경차수 -->

<INPUT type="hidden" name="prepayId" id="prepayId" value="<%=params.get("prepayId") %>">			<!-- 보증일련번호 -->
<INPUT type="hidden" name="guarOnOffYn" id="guarOnOffYn" value="<%=contOutWarr.get("GUAR_ONOFF_YN") %>">			<!-- 발행방법 -->
<INPUT type="hidden" name="USER" id="USER" value="<%=params.get("USER")%>">			<!-- 업체는 저장버튼 제외.  -->

	<!-- 제목 및 버튼 -->
<table  id="t1" width="100%" border="0" cellspacing="0" cellpadding="0" class="ftit_table">
	<colgroup>
		<col width="200" />
		<col width="*" />
	</colgroup>
	<tr>
	   <td align="right">
	        <% if(user.get("RIGHT_NAME").equals("OUTSIDE") ) {%> 
			<span class="btnSearch center" id="btnSave"><a>저장</a></span>
			<span class="btnSearch center" style="display:none" id="btnDel"><a href="javascript:void();del('정말로 보증정보를 삭제 하시겠습니까?');">삭제</a></span>
			<span class="btnSearch center" style="display:none" id="btnTrans"><a>전송</a></span>
			<span class="btnSearch center" style="display:none" id="btnAgain"><a>재전송</a></span>
			<span class="btnSearch center" style="display:none" id="btnCancel"><a href="javascript:void();del('해당기관에 전송한 계약정보가 삭제됩니다.\n\n취소 신청하시겠습니까?');">취소</a></span>
			<%} %>
	   </td>
   	</tr>
</table>
   	
<!-- 상세 정보 -->   	
<TABLE cellspacing="1" cellpadding="0" class="search_table" style="margin-top:10px;">
	<colgroup>
		<col width="140" />
		<col width="*" />
	</colgroup>
	<TR height="25"> 
		<TH class="search_table_title" style="text-align: left;">현장명</TH>
		<TD class="search_table_data" style="margin-left:10px;text-align: left;">&nbsp;<%= InputText.get("deptName", contOutWarr.get("DEPT_NAME"), 50, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %></TD>
	</TR>
	<TR height="25"> 
		<TH class="search_table_title" style="text-align: left;">하도공사명</TH>
		<TD class="search_table_data" style="margin-left:10px;text-align: left;">&nbsp;<%= InputText.get("buildName", contOutWarr.get("BUILD_NAME"), 50, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %></TD>
	</TR>
	<TR height="25"> 
		<TH class="search_table_title" style="text-align: left;">계약번호</TH>
		<TD class="search_table_data" style="margin-left:10px;text-align: left;">&nbsp;<%= InputText.get("conDocNo", contOutWarr.get("CON_DOC_NO"), 50, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %></TD>
	</TR>
	<TR height="25"> 
		<TH class="search_table_title" style="text-align: left;">협력회사명</TH>
		<TD class="search_table_data" style="margin-left:10px;text-align: left;">&nbsp;<%= InputText.get("memberName", contOutWarr.get("MEMBER_NAME"), 50, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %></TD>
	</TR>
	<!--  TR height="25"> 
		<TH class="search_table_title" style="text-align: left;">발행구분</TH>
		<TD class="search_table_data" style="margin-left:10px;text-align: left;">&nbsp;<%= InputText.get("warrGubunNm", contOutWarr.get("WARR_GUBUN_NM"), 50, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %></TD>
	</TR -->
	<TR height="25">
		<TH class="search_table_title required" style="text-align: left;">보증구분</TH>
		<TD class="search_table_data" style="margin-left:10px;text-align: left;">&nbsp;<%= HTMLMaker.getSelectTag(WarrPayGbComboList, "DETAILCD", "DETAILNM", "warrPayGb", "width:35%;height=18;' onChange='onChangeWpb();", "<option value=''>선택</option>", contOutWarr.get("WARR_PAY_GB")) %>
		<%-- <%= InputText.get("warrPayGb", contOutWarr.get("WARR_PAY_GB"), 30, 40, "string, left, readOnly", "string") %> --%>
		</TD>
	</TR>
</TABLE>
<%
	if (params.get("CAUSECODE").equals("04")){
%>
<TABLE cellspacing="1" cellpadding="0" class="search_table" id="offTableInfo" name="offTableInfo" style="margin-top:10px;display:">
	<colgroup>
		<col width="140" />
		<col width="*" />
	</colgroup>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">변경구분</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("xxxxxxxx", "연장", 50, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %>
			<INPUT type="hidden" name="warrSeq1" id="warrSeq1" value="<%=params.get("warrSeq") %>">				<!-- 보증증권 일련번호 -->
			<INPUT type="hidden" name="CAUSECODE1" id="CAUSECODE1" value="02">
			<INPUT type="hidden" name="CAUSECOUNT" id="CAUSECOUNT" value="2">		
		</TD>
	</TR>
	<TR height="25"> 
		<TH class="search_table_title" style="text-align: left;">증권번호</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("warrWgno1", contOutWarr.get("WARR_WGNO"), 55, 38, "string, left", "string") %></TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">보증기간</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("dateStart1", Formatter.formatDate(contOutWarr.get("WARR_SDATE"), "-"), 20, 10, "Center, date, PerSize, readonly", "date", "") %>
			<A href="JavaScript:calendar('dateStart1');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
				~
			<%= InputText.get("dateEnd1", Formatter.formatDate(contOutWarr.get("WARR_EDATE"), "-"), 20, 10, "Center, date, PerSize, readonly", "date", "") %>
			<A href="JavaScript:calendar('dateEnd1');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
		</TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">발급일</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("paperDate1", Formatter.formatDate(contOutWarr.get("PAPERDATE"), "-"), 29, 10, "Center, date, PerSize, readonly", "date", "") %>
			<A href="JavaScript:calendar('paperDate1');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
		</TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">보증금액</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("warrWamt1", Formatter.formatCurrency(contOutWarr.get("WARR_WAMT")), 55, 14, "class=input byteChk ,number, right", "number") %>
		</TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">수수료</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("warrCommsn1", Formatter.formatCurrency(contOutWarr.get("WARR_COMMSN")), 55, 14, "class=input byteChk ,minus, right", "number") %>
		</TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">첨부파일</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<TEXTAREA name="p_AttachFileGuar1" id="p_AttachFileGuar2" style="width:85%;height:20px" rows="1" class="input" readOnly><%=attFile1.get("fileRow") %></TEXTAREA>
			<IMG id='search_spot_button' onClick="doAttachFile(document.form1.subContModId,1,'GUARCONT_OUT_<%=params.get("warrGubun")%>_<%=params.get("warrSeq")%>');" src='/img/buyer/button/bt_change.gif' border='0'  align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'>
		</TD>
	</TR>	
</TABLE>
<TABLE cellspacing="1" cellpadding="0" class="search_table" id="offTableInfo" name="offTableInfo" style="margin-top:5px;display:">
	<colgroup>
		<col width="140" />
		<col width="*" />
	</colgroup>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">변경구분</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("xxxxxxxx", "증액", 50, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %>
			<INPUT type="hidden" name="warrSeq2" id="warrSeq2" value="<%=Integer.parseInt(params.get("warrSeq"))+1 %>">				<!-- 보증증권 일련번호 -->
			<INPUT type="hidden" name="CAUSECODE2" id="CAUSECODE2" value="03">	
		</TD>
	</TR>
	<TR height="25"> 
		<TH class="search_table_title" style="text-align: left;">증권번호</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("warrWgno2", contOutWarr.get("WARR_WGNO"), 55, 38, "string, left", "string") %></TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">보증기간</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("dateStart2", Formatter.formatDate(contOutWarr.get("WARR_SDATE"), "-"), 20, 10, "Center, date, PerSize, readonly", "date", "") %>
			<A href="JavaScript:calendar('dateStart2');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
				~
			<%= InputText.get("dateEnd2", Formatter.formatDate(contOutWarr.get("WARR_EDATE"), "-"), 20, 10, "Center, date, PerSize, readonly", "date", "") %>
			<A href="JavaScript:calendar('dateEnd2');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
		</TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">발급일</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("paperDate2", Formatter.formatDate(contOutWarr.get("PAPERDATE"), "-"), 29, 10, "Center, date, PerSize, readonly", "date", "") %>
			<A href="JavaScript:calendar('paperDate2');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
		</TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">보증금액</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("warrWamt2", Formatter.formatCurrency(contOutWarr.get("WARR_WAMT")), 55, 14, "class=input byteChk ,number, right", "number") %>
		</TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">수수료</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("warrCommsn2", Formatter.formatCurrency(contOutWarr.get("WARR_COMMSN")), 55, 14, "class=input byteChk ,minus, right", "number") %>
		</TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">첨부파일</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<TEXTAREA name="p_AttachFileGuar2" id="p_AttachFileGuar2" style="width:85%;height:20px" rows="1" class="input" readOnly><%=attFile.get("fileRow") %></TEXTAREA>
			<IMG id='search_spot_button' onClick="doAttachFile(document.form1.subContModId,2,1,'GUARCONT_OUT_<%=params.get("warrGubun")%>_<%=Integer.parseInt(params.get("warrSeq"))+1%>');" src='/img/buyer/button/bt_change.gif' border='0'  align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'>
		</TD>
	</TR>	
</TABLE>
<%}else{%>
<TABLE cellspacing="1" cellpadding="0" class="search_table" id="offTableInfo" name="offTableInfo" style="margin-top:10px;display:">
	<colgroup>
		<col width="140" />
		<col width="*" />
	</colgroup>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">변경구분</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("xxxxxxxx", contOutWarr.get("CAUSECODE_NM"), 50, 30, "class=input_blank, readOnly=white, string, left, tabIndex=-1", "string") %>
			<INPUT type="hidden" name="warrSeq1" id="warrSeq1" value="<%=params.get("warrSeq") %>">				<!-- 보증증권 일련번호 -->
			<INPUT type="hidden" name="CAUSECODE1" id="CAUSECODE1" value="<%=params.get("CAUSECODE") %>">
			<INPUT type="hidden" name="CAUSECOUNT" id="CAUSECOUNT" value="1">
		</TD>
	</TR>
	<TR height="25"> 
		<TH class="search_table_title" style="text-align: left;">증권번호</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("warrWgno1", contOutWarr.get("WARR_WGNO"), 55, 38, "string, left, readonly", "string") %></TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">보증기간</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("dateStart1", Formatter.formatDate(contOutWarr.get("WARR_SDATE"), "-"), 20, 10, "Center, date, PerSize, readonly", "date", "") %>
			<A href="JavaScript:calendar('dateStart1');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
				~
			<%= InputText.get("dateEnd1", Formatter.formatDate(contOutWarr.get("WARR_EDATE"), "-"), 20, 10, "Center, date, PerSize, readonly", "date", "") %>
			<A href="JavaScript:calendar('dateEnd1');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
		</TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">발급일</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("paperDate1", Formatter.formatDate(contOutWarr.get("PAPERDATE"), "-"), 29, 10, "Center, date, PerSize, readonly", "date", "") %>
			<A href="JavaScript:calendar('paperDate1');"><IMG src="/img/buyer/btn/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
		</TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">보증금액</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("warrWamt1", Formatter.formatCurrency(contOutWarr.get("WARR_WAMT")), 55, 14, "class=input byteChk ,number, right, readonly", "number") %>
		</TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">수수료</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<%= InputText.get("warrCommsn1", Formatter.formatCurrency(contOutWarr.get("WARR_COMMSN")), 55, 14, "class=input byteChk ,minus, right, readonly", "number") %>
		</TD>
	</TR>
	<TR height="25">
		<TH class="search_table_title" style="text-align: left;">첨부파일</TH>
		<TD class="search_table_data" style="text-align: left;">&nbsp;<TEXTAREA name="p_AttachFileGuar1" id="p_AttachFileGuar1" style="width:85%;height:30px" rows="1" class="input" readOnly><%=attFile.get("fileRow") %></TEXTAREA>
			<IMG id='search_spot_button' onClick="doAttachFile(document.form1.subContModId,1,'GUARCONT_OUT_<%=params.get("warrGubun")%>_<%=params.get("warrSeq")%>');" src='/img/buyer/button/bt_change.gif' border='0'  align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'>
		</TD>
	</TR>				
</TABLE>
<%}%>
</FORM>
<script>
window.onload = function() {  
	showHideTable(false);
};	

onChangeWpb();

</script>