<%--
  - FileName   : PuSupplier.jsp
  - Author(s)  : 이성민
  - Date       : 2014.06.26
  -
  - Description: 협력업체현황 상세
  --%>

<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
<%@ page import="com.udapsoft.waf.common.util.DateUtil"%>
<%@ page import="kr.co.hsnc.common.util.ValueObject" %>
<%@ page import="kr.co.hsnc.common.sql.RowSet" %>
<%@ page import="com.udapsoft.waf.common.ui.*" %>
<%@ page import="com.udapsoft.waf.common.util.StringUtils" %>
<%@ page import="com.udapsoft.waf.common.util.Formatter2"%>
<%@ page import="kr.co.hsnc.common.config.WAFConfig" %>
<%@ page import="kr.co.udapsoft.common.code.*" %>
<%@ 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();
    
    
    ValueObject vo = storage.getValueObject("InfoBaseList");
    ValueObject filein = storage.getValueObject("TERMS_AGREE_INFO");
    
    
    
    ValueObject corpInfoVo = storage.getValueObject("corpInfoVo");
    
    RowSet getApprYearList = storage.getRowSet("getApprYearList");
    
	String yyyy = (new java.text.SimpleDateFormat ("yyyy")).format (new java.util.Date());
	
	String yyyymmdd = (new java.text.SimpleDateFormat ("yyyy-MM-dd")).format (new java.util.Date());
	
	
	String oneYearAgoDate = Integer.toString((Integer.parseInt(yyyymmdd.replace("-", "")) + 10000));
	
	String oneDayDate = Integer.toString((Integer.parseInt(yyyymmdd.replace("-", "")) - 1));
	
	RowSet nationRowSet = storage.getRowSet("nationRowSet");
	
    int year = Integer.parseInt(yyyy);
    String sToday = DateUtil.getSystemDate().substring(0,8);
    	
    String yesrCombo = Integer.toString(year) + "|" + Integer.toString(year-1) + "|" + Integer.toString(year-2) + "|" + Integer.toString(year-3) + "|" + Integer.toString(year-4);
    
	String lic_code = "";
	String lic_name = "";
	
	RowSet licMasterList = storage.getRowSet("licMasterList");

	for (int i = 0; i < licMasterList.size(); i++) {
		lic_code = lic_code + "|"
				+ (licMasterList.getRow(i).get("LIC_CD"));
		lic_name = lic_name + "|"
				+ (licMasterList.getRow(i).get("LIC_NM"));
	}
	   
%>

<!-- CSS -->
<script src="/js/crownix-viewer.min.js"></script>
<link rel="stylesheet" type="text/css" href="/css/crownix-viewer.min.css">

<link href="/css/buyer/member_style.css" rel="stylesheet" type="text/css" />
<!-- <SCRIPT language="javascript" src="/js/RDConfig.js"></SCRIPT> -->
<script type="text/javascript" src="/js/creditEvaluationPop.js"></script>

