<%--
  - FileName   : TermsAgreeInfoReg.jsp
  - Author(s)  : 이성민
  - Date       : 2014.06.25
  -
  - Description: 사용자 등록
  --%>
  


<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
<%@ page import="com.udapsoft.waf.common.ui.*" %>
<%@ page import="com.udapsoft.waf.common.util.StringUtils" %>
<%@ page import="kr.co.hsnc.common.util.*"%>
<%@ page import="kr.co.hsnc.common.sql.*" %>
<%@ 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");
    
    RowSet getFileListRowSet = storage.getRowSet("getFileListRowSet");
%>
<style>
<!--
.input {
		    font-family                 : "굴림", "verdana"                         ;
		    font-size                   : 9pt                                       ;
		    border                      : #d0d7e4                                   ;
		    border-style                : solid                                     ;
		    border-top-width            : 1px                                       ;
		    border-right-width          : 1px                                       ;
		    border-bottom-width         : 1px                                       ;
		    border-left-width           : 1px                                       ;
		    color                       : #4063a2                                   ;
		    padding-left                : 3px;
/* 		    padding-top                 : 8px; */
/* 		    height                      : 22px; */
		}
-->
</style>

<link href="/css/supplier/join/member_style.css" rel="stylesheet" type="text/css" />
<SCRIPT language="JavaScript" src="/js/common.js"></SCRIPT>

<script type="text/javascript">
<!--