<!-- SCROPT -->
<script type="text/javascript">
<!--
	var now = new Date();
	var now_DY = now.getFullYear() +""+ (now.getMonth() + 1);
	var now_dd = now.getDate();
	if(now_dd < 10){
		now_dd = "0"+now_dd;
	}
	now_DY = now_DY+now_dd;
	var credit_yn 		= "<%=vo.get("credit_yn")%>";
	var p_in_out_div 	= "<%=params.get("p_in_out_div")%>";
	var class_gubun 	= "<%=vo.get("ITEM_STD_CD")%>";
	
	var corp_reg_gubun 	= "<%=vo.get("CORP_REG_NO") %>"; 
    corp_reg_gubun = corp_reg_gubun.trim().substring(3,5);
	
    

    var search_flag_4 = "N";
    var search_flag_5 = "N";
    var search_flag_6 = "N";
    var search_flag_7 = "N";
    var search_flag_8 = "N";
    var search_flag_9 = "N";
	
	$.gridInit = function()
	{
	    var init_sheet = {};
		init_sheet.Cfg = {SearchMode:2, MergeSheet:msHeaderOnly, Page:30,ChildPage:10};
		
		init_sheet.Cols = [
									{Header:"레벨",	 			Type:"Text", 				TreeCol:1,				LevelSaveName:"MATERIAL_LEVEL",	 	SaveName:"MATERIAL_LEVEL"	,	Width:250},
									{Header:"대분류",	 			Type:"Text", 				SaveName:"GUBUN_1",		Width:80, 	 Align:"Center",  Hidden:"True"},
									{Header:"중분류",	 			Type:"Text", 				SaveName:"GUBUN_2",		Width:80, 	 Align:"Center",  Hidden:"True"},
									{Header:"소분류",	 			Type:"Text", 				SaveName:"GUBUN_3",		Width:80, 	 Align:"Center",  Hidden:"True"},
									{Header:"LEVEL",	 			Type:"Text", 				SaveName:"LEVEL",		Width:0, 	 Align:"Center", Hidden:"True"},
									{Header:"CODE",	 			Type:"Text", 				SaveName:"MATERIALGROUP",		Width:100, 	 Align:"Center", Hidden:"True"}
									
		                   		];
		
		
		init_sheet.HeaderMode = {Sort:1};
		IBS_InitSheet(sheet1, init_sheet);
		sheet1.SetDataAutoTrim(0);
		sheet1.SetEditable(false);
		sheet1.SetCountPosition(0);
		sheet1.FitColWidth();
		
	
		
		/***********************sheet2*****************************/
		var init_sheet = {};
		init_sheet.Cfg = {SearchMode:2, MergeSheet:msHeaderOnly, Page:10};
		
		init_sheet.Cols = [
									{Header:"삭제",				Type:"DelCheck",			SaveName:"DEL_CHECK", 					Width:50, 	Align:"Center"},
									{Header:'Status',				Type:"Status", 			SaveName:"STATUS", 						Width:0, 	Align:"Center", Hidden:"True"},
									{Header:"대분류",	 			Type:"Text", 				SaveName:"KIND_BIG_NAME",	 			Width:110,  Align:"Left" },
									{Header:"중분류",	 			Type:"Text", 				SaveName:"KIND_MID_NAME",				Width:110, 	 Align:"Left"},
									{Header:"소분류",	 			Type:"Text", 				SaveName:"KIND_SMALL_NAME",			Width:110, 	 Align:"Left"},
									{Header:"대표ITEM",	 		Type:"Radio", 				SaveName:"MAIN_ITEM",					Width:50, 	 Align:"Center"},
									{Header:"ITEM_CODE",	 	Type:"Text", 				SaveName:"ITEM_CODE",					Width:50, 	 Align:"Center", Hidden:"True"}
		                   		];
		
		
		init_sheet.HeaderMode = {Sort:1};
		IBS_InitSheet(sheet2, init_sheet);
		sheet2.SetDataAutoTrim(0);
	    sheet2.SetEditable(true);
	    sheet2.SetCountPosition(0);
		sheet2.FitColWidth();
		
		
		
		
		


		/***********************sheet3*****************************/
		<%if(!params.get("p_in_out_div").equals("O")){ %>
		    
		var init_sheet = {};
		init_sheet.Cfg = {SearchMode:2, MergeSheet:msHeaderOnly, Page:10};
		
		init_sheet.Cols = [
									{Header:'Status',					Type:"Status", 			SaveName:"STATUS", 					Width:0, 	Align:"Center", Hidden:"True"},
									{Header:"신용평가사",	 		Type:"Text", 				SaveName:"CREDIT_CORP_CD",	 	Width:90, 	Edit:"False"},
									{Header:"신용등급",	 			Type:"Text", 				SaveName:"CREDIT_GRADE",			Width:90, 	 Align:"Center"},
									{Header:"현금흐름등급",	 		Type:"Text", 				SaveName:"CASH_GRADE",				Width:90, 	 Align:"Center"},
									{Header:"신용평가만료일",	 	Type:"Date", 				SaveName:"CREDIT_END_DY",			Width:100, 	 Align:"Center"},
									{Header:"신용평가사코드",	 	Type:"Text", 				SaveName:"GUBUN_CODE",				Width:100, 	 Align:"Center", Hidden:"True"}
		                   		];
		
		
		init_sheet.HeaderMode = {Sort:1};
		IBS_InitSheet(sheet3, init_sheet);
		sheet3.SetDataAutoTrim(0);
		sheet3.SetEditable(false);
		sheet3.SetCountPosition(0);
	
		sheet3.FitColWidth();
		<%}%>
		
		
	/***********************sheet4*****************************/
		
		var init_sheet = {};
		init_sheet.Cfg = {SearchMode:2, MergeSheet:msHeaderOnly, Page:10};
		
		init_sheet.Cols = [
									{Header:"삭제",					Type:"DelCheck",			SaveName:"DEL_CHECK", 				Width:70, 	Align:"Center",		HeaderCheck:"False"},
									{Header:'Status',				Type:"Status", 			SaveName:"STATUS", 				Width:0, 	Align:"Center", Hidden:"True"},
									{Header:"ID",	 				Type:"Text", 				SaveName:"USER_ID",	 			Width:100,		Edit:false},
									{Header:"비밀번호",	 			Type:"Text", 				SaveName:"PASSWD",				Width:100, 	 Align:"Center", Hidden:"True"},
									{Header:"담당자명",	 			Type:"Text", 				SaveName:"USER_NAME",			Width:100, 	 Align:"Center"},
									{Header:"부서명",	 			Type:"Text", 				SaveName:"DIVISION",				Width:160, 	 Align:"Center"},
									{Header:"직위",	 				Type:"Text", 				SaveName:"POSITION",				Width:100, 	 Align:"Center"},
									{Header:"이메일",	 			Type:"Text", 				SaveName:"EMAIL",					Width:160, 	 Align:"Center"},
									{Header:"전화번호",	 			Type:"Text", 				SaveName:"TEL_NUM",				Width:160, 	 Align:"Center"},
									{Header:"FAX번호",	 		Type:"Text", 				SaveName:"FAX_NUM",				Width:160, 	 Align:"Center"},
									{Header:"휴대전화",	 			Type:"Text", 				SaveName:"HP1",				Width:30, 	 Align:"Center",	EditLen:"3"},
									{Header:"휴대전화",	 			Type:"Text", 				SaveName:"BAR1",				Width:12, 	 Align:"Left",	Edit:"false"},
									{Header:"휴대전화",	 			Type:"Text", 				SaveName:"HP2",				Width:30, 	 Align:"Center",	EditLen:"4"},
									{Header:"휴대전화",	 			Type:"Text", 				SaveName:"BAR2",				Width:12, 	 Align:"Left",	Edit:"false"},
									{Header:"휴대전화",	 			Type:"Text", 				SaveName:"HP3",				Width:30, 	 Align:"Center",	EditLen:"4"},
									{Header:"비고",	 			Type:"Text", 				SaveName:"NOTE",				Width:160, 	 Align:"Center"},
									{Header:"CORP_ID",	 			Type:"Text", 				SaveName:"CORP_ID",				Width:100, 	 Align:"Center", Hidden:"True"},
									{Header:"CHARGE_SEQ",	 			Type:"Text", 				SaveName:"CHARGE_SEQ",				Width:100, 	 Align:"Center", Hidden:"True"}
		                   		];
		
		
		init_sheet.HeaderMode = {Sort:1};
		IBS_InitSheet(sheet4, init_sheet);
		sheet4.SetDataAutoTrim(0);
		//sheet4.SetEditable(false);
		sheet4.SetCountPosition(0);
		
		sheet4.FitColWidth();
		
		
	/***********************납품실적*****************************/
		
		var init_sheet = {};
		init_sheet.Cfg = {SearchMode:2, MergeSheet:msHeaderOnly, Page:10};
		
		init_sheet.Cols = [
							{Header:"삭제/승인",			Type:"DelCheck",		SaveName:"DEL_CHECK", 			Width:60, 		Align:"Center"},
							{Header:"상태",	 			Type:"Status", 			SaveName:"STATUS"	,			Width:0, 		Hidden:"True"},
							{Header:"납품처명",	 		Type:"Text", 			SaveName:"DELI_CORP_NM"	,		Width:120, 		Align:"Left"},
							{Header:"납품처사업자번호",	 	Type:"Text", 			SaveName:"DELI_CORP_NO",		Width:100, 	 	Align:"Left", Format:"SaupNo"},
							{Header:"품목명",	 			Type:"Text", 			SaveName:"ITEM_NM",				Width:100, 	 	Align:"Left"},
							{Header:"계약금액",	 		Type:"Int", 			SaveName:"CONT_AMT",			Width:100, 	 	Align:"Right", Format:"#,##0"},
							{Header:"수량",	 			Type:"Int", 			SaveName:"QTY",					Width:100, 	 	Align:"Right"},
							{Header:"규격",	 			Type:"Text", 			SaveName:"STD",					Width:100, 	 	Align:"Left"},
							{Header:"납품시작일",	 		Type:"Date", 			SaveName:"DELI_START_DY",		Width:100, 	 	Align:"Center"}, //, Format:"Ym"
							{Header:"납품종료일",	 		Type:"Date", 			SaveName:"DELI_END_DY",			Width:100, 	 	Align:"Center"},
							{Header:'☞첨부',				Type:"Text", 			SaveName:"FILE_YN", 			Width:60, 		Align:"center", Edit:"false",	Cursor:'pointer'},
							{Header:'승인여부',			Type:"Text", 			SaveName:"DELIRESULT_CONFIRM_NM", 	Width:60, 		Align:"center", Edit:"false"},
							{Header:'DELIRESULT_CONFIRM',	Type:"Text", 		SaveName:"DELIRESULT_CONFIRM", 	Width:60, 		Align:"center", Hidden:"true"},
							{Header:'DELI_FILE_ID',		Type:"Text", 			SaveName:"DELI_FILE_ID",		Width:0, 		Align:"center", Hidden:"true"},
			    			{Header:'FILE_ID',			Type:"Text", 			SaveName:"FILE_ID", 			Width:0, 		Align:"center", Hidden:"true"},
							{Header:"SEQ",	 			Type:"Text", 			SaveName:"SEQ",					Width:0, 	 	Align:"Center", Hidden:"True"},
							{Header:"CREDIT_END_DY",	Type:"Text", 			SaveName:"CREDIT_END_DY",		Width:0, 	 	Align:"Center", Hidden:"True"},
							{Header:"CREDIT_YN",	 	Type:"Text", 			SaveName:"CREDIT_YN",			Width:0, 	 	Align:"Center", Hidden:"True"}
							
                  		];
		
		
		init_sheet.HeaderMode = {Sort:1};
		IBS_InitSheet(sheet5, init_sheet);
		sheet5.SetDataAutoTrim(0);
		sheet5.SetImageList(1,"/img/buyer/button/bt_change.gif");
		
		/*
		if(credit_yn == "Y")
		{
			sheet5.SetEditable(false);
		}*/
		 
		sheet5.SetCountPosition(0);
		sheet5.FitColWidth();
		
	/***********************인증서*****************************/
		
		var init_sheet = {};
		init_sheet.Cfg = {SearchMode:2, MergeSheet:msHeaderOnly, Page:10};
		
		init_sheet.Cols = [
							{Header:"삭제/승인",					Type:"DelCheck",		SaveName:"DEL_CHECK", 			Width:30, 		Align:"Center"},
							{Header:"상태",	 					Type:"Status", 			SaveName:"STATUS"	,			Width:0, 		Hidden:"True"},
							{Header:"종류",	 					Type:"Combo", 			SaveName:"CERT_DIV_CD",			Width:100, 	 	Align:"Center", ComboText:"ISO9001|ISO14000|KOSHA|KS|기타", ComboCode:"01|02|03|04|99"},
							{Header:"인증번호",	 				Type:"Text", 			SaveName:"CERT_NO",				Width:100, 	 	Align:"Left"},
							{Header:"인증명",	 					Type:"Text", 			SaveName:"CERT_CTNT",			Width:100, 	 	Align:"Left"},
							{Header:"인증범위",	 				Type:"Text", 			SaveName:"CERT_SCOPE",			Width:100, 	 	Align:"Left"},
							{Header:"인증기관",	 				Type:"Text", 			SaveName:"CERT_GOV",			Width:100, 	 	Align:"Left"},
							{Header:"취득일",	 					Type:"Date", 			SaveName:"EXP_STA_DY",			Width:100, 	 	Align:"Center"},
							{Header:"만기일",	 					Type:"Date", 			SaveName:"EXP_END_DY",			Width:100, 	 	Align:"Center"},
							{Header:'☞첨부',						Type:"Text", 			SaveName:"FILE_YN", 			Width:60, 		Align:"center", Edit:"false",	Cursor:'pointer'},
							{Header:'승인여부',					Type:"Text", 			SaveName:"CERT_CONFIRM_NM", 	Width:60, 		Align:"center", Edit:"false"},
							{Header:'CERT_CONFIRM',				Type:"Text", 			SaveName:"CERT_CONFIRM", 		Width:60, 		Align:"center", Hidden:"true"},
							{Header:'CERT_FILE_ID',				Type:"Text", 			SaveName:"CERT_FILE_ID",		Width:0, 		Align:"center", Hidden:"true"},
			    			{Header:'FILE_ID',					Type:"Text", 			SaveName:"FILE_ID", 			Width:0, 		Align:"center", Hidden:"true"},
							{Header:"CERT_SEQ",	 				Type:"Text", 			SaveName:"CERT_SEQ",			Width:0, 	 	Align:"Center", Hidden:"True"},
							{Header:"CREDIT_END_DY",			Type:"Text", 			SaveName:"CREDIT_END_DY",		Width:0, 	 	Align:"Center", Hidden:"True"},
							{Header:"CREDIT_YN",	 			Type:"Text", 			SaveName:"CREDIT_YN",			Width:0, 	 	Align:"Center", Hidden:"True"}
							
							
                  		];
		
		
		init_sheet.HeaderMode = {Sort:1};
		IBS_InitSheet(sheet6, init_sheet);
		sheet6.SetDataAutoTrim(0);
		sheet6.SetImageList(1,"/img/buyer/button/bt_change.gif");
/* 		
		if(credit_yn == "Y")
		{
		sheet6.SetEditable(false);
		}
		 */
		sheet6.SetCountPosition(0);
		sheet6.FitColWidth();
		
		
	/***********************포상실적*****************************/
		
		var init_sheet = {};
		init_sheet.Cfg = {SearchMode:2, MergeSheet:msHeaderOnly, Page:10};
		
		init_sheet.Cols = [
							{Header:'삭제',							Type:"DelCheck",			SaveName:"DEL_CHECK", 				Width:30, 		Align:"Center"},
							{Header:"상태",	 					Type:"Status", 			SaveName:"STATUS"	,					Width:0, 		Hidden:"True"},
							{Header:"수상일",	 					Type:"Date", 				SaveName:"PRZ_DY",					Width:100, 	 	Align:"Center"},
							{Header:"수상자",	 					Type:"Text", 				SaveName:"PRZ_NM",					Width:100, 	 	Align:"Center"},
							{Header:"수여자",	 					Type:"Text", 				SaveName:"PRZ_GIVER",				Width:100, 	 	Align:"Left"},
							{Header:"수상내용",	 				Type:"Text", 				SaveName:"PRZ_INFO",					Width:300, 	 	Align:"Left"},
							{Header:"PRZ_SEQ",	 				Type:"Text", 				SaveName:"PRZ_SEQ",					Width:0, 	 	Align:"Center", Hidden:"True"},
							{Header:"CREDIT_END_DY",	Type:"Text", 				SaveName:"CREDIT_END_DY",			Width:0, 	 	Align:"Center", Hidden:"True"},
							{Header:"CREDIT_YN",	 		Type:"Text", 				SaveName:"CREDIT_YN",				Width:0, 	 	Align:"Center", Hidden:"True"}
							
		          		];
		
		
		init_sheet.HeaderMode = {Sort:1};
		IBS_InitSheet(sheet7, init_sheet);
		sheet7.SetDataAutoTrim(0);
/* 	
		if(credit_yn == "Y")
		{
		sheet7.SetEditable(false);
		}
		 */
		sheet7.SetCountPosition(0);
		sheet7.FitColWidth();


		
	/***********************특허*****************************/
		
		var init_sheet = {};
		init_sheet.Cfg = {SearchMode:2, MergeSheet:msHeaderOnly, Page:10};
		
		init_sheet.Cols = [
							{Header:'삭제',						Type:"DelCheck",			SaveName:"_CHECK", 					Width:30, 	Align:"Center"},
							{Header:"상태",	 				Type:"Status", 			SaveName:"STATUS"	,					Width:0, 		Hidden:"True"},
							{Header:"산업재산권구분",	 	Type:"Combo", 			SaveName:"PAT_CD",					Width:100, 	 	Align:"Center", ComboText:"실용신안|의장권|특허권|상표권|기타", ComboCode:"01|02|03|04|99"},
							{Header:"특허일",				 	Type:"Date",	 			SaveName:"PAT_DY",					Width:100, 	 	Align:"Center"},
							{Header:"명칭",	 				Type:"Text", 				SaveName:"PAT_INFO",					Width:300, 	 	Align:"Left"},
							{Header:"PAT_SEQ",	 			Type:"Text", 				SaveName:"PAT_SEQ",					Width:0, 	 	Align:"Center", Hidden:"True"},
							{Header:"CREDIT_END_DY",	Type:"Text", 				SaveName:"CREDIT_END_DY",			Width:0, 	 	Align:"Center", Hidden:"True"},
							{Header:"CREDIT_YN",	 		Type:"Text", 				SaveName:"CREDIT_YN",				Width:0, 	 	Align:"Center", Hidden:"True"}
                 		];
		
		
		init_sheet.HeaderMode = {Sort:1};
		IBS_InitSheet(sheet8, init_sheet);
		sheet8.SetDataAutoTrim(0);
/* 		
		if(credit_yn == "Y")
		{
		sheet8.SetEditable(false);
		}
		 */
		sheet8.SetCountPosition(0);
		sheet8.FitColWidth();

		
		/***********************건설면허*****************************/	
		var init_sheet = {};
		init_sheet.Cfg = {SearchMode:2, MergeSheet:msHeaderOnly, Page:10};
		
		init_sheet.Cols = [
							{Header:'삭제',			Type:"DelCheck",		SaveName:"_CHECK",			Width:30, 		Align:"Center"},
							{Header:"상태", 			Type:"Status", 			SaveName:"STATUS"	,		Width:0, 		Hidden:"True"},
							{Header:"기준년도",		Type:"Combo", 			SaveName:"BASE_YEAR",		Width:100, 	 	Align:"Center", ComboText:"<%=yesrCombo%>", ComboCode:"<%=yesrCombo%>"},
							{Header:"면허명",	 		Type:"Combo", 			SaveName:"LIC_CD",			Width:100, 	 	Align:"Left", ComboText:"<%=lic_name%>", ComboCode:"<%=lic_code%>"},
							{Header:"면허코드",		Type:"Text",			SaveName:"LIC_NM",			Width:100, 	 	Align:"Left", Hidden:"True"},
							{Header:"면허번호",		Type:"Text",			SaveName:"LIC_NO",			Width:100, 	 	Align:"Left"},
							{Header:"취득일자",		Type:"Date",			SaveName:"CONREYR",			Width:100, 	 	Align:"Center"},
							{Header:"CON_SEQ", 			Type:"Text",		SaveName:"CON_SEQ",			Width:0, 	 	Align:"Center", Hidden:"True"},
							{Header:"CREDIT_END_DY",	Type:"Text",		SaveName:"CREDIT_END_DY",	Width:0, 	 	Align:"Center", Hidden:"True"},
							{Header:"CREDIT_YN",		Type:"Text",		SaveName:"CREDIT_YN",		Width:0, 	 	Align:"Center", Hidden:"True"}
                 		];				
		init_sheet.HeaderMode = {Sort:1};
		IBS_InitSheet(sheet9, init_sheet);
		sheet9.SetDataAutoTrim(0);

		sheet9.SetCountPosition(0);
		sheet9.FitColWidth();				
		
	}
	
	$(function(){
	    
	    /* $(document).on("keyup", "input:text[numberOnly]", function(){
	        $(this).val( $(this).val().replace(/[^0-9]/gi,"") );
	     });
	    
	    $(document).on("keyup", ".numberic", function(){
	        $(this).val($(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));  //콤마찍기 정규식...귀찮ㄹ타
	     }); */
	    
	  	//숫자,특문-만... 귀찮으므로 다 정규식
	    $(document).on("keyup", "input:text[noHangelEng]", function() {
	        $(this).val( $(this).val().replace( /[^0-9-]/gi, "") );
	     });
	    
	    <%-- <%if(corpInfoVo.get("re_yn").equals("N")){ %>
	 	    $(".numberic").each(function(){
		         $("input").attr("readonly",true); 
		    });  
    	<%} %> 2017.10.16 신용만료일따라 수정여부 구분 제외--%>
	    
	    //페이지 로드시 콤마 찍어주기.
	    /* $(".numberic").each(function(){
	        $(this).val($(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(',')); 
	    }); */
	    
	    
	    $.getList = function()
		{
		    $("#fevent").val("GET_LIST");
			
			var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
			Modular.view.IBSheet7.doSearch(sheet1, url, $("#form1"), 10, "");
		};
		
		$.getList2 = function()
		{
		    $("#fevent").val("GET_MY_LIST");
			
			var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
			Modular.view.IBSheet7.doSearch(sheet2, url, $("#form1"), 10, "");
		};
		
		$.getList3 = function()
		{
		    $("#fevent").val("GET_APPR_LIST");
			
			var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
			Modular.view.IBSheet7.doSearch(sheet3, url, $("#form1"), 10, "");
		};
		
		
		$.getList4 = function()//담당자 정보
		{
		    $("#fevent").val("GET_CHARGE_LIST");
			
			var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
			Modular.view.IBSheet7.doSearch(sheet4, url, $("#form1"), 10, "");
		};
		
		
		$.getDeliverList = function()//납품실적
		{
		    $("#fevent").val("GET_DELIVER_LIST");
			
			var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
			Modular.view.IBSheet7.doSearch(sheet5, url, $("#form1"), 10, "");
		};
		
		$.getCertList = function()//인증서
		{
		    $("#fevent").val("GET_CRET_LIST");
			
			var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
			Modular.view.IBSheet7.doSearch(sheet6, url, $("#form1"), 10, "");
		};
		
		$.getPrizeList = function()//포상실적
		{
		    $("#fevent").val("GET_PRIZE_LIST");
			
			var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
			Modular.view.IBSheet7.doSearch(sheet7, url, $("#form1"), 10, "");
		};
		
		$.getSuppPatTent = function()//특허
		{
		    $("#fevent").val("GET_PATENT_LIST");
			
			var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
			Modular.view.IBSheet7.doSearch(sheet8, url, $("#form1"), 10, "");
		};
		
		$.getCert2List = function()//면허
		{
		    $("#fevent").val("GET_CRET2_LIST");
			
			var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
			Modular.view.IBSheet7.doSearch(sheet9, url, $("#form1"), 10, "");
		};
		
	});
	
	
	
	$(function(){
	    
		/******* 탭메뉴 ********/
	    
	    $(".tab_content").hide();
	    $(".tab_content:first").show();

	    $("ul.tabs li").click(function () {
	        $("ul.tabs li").removeClass("active").css("color", "#333");
	        //$(this).addClass("active").css({"color": "darkred","font-weight": "bolder"});
	        $(this).addClass("active").css("color", "darkred");
	        $(".tab_content").hide();
	        var activeTab = $(this).attr("rel");
	        $("#" + activeTab).fadeIn();
	        if(credit_yn == "Y")
            {
	            if(activeTab == "tab2")//담당자 정보
		        {
 		            //$.getList4();
	                sheet4.FitColWidth();
		        }
		        else if(activeTab == "tab3")//납품실적
		        {
// 		            $.getDeliverList();
		            sheet5.FitColWidth();
		        } 
		        else if(activeTab == "tab4")//인증서 현황
		        {
// 		            $.getCertList();
		            sheet6.FitColWidth();
		        } 
		        else if(activeTab == "tab5")//프싱실적
		        {
// 		            $.getPrizeList();
		            sheet7.FitColWidth();
		        } 
		        else if(activeTab == "tab6")//특허
		        {
// 		            $.getSuppPatTent();
		            sheet8.FitColWidth();
		        } 
		        else if(activeTab == "tab9")//면허
		        {
		            sheet9.FitColWidth();
		        } 
		        else if(activeTab == "tab8")//경영평가표
	            {
		            initRdViewer();
	            }
            }
	        else
            {
	        	if(activeTab == "tab2")//담당자정보
		        {
	                if(search_flag_4 == "N")
	                {
	                	//$.getList4();
	        	        search_flag_4 = "Y";
	                }
	                sheet4.FitColWidth();
		        }
		        else if(activeTab == "tab3")//납품실적
		        {
		            if(search_flag_5 == "N")
		            {
		            	//$.getDeliverList();
		    	        search_flag_5 = "Y";
		            }
		            sheet5.FitColWidth();
		        } 
		        else if(activeTab == "tab4")//인증서 현황
		        {
		            if(search_flag_6 == "N")
		            {
		    	        //$.getList4();
		    	        search_flag_6 = "Y";
		            }
		            sheet6.FitColWidth();
		        } 
		        else if(activeTab == "tab5")//프싱실적
		        {
		            if(search_flag_7 == "N")
		            {
		    	        search_flag_7 = "Y";
		            }
		            sheet7.FitColWidth();
		        } 
		        else if(activeTab == "tab6")//특허
		        {
		            if(search_flag_8 == "N")
		            {
		    	        search_flag_8 = "Y";
		            }
		            sheet8.FitColWidth();
		        } else if(activeTab == "tab9")//건설면허
		        {
		            if(search_flag_9 == "N")
		            {
		    	        search_flag_9 = "Y";
		            }
		            sheet9.FitColWidth();
		        } 
		        else if(activeTab == "tab8")//경영평가표
	            {
		            initRdViewer();
	            }
            }
	        
	        
	    });
	    
	    
	    /*
	    $("#esta_date_img").click(function(){
	        $.callCalendar($(this).attr("id"));
	    });
	    
	    $("#esta_date").click(function(){
	        $.callCalendar($(this).attr("id"));
	    });
	    */
	    
	    $("[name=date_img]").click(function(){
			var id = $(this).attr("id").substring(0, $(this).attr("id").lastIndexOf("_"));
			dlgCalendar(id);
		});
		
		
		//첨부파일
		$("#search_spot_button").click(function(){
		    
		    var obj = $("#p_corp_id").val();
		    var no = "1";
		    
		    if(no == 1)
		    {
				viewFileListNew("TERMS_AGREE_INFO", obj, document.form1.p_AttachFile1, "Y", "own/purchase/" + obj);
			}
		    
		});
		
		/*
	    $.callCalendar = function(id){
	        
	        var str_value = id;
	        var re = new RegExp("_", "ig");
	        var resultArray = str_value.match(re);
	        
	        if(resultArray.length == 1)
	        {
	            dlgCalendar(id);
	        }
	        else if(resultArray.length == 2)
	        {
	            id = id.substring(0, id.lastIndexOf("_"));
	            dlgCalendar(id);
	        }
	    };
	    */
	    
	    
	    
	    $("#btn_list").click(function(){
	        
	        $("#fevent").val("");
	        $("#form1").attr("action", "/supplier/purchase/PuSupplierList.screen");
	        $("#form1").attr("target", "_self");
			$("#form1").attr("method", "post");
			$("#form1").submit();	        
	        
	    });
	    
	    $("#btn_save2").click(function(){
	        
	        var f = document.form1;
	        var Row = sheet2.ColValueDup("6");
	        var event = "<%=event%>";
			var gubun = "N";
			var all_del= "N";
			
			
			// 정규식 - 이메일 유효성 검사
	        var regEmail = /([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
			
			
	        if(sheet2.LastRow() <=0)
            {
	            alert("등록희망ITEM을 입력하여 주십시오");
	            return;
            }
	        
	        for(var i=1; i<=sheet2.LastRow(); i++)
	    	{
                if(sheet2.GetCellValue(i, "MAIN_ITEM") == "1")
                {
                    gubun = "Y";
                }
	    	}
	        
	        if(gubun == "N")
	        {
                alert("대표 ITEM을 지정하세요.");
	            return;
	        }    
			if(Row != -1)
			{
		        alert("희망 공급 ITEM에 중복된 내용이 존재합니다.");
			    return;
			}
			
			for(var i=1; i<=sheet2.LastRow(); i++)
			{
			    if(sheet2.GetCellValue(i, "DEL_CHECK") == "1")
			    {
			        all_del = "Y";
		        }
			    else
		        {
			        all_del = "N";
			        break;
		        }
		    }
			
			if(all_del == "Y")
		    {
			    alert("등록희망 공급ITEM은 하나이상 반드시 등록하셔야 합니다.");
			    return;
		    }
	        
			
			
	        
	        if($(':radio[name="p_status"]:checked').val() == undefined)
            {
	            alert("등록상태를 선택해 주십시오.");
	            return $("#p_status1").focus();
            }
	        
	        if($("#manage_no").val().trim() == "")
            {
	            alert("관리번호를 입력해 주세요.");
	            return $("#manage_no").focus();
            }
	        
// 	        if($("#nation_cd").val().trim() == "")
//             {
// 	            alert("국가를 선택해 주세요");
// 	            return $("#nation_cd").focus();
//             }
			
			if($("#corp_kor").val().trim() == "")
		    {
        		alert("업체명을 입력해 주세요.");
        		return $("#corp_kor").focus();
		    }
			
			if($("#rep_name").val().trim() == "")
		    {
        		alert("대표자명을 입력해 주세요.");
        		return $("#rep_name").focus();
		    }
			
			if($("#corp_tel").val().trim() == "")
		    {
        		alert("전화번호를 입력해 주세요.");
        		return $("#corp_tel").focus();
		    }
			
			if($("#corp_fax").val().trim() == "")
		    {
        		alert("FAX번호를 입력해 주세요.");
        		return $("#corp_fax").focus();
		    }
			
            if($("#address").val().trim() == "")
            {
                alert("주소를 입력해 주세요");
                return $("#search_addr").click();
            }    
            
            
            
            if($("#user_name").val().trim() == "")
            {
                alert("담당자명을 입력해 주세요");
                return $("#user_name").focus();
            }
            
            if($("#email").val().trim() == "")
            {
                alert("이메일 주소를 입력해 주세요");
                return $("#email").focus();
            }
            else 
	        {
	            if(!regEmail.test($("#email").val().trim())) 
	            {
	                alert("이메일 주소가 유효하지 않습니다");
	                $("#email").focus();
	                return false;
	            }
	        }
            
            if($("#p_in_out_div").val()	==	"I")
            {
            	if($("#h_phon_1").val().trim() == "" || $("#h_phon_2").val().trim() == "" || $("#h_phon_3").val().trim() == "")
                {
                    alert("핸드폰 번호를 입력해 주세요");
                    return $("#h_phon_1").focus();
                }	
            }            
            
            if(confirm("업체정보를 저장하시겠습니까?"))
	        {
                if(event == "GET_OUT_DETAIL")
                {
                	$("#fevent").val("UPDATE_DATA2");
                }
                else
                {
                    $("#fevent").val("SAVE_DATA2");                    
                }

                var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
				var result = Modular.view.IBSheet7.doSave(sheet2, url, $("#form1"), false);
	        }
	    });
	    
	    $("#btn_erp_send").click(function(){
			if(!confirm("ERP로 거래처 전송 하시겠습니까?")) return;
			var f = document.form1;
			$("#erp_save").val("E_SAVE");
			
			save(); //2019.05.13
			
			//$("#fevent").val("ERP_SEND");
			//submitXmlRequest("/supplier/purchase/PuSupplier_form.screen", "ERP_SEND", f);
			
				 
		});
	    
	    $("#btn_save").click(function(){
	    	$("#erp_save").val("SAVE");
	    	save(); //2019.05.13
	    });
	    
	    
	    $("#btn_delete").click(function(){
		    

	        var f = document.form1;
	        var event = "<%=event%>";
	        
	        if(confirm("삭제 하시겠습니까?"))
	        {
                if(event == "GET_OUT_DETAIL")
                {
                    $("#fevent").val("DELETE_DATA");
                    var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/outside/OutSupplier_sheet.screen";
    				var result = Modular.view.IBSheet7.doSave(sheet2, url, $("#form1"), false);
                }
	        }
	        
	    });
	    
	    
	    
	    /*
	    $("#btn_apprv").click(function(){
	        
	        var f = document.form1;
	        
	        if(confirm("승인하시겠습니까?"))
            {
	            $("#p_status").val("03");
	            $("#p_right_id").val("149");
	            submitXmlRequest("/supplier/purchase/PuSupplier_form.screen", "UPDATE_APPRV", f);
	            
            }
	    });
	    */
	    
	    
	    $(':radio[name="factor_cd"]').click(function(){
	        if($(':radio[name="factor_cd"]:checked').val() == "9")
	        {
	            $("#mftr_div_cd_1").prop("disabled", true);
	            
	            $("#mftr_div_cd_1").prop("checked", false);
	            $("#mftr_div_cd_2").prop("checked", true);
	            
				return;
	        }
	        else
            {
	            $("#mftr_div_cd_1").prop("disabled", false);
            }
	    });
	    
		$("#sheet4_add").click(function(){
	        sheet4.DataInsert(-1);
			if(sheet4.GetCellValue(sheet4.LastRow(), "USER_ID").trim() == ""){
				//sheet4.SetCellEditable(sheet4.LastRow(), "USER_ID", 1);
				//sheet4.SetCellEditable(sheet4.LastRow(), "USER_NAME", 1);
				//sheet4.SetCellEditable(sheet4.LastRow(), "DIVISION", 1);
				//sheet4.SetCellEditable(sheet4.LastRow(), "POSITION", 1);
				sheet4.SetCellValue(sheet4.LastRow(), "BAR1","-");
				sheet4.SetCellValue(sheet4.LastRow(), "BAR2","-");
				sheet4.SetCellValue(sheet4.LastRow(), "CORP_ID","<%=params.get("p_corp_id") %>");
			}
	    });
	    
		$("#sheet5_add").click(function(){
	        sheet5.DataInsert(-1);
	    });
		
		$("#sheet5_admit").click(function(){
			var f = document.form1;
			
			if(sheet5.RowCount("D") == 0){	
				alert("승인할 납품실적을 선택해 주십시오.");
				return false;
			}
			
		    if(!confirm("선택한 납품실적을 승인 하시겠습니까?")) return;
		    else{
		    	$("#fevent").val("SAVE_DELIRESUT_ADMIT");

	        	var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
				var result = Modular.view.IBSheet7.doSave(sheet5, url, $("#form1"), false);	
		    }
				
	    });
		
		$("#sheet5_reject").click(function(){
			var f = document.form1;
			
			if(sheet5.RowCount("D") == 0){	
				alert("승인해제할 납품실적을 선택해 주십시오.");
				return false;
			}
			
		    if(!confirm("선택한 납품실적을 승인해제 하시겠습니까?")) return;
		    else{
		    	$("#fevent").val("SAVE_DELIRESUT_REJECT");

	        	var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
				var result = Modular.view.IBSheet7.doSave(sheet5, url, $("#form1"), false);	
		    }
				
	    });
		
		$("#sheet6_add").click(function(){
	        sheet6.DataInsert(-1);
	    });
	    
		$("#sheet6_admit").click(function(){
			var f = document.form1;
			
			if(sheet6.RowCount("D") == 0){	
				alert("승인할 인증서를 선택해 주십시오.");
				return false;
			}
			
		    if(!confirm("선택한 인증서를 승인 하시겠습니까?")) return;
		    else{
		    	$("#fevent").val("SAVE_CERT_ADMIT");

	        	var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
				var result = Modular.view.IBSheet7.doSave(sheet6, url, $("#form1"), false);	
		    }
				
	    });
		
		$("#sheet6_reject").click(function(){
			var f = document.form1;
			
			if(sheet6.RowCount("D") == 0){	
				alert("승인해제할 인증서를 선택해 주십시오.");
				return false;
			}
			
		    if(!confirm("선택한 인증서를 승인해제 하시겠습니까?")) return;
		    else{
		    	$("#fevent").val("SAVE_CERT_REJECT");

	        	var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
				var result = Modular.view.IBSheet7.doSave(sheet6, url, $("#form1"), false);	
		    }
				
	    });
		
		$("#sheet7_add").click(function(){
			
	        sheet7.DataInsert(-1);
	    });
		$("#sheet8_add").click(function(){
			
	        sheet8.DataInsert(-1);
	    });
		$("#sheet9_add").click(function(){
			
	        sheet9.DataInsert(-1);
	    });
	    
		$("#search_addr").click(function() {
			//2017.1.10 API적용
			/*var url = "/common/lib/dlgSearchZipCode.screen";
			var win_id = "_searchPostCode";
			url += "?pop_win_id="+win_id;
			$("#addr_gubun").val("A");

			fLayerPop(win_id, url, 550,490, '', '', 'NO');*/
			$("#addr_gubun").val("A");
			var pop = window.open("/lib/dlgjusoPopup.screen","pop","width=570,height=420, scrollbars=yes, resizable=yes"); 

		});
		
		$("#search_addr_sub").click(function() {
			//2017.01.10
			/* var url = "/common/lib/dlgSearchZipCode.screen";
			var win_id = "_searchPostCode";
			url += "?pop_win_id="+win_id;
			$("#addr_gubun").val("B");
			
			fLayerPop(win_id, url, 550,490, '', '', 'NO'); */
			$("#addr_gubun").val("B");
			var pop = window.open("/lib/dlgjusoPopup.screen","pop","width=570,height=420, scrollbars=yes, resizable=yes"); 
		});
		
		
		
		$("#corpTestYear").change(function(){
		    
		    var list = $("#corpTestYear").val().split("|");
			
		    $("#p_appr_dy").val(list[0]);
		    $("#p_arr_id").val(list[1]);
		    $("#p_doc_cd").val(list[2]);//2016.04.20
		    $("#p_adm_year").val(list[3]);
		    initRdViewer();
		    
		});
		
		
		/*
		$("#corp_tel").keyup(function(){
		    if(!checkTelno($("#corp_tel").val())){
		        alert("전화번호 형식이 올바르지 않습니다.");
		        $("#corp_tel").focus();
		        $("#corp_tel").val($("#corp_tel").val().substring(0, $("#corp_tel").val().length-1));
		    }
		});
		*/
		
		$(':radio[name="p_status"]').click(function(){
		    
		    var year = "<%=oneYearAgoDate%>";
		    year = year.substring(0,4) + "-" + year.substring(4,6) + "-" + year.substring(6,8);
		    
		    var day = "<%=oneDayDate%>";
		    day = day.substring(0,4) + "-" + day.substring(4,6) + "-" + day.substring(6,8);
		    
		    //alert($(':radio[name="p_status"]:checked').val());
		    
	        if($(':radio[name="p_status"]:checked').val() == "02" || $(':radio[name="p_status"]:checked').val() == "03")
	        {
	            
	            $("#use_end_dy").val(year);
	            $("#appr_dt").val("<%=yyyymmdd%>");
	            $("#p_right_id").val("149");
	            $("#can_dt").val("");
	            
	            $("#use_end_dy_img").show();
	            $("#appr_dt_img").show();
	            $("#can_dt_img").hide();
				return;
	        }else if($(':radio[name="p_status"]:checked').val() == "91" || $(':radio[name="p_status"]:checked').val() == "99")
            {
	            $("#appr_dt").val("");
	            $("#p_right_id").val("159");
	            $("#can_dt").val("<%=yyyymmdd%>")
	            $("#use_end_dy").val(day);
	            
	            $("#use_end_dy_img").show();
	            $("#appr_dt_img").hide();
	            $("#can_dt_img").show();
	            
	            return;
            }else
            {
	            $("#can_dt").val("");
	            $("#use_end_dy").val("");
	            $("#appr_dt").val("");
	            $("#p_right_id").val("159");

	            $("#use_end_dy_img").hide();
	            $("#appr_dt_img").hide();
	            $("#can_dt_img").hide();
	            
	            return;
            }
	    });
		
		
		$("#btn_test").click(function(){
		    
		    var f = document.form1;
		    
		    if(!confirm("신용평가서 정보를 적용후 평가를 하시겠습니까?")) return;
		    
		    $("#fevent").val("SUPP_TEST");
		    
		    submitXmlRequest("/supplier/purchase/PuSupplierList_form.screen", "SUPP_TEST", f);
		    
		});
		
		$("#btn_test2").click(function(){
		    
		    var f = document.form1;
		    
		    if(!confirm("평가를 하시겠습니까?")) return;
		    
		    $("#fevent").val("SUPP_TEST2");
		    
		    submitXmlRequest("/supplier/purchase/PuSupplierList_form.screen", "SUPP_TEST2", f);
		    
		});
	    
		$("#factor_confirm_btn").click(function() {
			var f = document.form1;

			if(<%=vo.get("factor_cd") == "" && vo.get("factor_cd") == null && vo.get("factor_cd") != "1" && vo.get("factor_cd") != "9"%>){
				alert("공장유무가 등록되어 있지 않습니다. \n저장 후 실행 바랍니다.");
				return;
			}
			
			if($(':radio[name="factor_cd"]:checked').val() == '9' || $(':radio[name="factor_cd"]:checked').val() == null){
				alert("승인할 공장이 없습니다.");
				return;
			}
			
			if($("#factor_confirm").val() == "Y"){
				alert("이미 승인되어 있습니다.");
				return;
			}
			
		    if(!confirm("등록된 공장을 승인 하시겠습니까?")) return;
		    $("#fevent").val("FACTOR_CONFIRM");
		    submitXmlRequest("/supplier/purchase/PuSupplier_form.screen", "FACTOR_CONFIRM", f);		    

		});
	    
	});
	
	/*
	$(window).load(function () {
        $(".gubun").each(function () {
            var rows = $(".gubun:contains('" + $(this).text() + "')");
            if (rows.length > 1) {
                rows.eq(0).attr("rowspan", rows.length);
                rows.not(":eq(0)").remove(); 
            } 
        });
    });
	*/
	
	
	
	
	
	
	
	$(document).ready(function(){	    
	    if(corp_reg_gubun > "80" && corp_reg_gubun < "90")
        {
	        $("#p_corp_no").addClass("required");
        }
	    
	    if(corp_reg_gubun  == "86")
        {
	        $("#p_head_corp_reg_n").addClass("required");
        }
	    
	    if(p_in_out_div == "O")
        {
	        var event = "<%=storage.getEvent()%>";
	        
	        if(event == "REG_DATA")
            {
	            $("#btn_delete_area").css("display", "none");
            }
	        else
            {
	            $("#btn_delete_area").css("display", "inline");
            }
	        $("#btn_save_area").css("display", "none");
	        $("#btn_erp_send_area").css("display", "none");
	        $("#btn_save2_area").css("display", "inline");
	        $("#h_phon_1").parents().parents().children("th").removeClass();
        }
	    else
        {
	    	$("#btn_delete_area").css("display", "none");
	        $("#btn_save2_area").css("display", "none");
        }
	    
	    
	    
	    
		    $.gridInit();
	
		    $.getList();
		    
			//$.getList2();
			
/* 			if(p_in_out_div != "O")
		    {
			    //$.getList3();
		    } */
			
			if(credit_yn.trim() == "N" || credit_yn.trim() == "" || credit_yn.trim() == "Y")
	        {
				//$.getList4();
				//$.getDeliverList();
				//$.getCertList();
				//$.getPrizeList();
				//$.getSuppPatTent();
	        }

			if(class_gubun == "01")
		    {
			    $("#class_1").css("background-color", "#f4f2f3");
		    }
			else if(class_gubun == "02")
		    {
			    $("#class_2").css("background-color", "#f4f2f3");
		    }
			if(class_gubun == "03")
		    {
			    $("#class_3").css("background-color", "#f4f2f3");
		    }
			if(class_gubun == "04")
		    {
			    $("#class_4").css("background-color", "#f4f2f3");
		    }
			if(class_gubun == "05")
		    {
			    $("#class_5").css("background-color", "#f4f2f3");
		    }
			
			if(credit_yn == "Y")
			{
			    //$("[name=sheet_save_btn]").css("display", "none");
			}
			
// 			initRdViewer();



			if($(':radio[name="mftr_div_cd"]:checked').val() == "3")
	        {
			    if($(':radio[name="factor_cd"]:checked').val() == "9")
		        {
		            $("#mftr_div_cd_1").prop("disabled", true);
		            
		            $("#mftr_div_cd_1").prop("checked", false);
		            $("#mftr_div_cd_2").prop("checked", true);
		            
					return;
		        }
	        }
	});
	
	//2019.05.13 save분리 
	function save(){
		var f = document.form1;
        var Row = sheet2.ColValueDup("6");
		var gubun = "N";
		var all_del= "N";
		// 정규식 - 사업장 관리번호 검사
        var regNo =  /^[0-9]{11,11}$/;
        
        if(sheet2.LastRow() <=0)
        {
            alert("등록희망ITEM을 입력하여 주십시오");
            return;
        }
        
        for(var i=1; i<=sheet2.LastRow(); i++)
    	{
            if(sheet2.GetCellValue(i, "MAIN_ITEM") == "1")
            {
                gubun = "Y";
            }
            
            if((sheet2.GetCellValue(i, "MAIN_ITEM") == "1")&&(sheet2.GetCellValue(i, "DEL_CHECK") == "1"))
            {
                gubun = "N";
                alert("대표 ITEM을 삭제 할 수 없습니다.");
	            return;
            }
    	}
        
			for(var i=1; i<=sheet4.LastRow(); i++)
    	{
            if(stringByteSize4UTF(sheet4.GetCellValue(i, "NOTE"))>500){
            	alert("비고는 500자를 넘을 수 없습니다.");
            	return;
            }
    	}
        
        if(gubun == "N")
        {
            alert("대표 ITEM을 지정하세요.");
            return;
        }    
		if(Row != -1)
		{
	        alert("희망 공급 ITEM에 중복된 내용이 존재합니다.");
		    return;
		}
		
		for(var i=1; i<=sheet2.LastRow(); i++)
		{
		    if(sheet2.GetCellValue(i, "DEL_CHECK") == "1")
		    {
		        all_del = "Y";
	        }
		    else
	        {
		        all_del = "N";
		        break;
	        }
	    }
		
		if(all_del == "Y")
	    {
		    alert("등록희망 공급ITEM은 하나이상 반드시 등록하셔야 합니다.");
		    return;
	    }
		
		
        
        if($(':radio[name="p_status"]:checked').val() == undefined)
        {
            alert("등록상태를 선택해 주십시오.");
            return $("#p_status1").focus();
        }
        
        if($(':radio[name="p_status"]:checked').val() == "91"  || $(':radio[name="p_status"]:checked').val() == "99")
        {
            if($("#comment").val() == "")
            {
                alert("의견을 입력해 주세요.");
                return $("#comment").focus();
            }
        }
        
        if(corp_reg_gubun == "86")
		{
		    if($("#head_corp_reg_n").val().trim() == "")
		 	{
		        alert("본사 사업자번호를 입력해 주세요.");
		        return $("#head_corp_reg_n").focus();
	        }
		}
        
        if(corp_reg_gubun > "80" && corp_reg_gubun < "90")
        {
		    if($("#copr_no").val().trim() == "")
		    {
        		alert("법인번호를 입력해 주세요.");
        		return $("#copr_no").focus();
		    }
        }
        
        if($("#sub_place_no").val().trim() != "")
	    {
        	if(!regNo.test($("#sub_place_no").val().trim())) 
            {
        		alert("사업장 관리번호가 유효하지 않습니다(숫자 11자리)");
        		$("#sub_place_no").focus();
        		return false;
            }    		
	    }
		
		if($("#corp_kor").val().trim() == "")
	    {
    		alert("업체명을 입력해 주세요.");
    		return $("#corp_kor").focus();
	    }
		
		if($("#rep_name").val().trim() == "")
	    {
    		alert("대표자명을 입력해 주세요.");
    		return $("#rep_name").focus();
	    }
		
		if($("#corp_sts").val().trim() == "")
	    {
    		alert("업태를 입력해 주세요.");
    		return $("#corp_sts").focus();
	    }
		
		if($("#biz_form").val().trim() == "")
	    {
    		alert("업종을 입력해 주세요.");
    		return $("#biz_form").focus();
	    }
		
		if($("#esta_date").val().trim() == "")
	    {
    		alert("설립일자를 입력해 주세요.");
    		return $("#esta_date").focus();
	    }
		
		if($("#corp_tel").val().trim() == "")
	    {
    		alert("전화번호를 입력해 주세요.");
    		return $("#corp_tel").focus();
	    }
		
		if($("#corp_fax").val().trim() == "")
	    {
    		alert("FAX번호를 입력해 주세요.");
    		return $("#corp_fax").focus();
	    }
		
		if($("#base_year").val()<1900)
        {
            alert("기준년도를 확인 해 주세요");
            return $("#base_year").focus();
        }
		
		if($("#float_asset").val().trim() == "")
	    {
    		alert("유동자산을 입력해 주세요.");
    		return $("#float_asset").focus();
	    }
		
		if($("#float_debt").val().trim() == "")
	    {
    		alert("유동부채를 입력해 주세요.");
    		return $("#float_debt").focus();
	    }
		
		if($("#tot_cap").val().trim() == "")
	    {
    		alert("자본총계를 입력해 주세요.");
    		return $("#tot_cap").focus();
	    }
		
		if($("#gross_asset").val().trim() == "")
	    {
    		alert("부채총계를 입력해 주세요.");  //2018.04.18 부채와 자본총계->부채총계 
    		return $("#gross_asset").focus();
	    }
		
		if($("#capital_amt").val().trim() == "")
	    {
    		alert("자본금을 입력해 주세요.");
    		return $("#capital_amt").focus();
	    }
		
		if($("#cur_profit").val().trim() == "")
	    {
    		alert("당기순이익을 입력해 주세요.");
    		return $("#cur_profit").focus();
	    }
		
		if($("#cur_sales_amt").val().trim() == "")
	    {
    		alert("당기매출액을 입력해 주세요.");
    		return $("#cur_sales_amt").focus();
	    }
		
		if($("#pri_sales_amt").val().trim() == "")
	    {
    		alert("전기매출액을 입력해 주세요.");
    		return $("#pri_sales_amt").focus();
	    }
		
		//은행계좌 확인 2019.05.09
		if($("#bank_cd").val().trim() == "" || $("#bank_acct").val().trim() == "")   
	    {
    		alert("계좌정보를 입력해 주세요.");
    		return $("#bank_acct").focus();
	    }
		
		
		//담당자명 중복체크  2016.4.20
		for(var i=1; i<=sheet4.LastRow(); i++)
		{
			for(var ii = i+1; ii<=sheet4.LastRow(); ii++)
			{
				if(sheet4.GetCellValue(i, "USER_NAME")== sheet4.GetCellValue(ii, "USER_NAME")){
					alert("담당자정보 이름이 중복됩니다. ");
					return false;
				}
			}
		}
		
		for(var i=1; i<=sheet5.LastRow(); i++)
		{
			if(sheet5.GetCellValue(i, "DEL_CHECK") != "1"){  //2015.3.4 삭제할경우 시작일,종료일 체크 제외 - 이재원대리 요청
				if(sheet5.GetCellValue(i, "DELI_END_DY") != ""){
					if(sheet5.GetCellValue(i, "DELI_END_DY")-sheet5.GetCellValue(i, "DELI_START_DY")<0){
						alert("납품시작일과 종료일을 확인해 주세요.(" + i.toString() + ")");  //2015.9.9 납품일 확인 
						return false;
					}
				}else{
					if(sheet5.GetCellValue(i, "DELI_START_DY") == ""){
						alert("납품시작일을 확인해 주세요." + i);
						return false;
					}
				}
			}
			
			for(var i=1; i<=sheet5.LastRow(); i++)
			{
				if(sheet5.GetCellValue(i, "DELIRESULT_CONFIRM") == "Y" && (sheet5.GetCellValue(i, "STATUS") == "D" || sheet5.GetCellValue(i, "STATUS") == "U")){	//승인 되어 있는 경우
					alert("승인된 납품실적은 삭제/수정 불가합니다.(" + i.toString() + ")");
					return false;
				}
			}
		}
		
		for(var i=1; i<=sheet6.LastRow(); i++)
		{
			if(sheet5.GetCellValue(i, "DEL_CHECK") != "1"){  //2015.3.4 삭제할경우 취득일,만기일 체크 제외 - 이재원대리 요청
				if(sheet6.GetCellValue(i, "EXP_END_DY")-sheet6.GetCellValue(i, "EXP_STA_DY")<0){
					alert("인증서 취득일과 만기일을 확인해 주세요.");
					return false;
				}
			}
			
			for(var i=1; i<=sheet6.LastRow(); i++)
			{
				if(sheet6.GetCellValue(i, "CERT_CONFIRM") == "Y" && (sheet6.GetCellValue(i, "STATUS") == "D" || sheet6.GetCellValue(i, "STATUS") == "U")){	//승인 되어 있는 경우
					alert("승인된 인증서는 삭제/수정 불가합니다.(" + i.toString() + ")");
					return false;
				}
			}
		}
		
		if($(':radio[name="tax_addr_cd"]:checked').val() == "B")
        {
            if($("#post_no_1").val().trim() == "")
            {
                alert("본점 소재지를 입력해 주세요");
	            //return $("#search_addr").focus();
//		            $("body,html").scrollTop(0);
                return $("#search_addr").click();
            }    
        }
        else
        {
            if($("#place_post_no_1").val().trim() == "")
            {
                alert("사업장  소재지를 입력해 주세요");
	            //return $("#search_addr_sub").focus();
//		            $("body,html").scrollTop(0);
                return $("#place_address").click();
            }
        }
		
		
		if($(':radio[name="p_status"]:checked').val() == "02" || $(':radio[name="p_status"]:checked').val() == "03")
        {
            $("#p_right_id").val("149");
        }
        else if($(':radio[name="p_status"]:checked').val() == "91" || $(':radio[name="p_status"]:checked').val() == "99")
        {
            $("#p_right_id").val("159");
        }
        else
        {
            $("#p_right_id").val("159");
        }

		if($(':radio[name="factor_cd"]:checked').val() == '9')	$("#factor_confirm").val("N");	//미승인 상태로 변경

		if($(':radio[name="mftr_div_cd"]:checked').val() == undefined)
        {
            alert("manufacturer 구분을 선택해 주세요");
            $("body,html").scrollTop(0);
            return $("#mftr_div_cd_1").focus();
        }
		else
     	{
		    if(confirm("변경한 업체정보를 저장하시겠습니까?"))
	        {
				$("#fevent").val("SAVE_DATA");

	        	var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
				var result = Modular.view.IBSheet7.doSave(sheet2, url, $("#form1"), false);
	        }
     	}   
	}
	
	function jusoCallBack(roadFullAddr,roadAddrPart1,addrDetail,roadAddrPart2,engAddr, jibunAddr, zipNo, admCd, rnMgtSn, bdMgtSn){
		// 팝업페이지에서 주소입력한 정보를 받아서, 현 페이지에 정보를 등록합니다.
		/*document.form.roadFullAddr.value = roadFullAddr;경기도 고양시 덕양구 도래울로 85, 213-202 (도내동, 엘에이치원흥도래울마을2단지)
		document.form.roadAddrPart1.value = roadAddrPart1;경기도 고양시 덕양구 도래울로 85
		document.form.roadAddrPart2.value = roadAddrPart2;213-202
		document.form.addrDetail.value = addrDetail;(도내동, 엘에이치원흥도래울마을2단지)
		document.form.engAddr.value = engAddr;85, Doraeul-ro, Deogyang-gu, Goyang-si, Gyeonggi-do
		document.form.jibunAddr.value = jibunAddr;경기도 고양시 덕양구 도내동  983 엘에이치원흥도래울마을2단지
		document.form.zipNo.value = zipNo; 10551
		document.form.admCd.value = admCd;4128110500
		document.form.rnMgtSn.value = rnMgtSn;412813194082
		document.form.bdMgtSn.value = bdMgtSn;4128110500109830000000001*/
		//2017.01.10
		if($("#addr_gubun").val() == "A"){
			$("#address").val( roadAddrPart1+ ' ' +roadAddrPart2 + ' ' + addrDetail );  
			$("#post_no_1").val( zipNo);  
		}else{
			$("#place_address").val( roadAddrPart1+ ' ' +roadAddrPart2 + ' ' + addrDetail );  
			$("#place_post_no_1").val( zipNo);  
		}
	
		
   }
	
	
	//2017.1.10 미사용 
	function searchPostCodeClose(result) {
		if( result != null ){
			
		    if($("#addr_gubun").val() == "A")
	        {
		        $("#post_no_1").val(result[0].substring(0,3));
			    $("#post_no_2").val(result[0].substring(4,7));
			    
			    $("#address").val(result[2]);
	        }
		    else
	        {
		        $("#place_post_no_1").val(result[0].substring(0,3));
			    $("#place_post_no_2").val(result[0].substring(4,7));
			    
			    $("#place_address").val(result[2]);
	        }
			
		    $("#addr_gubun").val("");
		}
		fLayerPopClose('_searchPostCode');
	}
	
	
	
	
	
	
	
	/*****************************************/
	
	
	function sheet3_OnDblClick(Row, Col, Value)
	{
	    var s_name = sheet3.ColSaveName(Col);
	    
	    var code = sheet3.GetCellValue(Row, "GUBUN_CODE");
        var reg_no = "<%=vo.get("CORP_REG_NO")%>";
	    
	    if(s_name == "CREDIT_GRADE")
        {
	        /*
	        	이크레더블 : E
	        	서울신용평가 : S
	        	나이스디앤비 : N
	        	한국기업데이터 : K
	        	나이스평가정보:M
	        */
	        if(code == "E")
	        {
	            var u = "2d2d424547494e204349504845522d2d313131310000000b3030303030303030eef0492ff42855bbffb697d670d4e3d109dafed98f4d7900293e8d4b9c1dcebd28eb9d58fd4c815c4d4829f1415fdfb730302d2d454e44204349504845522d2d";
	            var p = "2d2d424547494e204349504845522d2d313131310000000830303030303030301bb8ae01f161a326e30cc8d45f3844afd1bd2d39f5da22e9405f40dff013966445d4ea4029f89ad1385c4624cf679cc230302d2d454e44204349504845522d2d";
	            var i = reg_no; //협력업체사업자번호
	            var k = ""; //협력업체법인번호
	            
	            var m ='3';
	            var link ='http://www.esrm.co.kr/esrm/SrmplusLogin?u='+ u +'&p='+ p +'&i='+ i +'&k='+ k +'&c=7&m='+ m +'&g=2';
	            var features ='height=768, width=1024, status=no, scrollbars=auto, resizable=yes';
	            window.open(link, 'watchwin', features);  
	        }
	        else if(code == "S")
	        {
	            var  link = "http://www.bizrating.co.kr/url/urlPage.do?param1=ZXRlY2g=&param2=YWV0ZWNo&param3=" + reg_no;
	            window.open(link, "pop", "width=975,height=600, resizable=yes, scrollbars=yes");
	        }
	        else if(code == "N")
	        {
	            var f = document.form1;
	            
	            $("#p_corp_reg_no").val(reg_no);
		        $("#fevent").val("GET_CREADIT_REG_CHK");
		        
	            submitXmlRequest("/supplier/purchase/PuSupplierList_form.screen", "GET_CREADIT_REG_CHK", f, "VALUEOBJECT");
	        }
	        else if(code == "K")
	        {
				var f = document.form1;
	            
	            $("#p_corp_reg_no").val(reg_no);
		        $("#fevent").val("GET_CREADIT_REG_CHK2");
		        
	            submitXmlRequest("/supplier/purchase/PuSupplierList_form.screen", "GET_CREADIT_REG_CHK2", f, "VALUEOBJECT");
	            //window.open(link,"go_ksrm","width=900,height=600,scrollbar=auto");
	        }
	        else if(code == "M")
            {
	        	var vnk = "<%= sToday%>" * 677; 
	        	var  link = "http://service.ecredit.co.kr/p01/A0001M001.nice?bizno=" + reg_no + "&eid=ETECENC&nk=" + vnk;
	            window.open(link, "pop", "width=975,height=600, resizable=yes, scrollbars=yes");
	            
            }
        }
	}
	
	function sheet5_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
		if(Row == 0)return;
		if (sheet5.ColSaveName(Col) == "FILE_YN") {
			var modify = 'N';
			
			if(sheet5.GetCellValue(Row, "DELIRESULT_CONFIRM")=='Y')	modify = 'N';
			else modify = 'Y';
			
			if(sheet5.GetCellValue(Row, "DELI_FILE_ID")=='0'){
				alert("신용평가사 등록 정보 입니다.");
			}
			else if(sheet5.GetCellValue(Row, "DELI_FILE_ID")=='' || sheet5.GetCellValue(Row, "STATUS")=="I"){
					alert("입력한 내용을 저장을 한 후 파일을 첨부할 수 있습니다.");
			} 
			else{ 
				var FILE_ID = sheet5.GetCellValue(Row, "DELI_FILE_ID")
				var corp_id = $("#p_corp_id").val();
				viewFileListNew2('DELIRESULT', FILE_ID, "", modify, "own/purchase/"+corp_id+"/deliresult/"+FILE_ID, "", "", "", "N");
			} 
	     }
	}
	
		
	function sheet6_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
		if(Row == 0)return;
		if (sheet6.ColSaveName(Col) == "FILE_YN") {
			var modify = 'N';
			
			if(sheet6.GetCellValue(Row, "CERT_CONFIRM")=='Y')	modify = 'N';
			else modify = 'Y';
			
			
			if(sheet6.GetCellValue(Row, "CERT_FILE_ID")=='0'){
				alert("신용평가사 등록 정보 입니다.");
			}
			else if(sheet6.GetCellValue(Row, "CERT_FILE_ID")=='' || sheet6.GetCellValue(Row, "STATUS")=="I"){
					alert("입력한 내용을 저장을 한 후 파일을 첨부할 수 있습니다.");
			} 
			else{ 
				var FILE_ID = sheet6.GetCellValue(Row, "CERT_FILE_ID")
				var corp_id = $("#p_corp_id").val();
				viewFileListNew2('CERT', FILE_ID, "", modify, "own/purchase/"+corp_id+"/cert/"+FILE_ID, "", "", "", "N");
			} 
	     }
	}
	
	function viewFileListNew2(fileGB, id, obj, isModify, isDrectory, iframeID, user_filename, file_size, multi_yn) {
	 	
	 	var win_id = "_puSupplierFileList";
	 	var link = "/common/file/FileListNew.screen";
	 	    link += "?pop_win_id="+win_id;
	 	    link += "&file_gb=" + fileGB;
	 	    link += "&id=" + id;
	 	    
	 	    if( obj.id != null )
	 		    link += "&obj_id=" + obj.id;
	 	    if( iframeID != null )
	 	    	link += "&iframeID=" + iframeID;
	 	    
	 		if( isModify != null )
	 			link += "&is_modify=" + isModify;
	 		if( isDrectory != null )
	 			link += "&sys_gb=" + isDrectory;	    
	 		if( file_size != null )
	 			link += "&file_size=" + file_size;	    
	 		if( multi_yn != null )
	 			link += "&multi_yn=" + multi_yn;	    
	 		if( user_filename != null )
	 			link += "&user_filename=" + encodeURIComponent(user_filename);	 
	 	
	 	fLayerPop(win_id, link, 750,430, '', '', 'NO', '200');
	 }
	
	/* function fLayerPopClose(layerID){
		 var oNode = document.getElementById(layerID);
		if(oNode != null)
		{
			$('#'+layerID+ '_divcontent').empty();
			$('#'+layerID).bPopup().close();
			document.body.removeChild(oNode);
		}
		
		 if(layerID == "_puSupplierFileList"){
			 research();
		 }
	 } */
	
	function sheet1_OnSearchEnd(code, message) {
		if(code == 0){
			$.getList2();
			sheet1.ShowTreeLevel(0, 1);
		}else{
			alert(message);
		}
	}
	function sheet2_OnSearchEnd(code, message) {
		if(code == 0 || code == "0"){
			if($("#p_in_out_div").val() != "O")
		    {
			    $.getList3();
		    } 
		}else{
			alert(message);
		}
	}
	function sheet3_OnSearchEnd(code, message) {
		if(code == 0){
			if(credit_yn.trim() == "N" || credit_yn.trim() == "" || credit_yn.trim() == "Y")
	        {
				$.getList4();
	        }
		}else{
			alert(message);
		}
	}
	
	function sheet4_OnSearchEnd(code, message) 
	{
		if(code == 0){
			if(credit_yn.trim() == "N" || credit_yn.trim() == "" || credit_yn.trim() == "Y")
	        {
				$.getDeliverList();
	        }
		}else{
			alert(message);
		}
		
		if(search_flag_4 == "N" && credit_yn == "Y")
        {
	        search_flag_4 = "Y";
        }
		
		for(var i=1; i<=sheet4.LastRow(); i++)
		{
			if(sheet4.GetCellValue(i, "USER_ID").trim() != ""){
				sheet4.SetCellEditable(i, "DEL_CHECK", 0);
			}
		}
		
	    sheet4.FitColWidth();
	}
	
	function sheet5_OnSearchEnd(code, message) 
	{
		var info = {Type: "Image"};
		if(code == 0){
			if(credit_yn.trim() == "N" || credit_yn.trim() == "" || credit_yn.trim() == "Y")
	        {
				$.getCertList();
	        }
		    
	    	for(i=1; i <= sheet5.RowCount(); i++){
				if(sheet5.GetCellValue(i, "FILE_ID")!=""){
					sheet5.InitCellProperty(i, "FILE_YN", info);
				}
				if(sheet5.GetCellValue(i, "DELI_FILE_ID")!="0"){
					sheet5.SetCellFontColor(i,"FILE_YN", "#0000ff");
				}
			}
		}else{
			alert(message);
		}
		if(search_flag_5 == "N" && credit_yn == "Y")
        {
	        search_flag_5 = "Y";
        }
	    sheet5.FitColWidth();
	    
    	var credit_end_dy = sheet5.GetCellValue(1,"CREDIT_END_DY");
    	if(credit_end_dy == -1){
    		return; 
    	}else{
    		if(credit_end_dy > now_DY){
    			$("#span_sheet5_add").hide();
    			//$("#span_sheet5_admit").hide();
    			//$("#span_sheet5_reject").hide();
    			//sheet5.SetEditable(false); 2015.9.9
    		}
    	}
	}
	
	function sheet6_OnSearchEnd(code, message) 
	{
		var info = {Type: "Image"};	
		if(code == 0){
			if(credit_yn.trim() == "N" || credit_yn.trim() == "" || credit_yn.trim() == "Y")
	        {
				$.getPrizeList();
	        }
		    
	    	for(i=1; i <= sheet6.RowCount(); i++){
				if(sheet6.GetCellValue(i, "FILE_ID")!=""){
					sheet6.InitCellProperty(i, "FILE_YN", info);
				}
				if(sheet6.GetCellValue(i, "CERT_FILE_ID")!="0"){
					sheet6.SetCellFontColor(i,"FILE_YN", "#0000ff");
				}
			}
		}else{
			alert(message);
		}
		if(search_flag_6 == "N" && credit_yn == "Y")
        {
	        sheet6.FitColWidth();
	        search_flag_6 = "Y";
        }
	    sheet6.FitColWidth();
	    

	}
	
	function sheet7_OnSearchEnd(code, message) 
	{
		if(code == 0){
			if(credit_yn.trim() == "N" || credit_yn.trim() == "" || credit_yn.trim() == "Y")
	        {
				$.getSuppPatTent();
	        }
		}else{
			alert(message);
		}
		if(search_flag_7 == "N" && credit_yn == "Y")
        {
	        search_flag_7 = "Y";
        }
	    sheet7.FitColWidth();
	    
    	var credit_end_dy = sheet7.GetCellValue(1,"CREDIT_END_DY");
    	if(credit_end_dy == -1){
    		return; 
    	}else{
    		if(credit_end_dy > now_DY){
    			$("#span_sheet7_add").hide();
    			sheet7.SetEditable(false);
    		}
    	}
	}
	
	function sheet8_OnSearchEnd(code, message) 
	{
		if(code == 0){
			if(credit_yn.trim() == "N" || credit_yn.trim() == "" || credit_yn.trim() == "Y")
	        {
				$.getCert2List();
	        }
		}else{
			alert(message);
		}
		if(search_flag_8 == "N" && credit_yn == "Y")
        {
	        search_flag_8 = "Y";
        }
	    sheet8.FitColWidth();
	    
    	var credit_end_dy = sheet8.GetCellValue(1,"CREDIT_END_DY");
    	if(credit_end_dy == -1){
    		return; 
    	}else{
    		if(credit_end_dy > now_DY){
    			$("#span_sheet8_add").hide();
    		}
    	}		
	}

	function sheet9_OnSearchEnd(code, message) 
	{
		if(search_flag_9 == "N" && credit_yn == "Y")
        {
	        search_flag_9 = "Y";
        }
	    sheet9.FitColWidth();
	    
    	var credit_end_dy = sheet9.GetCellValue(1,"CREDIT_END_DY");
    	if(credit_end_dy == -1){
    		return; 
    	}else{
    		if(credit_end_dy > now_DY){
    			$("#span_sheet9_add").hide();
    			sheet9.SetEditable(false);
    		}
    	}
	}	
	
	
	function sheet2_OnSaveEnd(code, msg)
	{
		var event = $("#fevent").val();
		var f = document.form1;
		
		document.form1.isSubmit = false;
		
		if(event == "SAVE_DATA")
		{
		    if(code >= "0")
			{
		    	$("#fevent").val("SAVE_CHARGE");
	 		    var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
	 			var result = Modular.view.IBSheet7.doSave(sheet4, url, $("#form1"), false); 
			}
			else
			{
				alert("등록실패.");
			}
		}
		else if(event == "SAVE_DATA2")
		{
		    if(code >= "0")
			{
		    	alert("성공적으로 저장되었습니다.");
			    location.href="/supplier/purchase/PuSupplierList.screen"; 
			}
			else
			{
				alert("등록실패.");
			}
		}
		else if(event == "UPDATE_DATA2")
		{
		    if(code >= "0")
			{
		        alert("성공적으로 저장되었습니다.");
		        $("#fevent").val("GET_OUT_DETAIL");
// 		        location.href="/supplier/purchase/PuSupplierList.screen";
				$("#form1").attr("action", "/supplier/purchase/PuSupplier.screen");
				$("#form1").submit();
			}
			else
			{
				alert("등록실패.");
			}
		}
		else if(event == "DELETE_DATA")
		{
		    if(code >= "0")
			{
		        alert("삭제 되었습니다.");
		        location.href="/supplier/purchase/PuSupplierList.screen";
			}
			else
			{
				alert("삭제실패.");
			}
		}
	}
	
	function sheet4_OnSaveEnd(code, msg)
	{
	    var event = $("#fevent").val();
		var f = document.form1;
		
		document.form1.isSubmit = false;
		
		if(event == "SAVE_CHARGE")
		{
		    if(code >= "0")
			{
// 				alert("등록되었습니다.");
				
				if(credit_yn.trim() == "N" || credit_yn.trim() == ""||credit_yn.trim() == "Y")
				{
	 		 		$("#fevent").val("SAVE_DELIRESUT");
	 		        var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
	 				var result = Modular.view.IBSheet7.doSave(sheet5, url, $("#form1"), false);
				}
				else
			    {
				    alert("성공적으로 저장되었습니다.");
			    }
			}
			else
			{
				alert("등록실패.");
			}
		}
	}
	
	function sheet5_OnSaveEnd(code, msg)
	{
	    var event = $("#fevent").val();
		var f = document.form1;
		
		document.form1.isSubmit = false;
		
		if(event == "SAVE_DELIRESUT")
		{
		    if(code >= "0")
			{
// 				alert("등록되었습니다.");
				
				if(credit_yn.trim() == "N" || credit_yn.trim() == ""||credit_yn.trim() == "Y")
				{
	 		 		$("#fevent").val("SAVE_CERT");
	 		        var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
	 				var result = Modular.view.IBSheet7.doSave(sheet6, url, $("#form1"), false);
				}
			}
			else
			{
				alert("등록실패.");
			}
		}else if(event == "SAVE_DELIRESUT_ADMIT"){
			if(code >= "0"){
				alert("승인되었습니다.");
				research();
			}else
			{
				alert("승인실패.");
			}
		}else if(event == "SAVE_DELIRESUT_REJECT"){
			if(code >= "0"){
				alert("해제되었습니다.");
				research();
			}else
			{
				alert("해제실패.");
			}
		}
	}
	
	function sheet6_OnSaveEnd(code, msg)
	{
	    var event = $("#fevent").val();
		var f = document.form1;
		
		document.form1.isSubmit = false;
		
		if(event == "SAVE_CERT")
		{
		    if(code >= "0")
			{
// 				alert("등록되었습니다.");
				
				if(credit_yn.trim() == "N" || credit_yn.trim() == ""||credit_yn.trim() == "Y")
				{
	 		 		$("#fevent").val("SAVE_PRIZE");
	 		        var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
	 				var result = Modular.view.IBSheet7.doSave(sheet7, url, $("#form1"), false);
				}
			}
			else
			{
				alert("등록실패.");
			}
		}else if(event == "SAVE_CERT_ADMIT"){
			if(code >= "0"){
				alert("승인되었습니다.");
				research();
			}else
			{
				alert("승인실패.");
			}
		}else if(event == "SAVE_CERT_REJECT"){
			if(code >= "0"){
				alert("해제되었습니다.");
				research();
			}else
			{
				alert("해제실패.");
			}
		}
	}
	
	function sheet7_OnSaveEnd(code, msg)
	{
	    var event = $("#fevent").val();
		var f = document.form1;
		
		document.form1.isSubmit = false;
		
		if(event == "SAVE_PRIZE")
		{
		    if(code >= "0")
			{
// 				alert("등록되었습니다.");
				
				if(credit_yn.trim() == "N" || credit_yn.trim() == ""||credit_yn.trim() == "Y")
				{
	 		 		$("#fevent").val("SAVE_PATENT");
	 		        var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
	 				var result = Modular.view.IBSheet7.doSave(sheet8, url, $("#form1"), false);
				}
			}
			else
			{
				alert("등록실패.");
			}
		}
	}
	
	
	function sheet8_OnSaveEnd(code, msg)
	{
		var event = $("#fevent").val();
		var f = document.form1;
		document.form1.isSubmit = false;
		
		if(event == "SAVE_PATENT")
		{
		    if(code >= "0")
			{
// 				alert("등록되었습니다.");				
				if(credit_yn.trim() == "N" || credit_yn.trim() == ""||credit_yn.trim() == "Y")
				{					
	 		 		$("#fevent").val("SAVE_CERT2");
	 		        var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/purchase/PuSupplier_sheet.screen";
	 				var result = Modular.view.IBSheet7.doSave(sheet9, url, $("#form1"), false);
				}
			}
			else
			{
				alert("등록실패.");
			}
		}			    
	}	
	
	function sheet9_OnSaveEnd(code, msg)
	{
	    var event = $("#fevent").val();
		var f = document.form1;
		
		document.form1.isSubmit = false;
		
		if(event == "SAVE_CERT2")
		{
		    if(code >= "0")
			{
		    	if ($("#erp_save").val() == "E_SAVE"){ //2019.05.13
		    		$("#fevent").val("ERP_SEND");
					submitXmlRequest("/supplier/purchase/PuSupplier_form.screen", "ERP_SEND", f);
		    	}else{
		    		alert("등록되었습니다.");
		    		research();
		    	} 
			}
			else
			{
				alert("등록실패.");
			}
		}
	}	
	
	
	function sheet1_OnDblClick(Row, Col, Value)
	{
	    var rowIndex = "";
	    var sheetObj = document.all.sheet1;
	    
	    if(sheet1.GetCellValue(Row, "LEVEL") == "2")
	    {
// 	        sheet2.RowDelete(1, 0);

	        rowIndex = sheet2.DataInsert(-1);
		    sheet2.SetCellValue(rowIndex, "KIND_BIG_NAME", sheet1.GetCellValue(Row, "GUBUN_1"));
		    sheet2.SetCellValue(rowIndex, "KIND_MID_NAME", sheet1.GetCellValue(Row, "GUBUN_2"));
		    sheet2.SetCellValue(rowIndex, "KIND_SMALL_NAME", sheet1.GetCellValue(Row, "GUBUN_3"));
		    sheet2.SetCellValue(rowIndex, "ITEM_CODE", sheet1.GetCellValue(Row, "MATERIALGROUP"));
	    }
	    else
	    { 
	    	if(sheet1.GetRowExpanded(Row) == 0){
	    	    sheet1.SetRowExpanded(Row, 1);
	    	}else{
	    		sheet1.SetRowExpanded(Row, 0);
	    	}
	    }
	}
	
	
	
	//RD 화면에 출력하기 위한  Function
	function initRdViewer() {
		  var args = arguments;
// 		  var viewerObj = document.getElementById("RdViewer");
		  var p_doc_cd = $("#p_doc_cd").val();   <%-- "<%=params.get("p_doc_cd")%>"; 2016.4.20--%>
		  var RDUrl = "";
		  var RDParams = "";
		  if(p_doc_cd == "01")
	      { 
		      if ($("#p_adm_year").val() == "2014"){
		    	RDUrl = "/report/mrd/buyer/supplier/purchase/PuSupplierReport.mrd";
			  } else {
				RDUrl = "/report/mrd/buyer/supplier/purchase/PuSupplierReport_2023.mrd";
			  }
		      
		      RDParams = "[" + $("#p_corp_id").val() + "]";
		      RDParams += "[" + $("#p_arr_id").val() + "]";
		      RDParams += "[" + $("#p_appr_dy").val() + "]";
	      }
		  else if(p_doc_cd == "02")
	      {
			  if ($("#p_adm_year").val() == "2014"){
				RDUrl = "/report/mrd/buyer/supplier/purchase/PuSupplierReport2.mrd";
			  } else {
				RDUrl = "/report/mrd/buyer/supplier/purchase/PuSupplierReport2_2023.mrd";
			  }
		      
		      RDParams = "[" + $("#p_corp_id").val() + "]";
		      RDParams += "[" + $("#p_arr_id").val() + "]";
		      RDParams += "[" + $("#p_appr_dy").val() + "]";
	      }
		  else if(p_doc_cd == "03")
	      {
			  if ($("#p_adm_year").val() == "2014"){
		      	RDUrl = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3.mrd";
			  } else if ($("#p_adm_year").val() == "2016"){
		      	RDUrl = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3_2016.mrd";
			  } else if ($("#p_adm_year").val() == "2019"){
		      	RDUrl = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3_2019.mrd";
			  } else if ($("#p_adm_year").val() == "2020"){
				RDUrl = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3_2020.mrd";  
			  } else {
				RDUrl = "/report/mrd/buyer/supplier/purchase/PuSupplierReport3_2023.mrd";  
			  }
		      
		      RDParams = "[" + $("#p_corp_id").val() + "]";
		      RDParams += "[" + $("#p_arr_id").val() + "]";
		      RDParams += "[" + p_doc_cd + "]";
		      RDParams += "[" + $("#p_appr_dy").val() + "]";
	      }
		  else if(p_doc_cd == "04")
	      {
			  if ($("#p_adm_year").val() == "2014"){
			      RDUrl = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4.mrd";
			  } else if ($("#p_adm_year").val() == "2016"){
				  RDUrl = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4_2016.mrd";
			  } else if ($("#p_adm_year").val() == "2019"){
				  RDUrl = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4_2019.mrd";
			  } else if ($("#p_adm_year").val() == "2020"){
				  RDUrl = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4_2020.mrd";
			  }	else {
				  RDUrl = "/report/mrd/buyer/supplier/purchase/PuSupplierReport4_2023.mrd";
			  }		      
		      
		      RDParams = "[" + $("#p_corp_id").val() + "]";
		      RDParams += "[" + $("#p_arr_id").val() + "]";
		      RDParams += "[" + p_doc_cd + "]";
		      RDParams += "[" + $("#p_appr_dy").val() + "]";
	      }
		  
			  
			var viewer = new m2soft.crownix.Viewer("<%=WAFConfig.get("waf.rd_report.searver")%>", 'RdViewer');
			viewer.useAdjustCharacterScale(true);
		  	viewer.openFile("<%= ctx.getServerDomain() %>" + RDUrl, '/rf [<%= WAFConfig.get("waf.rd_report.path", "")%>rdagent.jsp] /rsn [<%= WAFConfig.get("waf.rd_report.DataSource", "")%>] /rp '+ RDParams);
		  
	}
	
	
	
	function doResult(resultObj) {
		try 
		{
		    if( resultObj.getRequestEvent() == "CORP_CHECK") 
		    {
		        
		    }
		    else if( resultObj.getRequestEvent() == "SAVE_DATA") //미사용 이벤트 result
		    {
		    	if( resultObj.getSuccess() ) 
				{
					alert("저장되었습니다.");
					document.form1.isSubmit = false;
				}
				else 
				{
					alert(resultObj.getValueObject().get("errMsg"));
					document.form1.isSubmit = false;
				}
			}
		    else if(resultObj.getRequestEvent() == "SUPP_TEST")
		    {
		        document.form1.isSubmit = false;
		        alert("평가가 완료되었습니다.");
		    }
		    else if(resultObj.getRequestEvent() == "UPDATE_APPRV")
	        {
		        if( resultObj.getSuccess() ) 
				{
		            alert("승인이 완료되었습니다.");
		            $("#btn_list").click();
				}
		        else
	            {
		            document.form1.isSubmit = false;
  					alert("승인이 실패하였습니다.");
	            }
	        }
		    else if(resultObj.getRequestEvent() == "GET_CREADIT_REG_CHK")
		    {
			    document.form1.isSubmit = false;
			    
			    var url = resultObj.getValueObject().get("returnUrl");
			    
			    window.open(url, "pop", "width=1024,height=600, resizable=yes, scrollbars=yes");
		    }
		    else if(resultObj.getRequestEvent() == "GET_CREADIT_REG_CHK2")
		    {
			    document.form1.isSubmit = false;
			    
			    var url = resultObj.getValueObject().get("return_url");
	            var open = window.open('',"go_ksrm","width=900,height=600,scrollbars=yes");
	            var f = document.form1;
	            
	            f.action = url;
	            f.target = "go_ksrm";
	            f.method = "post";
	            f.submit();
		    }
		    else if(resultObj.getRequestEvent() == "SUPP_TEST2")
		    {
		        document.form1.isSubmit = false;
		        alert("평가가 완료되었습니다.");
		    }
		    else if( resultObj.getRequestEvent() == "ERP_SEND") {
		    	if( resultObj.getSuccess() ) {
					alert("완료되었습니다.");
				} else {
					dlgErrorMsg(resultObj);
				}
			} 
		    else if(resultObj.getRequestEvent() == "FACTOR_CONFIRM")
		    {
		        document.form1.isSubmit = false;
		        alert("공장이 승인되었습니다.");
		        research();
		    }
		}
		catch(errorObject) {
			showErrorDlg("doResult()", errorObject);
		}
	}
	
	
	
	//*************************************************************************************************************************************
	
	function sheet4_OnChange(Row, Col, Value) {
		if(Col == 8){//전화번호 형식 체크
			if(Value != ""){
				if(!checkTelno(Value)){
					alert("전화번호 형식이 올바르지 않습니다.");
					sheet4.SetCellValue(Row,Col,"");
				}
			}
		}
		if(Col == 9){//전화번호 형식 체크
			if(Value != ""){
				if(!checkTelno(Value)){
					alert("FAX번호 형식이 올바르지 않습니다.");
					sheet4.SetCellValue(Row,Col,"");
				}
			}
		}
		if(Col == 10){//전화번호 형식 체크
			if(Value != ""){
				if(!checkTelno(Value)){
					alert("휴대전화번호 형식이 올바르지 않습니다.");
					sheet4.SetCellValue(Row,Col,"");
				}
			}
		}
		if(Col == 12){//전화번호 형식 체크
			if(Value != ""){
				if(!checkTelno(Value)){
					alert("휴대전화번호 형식이 올바르지 않습니다.");
					sheet4.SetCellValue(Row,Col,"");
				}
			}
		}
		if(Col == 14){//전화번호 형식 체크
			if(Value != ""){
				if(!checkTelno(Value)){
					alert("휴대전화번호 형식이 올바르지 않습니다.");
					sheet4.SetCellValue(Row,Col,"");
				}
			}
		}
		if(Col == 7){//이메일 형식 체크
			if(Value != ""){
				if(!checkEmail(Value)){
					alert("이메일 형식이 올바르지 않습니다.");
					sheet4.SetCellValue(Row,Col,"");
				}
			}
		}
	}
	
	function sheet4_OnSmartResize(Width, Height) { 
		sheet4.FitColWidth();
	}
	
	function sheet5_OnSmartResize(Width, Height) { 
		sheet5.FitColWidth();
	}
	
	function sheet6_OnSmartResize(Width, Height) { 
		sheet6.FitColWidth();
	}
	
	function sheet7_OnSmartResize(Width, Height) { 
		sheet7.FitColWidth();
	}
	
	function sheet8_OnSmartResize(Width, Height) { 
		sheet8.FitColWidth();
	}
	
	function sheet9_OnSmartResize(Width, Height) { 
		sheet9.FitColWidth();
	}
	
	function research() {
		jQuery("#fevent").val("GET_OUT_DETAIL");
		jQuery("#form1").attr("action", "/supplier/purchase/PuSupplier.screen");
		jQuery("#form1").attr("target", "_self");
		jQuery("#form1").attr("method", "post");
		jQuery("#form1").submit();
	}
//-->
</script>




<!-- SHEET -->




<modular:search id="form1">
	<modular:key id="fevent" /> 
</modular:search>
<form id="form1" name="form1" method="post" modular:type="search" action="">
<input type="hidden" name="fevent" id="fevent" value="">
<input type="hidden" name="p_corp_id" id="p_corp_id" value="<%=params.get("p_corp_id") %>" />
<input type="hidden" name="p_doc_cd" id="p_doc_cd" value="<%=params.get("p_doc_cd") %>" />
<input type="hidden" name="p_adm_year" id="p_adm_year" value="" />
<input type="hidden" name="p_corp_reg_no" id="p_corp_reg_no" value="<%=params.get("p_corp_reg_no") %>" />
<input type="hidden" name="p_eval_cmp" id="p_eval_cmp" value="<%=params.get("p_eval_cmp") %>" />
<input type="hidden" name="job_div" id="job_div" value="P" />
<input type="hidden" name="credit_yn" id="credit_yn" value="<%=vo.get("credit_yn")%>" />
<input type="hidden" name="finance_gbn" id="finance_gbn" value="<%=corpInfoVo.get("base_year") %>" />
<input type="hidden" name="addr_gubun" id="addr_gubun" value="" />
<input type="hidden" name="p_right_id" id="p_right_id" value="" />
<input type="hidden" name="p_in_out_div" id="p_in_out_div" value="<%=params.get("p_in_out_div") %>" />
<input type="hidden" name="past_status" id="past_status" value="<%=vo.get("status_code") %>" />
<input type="hidden" name="factor_confirm" id="factor_confirm" value="<%=vo.get("factor_confirm") %>" />