var job_div = "<%=params.get("job_div")%>";


	$(document).ready(function(){
		
		var init_sheet = {};
		init_sheet.Cfg = {SearchMode:0, MergeSheet:msHeaderOnly, Page:10, ChildPage:10};
		
		init_sheet.Cols = [
									{Header:"레벨",	 			Type:"Text", 				TreeCol:1,				LevelSaveName:"MATERIAL_LEVEL",	 	SaveName:"MATERIAL_LEVEL"	,	Width:120},
									{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();
		

		
		///////////////////////////////
		var init_sheet = {};
		init_sheet.Cfg = {SearchMode:0, 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", Edit:"False", Hidden:"True"},
									{Header:"대분류",	 			Type:"Text", 				SaveName:"KIND_BIG",	 			Width:100},
									{Header:"중분류",	 			Type:"Text", 				SaveName:"KIND_MID",				Width:100, 	 Align:"Center"},
									{Header:"소분류",	 			Type:"Text", 				SaveName:"KIND_SMALL",			Width:100, 	 Align:"Center"},
									<%if(params.get("job_div").equals("P")){%>
								    {Header:"대표ITEM",	 		Type:"Radio", 				SaveName:"MAIN_ITEM",			Width:50, 	 Align:"Center"},
									<%}else{%>
								    {Header:"대표공종",	 		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);
	//		sheet1.SetEditable(false);
		sheet2.SetCountPosition(0);
		sheet2.FitColWidth();
		
		
		
	/***********************sheet3*****************************/
		
		var init_sheet = {};
		init_sheet.Cfg = {SearchMode:0, MergeSheet:msHeaderOnly, Page:10};
		
		init_sheet.Cols = [
									{Header:'Status',					Type:"Status", 			SaveName:"STATUS", 				Width:0, 	Align:"Center", Edit:"False", Hidden:"True"},
									{Header:"신용평가사",	 		Type:"Text", 				SaveName:"EVAL_CMP",	 			Width:100, Edit:"False"},
									{Header:"신용등급",	 			Type:"Text", 				SaveName:"LASTGRD2",				Width:100, 	 Align:"Center", Edit:"False"},
									{Header:"현금흐름등급",	 		Type:"Text", 				SaveName:"DECISION",				Width:100, 	 Align:"Center", Edit:"False"},
									{Header:"신용평가만료일",	 	Type:"Text", 				SaveName:"SUVDT",					Width:100, 	 Align:"Center"},
									{Header:"가입정보반영",	 		Type:"Radio", 				SaveName:"CHK_CREDIT",			Width:80, 	 Align:"Center"},
									{Header:"정보반영코드",	 		Type:"Text", 				SaveName:"CREDIT_GUBUN",		Width:50, 	 Align:"Center", Hidden:"True"},
									{Header:"구분코드",		 		Type:"Text", 				SaveName:"GUBUN_CODE",			Width:50, 	 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();
		
		//getFileListForTextarea();
	});




	$(function(){
		getFileListForTextarea();
	    //숫자만
	    $(document).on("keyup", "input:text[numberOnly]", function() {$(this).val( $(this).val().replace(/[^0-9]/gi,"") );});
	    
	    //영어랑 숫자만
	    $(document).on("keyup", "input:text[noHangel]", function() {$(this).val( $(this).val().replace(/[^0-9a-zA-Z]/gi,"") );});
	    
	    //숫자,특문-만
	    $(document).on("keyup", "input:text[noHangelEng]", function() {$(this).val( $(this).val().replace( /[^0-9-]/gi, "") );});
	    
	    var f = document.form1;
	    var corp_reg_gubun = "<%=vo.get("CORP_REG_NO").equals("") ? params.get("corp_no") : vo.get("CORP_REG_NO")%>"; 
	    corp_reg_gubun = corp_reg_gubun.trim().substring(3,5);
	    
	    
	    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");
        }
	    
	        
	    
	    
	    
	    $(':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);
            }
	    });
	    
	    $("#mftr_div_cd_2").click(function(){
	        $("#factor_cd_3").prop("disabled", false);
	        return;
	    });
	    
	    
	    $("#btn_save").click(function(){
	        
	    	// 정규식 - 사업장 관리번호 검사
	        var regNo =  /^[0-9]{11,11}$/;
	        var corp_reg_gubun = "<%=vo.get("corp_reg_no") %>";
	        corp_reg_gubun = corp_reg_gubun.trim().substring(3,5); 
	      
	        if(corp_reg_gubun == "86")
	        {
	            if($("#head_corp_reg_n").val().trim() == "")
                {
                    alert("본사 사업자번호를 입력해 주세요");
                    $("body,html").scrollTop(0);
		            return $("#head_corp_reg_n").focus();
                }
	           
	            if($("#head_corp_reg_n").val().length != 10)
                {
	                alert("본사 사업자번호를 전부 입력해 주세요");
	                $("body,html").scrollTop(0);
		            return $("#head_corp_reg_n").focus();
                }
	        }
	        
	        if($(':radio[name="corp_div_cd"]:checked').val() == "1")
	        {
	          	if($("#copr_no").val().trim() == "")
	          	{
			        alert("법인번호 입력해 주세요");
			        $("body,html").scrollTop(0);
		            return $("#copr_no").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($("#sub_place_no").val().trim() == "")
            {
	            alert("종사업장번호를 입력해 주세요.");
	            $("body,html").scrollTop(0);
	            $("#sub_place_no").focus();
	            return;
            }
	        */
	        
	        if($("#corp_kor").val().trim() == "")
            {
	            alert("업체명을 입력해 주세요.");
	            $("body,html").scrollTop(0);
	            return $("#corp_kor").focus();
            }    
	        
	        if($("#rep_name").val().trim() == "")
            {
	            alert("대표자명을 입력해 주세요.");
	            $("body,html").scrollTop(0);
	            return $("#rep_name").focus();
            }    
	        
	        if($("#corp_sts").val().trim() == "")
            {
	            alert("업태를 입력해 주세요.");
	            $("body,html").scrollTop(0);
	            return $("#corp_sts").focus();
            }
	        
	        if($("#biz_form").val().trim() == "")
            {
	            alert("업종을 입력해 주세요.");
	            $("body,html").scrollTop(0);
	            return $("#biz_form").focus();
            }
	        
 	        if($("#esta_date").val().trim() == "")
            {
 	            alert("설립일자를 입력해 주세요.");
 	            $("body,html").scrollTop(0);
 	            return $("#esta_date").focus();
            }
	        
	        if($("#corp_tel").val().trim() == "")
            {
	            alert("전화번호를 입력해 주세요.");
	            $("body,html").scrollTop(0);
	            return $("#corp_tel").focus();
            }
	        
	        if($("#corp_fax").val().trim() == "")
            {
	            alert("팩스번호를 입력해 주세요.");
	            $("body,html").scrollTop(0);
	            return $("#corp_fax").focus();
            }
	        
	               
	        if($(':radio[name="corp_scale"]:checked').val() == undefined)
	        {
	            alert("회사규모를 선택해 주세요");
	            $("body,html").scrollTop(0);
	            return $("#corp_scale_1").focus();
	        }    
	        
	        //은행계좌 확인 2019.05.14
			if($("#bank_cd").val().trim() == "" || $("#bank_acct").val().trim() == "")   
		    {
	    		alert("계좌정보를 입력해 주세요.");
	    		return $("#bank_acct").focus();
		    }
	        
	        if($(':radio[name="tax_addr_cd"]:checked').val() == undefined)
	        {
	            alert("세금계산서 발행주소를 선택해 주세요");
	            $("body,html").scrollTop(0);
	            return $("#factor_cd_1").focus();
	        }
	        else
	        {
	            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 $("#search_addr_sub").click();
	                }
	            }    
	        }    
	        
	        if(job_div == "P")
            {
	            if($(':radio[name="mftr_div_cd"]:checked').val() == undefined)
		        {
		            alert("manufacturer 구분을 선택해 주세요");
		            $("body,html").scrollTop(0);
		            return $("#mftr_div_cd_1").focus();
		        }
            }
	        
	        
	        var chked_val = "";
			if(job_div == "O")
			{
			    $(":checkbox[name='out_main_cd']:checked").each(function(pi,po){
				    chked_val += ","+po.value;
				  });
				  if(chked_val != "") 
			      {
				      chked_val = chked_val.substring(1);
				      $("#out_main_check").val(chked_val);
			      }
				
			  	if(chked_val.trim() == "")
	            {
		            alert("주력분야는 반드시 하나 이상은 선택하셔야 합니다.");
		            $("body,html").scrollTop(0);
		            return $("#out_main_cd_1").focus();
	            }
			}
			else
		    {
			    if($('input:radio[name="factor_cd"]:checked').val() == "undefined")
		        {
			        
		        }
		    }
			
			
	       
	        
	        
	        if(sheet2.LastRow() >=1)
		   	{
	            var gubun = "N";
	            for(var i=1; i<=sheet2.LastRow(); i++)
		    	{
	                if(sheet2.GetCellValue(i, "MAIN_ITEM") == "1")
	                {
	                    gubun = 'Y";'
	                }
		    	}
		   	}
	        else
            {
	            if(job_div == "P")
	            {
	                alert("등록희망 공급ITEM을 선택하세요.");
	            }
	            else
                {
	                alert("등록희망 공종을 선택하세요.");
                }
	            return;
            }
	        
	        if(gubun == "N")
	        {
	            if(job_div == "P")
	            {
	                alert("대표 ITEM을 지정하세요.");
	            }
	            else
	            {
	                alert("대표 공종을 지정하세요.");
	            }
	            return;
	        }    
	        
	        
	        var Row = sheet2.ColValueDup("6");
			if(Row != -1)
			{
			    if(job_div == "P")
	            {
			        alert("희망 공급 ITEM에 중복된 내용이 존재합니다.");
	            }
	            else
	            {
	                alert("희망 공종에 중복된 내용이 존재합니다.");
	            }
			    return;
			}
			
			
			if($("#user_id").val() == "")
		    {
			    alert("ID를 입력해 주세요.");
			    return $("#user_id").focus();
		    }
			
			if($("#id_check_gubun").val() == "N")
            {
	            alert("ID 중복확인을 해주세요.");
	            return $("#btn_save").focus();
            }
			
			if($("#passwd").val().trim() == "")
	        {
	            alert("비밀번호를 입력해 주세요");
	            return $("#passwd").focus();
	        }
	        else if($("#re_passwd").val().trim() == "")
	        {
	            alert("비밀번호 확인을 입력해 주세요");
	            return $("#re_passwd").focus();
	        }
	        
	        if($("#passwd").val().trim() != $("#re_passwd").val().trim())
	        {
	            alert("비밀번호를 확인해 주세요.");
	            return $("#passwd").focus();
	        }
	        //2016.10.11 비밀번호 확인
	        var argObj = new Object();
		    argObj.user_id			= $("#user_id").val();
		    argObj.passwd01			= $("#passwd").val();
		    argObj.passwd02			= $("#re_passwd").val();
		    argObj.tel_no			= $("#tel_num").val();
		    argObj.fax_no			= $("#fax_num").val();
		    argObj.hand_tel			= $("#h_phon_1").val() + $("#h_phon_2").val() + $("#h_phon_3").val(); 
			var rMsg = doValidPassWord(argObj)
			if( rMsg != "" ) {
				ErrMsg($("#re_passwd"), rMsg);
				return;
			}
	        
	        
	        if($("#user_name").val().trim() == "")
		    {
			    alert("담당자명을 입력해 주세요.");
			    return $("#user_name").focus();
		    }
	        else if($("#division").val().trim() == "")
		    {
			    alert("부서명을 입력해 주세요.");
			    return $("#division").focus();
		    }
	        else if($("#position").val().trim() == "")
		    {
			    alert("직위를 입력해 주세요.");
			    return $("#position").focus();
		    }
	        else if($("#email").val().trim() == "")
		    {
			    alert("이메일을 입력해 주세요.");
			    return $("#email").focus();
		    }
	        else if($("#email").val().trim() == "")
		    {
			    alert("이메일을 입력해 주세요.");
			    return $("#email").focus();
		    }
	        else if($("#tel_num").val().trim() == "")
		    {
			    alert("전화번호를 입력해 주세요.");
			    return $("#tel_num").focus();
		    }
	        else if($("#fax_num").val().trim() == "")
		    {
			    alert("FAX번호를 입력해 주세요.");
			    return $("#fax_num").focus();
		    }
	        else if($("#h_phon_1").val().trim() == "")
		    {
			    alert("휴대전화번호를 입력해 주세요.");
			    return $("#h_phon_1").focus();
		    }
	        else if($("#h_phon_2").val().trim() == "")
		    {
			    alert("휴대전화번호를 입력해 주세요.");
			    return $("#h_phon_2").focus();
		    }
	        else if($("#h_phon_3").val().trim() == "")
		    {
			    alert("휴대전화번호를 입력해 주세요.");
			    return $("#h_phon_3").focus();
		    }
	        
	        
	        
			
			
			for(var i=1; i<=sheet1.LastRow(); i++)
	    	{
			    sheet1.SetCellValue(i, "STATUS", "I");
	    	}
			
			if(confirm("부가정보 페이지로 이동하시겠습니까?"))
		    {
			    $("#fevent").val("SAVE_LIST");
				var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/portal/join/TermsAgreeInfoReg_sheet.screen";
				var result = Modular.view.IBSheet7.doSave(sheet2, url, $("#form1"), false);    
		    }
	        			
	    });
	    
	    

	        
	        
	    
	    
	    $("#btn_cancel").click(function(){
	        top.location.href="/supplierLogin.screen";
	    });
	    
	    
	    $("#btn_idChk").click(function(){
	        $("#fevent").val("CHECK_ID");
			f.isSubmit = false;
	        submitXmlRequest("/supplier/portal/join/TermsAgreeInfoReg_form.screen", $("#fevent").val(), f, "VALUEOBJECT");
            
	    });
	    
	    
	    $("#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_addr").click(function() {
			
			/* 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() {
			
			/* 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"); 
			
		});
		
		//첨부파일
		$("#search_spot_button").click(function(){
		    
		    var obj = $("#corp_id").val();
		    var no = "1";
		    var corp_id = "<%=vo.get("corp_id")%>";
		    
		    
		    if(no == 1)
		    {
		        if(job_div == "P")
	            {
		            viewFileListNew("TERMS_AGREE_INFO", obj, document.form1.p_AttachFile1, "Y", "own/purchase/" + corp_id);
	            }
		        else
	            {
		            viewFileListNew("TERMS_AGREE_INFO", obj, document.form1.p_AttachFile1, "Y", "own/outside/" + corp_id);
	            }
			}
		    
		});
		
	    $.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);
	        }
	    };
	    
	    
	    
	    
		$.getList = function()
		{
		    $("#fevent").val("GET_LIST");
			
			var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/portal/join/TermsAgreeInfoReg_sheet.screen";
			Modular.view.IBSheet7.doSearch(sheet1, url, $("#form1"), 30, "");
//				sheet1.DoSearch("/test/TestList_data.screen", $("#form1"));
		};
		
		$.getList2 = function()
		{
			$("#fevent").val("GET_APPR_LIST");
			
			var url = Modular.model.PageContext.CONTEXT_ROOT + "/supplier/portal/join/TermsAgreeInfoReg_sheet.screen";
			Modular.view.IBSheet7.doSearch(sheet3, url, $("#form1"), 30, "");
		};
		
		$.getList();
		
		$.getList2();
		
	});
	
	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.04.18
		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);  
		}	
   }
	
	function sheet1_OnSearchEnd(code, message) {
		sheet1.ShowTreeLevel(0, 1);

	}
	
	
	
	/* 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 getOpenerReload() 
	{
		$("#file_list").load("/main.screen");
		
	}
	
	function doResult(resultObj) 
	{
		try 
		{
		    if( resultObj.getRequestEvent() == "CHECK_ID") 
		    {
				document.form1.isSubmit = false;
		        
		        var cnt = resultObj.getValueObject().get("cnt");
		        
		        if($("#user_id").val().trim() == "")
		        {
		            alert("ID를 입력해 주세요");
		            return $("#user_id").focus();
		        }
		            
		        if(cnt == "0")
		        {
		            alert("등록가능합니다.");
		            $("#id_check_gubun").val("Y");
		            $("#user_id").attr("readonly",true);
		        }
		        else
		        {
		            alert("이미 사용중인 아이디 입니다.");
		            $("#id_check_gubun").val("N");
		        }    
		    }
		    else if(resultObj.getRequestEvent() == "GET_ATTACHFILE")
	    	{
	    		if( resultObj.getSuccess() ) {				
					document.form1.p_AttachFile1.value = resultObj.getValueObject().get("AttachFile");
				}else {
					dlgErrorMsg(resultObj);
				}
				document.form1.isSubmit = false;
	    	}
		}
		catch(errorObject) 
		{
		    document.form1.isSubmit = false;
			showErrorDlg("doResult()", errorObject);
		}
	}
	
	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", sheet1.GetCellValue(Row, "GUBUN_1"));
		    sheet2.SetCellValue(rowIndex, "KIND_MID", sheet1.GetCellValue(Row, "GUBUN_2"));
		    sheet2.SetCellValue(rowIndex, "KIND_SMALL", sheet1.GetCellValue(Row, "GUBUN_3"));
		    sheet2.SetCellValue(rowIndex, "ITEM_CODE", sheet1.GetCellValue(Row, "MATERIALGROUP"));
	    }
	    else
	    {
// 	        dlgAlert("ㅁㄴ야ㅕ모뉴야ㅕㅁ뉴야며늉먄유");
//			alert("소분류를 선택해 주세요.");
	    	if(sheet1.GetRowExpanded(Row) == 0){
	    	    sheet1.SetRowExpanded(Row, 1);
	    	}else{
	    		sheet1.SetRowExpanded(Row, 0);
	    	}
	    }
	    
	    
	    var Row = sheet2.ColValueDup("6");
		if(Row != -1)
		{
		    if(job_div == "P")
            {
		        alert("희망 공급 ITEM에 중복된 내용이 존재합니다.");
            }
            else
            {
                alert("희망 공종에 중복된 내용이 존재합니다.");
                
            }
		    
		    sheet2.RowDelete(sheet2.LastRow() , 0);
		    
		    return;
		}
		
		
	}
	
	function sheet2_OnSaveEnd(code, msg)
	{
		var event = $("#fevent").val();
		var f = document.form1;
		
		if(code >= "0")
		{
			alert("기본정보가 등록되었습니다.\n부가정보 등록 페이지로 이동합니다.");
			
			$("#fevent").val("ADD_INFO_REG");
	        $("#form1").attr("action", "/supplier/portal/join/TermsAgreeAddInfoReg.screen");
	        $("#form1").attr("target", "_self");
			$("#form1").attr("method", "post");
			$("#form1").submit();	        
			
		}
		else
		{
			alert("등록실패.");
		}
	}
	
	
	function sheet3_OnSearchEnd(code, msg)
	{
	    if(code == 0) 
	    {
	        var len = sheet3.LastRow();
	        
	        if(len >= 0)
	        {
	            for(var i=1; i <= len; i++)
		    	{
	                if(sheet3.GetCellValue(i, "CREDIT_GUBUN") == sheet3.GetCellValue(i, "GUBUN_CODE"))
	                {
	                    sheet3.SetCellValue(i, "CHK_CREDIT", "1");
	                }
	                else
	                {
	                    sheet3.SetCellValue(i, "CHK_CREDIT", "0");
	                }
		    	}
	        }
	    }
	}
	
	
	
	function fileCheck(checkObj, val){
		var f = document.form1;
		
		var obj = eval("document.getElementById('" + val + "')");
		
		if(obj.style.display == "none"){
			obj.style.display = "inline";
			checkObj.checked = true;
		}else{
			obj.style.display = "none";
			checkObj.checked = false;
		}
	} 
	
	//첨부목록 조회
	function getFileListForTextarea(){
		if(job_div=="O"){	//외주일때만
			document.form1.p_AttachFile1.value = "";
			var f = document.form1;  
			jQuery("#fevent").val("GET_ATTACHFILE");
			submitXmlRequest("/supplier/purchase/PuSupplierList_form.screen", "GET_ATTACHFILE", f, "VALUEOBJECT");	
		}
	}
	
	
	function doAttachFile(obj,No,fileName) {

		if(obj.value == ''){
			alert("데이터를 저장 후, 파일을 첨부할 수가 있습니다.");
		}
		else if(obj.value != ''){ 
			if(No == 1){
				viewFileListNew1('TERMS_AGREE_INFO_'+obj.value, No, document.form1.p_AttachFile2, "Y", "own/outside/"+obj.value);
			}else{
				var upLoadFlg = "Y";
				if(jQuery("#statusCd").val() == "10"){	//상태값이 기성신청(03), 결재완료(10) 일때는 첨부파일 다운로드만 가능
					upLoadFlg = "N";
				}
				//2017.11.23  협력업체등록증은 수정불가 
				if (No == "180"){
					upLoadFlg = "N";
					alert("당사에서 발급 후 조회 가능합니다.");
					return;
				}
				viewFileListNew1('TERMS_AGREE_INFO_'+obj.value, No, document.form1.p_AttachFile2, upLoadFlg, "own/outside/"+obj.value, null, fileName);
			}
		} 

		//기성첨부파일 목록 조회
		//getFileListForTextarea();
		
	}
	
	function viewFileListNew1(fileGB, id, obj, isModify, isDrectory, iframeID, user_filename) {
		
		var win_id = "_viewFileList";
		var link = "/common/file/FileListNew.screen";
		    link += "?pop_win_id="+win_id;
		    link += "&extFunction=viewFileListClose1";
		    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( user_filename != null )
				link += "&user_filename=" + user_filename;	 
		
		fLayerPop(win_id, link, 750,430, '', '', 'NO', '200');
	}

	
//-->
</script>


<modular:search id="form1">
	<modular:key id="fevent" />
</modular:search>
<form id="form1" name="form1" method="post" modular:type="search">
<input type="hidden" name="fevent" id="fevent" value="" />
<input type="hidden" name="job_div" id="job_div" value="<%=params.get("job_div")%>" />
<input type="hidden" name="credit_yn" id="credit_yn" value="<%=params.get("credit_yn")%>"/>
<input type="hidden" name="charge_seq" id="charge_seq" value="<%=vo.get("charge_seq") %>" />
<input type="hidden" name="corp_id" id="corp_id" value="<%=vo.get("corp_id") %>" />
<input type="hidden" name="p_corp_id" id="p_corp_id" value="<%=vo.get("corp_id") %>" />
<input type="hidden" name="id_check_gubun" id="id_check_gubun" value="N" />

<input type="hidden" name="credit_corp_cd" id="credit_corp_cd" value="<%=vo.get("credit_corp_cd")%>"/>
<input type="hidden" name="credit_grade" id="credit_grade" value="<%=vo.get("credit_grade")%>"/>
<input type="hidden" name="cash_grade" id="cash_grade" value="<%=vo.get("cash_grade")%>"/>
<input type="hidden" name="credit_sta_dy" id="credit_sta_dy" value="<%=vo.get("credit_sta_dy")%>"/>
<input type="hidden" name="credit_end_dy" id="credit_end_dy" value="<%=vo.get("credit_end_dy")%>"/>

<input type="hidden" name="corp_reg_no" id="corp_reg_no" value="<%=vo.get("CORP_REG_NO").equals("") ? params.get("corp_no") : vo.get("CORP_REG_NO")%>" />

<input type="hidden" name="out_main_check" id="out_main_check" value="" />
<input type="hidden" name="addr_gubun" id="addr_gubun" value="" />

<input type="hidden" name="fileConnGB" id="fileConnGB" value=""/>
<input type="hidden" name="fileConnID" id="fileConnID" value=""/>
<input type="hidden" name="p_AttachFile2" id="p_AttachFile2" onPropertyChange="JavaScript:getFileListForTextarea();"/>

<input type="hidden" name="eval_cmp" id="eval_cmp" value="<%=params.get("CREDIT_CORP_CD")%>" />
	
	<div id="header" >
		<div id="supplier-main-menu">
			<ul class="main-menu">
				<li class="logo">
					<a href="/supplierLogin.screen"><img src="/img/supplier/portal_logo.png" /></a>
				</li>
			</ul>
		</div>
	</div>
	
	<div id="join_wrap" align="center" >
		<table width="920" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td height="10"></td>
			</tr>
			<tr>
				<td>
					<!--step01-->
					<div align="center">
						<img src="/img/buyer/title/join_step02.gif" />
					</div>
				</td>
			</tr>
			<tr>
				<td height="1">&nbsp;</td>
			</tr>
			<tr>
				<td>
					<!--소타이틀-->
					<div id="title02" align="left">
						<img src="/img/buyer/title/t_03.gif" alt="회사정보" />
					</div> <!--소타이틀끝-->
				</td>
			</tr>
			<tr>
				<td>
					<div id="table01">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td>
									<div class="td_title04">
										<ul>
											<li>사업자번호</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div id="input01">
										<ul>
											<li>
												<!--<input type="text" style="width: 150px;" />-->
												<%=vo.get("CORP_REG_NO").equals("") ? StringUtils.getBizNo(params.get("corp_no")) : StringUtils.getBizNo(vo.get("CORP_REG_NO")) %>
											</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div id="p_head_corp_reg_n" class="td_title04">
										<ul>
											<li>본사 사업자번호</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="head_corp_reg_n" id="head_corp_reg_n" value="" maxlength="10" numberOnly="true"  style="width: 150px;" /></li>
										</ul>
									</div>
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="7"></td>
							</tr>
							<tr>
								<td>
									<div id="p_corp_no" class="td_title04" >
										<ul>
											<li>법인번호</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="copr_no" id="copr_no" value="<%=vo.get("copr_no") %>" maxlength="13" numberOnly="true" style="width: 150px;" /></li>
										</ul>
									</div>
								</td>
								<td bgcolor="#cccccc"></td>
								<td>
									<div class="td_title04">
										<ul>
											<li>사업장 관리번호</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#cccccc"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="sub_place_no" id="sub_place_no" value="" maxlength="11" numberOnly="true"style="width: 150px;" /></li>
										</ul>
									</div>
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="7"></td>
							</tr>
							<tr>
								<td>	
									<div class="td_title04 required">
										<ul>
											<li>업체명</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="corp_kor" id="corp_kor" value="<%=vo.get("corp_kor") %>" style="width: 150px;" /></li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>대표자명</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="rep_name" id="rep_name" value="<%=vo.get("rep_name") %>" style="width: 150px;" /></li>
											<li></li>
										</ul>
									</div>
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="7"></td>
							</tr>
							<tr>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>업태</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="corp_sts" id="corp_sts" value="<%=vo.get("corp_sts") %>" style="width: 150px;" /></li>
										</ul>
									</div>
								</td>
								<td bgcolor="#cccccc"></td>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>업종</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#cccccc"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="biz_form" id="biz_form" value="<%=vo.get("biz_form") %>" style="width: 150px;" /></li>
										</ul>
									</div>
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="7"></td>
							</tr>
							<tr>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>사업자구분</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div id="sheet_td">
										<ul>
											<li><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"/></li>
											<li>법인</li>
											<li><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"/></li>
											<li>개인</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#cccccc"></td>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>설립일자</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#cccccc"></td>
								<td>
									<div id="input01">
										<ul>
											<li><%= InputText.get("esta_date", vo.get("esta_date"), 23, 50, "hangule,left, desc=설립일자,ReadOnly") %></li>
											<li><img alt="달력" id="esta_date_img" name="date_img" src="/img/buyer/btn/bt_calender.gif" style="vertical-align: middle; cursor: pointer;"/></li>
										</ul>
									</div>
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="7"></td>
							</tr>
							<tr>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>전화번호</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="corp_tel" id="corp_tel" value="<%=vo.get("corp_tel") %>"  style="width: 150px;" maxlength="100" noHangelEng="true"/> <span style="color: red; font-size: 11px;">ex)000-0000-0000</span></li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>FAX번호</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="corp_fax" id="corp_fax" value="<%=vo.get("corp_fax") %>" style="width: 150px;" maxlength="100" noHangelEng="true"/> <span style="color: red; font-size: 11px;">ex)000-0000-0000</span></li>
										</ul>
									</div>
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="7"></td>
							</tr>
							<tr>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>회사규모</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div id="sheet_td">
										<ul>
										<%if(vo.get("corp_div_cd").equals("2")){%>
											<li><input type="radio" name="corp_scale" id="corp_scale_1" value="B"  disabled="disabled"/></li>
											<li>대기업</li>
											<li><input type="radio" name="corp_scale" id="corp_scale_2" value="S" checked="checked"  disabled="disabled"/></li>
											<li>중소기업</li>
										<%}else{ %>
											<li><input type="radio" name="corp_scale" id="corp_scale_1" value="B" <%=vo.get("corp_scale").equals("B") ? "checked=\"checked\"" : ""%> /></li>
											<li>대기업</li>
											<li><input type="radio" name="corp_scale" id="corp_scale_2" value="S"<%=vo.get("corp_scale").equals("S") ? "checked=\"checked\"" : ""%> /></li>
											<li>중소기업</li>
										<%} %>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>계좌정보</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div id="sheet_td">
										<ul>
										 <%=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: 200px;" />
												
										</ul>
									</div>
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="7"></td>
							</tr>
							<tr>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>본점 소재지</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td colspan="5">
									<div id="input01">
										<ul>
											<li>
												<%-- <input type="tet" 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"> --%>
												<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%;"/>
											</li>
											<li><img id="search_addr" name="search_addr" style="vertical-align: middle; cursor: pointer;" src="/img/buyer/btn/btn_add_find.gif" /></li>
										</ul>
									</div>
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="7"></td>
							</tr>
							<tr>
								<td>
									<div class="td_title04">
										<ul>
											<li>사업장 소재지</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td colspan="5">
									<div id="input01">
										<ul>
											<li>
												<%-- <input type="tet" 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"> --%>
												<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%;"/>
											</li>
											<li><img id="search_addr_sub" name="search_addr_sub" src="/img/buyer/btn/btn_add_find.gif" style="vertical-align: middle; cursor: pointer;" src="/img/buyer/btn/btn_add_find.gif" /></li>
										</ul>
									</div>
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="7"></td>
							</tr>
							<tr>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>세금계산서 발행주소</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td colspan="5">
									<div id="sheet_td">
										<ul>
											<li><input type="radio" name="tax_addr_cd" id="tax_addr_cd_1" value="B" checked="checked"/></li>
											<li>본사</li>
											<li><input type="radio" name="tax_addr_cd" id="tax_addr_cd_2" value="S"/></li>
											<li>사업장</li>
										</ul>
									</div>
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="7"></td>
							</tr>
							<%if(params.get("job_div").equals("P")){ %>
							<tr>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>공장유무</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="radio" name="factor_cd" id="factor_cd_1" value="1"  <%=vo.get("factor_cd").equals("1")  ? "checked=\"checked\"" : ""%>  /></li>
											<li>유</li>
											<%-- <li><input type="radio" name="factor_cd" id="factor_cd_2" value="2"  <%=vo.get("factor_cd").equals("2")  ? "checked=\"checked\"" : ""%> /></li>
											<li>임대공장</li> --%>
											<li><input type="radio" name="factor_cd" id="factor_cd_3" value="9"  <%=vo.get("factor_cd").equals("9")  ? "checked=\"checked\"" : ""%> /></li>
											<li>무</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div class="td_title04">
										<ul>
											<li>manufacturer 구분</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="radio" name="mftr_div_cd" id="mftr_div_cd_1" value="1"  <%=vo.get("mftr_div_cd").equals("1")  ? "checked=\"checked\"" : ""%> /></li>
											<li>manufacturer</li>
											<li><input type="radio" name="mftr_div_cd" id="mftr_div_cd_2" value="2"  <%=vo.get("mftr_div_cd").equals("2")  ? "checked=\"checked\"" : ""%> /></li>
											<li>agent</li>
										</ul>
									</div>
								</td>
							</tr>
							<%}else{ %>
							<tr>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>주력분야</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td colspan="5">
									<div id="input01">
										<ul>
											<li><input type="checkbox" name="out_main_cd" id="out_main_cd_1" value="31" style="vertical-align: middle;" />&nbsp;주택분야</li>
											<li><input type="checkbox" name="out_main_cd" id="out_main_cd_2" value="32" style="vertical-align: middle;" />&nbsp;공동주택</li>
											<li><input type="checkbox" name="out_main_cd" id="out_main_cd_3" value="33" style="vertical-align: middle;" />&nbsp;산업플랜트</li>
											<li><input type="checkbox" name="out_main_cd" id="out_main_cd_4" value="34" style="vertical-align: middle;" />&nbsp;발전플랜트</li>
											<li><input type="checkbox" name="out_main_cd" id="out_main_cd_5" value="35" style="vertical-align: middle;" />&nbsp;화공플랜트</li>
											<li><input type="checkbox" name="out_main_cd" id="out_main_cd_6" value="36" style="vertical-align: middle;" />&nbsp;환경플랜트</li>
											<li><input type="checkbox" name="out_main_cd" id="out_main_cd_7" value="37" style="vertical-align: middle;" />&nbsp;제약플랜트</li>
										</ul>
									</div>
								</td>
							</tr>
							<%} %>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="7"></td>
							</tr>
							<%if(params.get("job_div").equals("P")){ %>
							<tr>
								<td class="td_title04">
									<div>
										<ul>
											<li>첨부파일(공사지명원 외)</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td colspan="9">
									<div id="input01" style="height: 90px; margin-top: 3px;">
										<ul>
											<li >
												<textarea name="p_AttachFile1" id="p_AttachFile1" style="width:85%;height:80px" rows="1" class="input" readOnly><%=filein.get("TERMS_AGREE_INFO") %></textarea>
											</li>
											<li>
												<img id="search_spot_button" src='/img/buyer/button/bt_change.gif' border='0'  align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer; vertical-align: middle; margin-bottom: 20px;'>
											</li>
										</ul>
									</div>
								</td>
							</tr>
							<%}else{%>
							<tr >
								<td rowspan="3" style="background-color: rgb(244, 242, 243);">
									<div class="td_title04">
										<ul>
											<li>첨부파일</li>
										</ul>
									</div>
								</td>
								<td width="1" bgcolor="#cccccc"></td>
								<td colspan="5" id="input01">
									<table width="100%" border="0" cellpadding="0" cellspacing="0">
																<%
																	if(getFileListRowSet.size() > 0){
																		int i_mod = 0;
																		for(int i = 0; getFileListRowSet.size() > i; i++){
																			i_mod = i%3;
																			if(i_mod == 0){ %>
																				<TR>
																		<%	} %>
																					<td width="2%">
																					&nbsp;<input type="checkbox" name="<%=getFileListRowSet.getRow(i).get("DETAILSORTNM") %>" value="<%=getFileListRowSet.getRow(i).get("DETAILCD") %>" style="cursor:pointer;" onClick="fileCheck(this,'<%=getFileListRowSet.getRow(i).get("DETAILCD") %>')" <%if(!getFileListRowSet.getRow(i).get("DOC_CD").equals("")){out.print("checked");} %>>
																					</td>
																					<td width="26%">
																					&nbsp;<%=getFileListRowSet.getRow(i).get("DETAILNM") %>
																					</td>
																					<td width="5%" height="24">
																					<IMG src="/img/supplier/button/bt_attach_file.gif" id="<%=getFileListRowSet.getRow(i).get("DETAILCD") %>" alt="첨부파일 관리" align="top" style="display:<%if(!getFileListRowSet.getRow(i).get("DOC_CD").equals("")){out.print("inline");}else{out.print("none");} %>" onClick="doAttachFile(document.form1.corp_id, '<%=getFileListRowSet.getRow(i).get("DETAILCD") %>', '<%=getFileListRowSet.getRow(i).get("DETAILNM")%>');" class="button">
																					</td>
																		<%	if(i_mod == 2) { %>		
																				</TR>
																		<%	} %>		
																	<%
																		}
																		for(int i=i_mod+1; i<3; i++){ %>
																			<td></td>
																	<%	}
																		if(i_mod == 0 || i_mod == 1){ %>
																			</TR>	
																	<%	}
																	}
																%>
									</table>
								</TD>
							</tr>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="6"></td>
							</tr>
							<tr>
								<td colspan="6">
									<textarea name="p_AttachFile1" id="p_AttachFile1" style="width:99%;height:80px" rows="1" class="input" readOnly><%=filein.get("TERMS_AGREE_INFO") %></textarea>
								</td>
							</tr>
							<%}%>
						</table>
					</div>
				</td>
			</tr>
			<tr>
				<td height="1">&nbsp;</td>
			</tr>
			<tr>
				<td>
					<!--소타이틀-->
					<div id="title02" align="left">
						<img src="/img/buyer/title/t_17.gif" alt="신용평가사" />
					</div> <!--소타이틀끝-->
				</td>
			</tr>
			<tr>
				<td>
					<div id="table03" style="width: 100%;; height:113px;">
						<script>createIBSheet("sheet3","100%", "100%");</script>
					</div>
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td align="left">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td valign="top" style="width: 48%;">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td>
											<%if(params.get("job_div").equals("P")){ %>
											<img src="/img/buyer/title/t_04.gif" alt="공급ITEM'"/>
											<%}else{ %>
											<img src="/img/buyer/title/t_12.gif" alt="공종" style="width: 137px; height: 30px;" />
											<%} %>
										</td>
									</tr>
									<tr>
										<td>
											<div id="table01" style="width: 350px; height: 250px;">
												<script>createIBSheet("sheet1","100%", "100%");</script>
											</div>
										</td>
									</tr>
								</table>
							</td>
							<td width="40" align="center" valign="middle" style="padding-top: 30px;">
								<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" style="width: 42%;">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td>
											<%if(params.get("job_div").equals("P")){ %>
											<table width="100%" border="0" cellspacing="0" cellpadding="0">
											<tr>
											<td><img src="/img/buyer/title/t_05.gif" />
											</td>
											<td align="right"><span style="color: red; font-size: 11px;">* 공급ITEM 소분류를 더블클릭하면 등록희망 공급ITEM이 추가됩니다.</span></td>
											</tr>
											</table>
											<%}else{ %>
											<img src="/img/buyer/title/t_13.gif" alt="선택 공종" style="width: 137px; height: 30px;" />
											<%} %>
										</td>
									</tr>
									<tr>
										<td>
											<div id="table02" style="width: 510px;; height: 250px;">
												<script>createIBSheet("sheet2","100%", "100%");</script>
											</div>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td height="1">&nbsp;</td>
			</tr>
			<tr>
				<td>
					<!--소타이틀-->
					<div id="title02" align="left">
						<img src="/img/buyer/title/t_06.gif" alt="담당자 등록" />
					</div> <!--소타이틀끝-->
				</td>
			</tr>
			<tr>
				<td>
					<div id="table01">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<colgroup>
								<col style="width:100px"/>
								<col style="width:1px"/>
								<col/>
								<col style="width:1px"/>
								<col style="width:100px"/>
								<col style="width:1px"/>
								<col/>
								<col style="width:1px"/>
								<col style="width:100px"/>
								<col style="width:1px"/>
								<col/>
							</colgroup>
							<tr>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>ID</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="user_id" id="user_id" value="" style="width: 150px;" noHangel="true" /></li>
											<li><img src="/img/buyer/btn/btn_overlap.gif" name="btn_idChk" id="btn_idChk" style="cursor: pointer;" alt="아이디중복확인" /></li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>비밀번호</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="password" name="passwd" id="passwd" value="" style="width: 150px;" /></li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div class="td_title04 required">
										<ul>

											<li>비밀번호확인</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="password" name="re_passwd" id="re_passwd" style="width: 150px;" /></li>
										</ul>
									</div>
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="11"></td>
							</tr>
							<tr>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>담당자명</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="user_name" id="user_name" value="<%=vo.get("user_name") %>" style="width: 150px;" /></li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>부서명</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="division" id="division" value="<%=vo.get("division") %>" style="width: 150px;" /></li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>직위</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="position" id="position" value="<%=vo.get("position") %>" style="width: 150px;" /></li>
										</ul>
									</div>
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="11"></td>
							</tr>
							<tr>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>이메일</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="email" id="email" value="<%=vo.get("email") %>" style="width: 150px;" /></li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>전화번호</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="tel_num" id="tel_num" value="<%=vo.get("tel_num") %>" style="width: 150px;"  maxlength="15" noHangelEng="true" /></li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>FAX번호</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td>
									<div id="input01">
										<ul>
											<li><input type="text" name="fax_num" id="fax_num" value="<%=vo.get("fax_num") %>" style="width: 150px;" maxlength="15" noHangelEng="true"/></li>
										</ul>
									</div>
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#cccccc" colspan="11"></td>
							</tr>
							<tr>
								<td>
									<div class="td_title04 required">
										<ul>
											<li>휴대전화</li>
										</ul>
									</div>
								</td>
								<td bgcolor="#b5b29e"></td>
								<td colspan="5">
									<div id="input01">
										<ul>
											<li>
											&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")%>"/> 
<!-- 												<input type="text" style="width:150px;"/> -->
											</li>
										</ul>
									</div>
								</td>
							</tr>
						</table>
					</div>
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td align="center" height="50">
					<img src="/img/buyer/btn/btn_join02.gif" name="btn_save" id="btn_save" alt="다음" style="cursor: pointer;"/>
					<img src="/img/buyer/btn/btn_join03.gif" name="btn_cancel" id="btn_cancel" alt="등록취소" hspace="5" style="cursor: pointer;"/>
				</td>
			</tr>
		</table>
	<div id="footer" >
		<p><img src="/img/supplier/login/footer.gif"></p>
	</div>
	</div>
	

</form>