<!-- 검색 파라메터 -->
<input type="hidden" name="material_Kind_Code_Lv1" id="material_Kind_Code_Lv1" value="<%=params.get("material_Kind_Code_Lv1") %>" />
<input type="hidden" name="material_Kind_Code_Lv2" id="material_Kind_Code_Lv2" value="<%=params.get("material_Kind_Code_Lv2") %>" />
<input type="hidden" name="material_Kind_Code_Lv3" id="material_Kind_Code_Lv3" value="<%=params.get("material_Kind_Code_Lv3") %>" />
<input type="hidden" name="corp_no" id="corp_no" value="<%=params.get("corp_no") %>" />
<input type="hidden" name="corp_name" id="corp_name" value="<%=params.get("corp_name") %>" />
<input type="hidden" name="search_gb" id="search_gb" value="<%=params.get("search_gb") %>" />
<input type="hidden" name="corp_status" id="corp_status" value="<%=params.get("corp_status") %>" />
<input type="hidden" name="in_out_gubun" id="in_out_gubun" value="<%=params.get("in_out_gubun") %>" />
<input type="hidden" name="nation_cd" id="nation_cd" value="<%=params.get("nation_cd") %>" />

<input type="hidden" name="p_arr_id" id="p_arr_id" value="<%=vo.get("arr_id") %>" />
<input type="hidden" name="p_appr_dy" id="p_appr_dy" value="<%=vo.get("appr_dy") %>" />
<input type="hidden" name="bank_nm" id="bank_nm" value="<%=vo.get("bank_nm") %>" /> 
<input type="hidden" name="erp_save" id="erp_save" value="">  <!-- 2019.05.13 erp전송전 저장처리 -->

	<!-- TITLE -->
	<table border="0" cellspacing="0" cellpadding="0" style="width: 100%; margin-left: 0px;">
		<tr>
			<td>
				<table class="screen_title_table">
					<tr height="25">
			    		<td width="80%" class="screen_title_text" align="left">
			    			<div align="left" id="title">
								<ul>
							    	<li>구매_협력업체현황 상세(<%=vo.get("status").equals("") ?  "작성중" : vo.get("status")%>)</li>
							   	</ul>
							</div> 
			    		</td>
			    		<td align="right" style="vertical-align:bottom;">
							<span class="btnSearch center"><a href="javascript:void(0);" id="btn_list">목록</a></span>
							<span class="btnSearch center" id="btn_save_area"><a href="javascript:void(0);" id="btn_save">저장</a></span>
							<span class="btnSearch center" id="btn_save2_area"><a href="javascript:void(0);" id="btn_save2">저장</a></span>
							<span class="btnSearch center" id="btn_erp_send_area"><a href="javascript:void(0);" id="btn_erp_send">ERP전송</a></span>
							<span class="btnSearch center" id="btn_delete_area"><a href="javascript:void(0);" id="btn_delete">삭제</a></span>
<!-- 							<span class="btnSearch center"><a href="javascript:void(0);" id="btn_apprv">승인</a></span> -->
<!-- 							<span class="btnSearch center"><a href="javascript:void(0);" id="btn_return">반려</a></span> -->
			    		</td>
			  		</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td>
							<div class="application-info magT20">
								<div class="application-sub-title">
									<span class="title">업체명 : <%=vo.get("corp_kor") %> (<%=StringUtils.getBizNo(vo.get("CORP_REG_NO")) %>)</span>
								</div>
							</div>
							<div id="container" style="margin-top: 20px;">
								<%if(!params.get("p_in_out_div").equals("O")){ %>
							    <ul class="tabs">
							        <li class="active" rel="tab1">기본정보</li>
							        <li rel="tab2">담당자 정보</li>
							        <li rel="tab3">납품실적</li>
							        <li rel="tab4">인증서 현황</li>
							        <li rel="tab5">포상실적</li>
							        <li rel="tab6">특허</li>
							        <li rel="tab9">건설면허</li>
							        <li rel="tab7">재무정보</li>
							        <li rel="tab8">경영평가표</li>
							    </ul>
							    <%}else{ %>
							    <ul class="tabs">
							        <li class="active" rel="tab1">기본정보</li>
							    </ul>
							    <%} %>
							    <div class="tab_container">
							        <div id="tab1" class="tab_content">
							            <table width="100%" border="0" cellspacing="0" cellpadding="0">
							            	<colgroup>
							            		<col width="20%"/>
							            		<col width="40px"/>
							            		<col width="40%"/>
							            		<col width="70px"/>
							            		<col/>
							            	</colgroup>
											<tr>
												<td valign="top">
													<div class="application-info magT20">
														<div class="application-sub-title">
															<span class="title">공급ITEM</span>
														</div>
													</div>
													<div id="table01" style="width: 100%; height: 200px;">
														<script>createIBSheet("sheet1","100%", "100%");</script>
													</div>
									
													<!-- table width="100%" border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td align="left">
																<div style="margin-bottom: 0px; margin-top: 10px; font-size: 12px;" class="screen_title_text">
																	<img src="/img/buyer/common/subtitle_bullet.gif" style="vertical-align: middle;">&nbsp;구분
																</div>
																
															</td>
														</tr>
													</table -->
												</td>
												<td align="center" valign="middle" style="width: 70px;">
													<table width="40" border="0" cellspacing="0" cellpadding="0">
														<tr>
															<td height="30" align="center" valign="middle"><img
																src="/img/buyer/icon/icon_in.gif" width="27"
																height="17" /></td>
														</tr>
														<tr>
															<td height="30" align="center" valign="middle"><img
																src="/img/buyer/icon/icon_out.gif" alt="" width="27"
																height="17" /></td>
														</tr>
													</table>
												</td>
												<td valign="top">
													<div class="application-info magT20">
														<div class="application-sub-title">
															<span class="title">등록희망 공급ITEM</span>
														</div>
													</div>
													<div id="table01" style="width: 100%;height: 200px;">
														<script>createIBSheet("sheet2","100%", "100%");</script>
													</div>
												</td>
												<%if(!params.get("p_in_out_div").equals("O")){ %>
												<td align="center" valign="middle">
													<div style="width: 30px;"></div>
												</td>
												<td align="left">
												<div class="application-info magT20">
													<div class="application-sub-title">
														<span class="title">신용평가정보</span>
													</div>
												</div>
												<div id="table01" style="width: 100%;height: 200px;">
													<script>createIBSheet("sheet3","100%", "100%");</script>
												</div>
												<%}else{ %>
												<td align="center" valign="middle" colspan="2">
													<div style="width: 250px;"></div>
												</td>
												<%} %>
											</tr>
										</table>
										
										<div class="application-info magT20 ">
											<div class="application-sub-title">
												<span class="title">등록상태정보</span>
											</div>
										</div>
										
										<%if(!params.get("p_in_out_div").equals("O")){ %>
										<table width="100%" border="0" cellspacing="0" cellpadding="0" class="form-table">
											<col style="width:160px"/>
											<col style="width:25%"/>
											<col style="width:160px"/>
											<col/>
											<col style="width:160px"/>
											<col/>
											
											<tr>
												<th class="required" >협력업체 등록상태</th>
												<td>
													<span><input type="radio"  name="p_status" id="p_status1" value="01" <%=vo.get("status_code").equals("01") ? "checked=\"checked\"" : "" %> /> 대기</span>
													<span><input type="radio"  name="p_status" id="p_status2" value="02" <%=vo.get("status_code").equals("02") ? "checked=\"checked\"" : "" %> /> 가등록</span>
													<span><input type="radio"  name="p_status" id="p_status3" value="03" <%=vo.get("status_code").equals("03") ? "checked=\"checked\"" : "" %> /> 등록</span>
													<span><input type="radio"  name="p_status" id="p_status4" value="91" <%=vo.get("status_code").equals("91") ? "checked=\"checked\"" : "" %> /> 거래중지</span>
													<span><input type="radio"  name="p_status" id="p_status5" value="99" <%=vo.get("status_code").equals("99") ? "checked=\"checked\"" : "" %> /> 거래취소</span>
												</td>
												
												<th>협력업체 등록기간</th>
												<td>
													<input type="text" name="use_end_dy" id="use_end_dy" value="<%=vo.get("use_end_dy") %>" size="10" style="background-color: rgb(238, 238, 238);text-align:center"  readonly="readonly"/>
<%
	String	sDisplay	=	"";
	if(vo.get("STATUS_CODE").equals("01"))
	{
		sDisplay	=	"display:none;";
	}
%>														
													<img alt="달력" id="use_end_dy_img" name="date_img" src="/img/buyer/btn/bt_calender.gif" style="vertical-align: middle; cursor: pointer;<%=sDisplay%>>"/>
												</td>
												
												<th>협력업체 등록요청일</th>
												<td>
													<input type="text" name="reg_req_dt" id="reg_req_dt" value="<%=vo.get("reg_req_dt") %>"  size="10" style="background-color: rgb(238, 238, 238);text-align:center"  readonly="readonly"/>
												</td>
												
											</tr>
											
											<tr>
												<th>협력업체 등록신청일</th>
												<td>
													<input type="text" name="reg_dt" id="reg_dt" value="<%=vo.get("reg_dt") %>" size="10" style="background-color: rgb(238, 238, 238);text-align:center"  readonly="readonly"/>
												</td>
												
												<th>협력업체 등록승인일</th>
												<td>
													<input type="text" name="appr_dt" id="appr_dt" value="<%=vo.get("appr_dt") %>" size="10" style="background-color: rgb(238, 238, 238);text-align:center"  readonly="readonly"/>
<%
	sDisplay	=	"";
	if(vo.get("STATUS_CODE").equals("01") || vo.get("STATUS_CODE").equals("91") || vo.get("STATUS_CODE").equals("99"))
	{
		sDisplay	=	"display:none;";
	}
%>											
													<img alt="달력" id="appr_dt_img" name="date_img" src="/img/buyer/btn/bt_calender.gif" style="vertical-align: middle; cursor: pointer;<%=sDisplay%>"/>
												</td>
												<th>거래취소/거래중지일</th>
												<td>
													<input type="text" name="can_dt" id="can_dt" value="<%=vo.get("can_dt") %>" size="10"  style="background-color: rgb(238, 238, 238);text-align:center"  readonly="readonly"/>
<%
	sDisplay	=	"";	
	if(vo.get("STATUS_CODE").equals("01") || vo.get("STATUS_CODE").equals("02") || vo.get("STATUS_CODE").equals("03"))
	{
		sDisplay	=	"display:none;";
	}
%>													
													<img alt="달력" id="can_dt_img" name="date_img" src="/img/buyer/btn/bt_calender.gif" style="vertical-align: middle; cursor: pointer;<%=sDisplay%>>"/>
												</td>
											</tr>
											<tr>
												<th>의견</th>
												<td colspan="5">
													<textarea name="comment" id="comment" rows="5" style="width: 100%;"><%=vo.get("comment") %></textarea>
												</td>
											</tr>
										</table>
										<%}else{ %>
										<table width="100%" border="0" cellspacing="0" cellpadding="0" class="form-table">
											<col style="width:160px"/>
											<col style="width:25%"/>
											<col style="width:160px"/>
											<col/>
											<col style="width:160px"/>
											<col/>
											
											<tr>
												<th class="required" >협력업체 등록상태</th>
												<td>
													<span><input type="radio"  name="p_status" id="p_status1" value="01" <%=vo.get("status_code").equals("01") ? "checked=\"checked\"" : "" %> /> 대기</span>
													<span><input type="radio"  name="p_status" id="p_status2" value="02" <%=vo.get("status_code").equals("02") ? "checked=\"checked\"" : "" %> /> 가등록</span>
													<span><input type="radio"  name="p_status" id="p_status3" value="03" <%=vo.get("status_code").equals("03") ? "checked=\"checked\"" : "" %> /> 등록</span>
													<span><input type="radio"  name="p_status" id="p_status4" value="91" <%=vo.get("status_code").equals("91") ? "checked=\"checked\"" : "" %> /> 거래중지</span>
													<span><input type="radio"  name="p_status" id="p_status5" value="99" <%=vo.get("status_code").equals("99") ? "checked=\"checked\"" : "" %> /> 거래취소</span>
												</td>
												
												<th>협력업체 등록기간</th>
												<td>
													<input type="text" name="use_end_dy" id="use_end_dy" value="<%=vo.get("use_end_dy") %>" size="10" style="background-color: rgb(238, 238, 238);text-align:center"  readonly="readonly"/>
													<img alt="달력" id="use_end_dy_img" name="date_img" src="/img/buyer/btn/bt_calender.gif" style="vertical-align: middle; cursor: pointer;"/>
												</td>
												
												<th>등록취소/거래중지일</th>
												<td>
													<input type="text" name="can_dt" id="can_dt" value="<%=vo.get("can_dt") %>" size="10"  style="background-color: rgb(238, 238, 238);text-align:center"  readonly="readonly"/>
													<img alt="달력" id="can_dt_img" name="date_img" src="/img/buyer/btn/bt_calender.gif" style="vertical-align: middle; cursor: pointer;"/>
												</td>
											</tr>
											
											<tr>
												<th>의견</th>
												<td colspan="5">
													<textarea name="comment" id="comment" rows="5" style="width: 100%;"><%=vo.get("comment") %></textarea>
												</td>
											</tr>
										</table>
										<%} %>
										
										
										<div class="application-info magT20">
											<div class="application-sub-title">
												<span class="title">기본정보</span>
											</div>
										</div>
										<table width="100%" border="0" cellspacing="0" cellpadding="0" class="form-table">
							            	<col width="150px"/>
											<col width="40%"/>
											<col width="150px"/>
											<col/>
											<%if(!params.get("p_in_out_div").equals("O")){ %>
											<tr>
												<th>
													사업자 등록번호
												</th>
												<td>
													<%=StringUtils.getBizNo(vo.get("CORP_REG_NO")) %>
												</td>
												<th id="p_head_corp_reg_n">
													본사 사업자번호
												</th>
												<td>
													<input type="text" name="head_corp_reg_n" id="head_corp_reg_n" value="<%=vo.get("head_corp_reg_n") %>" maxlength="10" numberOnly="true"  style="width: 250px;" />
												</td>
											</tr>
											<tr>
												<th id="p_corp_no" >
													법인번호
												</th>
												<td>
													<input type="text" name="copr_no" id="copr_no" value="<%=vo.get("copr_no") %>" maxlength="13" numberOnly="true" style="width: 250px;" />
												</td>
												<th>
													사업장 관리번호
												</th>
												<td>
													<input type="text" name="sub_place_no" id="sub_place_no" value="<%=vo.get("sub_place_no") %>" maxlength="11" numberonly="true"style="width: 250px;" />
												</td>
											</tr>
											<%}else{ %>
											<tr>
												<th class="required">
													관리번호(ERP거래처코드)
												</th>
												<td>
													<input type="text" name="manage_no" id="manage_no" value="<%=vo.get("manage_no") %>" maxlength="10" style="width: 250px;" />
												</td>
												<th>
													국가
												</th>
												<td>
													<%= HTMLMaker.getSelectTag(nationRowSet, "detailcd", "detailnm" , "nation_cd", "style='width:28%;height=18;'", "<OPTION value=''>-- 전체 --</OPTION>", vo.get("nation_cd"), 0) %>
												</td>
											</tr>
											<%} %>
											<tr>
												<th class="required">
													업체명
												</th>
												<td >
													<input type="text" name="corp_kor" id="corp_kor" value="<%=vo.get("corp_kor") %>"  style="width: 250px;" />
												</td>
												<th class="required">
													대표자명
												</th>
												<td >
													<input type="text" name="rep_name" id="rep_name" value="<%=vo.get("rep_name") %>"  style="width: 250px;" />
												</td>
											</tr>
											<%if(!params.get("p_in_out_div").equals("O")){ %>
											<tr>
												<th class="required">
													업태
												</th>
												<td>
													<input type="text" name="corp_sts" id="corp_sts" value="<%=vo.get("corp_sts") %>" style="width: 250px;" />
												</td>
												<th class="required">
													업종
												</th>
												<td>
													<input type="text" name="biz_form" id="biz_form" value="<%=vo.get("biz_form") %>"  style="width: 250px;" />
												</td>
											</tr>
											<tr>
												<th class="required">
													사업자구분
												</th>
												<td>
													<input type="radio" name="corp_div_cd" id="corp_div_cd_1" value="1" <%=vo.get("corp_div_cd").equals("1") ? "checked=\"checked\"" : ""%> disabled="disabled"/> 법인
													<input type="radio" name="corp_div_cd" id="corp_div_cd_2" value="2"<%=vo.get("corp_div_cd").equals("2") ? "checked=\"checked\"" : ""%> disabled="disabled"/> 개인
												</td>
												<th class="required">
													설립일자
												</th>
												<td>
													<input type="text" name="esta_date" id="esta_date" value="<%=vo.get("esta_date") %>"  style="width: 250px; background-color: rgb(238, 238, 238);"  readonly="readonly"/>
													<img alt="달력" id="esta_date_img" name="date_img" src="/img/buyer/btn/bt_calender.gif" style="vertical-align: middle; cursor: pointer;"/>
												</td>
											</tr>
											<%} %>
											<tr>
												<th class="required">
													전화번호
												</th>
												<td>
													<input type="text" name="corp_tel" id="corp_tel" value="<%=vo.get("corp_tel") %>"  maxlength="15" style="width: 250px;" maxlength="100" noHangelEng="true" />
<%
	if(params.get("p_in_out_div").equals("I"))
	{
%>
													<span style="color: red; font-size: 11px;">ex)000-0000-0000</span>
<%		
	}
%>													
													
												</td>
												<th class="required">
													FAX번호
												</th>
												<td>
													<input type="text" name="corp_fax" id="corp_fax" value="<%=vo.get("corp_fax") %>" style="width: 250px;" maxlength="100"  noHangelEng="true" />
<%
	if(params.get("p_in_out_div").equals("I"))
	{
%>
													<span style="color: red; font-size: 11px;">ex)000-0000-0000</span>
<%		
	}
%>													
												</td>
											</tr>
											<%if(!params.get("p_in_out_div").equals("O")){ %>
											<tr>
												<th class="required">
													회사규모
												</th>
												<td>												
													<input type="radio" name="corp_scale" id="corp_scale_1" value="B" <%=vo.get("corp_scale").equals("B") ? "checked=\"checked\"" : ""%> /> 대기업
													<input type="radio" name="corp_scale" id="corp_scale_2" value="S"<%=vo.get("corp_scale").equals("S") ? "checked=\"checked\"" : ""%> /> 중소기업
												</td>
												<th class="required">
													계좌정보
												</th>
												<td>
												    <%=CommCodeManager.getSelectCodeList("ERP_BANK","bank_cd","height=18;","<option value=''>--선택--</option>",vo.get("bank_cd")) %>												
													<input type="text" name="bank_acct" id="bank_acct" value="<%=vo.get("bank_acct") %>"  style="width: 250px;" />
												</td>
											</tr>
											<tr>
												<th class="required">
													본점 소재지
												</th>
												<td colspan="5">
													<%-- <input type="text" name="post_no_1" id="post_no_1" value="<%=!vo.get("post_no").equals("") ? vo.get("post_no").substring(0, 3) : ""%>" class="input" style="background-color: rgb(218, 227, 244); width: 80px;" readonly="readonly">
													&nbsp;-&nbsp;
													<input type="text" name="post_no_2" id="post_no_2" value="<%=!vo.get("post_no").equals("") ? vo.get("post_no").substring(3, 6) : ""%>" class="input" style="background-color: rgb(218, 227, 244); width: 80px;" readonly="readonly">
													&nbsp; --%>
													<input type="text" name="post_no_1" id="post_no_1" value="<%=!vo.get("post_no").equals("") ? vo.get("post_no") : ""%>" class="input" style="background-color: rgb(218, 227, 244); width: 80px;" readonly="readonly">
													&nbsp;
													<input type="text" name="address" id="address" value="<%=vo.get("address") %>" style="width: 50%;"/>
													<img id="search_addr" name="search_addr" style="vertical-align: middle; cursor: pointer;" src="/img/buyer/btn/btn_add_find.gif" />
												</td>
											</tr>
											<tr>
												<th class="required">
													사업장 소재지
												</th>
												<td colspan="3">
														<%-- <input type="text" name="place_post_no_1" id="place_post_no_1" value="<%=!vo.get("place_post_no").equals("") ? vo.get("place_post_no").substring(0, 3) : "" %>" class="input" style="background-color: rgb(218, 227, 244); width: 80px;" readonly="readonly">
														&nbsp;-&nbsp;
														<input type="text" name="place_post_no_2" id="place_post_no_2" value="<%=!vo.get("place_post_no").equals("") ? vo.get("place_post_no").substring(3, 6) : "" %>" class="input" style="background-color: rgb(218, 227, 244); width: 80px;" readonly="readonly">
														&nbsp; --%>
														<input type="text" name="place_post_no_1" id="place_post_no_1" value="<%=!vo.get("place_post_no").equals("") ? vo.get("place_post_no") : ""%>" class="input" style="background-color: rgb(218, 227, 244); width: 80px;" readonly="readonly">
													    &nbsp;
														<input type="text" name="place_address" id="place_address" value="<%=vo.get("place_address") %>" style="width: 50%;"/>
														<img src="/img/buyer/btn/btn_add_find.gif" id="search_addr_sub" name="search_addr_sub" style="vertical-align: middle; cursor: pointer;" src="/img/buyer/btn/btn_add_find.gif" />
												</td>
											</tr>
											<tr>
												<th class="required">
													세금계산서 발행주소
												</th>
												<td colspan="3">
													<input type="radio" name="tax_addr_cd" id="tax_addr_cd_1" value="B" <%=vo.get("tax_addr_cd").equals("B")  ? "checked=\"checked\"" : ""%> /> 본사
													<input type="radio" name="tax_addr_cd" id="tax_addr_cd_2" value="S" <%=vo.get("tax_addr_cd").equals("S")  ? "checked=\"checked\"" : ""%> /> 사업장
												</td> 
											</tr>
											<tr>
												<th class="required">
													공장유무
												</th>
												<td>
													<input type="radio" name="factor_cd" id="factor_cd_1" value="1"  <%=vo.get("factor_cd").equals("1")  ? "checked=\"checked\"" : ""%>  /> 유
													<%-- <input type="radio" name="factor_cd" id="factor_cd_2" value="2"  <%=vo.get("factor_cd").equals("2")  ? "checked=\"checked\"" : ""%> /> 임대공장 --%>
													<input type="radio" name="factor_cd" id="factor_cd_3" value="9"  <%=vo.get("factor_cd").equals("9")  ? "checked=\"checked\"" : ""%> /> 무
													&nbsp;&nbsp;<img src="/img/buyer/button/bt_confirm.gif" id="factor_confirm_btn" name="factor_confirm_btn" style="vertical-align: middle; cursor: pointer;" src="/img/buyer/button/bt_confirm.gif" />&nbsp;&nbsp;<%=vo.get("factor_confirm_nm") %>
												</td>
												<th class="required">
													manufacturer 구분
												</th>
												<td>
													<input type="radio" name="mftr_div_cd" id="mftr_div_cd_1" value="1"  <%=vo.get("mftr_div_cd").equals("1")  ? "checked=\"checked\"" : ""%> /> manufacturer
													<input type="radio" name="mftr_div_cd" id="mftr_div_cd_2" value="2"  <%=vo.get("mftr_div_cd").equals("2")  ? "checked=\"checked\"" : ""%> /> agent
												</td>
											</tr>
											<%}else{ %>
											<tr>
												<th class="required">
													주소
												</th>
												<td colspan="3">
													<input type="text" name="address" id="address" value="<%=vo.get("address") %>" style="width: 100%;"/>
												</td>
											</tr>
											<%} %>
											<tr>
												<th>
													첨부파일
												</th>
												<td colspan="3" id="input01">
													<textarea name="p_AttachFile1" id="p_AttachFile1" style="width:85%;height:80px" rows="1" class="input" readOnly><%=filein.get("TERMS_AGREE_INFO") %></textarea>
													<img id="search_spot_button" src='/img/buyer/button/bt_change.gif' border='0'  align="top" align="absmiddle" alt='[Attach File]' style='vertical-align: middle; margin-bottom: 20px; cursor: pointer;'>
												</td>
											</tr>
											
										</table>
										
										<%if(params.get("p_in_out_div").equals("O")){ %>
										<div class="application-info magT20 ">
											<div class="application-sub-title">
												<span class="title">등록상태정보</span>
											</div>
										</div>
										
										<table width="100%" border="0" cellspacing="0" cellpadding="0" class="form-table">
							            	<col width="150px"/>
											<col width="20%"/>
											<col width="150px"/>
											<col width="20%"/>
											<col width="150px"/>
											
											<tr>
												<th class="required">
													담당자명
												</th>
												<td >
													<input type="text" name="user_name" id="user_name" value="<%=vo.get("user_name") %>"  style="width: 250px;" />
												</td>
												<th>
													부서명
												</th>
												<td >
													<input type="text" name="division" id="division" value="<%=vo.get("division") %>"  style="width: 250px;" />
												</td>
												<th>
													직위
												</th>
												<td >
													<input type="text" name="position" id="position" value="<%=vo.get("position") %>"  style="width: 250px;" />
												</td>
											</tr>
											<tr>
												<th class="required">
													이메일
												</th>
												<td >
													<input type="text" name="email" id="email" value="<%=vo.get("email") %>"  style="width: 250px;" />
												</td>
												<th>
													전화번호
												</th>
												<td >
													<input type="text" name="tel_num" id="tel_num" value="<%=vo.get("tel_num") %>"  style="width: 250px;" />
												</td>
												<th>
													FAX번호
												</th>
												<td >
													<input type="text" name="fax_num" id="fax_num" value="<%=vo.get("fax_num") %>"  style="width: 250px;" />
												</td>
											</tr>
											<tr>
												<th class="required">
													핸드폰 번호
												</td>
												<td colspan="5">
													&nbsp;<input type="text" name="h_phon_1" id="h_phon_1" size="3" numberOnly="true" maxlength="3" value="<%=vo.get("hp1")%>"/> -
				    								&nbsp;<input type="text" name="h_phon_2" id="h_phon_2" size="4" numberOnly="true" maxlength="4" value="<%=vo.get("hp2")%>"/> - 
				    								&nbsp;<input type="text" name="h_phon_3" id="h_phon_3" size="4" numberOnly="true" maxlength="4" value="<%=vo.get("hp3")%>"/> 
												</td>
											</tr>
										</table>
										<%} %>
										
							        </div>
							        <!-- #tab1 -->
							        <div id="tab2" class="tab_content" style="width:98%;">
							           	<div id="title02" name="sheet_save_btn" style="margin-top:5px; float:right; text-align: right; height: 25px; vertical-align: top;" >
											<span class="btnSearch center" id="span_sheet4_add"><a href="javascript:void(0);" id="sheet4_add" name="sheet4_add">추가</a></span>
										</div>
							        	<div id="title02" name="sheet_info" style="margin-top:10px; float:right; text-align: right; vertical-align: top;" >
										</div>
							        
							        	<div id="table01" style="width: 100%; height: 100%;">
											<script>createIBSheet("sheet4","100%", "350px");</script>
										</div>
							        </div>
							        <!-- #tab2 -->
							        <div id="tab3" class="tab_content" style="width:98%;">
							           	<div id="title02" name="sheet_save_btn" style="margin-top:5px; float:right; text-align: right; height: 25px; vertical-align: top;" >
											<span class="btnSearch center" id="span_sheet5_add"><a href="javascript:void(0);" id="sheet5_add" name="sheet5_add">추가</a></span>
											<span class="btnSearch center" id="span_sheet5_admit"><a href="javascript:void(0);" id="sheet5_admit" name="sheet5_admit">승인</a></span>
											<span class="btnSearch center" id="span_sheet5_reject"><a href="javascript:void(0);" id="sheet5_reject" name="sheet5_reject">해제</a></span>
										</div>
							        	<div id="title02" name="sheet_info" style="margin-top:10px; float:right; text-align: right; vertical-align: top;" >
							        		<span style="font-size: 11px; color: red;"><b>(* 금액 단위 : 천원)</b></span>&nbsp;
										</div>
							        	<div id="table01" style="width: 100%; height: 100%;">
											<script>createIBSheet("sheet5","100%", "350px");</script>
										</div>
							        </div>
							        <!-- #tab3 -->
							        <div id="tab4" class="tab_content" style="width:98%;">
							        	<div id="title02" name="sheet_save_btn" style="margin-top:5px; float:right; text-align: right; height: 25px; vertical-align: top;">
											<span style="vertical-align: bottom;  margin-top: 10px;" id="sheet4_btn">
												<span class="btnSearch center" id="span_sheet6_add"><a href="javascript:void(0);" id="sheet6_add" name="sheet6_add">추가</a></span>
												<span class="btnSearch center" id="span_sheet6_admit"><a href="javascript:void(0);" id="sheet6_admit" name="sheet6_admit">승인</a></span>
												<span class="btnSearch center" id="span_sheet6_reject"><a href="javascript:void(0);" id="sheet6_reject" name="sheet6_reject">해제</a></span>
											</span>
										</div>
							        	<div id="title02" name="sheet_info" style="margin-top:10px; float:right; text-align: right; vertical-align: top;">
										</div>
										<div id="table01" style="width: 100%; height: 100%;">
											<script>createIBSheet("sheet6","100%", "350px");</script>
										</div>
							        </div>
							        <!-- #tab4 -->
							        <div id="tab5" class="tab_content" style="width:98%;">
							        	<div id="title02" name="sheet_save_btn" style="margin-top:5px; float:right; text-align: right; height: 25px; vertical-align: top;">
											<span class="btnSearch center" id="span_sheet7_add"><a href="javascript:void(0);" id="sheet7_add" name="sheet7_add">추가</a></span>
										</div>
							        	<div id="title02" name="sheet_info" style="margin-top:10px; float:right; text-align: right; vertical-align: top;">
										</div>
										<div id="table01" style="width: 100%; height: 100%;">
											<script>createIBSheet("sheet7","100%", "350px");</script>
										</div>
							        </div>
							        <!-- #tab5 -->
							        <div id="tab6" class="tab_content" style="width:98%;">
							        	<div id="title02" name="sheet_save_btn" style="margin-top:5px; float:right; text-align: right; height: 25px; vertical-align: top;">
											<span class="btnSearch center" id="span_sheet8_add"><a href="javascript:void(0);" id="sheet8_add" name="sheet8_add">추가</a></span>
										</div>
							        	<div id="title02" name="sheet_info" style="margin-top:10px; float:right; text-align: right; vertical-align: top;">
										</div>
										<div id="table01" style="width: 100%; height: 100%;">
											<script>createIBSheet("sheet8","100%", "350px");</script>
										</div>
							        </div>
							        <!-- #tab9 -->
							        <div id="tab9" class="tab_content" style="width:98%;">
							        	<div id="title02" name="sheet_save_btn" style="margin-top:5px; float:right; text-align: right; height: 25px; vertical-align: top;">
											<span class="btnSearch center" id="span_sheet9_add"><a href="javascript:void(0);" id="sheet9_add" name="sheet9_add">추가</a></span>
										</div>
							        	<div id="title02" name="sheet_info" style="margin-top:10px; float:right; text-align: right; vertical-align: top;">
										</div>
										<div id="table01" style="width: 100%; height: 100%;">
											<script>createIBSheet("sheet9","100%", "350px");</script>
										</div>
							        </div>
							        <!-- #tab6 -->
							        <div id="tab7" class="tab_content">
							        	<div id="title02" name="sheet_save_btn" style="margin-top:5px; float:right;">
							        	</div>
							        	<div id="title02" name="sheet_info" style="margin-top:10px; float:right; text-align: right; vertical-align: top;">
							        		<span style="float: right; font-size: 11px; color: red;"><b>(* 금액 단위 : 원)</b></span>
							        	</div>
						        		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="form-table">
						        			<colgroup>
						        				<col width="150px"/>
						        				<col/>
						        				<col width="150px"/>
						        				<col/>
						        			</colgroup>
											<tr>
												<th class="required">
													기준년도
												</th>
												<td colspan="3">
													<%=InputText.get("base_year",corpInfoVo.get("base_year"), 5,4, "PerSize,Number,center,class=numberic") %>
													<%-- <input type="text" id="base_year" name="base_year" style="width: 50px; text-align: center;" value="<%=corpInfoVo.get("base_year")%>" numberOnly="true" maxlength="4"/> --%> 년도
												</td>
											</tr>
											<TR>
												<th class="required">
													유동자산
												</th>
												<td>
													<%=InputText.get("float_asset",Formatter2.currency(corpInfoVo.get("float_asset")), 30,15, "PerSize,Number,Minus,right,class=numberic","Number") %>
													<%-- <input type="text" class="numberic" name="float_asset" id="float_asset" value="<%=corpInfoVo.get("float_asset") %>" numberOnly="true"style="padding-right:3px; width: 150px; text-align: right;" <%=corpInfoVo.get("re_yn").equals("Y") ? "readonly=\"readonly\" " : "" %> maxlength="15"/> --%>
												</td>
												<th class="required">	
													유동부채
												</th>
												<td>
													<%=InputText.get("float_debt",Formatter2.currency(corpInfoVo.get("float_debt")), 30,15, "PerSize,Number,Minus,right,class=numberic","Number") %>
													<%-- <input type="text" class="numberic" name="float_debt" id="float_debt" value="<%=corpInfoVo.get("float_debt") %>" numberOnly="true" style="padding-right:3px; width: 150px; text-align: right;" <%=corpInfoVo.get("re_yn").equals("Y") ? "readonly=\"readonly\" " : "" %> maxlength="15"/> --%>
												</td>
											</TR>
											<tr>
												<th class="required">
													자본총계
												</th>
												<td>
													<%=InputText.get("tot_cap",Formatter2.currency(corpInfoVo.get("tot_cap")), 30,15, "PerSize,Number,Minus,right,class=numberic","Number") %>
													<%-- <input type="text" class="numberic" name="tot_cap" id="tot_cap" value="<%=corpInfoVo.get("tot_cap") %>" numberOnly="true" style="padding-right:3px; width: 150px; text-align: right;"  <%=corpInfoVo.get("re_yn").equals("Y") ? "readonly=\"readonly\" " : "" %> maxlength="15"/> --%>
												</td>
												<th class="required">
													부채총계
												</th>
												<td>
													<%=InputText.get("gross_asset",Formatter2.currency(corpInfoVo.get("gross_asset")), 30,15, "PerSize,Number,Minus,right,class=numberic","Number") %>
													<%-- <input type="text" class="numberic" name="gross_asset" id="gross_asset" value="<%=corpInfoVo.get("gross_asset") %>" numberOnly="true" style="padding-right:3px; width: 150px; text-align: right;" <%=corpInfoVo.get("re_yn").equals("Y") ? "readonly=\"readonly\" " : "" %> maxlength="15"/> --%>
												</td>
											</tr>
											<tr>
												<th class="required">
													자본금
												</th>
												<td>
													<%=InputText.get("capital_amt",Formatter2.currency(corpInfoVo.get("capital_amt")), 30,15, "PerSize,Number,Minus,right,class=numberic","Number") %>
													<%-- <input type="text" class="numberic" name="capital_amt" id="capital_amt" value="<%=corpInfoVo.get("capital_amt") %>" numberOnly="true" style="padding-right:3px; width: 150px; text-align: right;" <%=corpInfoVo.get("re_yn").equals("Y") ? "readonly=\"readonly\" " : ""%>  maxlength="15"/> --%>
												</td>
												<th class="required">
													당기순이익
												</th>
												<td>
													<%=InputText.get("cur_profit",Formatter2.currency(corpInfoVo.get("cur_profit")), 30,15, "PerSize,Number,Minus,right,class=numberic","Number") %>
													<%-- <input type="text" class="numberic" name="cur_profit" id="cur_profit" value="<%=corpInfoVo.get("cur_profit") %>" numberOnly="true" style="padding-right:3px; width: 150px; text-align: right;" <%=corpInfoVo.get("re_yn").equals("Y") ? "readonly=\"readonly\" " : "" %> maxlength="15"/> --%>
												</td>	
											</tr>
											<tr>
												<th class="required">
													당기매출액
												</th>
												<td>
													<%=InputText.get("cur_sales_amt",Formatter2.currency(corpInfoVo.get("cur_sales_amt")), 30,15, "PerSize,Number,Minus,right,class=numberic","Number") %>
													<%-- <input type="text" class="numberic" name="cur_sales_amt" id="cur_sales_amt" value="<%=corpInfoVo.get("cur_sales_amt") %>" numberOnly="true" style="padding-right:3px; width: 150px; text-align: right;" <%=corpInfoVo.get("re_yn").equals("Y") ? "readonly=\"readonly\" " : "" %> maxlength="15"/> --%>
												<th class="required">
													전기매출액
												</thtd>
												<td>
													<%=InputText.get("pri_sales_amt",Formatter2.currency(corpInfoVo.get("pri_sales_amt")), 30,15, "PerSize,Number,Minus,right,class=numberic","Number") %>
													<%-- <input type="text" class="numberic" name="pri_sales_amt" id="pri_sales_amt" value="<%=corpInfoVo.get("pri_sales_amt") %>" numberOnly="true" style="padding-right:3px; width: 150px; text-align: right;"  <%=corpInfoVo.get("re_yn").equals("Y") ? "readonly=\"readonly\" " : "" %> maxlength="15"/> --%>
													<input type="hidden" name="own_cap" id="own_cap" value="<%=corpInfoVo.get("own_cap") %>"/>
													<input type="hidden" name="sales_amt" id="sales_amt" value="<%=corpInfoVo.get("sales_amt") %>"/>
												</td>
											</tr>
										</table>
							        </div>
							        <div id="tab8" class="tab_content">
							        	<div style="width: 40%; text-align: left; float: left;" >
							        	기준 년도 : 
							        		<select name="corpTestYear" id="corpTestYear">
							        		<%
							        			if(getApprYearList.size() > 0)
							        			{
							        			    for(int i=0; i < getApprYearList.size(); i++)
							        			    {
							        		%>
							        			<option value="<%=getApprYearList.getRow(i).get("appr_dy")%>|<%=getApprYearList.getRow(i).get("arr_id")%>|<%=getApprYearList.getRow(i).get("doc_cd")%>|<%=getApprYearList.getRow(i).get("adm_year")%>" <%=vo.get("appr_dy").equals(getApprYearList.getRow(i).get("appr_dy")) ? "selected=\"selected\" " : "" %>><%=getApprYearList.getRow(i).get("appr_dy")%></option>
							        		<%
							        			    }
							        			}
							        		%>
							        		</select>
							        	</div>
							        	<div style="width: 40%; text-align: right; float: right;">
							        		<span class="btnSearch center"><a href="javascript:void(0);" id="btn_test">신평사정보 적용/평가하기</a></span>
							        		<span class="btnSearch center"><a href="javascript:void(0);" id="btn_test2">평가하기</a></span>
							        	</div>
							        	
										<div style="margin-top: 25px; margin-bottom: 5px;height:1400px;">
											<div id="RdViewer" style="position:relative;width:100%;height:100%"></div>
<!-- 											<script type="text/javascript">makeRDViewer('RdViewer', '100%', '100%'); -->
											
										</div>
							        </div>
							        
							        <%--
							        
							        <div id="tab8" class="tab_content">
							        	<div style="width: 100%; text-align: center; margin-top: 10px; margin-bottom: 15px;" >
							        		<span style="font-size: 15px; font-weight: bold;">공사 협력업체 경영평가표</span>
							        	</div>
							        	<div style="width: 100%; text-align: right;">
							        		<span><input type="button" name="" id="" value="평가하기" /></span>
							        	</div>
							        	
							        	<div style="width: 100%; text-align: left; margin-left: 15px;">
							        		<ol>
							        			<!-- 
												<li style="margin-bottom: 7px;">
													평가자 : <%=vo.get("USER_NAME") %>
												</li>
												 -->
												<li style="margin-bottom: 7px;">
													평가일 : <%=vo.get("APPR_DY") %>
												</li>
												<li style="margin-bottom: 5px;">
													업체명 : <%=vo.get("CORP_KOR") %>
												</li>
												<!-- 
												<li>
													GROUP : 
													 <select name="" id="" >
													 	<option value="">기계</option>
													 	<option value="">배관</option>
													 	<option value="">전기</option>
													 	<option value="">계장</option>
													 	<option value="">토건</option>
													</select>
												</li>
												 -->
											</ol>
							        	</div>
							        	<table width="100%" border="0" cellspacing="0" cellpadding="0" id="appr_std_table" class="form-table">
											<tr>
												<th colspan="3" style="text-align: center;">
													평가항목
												</th>
												<th rowspan="2" style="text-align: center;">
													배당점수
												</th>
												<th rowspan="2" style="text-align: center;">
													평가점수
												</th>
												<th colspan="5" style="text-align: center;">
													배점기준
												</th>
												<th rowspan="2" style="text-align: center;">
													REMARK
												</th>
											</tr>
											<tr>
												<th style="text-align: center;">
													대분류
												</th>
												<th style="text-align: center;">
													중분류
												</th>
												<th style="text-align: center;">
													소분류
												</th>
												<th style="text-align: center;">
													A
												</th>		
												<th style="text-align: center;">
													B
												</th>	
												<th style="text-align: center;">
													C
												</th>
												<th style="text-align: center;">
													D
												</th>
												<th style="text-align: center;">
													E
												</th>			
											</tr>
											<%
											int total_rate = 0;
											String result_rate = "";
											for(int i=0; i < getApprSrdList.size(); i++)
											{
											%>
											<tr>
												<th style="text-align: center;">
													<%=getApprSrdList.getRow(i).get("GUBUN_1") %>
												</th>
												
												<%if(getApprSrdList.getRow(i).get("GUBUN_2").trim().equals("")){ %>
												<th colspan="2" style="text-align: center;">
													<%=getApprSrdList.getRow(i).get("GUBUN_3") %>
												</th>
												<%}else{ %>
												<th style="text-align: center;">
													<%=getApprSrdList.getRow(i).get("GUBUN_2") %>
												</th>
												<th style="text-align: center;">
													<%=getApprSrdList.getRow(i).get("GUBUN_3") %>
												</th>
												<%} %>
												
												<th style="text-align: center;">
													<%=getApprSrdList.getRow(i).get("STOCK_RATE") %>
												</td>
												<td style="text-align: center;">
													<%=getApprSrdList.getRow(i).get("APPR_RATE") %>
												</td>
												<td style="height: 60px;" <%=getApprSrdList.getRow(i).get("APPR_RESULT_CD").equals("A") ? "class=\"select_result\" ": "" %>>
													<div style="text-align: center;">
														<ul>
															<li>
																<%=getApprSrdList.getRow(i).get("A_CONTENT") %>
															</li>
														</ul>
													</div>
													<div style="text-align: center;">
														<ul>
															<li>
																<%=getApprSrdList.getRow(i).get("A_RATE") %>
															</li>
														</ul>
													</div>
												</td>
												<td style="height: 60px;" <%=getApprSrdList.getRow(i).get("APPR_RESULT_CD").equals("B") ? "class=\"select_result\" ": "" %>>
													<div style="text-align: center;">
														<ul>
															<li>
																<%=getApprSrdList.getRow(i).get("B_CONTENT") %>
															</li>
														</ul>
													</div>
													<div style="text-align: center;">
														<ul>
															<li>
																<%=getApprSrdList.getRow(i).get("B_RATE") %>
															</li>
														</ul>
													</div>
												</td>
												<td style="height: 60px;" <%=getApprSrdList.getRow(i).get("APPR_RESULT_CD").equals("C") ? "class=\"select_result\" ": "" %>>
													<div style="text-align: center;" >
														<ul>
															<li>
																<%=getApprSrdList.getRow(i).get("C_CONTENT") %>
															</li>
														</ul>
													</div>
													<div style="text-align: center;">
														<ul>
															<li>
																<%=getApprSrdList.getRow(i).get("C_RATE") %>
															</li>
														</ul>
													</div>
												</td>
												<td style="height: 60px;" <%=getApprSrdList.getRow(i).get("APPR_RESULT_CD").equals("D") ? "class=\"select_result\" ": "" %>>
													<div style="text-align: center;" >
														<ul>
															<li>
																<%=getApprSrdList.getRow(i).get("D_CONTENT") %>
															</li>
														</ul>
													</div>
													<div style="text-align: center;">
														<ul>
															<li>
																<%=getApprSrdList.getRow(i).get("D_RATE") %>
															</li>
														</ul>
													</div>
												</td>
												<td style="height: 60px;" <%=getApprSrdList.getRow(i).get("APPR_RESULT_CD").equals("E") ? "class=\"select_result\" ": "" %>>
													<div style="text-align: center;" >
														<ul>
															<li>
																<%=getApprSrdList.getRow(i).get("E_CONTENT") %>
															</li>
														</ul>
													</div>
													<div style="text-align: center;">
														<ul>
															<li>
																<%=getApprSrdList.getRow(i).get("E_RATE") %>
															</li>
														</ul>
													</div>
												</td>
												<td style="height: 60px; text-align: center;" >
													<b><%=getApprSrdList.getRow(i).get("noti") %></b>
												</td>
											</tr>
											<%
												if(getApprSrdList.getRow(i).get("APPR_RATE").trim().equals(""))
												{
												    total_rate = 0;
												}
												else
												{
												    total_rate += Integer.parseInt(getApprSrdList.getRow(i).get("APPR_RATE"));
												}
											
												if(total_rate >= 85)
												{
												    result_rate = "A등급";
												}
												else if(total_rate >= 80)
												{
												    result_rate = "B등급";
												}
												else if(total_rate >= 75)
												{
												    result_rate = "C등급";
												}
												else if(total_rate >= 70)
												{
												    result_rate = "D등급";
												}
												else
												{
												    result_rate = "등급외";
												}
											
											}
											%>
											<tr>
												<th colspan="3">
													[ 총 합 계 ]
												</th>
												<th>
													100
												</td>
												<th>
													<%=total_rate %>
												</th>
												<th>
													종합평가
												</th>
												<th colspan="5">
													상기 업체 평가 점수는 &nbsp;<%=total_rate %>&nbsp; 점으로   &nbsp;등급기준은&nbsp;<%=result_rate %>&nbsp;입니다.
												</th>
											</tr>
										</table>
										<div style="margin-top: 20px; margin-bottom: 5px;">
										</div>
										<table width="100%" border="0" cellspacing="0" cellpadding="0" id="appr_std_table">
								            <tr>
								                <td colspan="5" style="text-align: left;" class="border_line_b">
						                    		<b>*공종별 등급 기준</b>
								                </td>
								                <td width="1" bgcolor="#cccccc"></td>
								                <td id="td_title04" style="text-align:center;" class="border_line_tb">
								                	<div style="text-align: center;">
														<ul>
															<li>A</li>
														</ul>
													</div>
								                </td>
								                <td width="1" bgcolor="#cccccc"></td>
								                <td id="td_title04" style="text-align:center;" class="border_line_tb">
								                	<div style="text-align: center;">
														<ul>
															<li>B</li>
														</ul>
													</div>
								                </td>
								                <td width="1" bgcolor="#cccccc"></td>
								                <td id="td_title04" style="text-align:center;" class="border_line_tb">
								                	<div style="text-align: center;">
														<ul>
															<li>C</li>
														</ul>
													</div>
								                </td>
								                <td width="1" bgcolor="#cccccc"></td>
								                <td id="td_title04" style="text-align:center;" class="border_line_tb"> 
								                	<div style="text-align: center;">
														<ul>
															<li>D</li>
														</ul>
													</div>
								                </td>
								                <td width="1" bgcolor="#cccccc"></td>
								                <td id="td_title04" style="text-align:center;" class="border_line_tb">
								                	<div style="text-align: center;">
														<ul>
															<li>등급외</li>
														</ul>
													</div>
								                </td>
								                <td width="1" bgcolor="#cccccc"></td>
								              	<td id="td_title04" style="text-align:center;" class="border_line_tb">
								                	<div style="text-align: center;">
														<ul>
															<li>Remark</li>
														</ul>
													</div>
								                </td>
								                <td width="1" bgcolor="#cccccc"></td>
								            </tr>
								            <tr id="class_1">
								            	<td id="td_title04" style="text-align:center;" rowspan="5" class="border_line_b">
								            		<b>공종별<br />등급기준</b>
								                </td>
								                <td width="1" bgcolor="#cccccc"></td>
								                <td id="td_title04" style="text-align:center;" class="border_line_b">
								                	<div style="text-align: center;">
														<ul>
															<li>기계</li>
														</ul>
													</div>
								                </td>
								                <td width="1" bgcolor="#cccccc"></td>
						                        <td  style="text-align:center;">
					                            	<div style="text-align: center;"  id="td_title06" >
														<ul>
															<li>기계설비(플랜트, 환경)등</li>
														</ul>
													</div>
						                        </td>
						                        <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;" >
				                                    <div style="text-align: center;"  id="td_title06">
														<ul>
															<li>90 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;">
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>80 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;" >
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>70 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;" >
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>65 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;">
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>65 점 ↓</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
						                        <td  style="text-align:center;" >
						                        	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li> </li>
														</ul>
													</div>
						                        </td>
						                        <td width="1" bgcolor="#cccccc"></td>
						                    </tr>
						                    <tr id="class_2">
						                    	<td width="1" bgcolor="#cccccc"></td>
								                <td id="td_title04" style="text-align:center;" >
								                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>배관</li>
														</ul>
													</div>
								                </td>
								                <td width="1" bgcolor="#cccccc"></td>
						                        <td  style="text-align:center;" >
					                            	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>Pipr, Fitting, Valve, Flange 등</li>
														</ul>
													</div>
						                        </td>
						                        <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;" >
				                                    <div style="text-align: center;"  id="td_title06">
														<ul>
															<li>90 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;" >
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>78 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;" >
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>70 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;" >
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>65 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;" >
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>65 점 ↓</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
						                        <td  style="text-align:center;">
						                        	<div style="text-align: center;" id="td_title06">
														<ul>
															<li></li>
														</ul>
													</div>
						                        </td>
						                        <td width="1" bgcolor="#cccccc"></td>
						                    </tr>
						                    <tr id="class_3">
						                    	<td width="1" bgcolor="#cccccc"></td>
								                <td id="td_title04" style="text-align:center;" >
								                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>Cable, MCC, TR등</li>
														</ul>
													</div>
								                </td>
								                <td width="1" bgcolor="#cccccc"></td>
						                        <td  style="text-align:center;" >
					                            	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>전기공사(소방, 강전, 약전), 계장공사</li>
														</ul>
													</div>
						                        </td>
						                        <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;" >
				                                    <div style="text-align: center;"  id="td_title06">
														<ul>
															<li>90 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;" >
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>78 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;" >
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>70 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;">
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>65 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;">
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>65 점 ↓</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
						                        <td  style="text-align:center;">
						                        	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li></li>
														</ul>
													</div>
						                        </td>
						                        <td width="1" bgcolor="#cccccc"></td>
						                    </tr>
						                    <tr id="class_4">
						                    	<td width="1" bgcolor="#cccccc"></td>
						                        <td  style="text-align:center;" id="td_title04">
					                            	<div style="text-align: center;"   id="td_title06">
														<ul>
															<li>계장</li>
														</ul>
													</div>
						                        </td>
								                <td width="1" bgcolor="#cccccc"></td>
						                        <td  style="text-align:center;">
					                            	<div style="text-align: center;"  id="td_title06"">
														<ul>
															<li>PLC, DCS, CCTV 등</li>
														</ul>
													</div>
						                        </td>
						                        <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;">
				                                    <div style="text-align: center;"  id="td_title06">
														<ul>
															<li>90 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;">
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>78 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;">
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>70 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td style="text-align:center;">
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>65 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td style="text-align:center;">
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>65 점 ↓</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
						                        <td  style="text-align:center;">
						                        	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li></li>
														</ul>
													</div>
						                        </td>
						                        <td width="1" bgcolor="#cccccc"></td>
						                    </tr>
						                    <tr id="class_5">
								                <td width="1" bgcolor="#cccccc"></td>
								                <td id="td_title04" style="text-align:center;">
								                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>토건</li>
														</ul>
													</div>
								                </td>
								                <td width="1" bgcolor="#cccccc"></td>
								                <td style="text-align:center;">
					                            	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>철근, PHC, 레미콘, H beam 등</li>
														</ul>
													</div>
						                        </td>
								                <td width="1" bgcolor="#cccccc"></td>
								                <td  style="text-align:center;">
				                                    <div style="text-align: center;"  id="td_title06">
														<ul>
															<li>90 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;">
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>78 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;">
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>70 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td style="text-align:center;">
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>65 점 ↑</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td style="text-align:center;">
				                                	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li>65 점 ↓</li>
														</ul>
													</div>
				                                </td>
				                                <td width="1" bgcolor="#cccccc"></td>
				                                <td  style="text-align:center;">
						                        	<div style="text-align: center;"  id="td_title06">
														<ul>
															<li></li>
														</ul>
													</div>
						                        </td>
						                        <td width="1" bgcolor="#cccccc"></td>
								            </tr>
								        </table>
							        </div>
							        
							         --%>
							        <!-- #tab8 -->
							    </div>
							    <!-- .tab_container -->
							</div>
							<!-- #container -->
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	
</form>
