<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ page import="java.io.*"%>
<%@ page import="com.eactive.eai.rms.common.login.SessionManager"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="/jsp/common/include/localemessage.jsp" %>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setHeader("Expires", "0");
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<jsp:include page="/jsp/common/include/css.jsp"/>
<jsp:include page="/jsp/common/include/script.jsp"/>
<script language="javascript" >
var srcGroup;
var tgtGroup;
var srcGrid ;
var tgtGrid ;
var url ='<c:url value="/onl/admin/rule/transformMan.json" />';

var isAdmin = "";

var srcCurRowId;
var tarCurRowId;
var srcSelectRowId;
var tarSelectRowId;
var srcSelectRowId2;
var tarSelectRowId2;

var returnUrl = getReturnUrlForReturn();
var roleString	= "<%=SessionManager.getRoleIdString(request)%>";

var selectName = "functionCombo";	// selectBox Name
function getSourceResult(cnvsnName){
	$.ajax({  
		type : "POST",
		url:url,
		dataType:"json",
		data:{cmd : 'LIST_TRANSFORM_SOURCE_RESULT', cnvsnName : cnvsnName},
		success:function(json){
			var data = json.rows;
			var src = null;
			var tgt = null;;
			var srcDesc = null;
			var tgtDesc = null;
			for ( var i = 0; i < data.length; i++) {
				if (data[i]['SOURCRSULTDSTCD'] == 'SRC_LAYOUT' ){
					src = data[i]['LOUTNAME'];
					srcDesc = data[i]['LOUTDESC'];
					$("input[name=srcLayout]").val(src);
					$("input[name=srcLayoutDesc]").val(srcDesc);
				}else if (data[i]['SOURCRSULTDSTCD'] == 'TGT_LAYOUT' ){
					tgt = data[i]['LOUTNAME'];
					tgtDesc = data[i]['LOUTDESC'];
					$("input[name=tgtLayout]").val(tgt);
					$("input[name=tgtLayoutDesc]").val(tgtDesc);
				}
			}
			if (src !=null){
				srcGrid.setGridParam( {url :url ,postData: { cmd : 'LIST_LAYOUT_ITEM', loutName: src } }).trigger("reloadGrid");
			}
			if (tgt !=null){
				tgtGrid.setGridParam( {url :url ,postData: { cmd : 'LIST_TRANSFORM_ITEM', loutName: tgt ,cnvsnName : cnvsnName} }).trigger("reloadGrid");
			}
			
		},
		error:function(e){
			alert(e.responseText);
		}
	}); 	
}

function addGroupTag(group,data){
	var result = data;
	var datas = data.split(".");
    var comp = datas[0];
    var arr = new Array();

	for(var i=1;i<datas.length;i++){
		comp = comp +"." +datas[i];
		if (group[comp] != undefined){
			//값이 있음
			arr.push(comp);
		}
	}
	for(var i=arr.length;i > 0;i--){
		var a =  arr.pop();
		result = result.substr(0,result.indexOf(a)+a.length) + "[*]"+ result.substring(result.indexOf(a)+a.length);
	}
	return result;
}

function setTgtCell(){
	var rowId = tgtGrid.getGridParam( "selrow" );
	tgtGrid.jqGrid('setCell',rowId,'CNVSNRSULTITEMPATHNAME',$('textarea[name=CNVSNRSULTITEMPATHNAME]').val());
	tgtGrid.jqGrid('setCell',rowId,'CNVSNCMDNAME',$('textarea[name=CNVSNCMDNAME]').val());
	tgtGrid.jqGrid('setCell',rowId,'CNVSNITEMBASCVAL',$('input[name=CNVSNITEMBASCVAL]').val() == "" ? null : $('input[name=CNVSNITEMBASCVAL]').val());
	tgtGrid.jqGrid('setCell',rowId,'CNVSNITEMSERNO',$('input[name=CNVSNITEMSERNO]').val());	
}
function detail(key)
{
	//sub combo
	$.ajax({  
		type : "POST",
		url:url,
		dataType:"json",
		data:{cmd : 'LIST_TRANSFORM4EAISVCNAME_COMBO',eaiSvcName : key},
		success:function(json){				
			$("select[name=transformForEaiSvcNameCombo]").html('');

			//transform combo 
			new makeOptions("CODE","NAME").setObj($("select[name=transformForEaiSvcNameCombo]")).setData(json.rows).setFormat(codeName3OptionFormat).setAttr("desc","NAME").rendering();
			
			//첫번째 select 가 선택되야 됨
			$("select[name=transformForEaiSvcNameCombo]").first().change();
		},
		error:function(e){
			alert(e.responseText);
		}
	});
}

//var layoutArgs = new Object(); //임시 주석처리sh

function layoutListPop(loutName, loutDesc, gridObj)
{
	var key = "";
	var args = new Object();
    args['loutName'] = $('input[name=' + loutName + ']').val();
    args['selLoutName'] = loutName;
	var urlLayout='<c:url value="/onl/admin/rule/transformMan.view"/>';
    urlLayout = urlLayout + "?cmd=LAYOUT";

    var result = showModal(urlLayout,args,800,708, function(arg){
    	var args = null;
        if(arg == null || arg == undefined ) {//chrome
            args = this.dialogArguments;
            args.returnValue = this.returnValue;
        } else {//ie
            args = arg;
        }
        
        if( !args || !args.returnValue ) return;
        
        var result = args.returnValue;
        
        if( result ) {
        	$("input[name=" + loutName + "]").val(result.key);
        	$("input[name=" + loutDesc + "]").val(result.loutDesc);
        	
        	gridObj.setGridParam( {url :url ,postData: { cmd : 'LIST_LAYOUT_ITEM', loutName: result.key } }).trigger("reloadGrid");
        }
    	
    });
}

//변환명에 있는 서비스코드와 if서비스 코드 매칭
function validation(){
	
	var eaiSvcName = $("input[name=eaiSvcName]").val();
	var idx = eaiSvcName.length;
	var cnvsnSvcName = $('select[name=transformForEaiSvcNameCombo]').val();
	var cnvsnSvcStr = cnvsnSvcName.split("_");
	eaiSvcName  = eaiSvcName.substring(0,idx-2);
	
	if(isAdmin == "Y"){
		return true;
	}
	
	if(eaiSvcName != cnvsnSvcStr[2]){
		alert("변환매핑코드와 체계가 다른 서비스코드가 선택되었습니다.\n" 
				+ "전문레이아웃변환매핑 코드 = " + cnvsnSvcStr[2]
				+ "\nTRANSFORM_[업무코드]_[거래코드]_[변환구분] \n" 
				+ "IF 서비스코드 거래코드 = " + eaiSvcName
				+ "\n다시확인해주세요\n");
		return false;
	}else{
		return true;
	}
	
}


function tgtGridSelect(loutitempath, rowId){
	
	var ids = $("#targetLayout").jqGrid('getDataIDs');
	var tarItempath ;
	
	//console.log("항목명 :"+loutitempath)
	
	for ( var i = 0 ; i < ids.length; i++) {
		tarItempath = $('#targetLayout').jqGrid('getCell', ids[i],'CNVSNCMDNAME'); 	//rowData.id;
		tarItempath = tarItempath.replace("[*]","");
		loutitempath = loutitempath.replace("[*]","");
		//console.log("타겟항목명 :"+tarItempath)
		
		if(loutitempath != '' && tarItempath.indexOf(loutitempath) > -1){
			tarSelectRowId = ids[i];
			srcSelectRowId = rowId;
			
			if(tarSelectRowId2 != ids[i]){
				$("#targetLayout tr[id="+ids[i]+"]").css("background-color","#BBEEEE");
			}
			if(srcSelectRowId2 != rowId){
				$("#sourceLayout tr[id="+rowId+"]").css("background-color","#BBEEEE");
			}
		}else{
			if(tarCurRowId != ids[i]){
				$("#targetLayout tr[id="+ids[i]+"]").css("background-color","#FFFFFF");
			}
			
		}
 	}
}


function srcGridSelect(loutitempath , rowId){
	
	var ids = $("#sourceLayout").jqGrid('getDataIDs');
	var srcItempath ;
	
	//ascii2ebcdic(removepoint(BFF_KFK128BK61_REQ1.InData.주택사용총면적,5,2)) //ascii2ebcdic(EAI_XML_ERR.OutData.RpsntErrInfo.ErrmsgTreatCd)
	if(loutitempath.indexOf("(") > -1){  
		var startIndex = loutitempath.lastIndexOf("(");
		var lastIndex = loutitempath.lastIndexOf(")");
		loutitempath = loutitempath.substring(startIndex+1,lastIndex);
	}
	
	if(loutitempath.indexOf(",") > -1){  //EAI_XML_ERR.OutData.RpsntErrInfo.ErrmsgTreatCd,3
		var lastIndex = loutitempath.indexOf(",");
		loutitempath = loutitempath.substring(0,lastIndex);
	}
	
	loutitempath = loutitempath.replace("[*]","");
	//console.log("변환명령 :"+loutitempath)
	
	for ( var i = 0 ; i < ids.length; i++) {
		srcItempath = $('#sourceLayout').jqGrid('getCell', ids[i],'LOUTITEMPATH'); 	//항목명
		srcItempath = srcItempath.replace("[*]","");
		//console.log("항목명 :"+srcItempath)
		if(loutitempath != '' && loutitempath == srcItempath){
			srcSelectRowId2 = ids[i];
			tarSelectRowId2 = rowId;
			
			if(srcSelectRowId != ids[i]){
				$("#sourceLayout tr[id="+ids[i]+"]").css("background-color","#EDD5DD");
			}
			if(tarSelectRowId != rowId){
				$("#targetLayout tr[id="+rowId+"]").css("background-color","#EDD5DD");
			}
		}else{
			if(srcCurRowId != ids[i]){
				$("#sourceLayout tr[id="+ids[i]+"]").css("background-color","#FFFFFF");
			}
		}
 	}
}


$(document).ready(function() {	
	$("input[name=verInfo]").val("${param.verInfo}");
	
	//combo
	$.ajax({  
		type : "POST",
		url:url,
		dataType:"json",
		data:{cmd : 'LIST_INIT_COMBO',eaiSvcName: '${param.eaiSvcName}'},
		success:function(json){
			isAdmin = json.isAdmin;
			//eaiSvcName combo
			$("input[name=eaiSvcName]").val('${param.eaiSvcName}');
			$("input[name=eaiSvcDesc]").val('${param.eaiSvcDesc}');
			//transform combo 
			new makeOptions("CODE","NAME").setObj($("select[name=transformForEaiSvcNameCombo]")).setData(json.transformRows).setFormat(codeOptionFormat).setAttr("desc","NAME").rendering();
			//function combo
			new makeOptions("CODE","NAME").setObj($("select[name=functionCombo]")).setData(json.functionRows).setNoValueInclude(true).setNoValue("", "<%=localeMessage.getString("transformManDetail.none")%>").setFormat(codeName3OptionFormat).rendering();

			new makeOptions("CODE","NAME").setObj($("select[name=cnvsnTypeCombo]")).setData(json.cnvsnType).setFormat(codeName3OptionFormat).rendering();
			new makeOptions("CODE","NAME").setObj($("select[name=eaiSevrDStcd]")).setData(json.svrDstcd).setFormat(codeName3OptionFormat).rendering();
			new makeOptions("CODE","NAME").setObj($("select[name=useYn]")).setData(json.useYnRows).setFormat(codeName3OptionFormat).rendering();
			$("select[name=eaiSevrDStcd]").val('${param.eaiSevrDStcd}');
			$("select[name=useYn]").val('${param.useYn}');
			//setSearchable(selectName);	// 콤보에 searchable 설정
			if(json.transformRows.length == 0){
				$("select[name=transformForEaiSvcNameCombo]").append("<option value='"+"${param.cnvsnName}"+"'>"+"${param.cnvsnName}"+"</option>");
				$("input[name=cnvsnDesc]").val(("${param.cnvsnDesc}"!="undefined")?"${param.cnvsnDesc}":"");
				
			}else{
				$("select[name=transformForEaiSvcNameCombo]").val("${param.cnvsnName}").change();
				$("input[name=cnvsnDesc]").val($("select[name=transformForEaiSvcNameCombo] option:selected").attr("desc"));
			}
			getSourceResult("${param.cnvsnName}");
		
		},
		error:function(e){
			alert(e.responseText);
		}
	}); 

	
	
	srcGrid = $("#sourceLayout");
	srcGrid.jqGrid({
		//url: '<c:url value="/onl/admin/rule/transformMan.json" />',
		//postData : { cmd : 'LAYOUT_ITEM', loutName: 'LAC_BBSA311_CBSS'},			    
	    datatype:'json',
	    loadui: "disable",
	    mtype: 'POST',
	    colNames: [
	    	"id",
	    	'<%=localeMessage.getString("transformManDetail.srcItemName")%>',
	    	'<%=localeMessage.getString("transformManDetail.srcItemDesc")%>',
	    	'<%=localeMessage.getString("transformManDetail.num")%>',
	    	'<%=localeMessage.getString("transformManDetail.nodeType")%>',
	    	'<%=localeMessage.getString("transformManDetail.itemType")%>',
	    	"LOUTITEMNODEPTRNIDNAME",
	    	"LOUTITEMPTRNIDNAME",
	    	"LOUTITEMPATH",
	    	"LOUTNAME",
	    	"LOUTITEMMAXOCCURNOITM",
	    	"LOUTITEMREFINFO2"
	    	],
	    colModel: [
	        {name: "id"                     , hidden:true,key:true},
	        {name: "LOUTITEMNAME"           , width:"250"},
	        {name: "LOUTITEMDESC"                      },
	        {name: "LOUTITEMSERNO"          , width:"30"},
	        {name: "LOUTITEMNODEPTRNIDDESC" , width:"60"},
	        {name: "LOUTITEMPTRNIDDESC"     , width:"80"},
	        {name: "LOUTITEMNODEPTRNIDNAME" , hidden:true},
	        {name: "LOUTITEMPTRNIDNAME"     , hidden:true},
	        {name: "LOUTITEMPATH"           , hidden:true},
	        {name: "LOUTNAME"               , hidden:true},
	        {name: "LOUTITEMMAXOCCURNOITM"  , hidden:true},
	        {name: "LOUTITEMREFINFO2"       , hidden:true}
	        
			],
	    treeGrid: true,
	    treeGridModel: "adjacency",
	    ExpandColumn: "LOUTITEMNAME",
	    height:"280",
	    width: "760",
	    //direction:"rtl",
	    rowNum: 10000,
	    //autowidth: true,

	    //ExpandColClick: true,
	    treeIcons: {leaf:'ui-icon-document-b'},
	    jsonReader: {
	        repeatitems: false
	    },
	    loadComplete:function (d){
	    	var data = d.rows;
			srcGroup = new Object();
			for ( var i = 0; i < data.length; i++) {
				//if (data[i]["LOUTITEMREFINFO2"] == null) continue;
				if (data[i]["LOUTITEMPATH"].length > 0 
					&& (data[i]["LOUTITEMNODEPTRNIDNAME"] == "2202")
					&& (data[i]["LOUTITEMMAXOCCURNOITM"] > 1
							|| ( data[i]["LOUTITEMREFINFO2"] != null && data[i]["LOUTITEMREFINFO2"].trim().length > 1 )
	             )
					)  {
					srcGroup[data[i]["LOUTITEMPATH"]]= data[i]["LOUTITEMPATH"];
					}
			}
// 			for(var key in srcGroup){
// 				if(srcGroup.hasOwnProperty(key)){
// 					console.log(key+"="+srcGroup[key]);
// 				}
// 			}
			//select box 에 추가
			$("select[name=cnvsnCmdCombo]").html("");
			for ( var i = 0; i < data.length; i++) {
				if (data[i]['LOUTITEMNODEPTRNIDNAME'] != "2203" && data[i]['LOUTITEMNODEPTRNIDNAME'] != "2204") continue;
				var str = new makeOptions("CODE","NAME").setData(addGroupTag(srcGroup,data[i]['LOUTITEMPATH']),addGroupTag(srcGroup,data[i]['LOUTITEMDESC'])).setFormat(codeName3OptionFormat).getOption();
				
				$("select[name=cnvsnCmdCombo]").append(str);
			}
	    },
        loadError: function (jqXHR, textStatus, errorThrown) {
        	 if(jqXHR.status == 401) {
 	    		alert('HTTP status code: ' + jqXHR.status + '\n' +
 	                    '에러:  세션이 종료되었습니다. ');
 	    		parent.location.href='<%=request.getContextPath()%>/';	
 	    	}
	    }, 
	    onSelectRow: function(rowId) {
			var rowData = $(this).getRowData(rowId); 
			
			$('select[name=cnvsnCmdCombo]').val(addGroupTag(srcGroup,rowData['LOUTITEMPATH']));
			
			//색상변경 추가
			srcCurRowId = rowId;
			
			var ids = $("#sourceLayout").jqGrid('getDataIDs');
			for ( var i = 0 ; i < ids.length; i++) {
				if(rowId != ids[i]  && srcSelectRowId2 != ids[i]){
					$("#sourceLayout tr[id="+ids[i]+"]").css("background-color","#FFFFFF");
				}
			}
			
			var loutitemnodeptrnidname = $("#sourceLayout").jqGrid("getCell", rowId, "LOUTITEMNODEPTRNIDNAME");
   			if (loutitemnodeptrnidname == "2203" || loutitemnodeptrnidname == "2204"){
   	   			
   	   			var selectValue = $('select[name=cnvsnCmdCombo]').val();   //변환명령 콤보
   				tgtGridSelect(selectValue, rowId);
   	   		
   			}
			
       }
	});
	tgtGrid = $("#targetLayout");
	tgtGrid.jqGrid({
		//url: '<c:url value="/onl/admin/rule/transformMan.json" />',
		//postData : { cmd : 'LAYOUT_ITEM', loutName: 'LAC_BBSA311_ORGS'},			    
	    datatype:'json',
	    loadui: "disable",
	    mtype: 'POST',
	    colNames: [
	    	"id",
	    	'<%=localeMessage.getString("transformManDetail.tgtItemName")%>',
	    	'<%=localeMessage.getString("transformManDetail.tgtItemDesc")%>',
	    	'<%=localeMessage.getString("transformManDetail.num")%>',
	    	'<%=localeMessage.getString("transformManDetail.nodeType")%>',
	    	'<%=localeMessage.getString("transformManDetail.itemType")%>',
	    	"LOUTITEMNODEPTRNIDNAME",
	    	"LOUTITEMPTRNIDNAME",
	    	"LOUTITEMPATH",
	    	"LOUTNAME",
	    	"CNVSNNAME",
	    	"CNVSNRSULTITEMPATHNAME" ,
	    	'<%=localeMessage.getString("transformManDetail.transCmdName")%>',
	    	"CNVSNITEMBASCVAL",
	    	"CNVSNITEMSERNO"
	              ],
	    colModel: [
	        {name: "id"                     , hidden:true,key:true},
	        {name: "LOUTITEMNAME"           , width:"250" },
	        {name: "LOUTITEMDESC"            },
	        {name: "LOUTITEMSERNO"          , width:"30" },
	        {name: "LOUTITEMNODEPTRNIDDESC" , width:"60" },
	        {name: "LOUTITEMPTRNIDDESC"     , width:"80" },
	        {name: "LOUTITEMNODEPTRNIDNAME" , hidden:true},
	        {name: "LOUTITEMPTRNIDNAME"     , hidden:true},
	        {name: "LOUTITEMPATH"           , hidden:true},
	        {name: "LOUTNAME"               , hidden:true},

	        {name: "CNVSNNAME"              , hidden:true}, //변환 명
	        {name: "CNVSNRSULTITEMPATHNAME" , hidden:true}, //타겟 항목명
	        {name: "CNVSNCMDNAME"           , width:"400"}, //변환 명령
	        {name: "CNVSNITEMBASCVAL"       , hidden:true}, //기본값
	        {name: "CNVSNITEMSERNO"         , hidden:true}  //매핑순서
	    ],
	    treeGrid: true,
		treeIcons : {
			plus: "ui-icon-circlesmall-plus",
			minus: "ui-icon-circlesmall-minus",
			leaf : "ui-icon-document"
		},		    
	    treeGridModel: "adjacency",
	    ExpandColumn: "LOUTITEMNAME",
	    height:"280",
	    width: "760",
	    rowNum: 10000,
	    //ExpandColClick: true,
	    treeIcons: {leaf:'ui-icon-document-b'},
	    jsonReader: {
	        repeatitems: false
	    },
	    loadComplete:function (d){
	    	var data = d.rows;
	    	if(!data.length){
	    		$("#btn_cnvsnDetail").hide();
	    	}
				tgtGroup = new Object();
				for ( var i = 0; i < data.length; i++) {
						if (data[i]["LOUTITEMPATH"].length > 0 
							&& (data[i]["LOUTITEMNODEPTRNIDNAME"] == "2202")
							&& (data[i]["LOUTITEMMAXOCCURNOITM"] > 1
							        || ( data[i]["LOUTITEMREFINFO2"] != null && data[i]["LOUTITEMREFINFO2"].trim().length > 1 )
			           )
						)  {
							tgtGroup[data[i]["LOUTITEMPATH"]]= data[i]["LOUTITEMPATH"];
						}
				}
				
	    },
	    loadBeforeSend : function (xhr,settings){
			if(this.p.url ==null || this.p.url == ""){
				this.p.loadBeforeSend = null;
				return false;
			}
		},
        loadError: function (jqXHR, textStatus, errorThrown) {
        	var location ='<%=request.getContextPath()%>/';
	        comloadError(jqXHR, textStatus, errorThrown ,location);
    	},   
    	onSelectRow: function(rowId) {
			var rowData = $(this).getRowData(rowId); 
			$('textarea[name=CNVSNRSULTITEMPATHNAME]').val(rowData['CNVSNRSULTITEMPATHNAME']);//
			$('textarea[name=CNVSNCMDNAME]').val(rowData['CNVSNCMDNAME']);
			$('input[name=CNVSNITEMBASCVAL]').val(rowData['CNVSNITEMBASCVAL']);
			$('input[name=CNVSNITEMSERNO]').val(rowData['CNVSNITEMSERNO']);
			
			//색상변경 추가
			tarCurRowId = rowId;
			
			var ids = $("#targetLayout").jqGrid('getDataIDs');
			for ( var i = 0 ; i < ids.length; i++) {
				if(tarSelectRowId != ids[i]  && ids[i] != rowId ){
					$("#targetLayout tr[id="+ids[i]+"]").css("background-color","#FFFFFF");
				}
			}
			var loutitemnodeptrnidname = $("#targetLayout").jqGrid("getCell", rowId, "LOUTITEMNODEPTRNIDNAME");
			
  			if (loutitemnodeptrnidname == "2203" || loutitemnodeptrnidname == "2204"){
	  	   		var selectValue = $("#targetLayout").jqGrid("getCell", rowId, "CNVSNCMDNAME"); //변환명령
  				srcGridSelect(selectValue , rowId);
  			}
       }
	});
	//resizeJqGridWidth('sourceLayout','sourceLayoutTd','1000');		
	//resizeJqGridWidth('targetLayout','targetLayoutTd','1000');
	
	$("#btn_search").click(function(){
		var key = "";
		var args = new Object();
    	args['eaiSvcName'] = $('input[name=eaiSvcName]').val();
	    var url='<c:url value="/onl/transaction/extnl/interfaceMan.view"/>';
	    url = url + "?cmd=POPUP";
	    var ret = showModal(url,args,1020,630, function(arg){
	    	var args = null;
	        if(arg == null || arg == undefined ) {//chrome
	            args = this.dialogArguments;
	            args.returnValue = this.returnValue;
	        } else {//ie
	            args = arg;
	        }
	        
	        if( !args || !args.returnValue ) return;
	        
	        var ret = args.returnValue;
	    	
			key = ret['key'];
			
			$("input[name=eaiSvcName]").val(key);
			$("input[name=eaiSvcDesc]").val(ret['eaiSvcDesc']);
			
			if(!$("input:checkbox[name=chk_eaiSvcName]").is(":checked"))
				detail(key);
			
	    });
	});
	
	$("#btn_searchSrcLout").click(function(){
		layoutListPop("srcLayout", "srcLayoutDesc", srcGrid);
	});
	$("#btn_searchTgtLout").click(function(){
		layoutListPop("tgtLayout", "tgtLayoutDesc", tgtGrid);
	});
		
	$("input[name=auto]").click(function(){
	    var sourceData = srcGrid.getRowData();
	    var targetData = tgtGrid.getRowData();

		var selectValue = "";
		var targetValue = "";
		for ( var i = 0; i < sourceData.length; i++) {
			if (sourceData[i]['LOUTITEMNODEPTRNIDNAME'] != "2203" && sourceData[i]['LOUTITEMNODEPTRNIDNAME'] != "2204") continue;
			selectValue = (sourceData[i]['LOUTITEMPATH']).substr(sourceData[i]['LOUTNAME'].length+1);
			for (var j = 0; j <targetData.length; j++) {
				if (targetData[j]['LOUTITEMNODEPTRNIDNAME'] != "2203" && targetData[j]['LOUTITEMNODEPTRNIDNAME'] != "2204") continue;
				targetValue = (targetData[j]['LOUTITEMPATH']).substr(targetData[j]['LOUTNAME'].length+1);
				if (targetValue == selectValue ) {
					var data = sourceData[i]['LOUTITEMPATH'];
					var tgtRowId = targetData[j]['id'];
					
					var cnvsnCmdName = addGroupTag(srcGroup,data);
					
					// function까지 처리되도록 수정했으나, parameter가 하나인 경우에만 정상처리됨
					if($('select[name=functionCombo]').val() != "") cnvsnCmdName = $('select[name=functionCombo]').val() + "(" + cnvsnCmdName + ")";
					
					tgtGrid.jqGrid('setCell',tgtRowId,'CNVSNCMDNAME',cnvsnCmdName);
					
					tgtGrid.jqGrid('setCell',tgtRowId,'CNVSNRSULTITEMPATHNAME',addGroupTag(tgtGroup,targetData[j]['LOUTITEMPATH']));
					tgtGrid.jqGrid('setCell',tgtRowId,'CNVSNITEMSERNO',targetData[j]['LOUTITEMSERNO']);
					break;
				}
			}
		}
	});	

	$("input[name=add]").click(function(){

	 	var srcRowId = srcGrid.getGridParam( "selrow" );
	 	var tgtRowId = tgtGrid.getGridParam( "selrow" );
	 	
	 	if (srcRowId == null) {alert('<%=localeMessage.getString("transformManDetail.alert1")%>');return;}
	 	if (tgtRowId == null) {alert('<%=localeMessage.getString("transformManDetail.alert2")%>');return;}
	 	
	 	//field, ATTR 여부 판단
	 	var sourceRow = srcGrid.getRowData( srcRowId );
	 	var targetRow = tgtGrid.getRowData( tgtRowId );
	 	if ( (sourceRow["LOUTITEMNODEPTRNIDNAME"] == '2203' || sourceRow["LOUTITEMNODEPTRNIDNAME"] == '2204') &&
	 		 (targetRow["LOUTITEMNODEPTRNIDNAME"] == '2203' || targetRow["LOUTITEMNODEPTRNIDNAME"] == '2204') ){
	 		;
	 	}else{
	 		alert("ATTR, "+'<%=localeMessage.getString("transformManDetail.alert3")%>');
	 		return ;
		}
	 	tgtGrid.jqGrid('setCell',tgtRowId,'CNVSNCMDNAME',addGroupTag(srcGroup,sourceRow["LOUTITEMPATH"]));
	 	tgtGrid.jqGrid('setCell',tgtRowId,'CNVSNRSULTITEMPATHNAME',addGroupTag(tgtGroup,targetRow["LOUTITEMPATH"]));
		tgtGrid.jqGrid('setCell',tgtRowId,'CNVSNITEMSERNO',targetRow['LOUTITEMSERNO']);
	 	
	 	tgtGrid.jqGrid("setSelection",tgtRowId, true);
	});
	$("input[name=addAll]").click(function(){
	 	var srcRowId = srcGrid.getGridParam( "selrow" );
	 	var tgtRowId = tgtGrid.getGridParam( "selrow" );
	 	if (srcRowId == null) {alert('<%=localeMessage.getString("transformManDetail.alert1")%>');return;}
	 	if (tgtRowId == null) {alert('<%=localeMessage.getString("transformManDetail.alert2")%>');return;}
	 	
	 	
	 	//field, ATTR 여부 판단
	 	var sourceRow = srcGrid.getRowData( srcRowId );
	 	var targetRow = tgtGrid.getRowData( tgtRowId );
	 	if ( (sourceRow["LOUTITEMNODEPTRNIDNAME"] == '2203' || sourceRow["LOUTITEMNODEPTRNIDNAME"] == '2204') &&
		 		 (targetRow["LOUTITEMNODEPTRNIDNAME"] == '2203' || targetRow["LOUTITEMNODEPTRNIDNAME"] == '2204')  ){
	 		;
	 	}else{
	 		alert("ATTR, "+'<%=localeMessage.getString("transformManDetail.alert3")%>');
	 		return ;
		}	 	
	 	//grid data
	    var sourceData = srcGrid.getRowData();
	    var targetData = tgtGrid.getRowData();
	 	
	 	
	 	//grid index
		var srcIndex = srcGrid.jqGrid('getInd',srcRowId);
		var tgtIndex = tgtGrid.jqGrid('getInd',tgtRowId);

	 	
	 	var selectValue = "";
		var targetValue = "";
		var j=tgtIndex-1-1;
		for ( var i = srcIndex-1; i < sourceData.length; i++) {
			if (sourceData[i]['LOUTITEMNODEPTRNIDNAME'] != "2203" && sourceData[i]['LOUTITEMNODEPTRNIDNAME'] != "2204") continue;
			j++;
			while (targetData.length -1 >= j &&targetData[j]["LOUTITEMNODEPTRNIDNAME"] != "2203" && targetData[j]["LOUTITEMNODEPTRNIDNAME"] != "2204"){
				j++;
			}
			if (targetData.length -1 < j) break;
			var rowId = targetData[j]['id'];
			
			var cnvsnCmdName = addGroupTag(srcGroup,sourceData[i]['LOUTITEMPATH']);
			
			// function까지 처리되도록 수정했으나, parameter가 하나인 경우에만 정상처리됨
			if($('select[name=functionCombo]').val() != "") cnvsnCmdName = $('select[name=functionCombo]').val() + "(" + cnvsnCmdName + ")";
			
			tgtGrid.jqGrid('setCell',rowId,'CNVSNCMDNAME', cnvsnCmdName);
			tgtGrid.jqGrid('setCell',rowId,'CNVSNRSULTITEMPATHNAME',addGroupTag(tgtGroup,targetData[j]['LOUTITEMPATH']));
			tgtGrid.jqGrid('setCell',rowId,'CNVSNITEMSERNO',targetData[j]['LOUTITEMSERNO']);
			
	 	}
	 	tgtGrid.jqGrid("setSelection",tgtRowId, true);
	});
	$("input[name=remove]").click(function(){
	 	var tgtRowId = tgtGrid.getGridParam( "selrow" );
	 	if (tgtRowId == null) {alert('<%=localeMessage.getString("transformManDetail.alert2")%>');return;}
	 	tgtGrid.jqGrid('setCell',tgtRowId,'CNVSNCMDNAME',null);
	 	tgtGrid.jqGrid('setCell',tgtRowId,'CNVSNRSULTITEMPATHNAME',null);
	 	tgtGrid.jqGrid('setCell',tgtRowId,'CNVSNITEMSERNO',null);
	 	tgtGrid.jqGrid('setCell',tgtRowId,'CNVSNITEMBASCVAL',null);
	 	tgtGrid.jqGrid("setSelection",tgtRowId, true);
	 	
	});	
	$("input[name=removeAll]").click(function(){
	 	var tgtRowId = tgtGrid.getGridParam( "selrow" );
	 	if (tgtRowId == null) {alert('<%=localeMessage.getString("transformManDetail.alert2")%>');return;}
		//grid data
		var targetData = tgtGrid.getRowData();
		//grid index
		var tgtIndex = tgtGrid.jqGrid('getInd',tgtRowId);

		for ( var i = tgtIndex-1; i < targetData.length; i++) {
			var rowId = targetData[i]['id'];
			tgtGrid.jqGrid('setCell',rowId,'CNVSNCMDNAME',null);
			tgtGrid.jqGrid('setCell',rowId,'CNVSNRSULTITEMPATHNAME',null);
		 	tgtGrid.jqGrid('setCell',rowId,'CNVSNITEMSERNO',null);
		 	tgtGrid.jqGrid('setCell',rowId,'CNVSNITEMBASCVAL',null);
			
	 	}
	 	tgtGrid.jqGrid("setSelection",tgtRowId, true);
	 	
	});	

	$("textarea[name=CNVSNRSULTITEMPATHNAME],textarea[name=CNVSNCMDNAME],input[name=CNVSNITEMBASCVAL],input[name=CNVSNITEMSERNO]").blur(function(){
		var rowId = tgtGrid.getGridParam( "selrow" );
		if (isNull(rowId)) return;
		setTgtCell();
		
	});	
	
	$("select[name=transformForEaiSvcNameCombo]").change(function(){
		if($("input[name=cnvsnDesc]").val() == ""){
			$("input[name=cnvsnDesc]").val($("select[name=transformForEaiSvcNameCombo] option:selected").attr("desc"));
		}
		var data = $("select[name=transformForEaiSvcNameCombo]").val();
		
		if(data == null) return;
		data = data.substr(data.length-3,3);
		$("select[name=cnvsnTypeCombo]").val(data.trim());
		$("select[name=cnvsnTypeCombo]").attr("disabled",true);
		$("select[name=eaiSevrDStcd]").attr("disabled",true);
		/* $("select[name=cnvsnTypeCombo] option:selected").each(function(){
			$(this).removeAttr("selected");
			$(this).attr("disabled","disabled");
		}); */
		getSourceResult($("select[name=transformForEaiSvcNameCombo]").val());
		
	});	
	$("#btn_previous").click(function(){
		goNav(returnUrl);//LIST로 이동
	});	
	$("#btn_modify").click(function(){
		//disabled 해제
		$("select[name=cnvsnTypeCombo]").attr("disabled",false);
		$("select[name=eaiSevrDStcd]").attr("disabled",false);
		
		if(!validation()) return;
		
	    var targetData = tgtGrid.getRowData();
		var gridData                = new Array();
		for (var i = 0; i <targetData.length; i++) {
			if ((targetData[i]['LOUTITEMNODEPTRNIDNAME'] != "2203") && (targetData[i]['LOUTITEMNODEPTRNIDNAME'] != "2204")) continue;
			if (targetData[i]['CNVSNCMDNAME']==null 
					|| targetData[i]['CNVSNCMDNAME']== undefined 
					|| targetData[i]['CNVSNCMDNAME'].trim() =="" 
					) continue;
			
			gridData.push(tgtGrid.jqGrid('getRowData', targetData[i]['id']));
			
		}
		var postData = [];
		postData.push({ name: "cmd"           , value:"UPDATE"});
		postData.push({ name: "eaiSvcName"    , value:$("input[name=eaiSvcName]").val()});
		postData.push({ name: "cnvsnName"     , value:$("select[name=transformForEaiSvcNameCombo]").val()});
		postData.push({ name: "cnvsnDesc"     , value:$("input[name=cnvsnDesc]").val()});
		postData.push({ name: "cnvsnType"     , value:$("select[name=cnvsnTypeCombo]").val()});
		postData.push({ name: "eaiSevrDStcd"  , value:$("select[name=eaiSevrDStcd]").val()});
		postData.push({ name: "chkForce"      , value:$("input:checkbox[name=chk_eaiSvcName]").is(":checked")});
		postData.push({ name: "srcLayoutName" , value:$("input[name=srcLayout]").val()});
		postData.push({ name: "tgtLayoutName" , value:$("input[name=tgtLayout]").val()});
		postData.push({ name: "useYn" 		  , value:$("select[name=useYn]").val()});
		postData.push({ name: "verInfo" 	  , value:$("input[name=verInfo]").val()});
		postData.push({ name: "gridData"      , value:JSON.stringify(gridData)});
		$.ajax({
			type : "POST",
			url:url,
			data:postData,
			success:function(args){
				alert('<%=localeMessage.getString("common.saveMsg")%>');
				goNav(returnUrl);//LIST로 이동
			},
			error:function(e){
				alert(e.responseText);
			}
		});
	});

	$("#btn_delete").click(function(){
		if(confirm("<%= localeMessage.getString("common.confirmMsg")%>")){ 
			var postData = [];
			
			postData.push({ name: "cmd"       , value:"DELETE"});
			postData.push({ name: "eaiSvcName", value:$("input[name=eaiSvcName]").val()});
			postData.push({ name: "cnvsnName" , value:$("select[name=transformForEaiSvcNameCombo]").val()});
			postData.push({ name: "cnvsnType" , value:$("select[name=cnvsnTypeCombo]").val()});
			
			$.ajax({
				type : "POST",
				url:url,
				data:postData,
				success:function(args){
					alert('<%=localeMessage.getString("common.deleteMsg")%>');
					goNav(returnUrl);//LIST로 이동

				},
				error:function(e){
					alert(e.responseText);
				}
			});
		}else{
				return false;
		}
		
	});		
	$("input[name=addCmd]").click(function(){
		var rowId = tgtGrid.getGridParam( "selrow" );
		var targetRow = "";
		var cnvsnCmdName = "";
		
		if (isNull(rowId)){
			alert('<%=localeMessage.getString("transformManDetail.alert4")%>');
			return;
		}
		
		targetRow = tgtGrid.getRowData( rowId );	// 타겟 그리드에서 선택된 ROW 값
		rowId = srcGrid.getGridParam( "selrow" );
		if (isNull(rowId)){
			alert('<%=localeMessage.getString("transformManDetail.alert5")%>');
			return;
		}
		
		cnvsnCmdName = $('select[name=cnvsnCmdCombo]').val();
		
		if($('select[name=functionCombo]').val() != "") cnvsnCmdName = $('select[name=functionCombo]').val() + "(" + cnvsnCmdName + ")";
		
		$('textarea[name=CNVSNCMDNAME]').val(cnvsnCmdName);
		$('textarea[name=CNVSNRSULTITEMPATHNAME]').val(addGroupTag(tgtGroup,targetRow["LOUTITEMPATH"]));
		$('input[name=CNVSNITEMSERNO]').val(targetRow['LOUTITEMSERNO']);
		
		setTgtCell();
	});	
	
	$("#btn_initialize").click(function(){
		$.ajax({  
			type : "POST",
			url:url,
			dataType:"json",
			data:{cmd: 'INITIALIZE',cnvsnName:$("select[name=transformForEaiSvcNameCombo]").val()},
			success:function(json){
				alert(json.message);
			},
			error:function(e){
				alert(e.responseText);
			}
		});		
		
	});
	
	$("input[name=eaiSvcName],[name=srcLayout],[name=tgtLayout]").keydown(function(key){
		if (key.keyCode == 13){
			if($(this).attr("name") == "eaiSvcName") $("#btn_search").click();
			if($(this).attr("name") == "srcLayout") $("#btn_searchSrcLout").click();
			if($(this).attr("name") == "tgtLayout") $("#btn_searchTgtLout").click();
		}
	});
	
	$("input[name=srcLayout],[name=tgtLayout]").dblclick(function(){
		var layoutName = $(this).val();
		if($.trim(layoutName) =="") return;

		 var args = new Object();

		var url = '<c:url value="/onl/admin/rule/layoutMan.view" />';
		url += "?cmd=DETAILPOPUP";
        url += '&loutName='+layoutName;
        url += '&pop=true';
	    
	    showModal(url,args,1200,800); 
	});
	
	$("#btn_cnvsnDetail").click(function(){
		var cnvsnName = $("select[name=transformForEaiSvcNameCombo]").val();	//변환매핑 코드
		var tgtLayout =$("input[name=tgtLayout]").val();
		var srcLayout =$("input[name=srcLayout]").val();
		
		var url2 = '<c:url value="/onl/admin/rule/transformMan.view" />';
		var args = new Object();
	    url2 = url2 + "?cmd=DETAIL POPUP";
	    url2 += '&cnvsnName='+cnvsnName;
	    url2 += '&tgt_layout='+tgtLayout;
	    url2 += '&src_layout='+srcLayout;
	    showModal(url2,args,1200,700,"","scroll:on");
	});
	
	buttonControl();
	setBtnHide(roleString, "admin", "btn_initialize");
});
	 
	</script>
</head>
	<body>
		<div class="right_box">
			<div class="content_top">
				<ul class="path">
					<li><a href="#">${rmsMenuPath}</a></li>					
				</ul>					
			</div><!-- end content_top -->
			<div class="content_middle">
				<div class="search_wrap">
					<button type="button" class="cssbtn" id="btn_initialize" level="W" status="DETAIL"><i class="material-icons">restart_alt</i> <%= localeMessage.getString("button.reset") %></button>
					<button type="button" class="cssbtn" id="btn_delete" level="W" status="DETAIL"><i class="material-icons">delete</i> <%= localeMessage.getString("button.delete") %></button>
					<button type="button" class="cssbtn" id="btn_modify" level="W" status="DETAIL,NEW"><i class="material-icons">save</i> <%= localeMessage.getString("button.modify") %></button>
					<button type="button" class="cssbtn" id="btn_previous" level="R" status="DETAIL,NEW"><i class="material-icons">arrow_back</i> <%= localeMessage.getString("button.previous") %></button>                       								
<%-- 					<img src="<c:url value="/img/btn_initialize.png"/>" alt="" id="btn_initialize" level="W" status="DETAIL"/>	 --%>
<%-- 					<img src="<c:url value="/img/btn_delete.png"/>" alt="" id="btn_delete" level="W" status="DETAIL"/> --%>
<%-- 					<img src="<c:url value="/img/btn_modify.png"/>" alt="" id="btn_modify" level="W" status="DETAIL,NEW" />				 --%>
<%-- 					<img src="<c:url value="/img/btn_previous.png"/>" alt="" id="btn_previous" level="R" status="DETAIL,NEW"/>	 --%>
				</div>
				<div class="title"><%=localeMessage.getString("transformManDetail.title")%><span class="tooltip"><%=localeMessage.getString("transformManDetail.tooltip")%></span></div>				
				<table class="search_condition" cellspacing="0">
					<tr>
						<th style="width:180px;"><%=localeMessage.getString("transformManDetail.ifSvcCd")%></th>
						<td colspan="3">
							<input type="text" name="eaiSvcName" value="BOP0810000000008R1" style="width:calc(100% - 220px);" readonly>
<%-- 							<img id="btn_search" src="<c:url value="/img/btn_pop_search.png"/>" level="R" class="btn_img" /> --%>
							<button type="button" class="cssbtn smallBtn2" id="btn_search" style="vertical-align:middle; font-weight:bold;" level="R"><i class="material-icons">search</i><%= localeMessage.getString("button.search") %></button>
							<input type="checkbox" name="chk_eaiSvcName" id="sub2_4_3_modify_1"><label for="sub2_4_3_modify_1"><%=localeMessage.getString("transformManDetail.ifSvcCdChk")%></label>		
						</td>
					</tr>
					<tr>
						<th><%=localeMessage.getString("transformManDetail.ifSvcDesc")%></th>
						<td colspan="3">
							<input type="text" name="eaiSvcDesc" value="한국은행-신한은회선시험응답" readonly="readonly">
						</td>
					</tr>
					<tr>
						<th><%=localeMessage.getString("transformManDetail.transformForEaiSvcNameCd")%></th>
						<td colspan="3">
							<div class="select-style" style="width:95%; display:inline-block;">
								<select name="transformForEaiSvcNameCombo">
								</select>
							</div>	
<%-- 							<img src="<c:url value="/images/bt/pop_detail.gif"/>" alt="" id="btn_cnvsnDetail"/>	 --%>
							<button type="button" class="cssbtn smallBtn2" id="btn_cnvsnDetail" style="vertical-align:middle; font-weight:bold;"><i class="material-icons">details</i><%= localeMessage.getString("button.detail") %></button>
						</td>
					</tr>
					<tr>
						<th><%=localeMessage.getString("transformManDetail.transformForEaiSvcNameCd")%>설명</th>
						<td colspan="3">
						<input type="text" name="cnvsnDesc">
						</td>
					</tr>
					<tr>
						<th style="width:180px"><%=localeMessage.getString("transformManDetail.cnvsnType")%></th>
						<td style="width:38%">
							<div class="select-style">
								<select name="cnvsnTypeCombo"> 									
								</select>
							</div>	
						</td>
						<th style="width:180px"><%=localeMessage.getString("transformManDetail.sevrDstcd")%></th>
						<td>
							<div class="select-style">
								<select name="eaiSevrDStcd">
								</select>
							</div>	
						</td>
					</tr>
					<tr>
						<th><%=localeMessage.getString("combo.useYn")%></th>
						<td>
							<div class="select-style">
								<select name="useYn">
								</select>
							</div>	
						</td>
						<th style="width:180px"><%=localeMessage.getString("transformMan.verInfo")%></th>
						<td>
							<input type="text" name="verInfo" readonly>
						</td>
						
				</table>
				
				
				<!-- tree -->
				<table style="width:100%;">
				<tr>					
					<td style="width:40%; vertical-align:top;">
						<table class="table_row" cellspacing="0">
							<tr>
								<th style="width:130px;"><%=localeMessage.getString("transformManDetail.srcLayout")%></th>
								<td>
									<input type="text" name="srcLayout" style="width:calc(100% - 70px)">
<%-- 									<img id="btn_searchSrcLout" src="<c:url value="/img/btn_pop_search.png"/>" level="R" class="btn_img" /> --%>
									<button type="button" class="cssbtn smallBtn2" id="btn_searchSrcLout" style="vertical-align:middle; font-weight:bold;" level="R"><i class="material-icons">search</i><%= localeMessage.getString("button.search") %></button>
								</td>								
							</tr>
							<tr>
								<th><%=localeMessage.getString("transformManDetail.srcLayoutDesc")%></th>
								<td>
									<input type="text" name="srcLayoutDesc" readOnly>
								</td>
							</tr>
						</table>
						<div id="sourceLayoutTd" style="margin-bottom:15px;">
							<table id="sourceLayout"></table>
							<div id="sourcePage"></div>
						</div>
						<table class="table_row" cellspacing="0">
							<tr>
								<th style="width:130px;"><%=localeMessage.getString("transformManDetail.transCmdName")%></th>
								<td>
									<div class="select-style" style="display:inline-block; width:calc((100% - 70px)*0.3);">
										<select name="functionCombo" style="width:120%;"></select>
									</div>
									<div class="select-style" style="display:inline-block; width:calc((100% - 70px)*0.7);">	
										<select name="cnvsnCmdCombo"></select>
									</div>
<!-- 									<input type="button" name="addCmd" class="btn_img btn_pop_add" />	 -->
									<button type="button" class="cssbtn smallBtn2" id="addCmd" style="vertical-align:middle; font-weight:bold;"><i class="material-icons">add</i><%= localeMessage.getString("button.add") %></button>									
								</td>
							</tr>
							<tr height="50px">
								<td colspan=2><textarea  name="CNVSNCMDNAME"></textarea></td>
							</tr>
							<tr>
								<th><%=localeMessage.getString("transformManDetail.default")%></th><td><input type="text" name="CNVSNITEMBASCVAL"/></td>
							</tr>
						</table>	
					</td>
					<td style="width:20%; text-align:center;">
						<input type=button name="auto" class="btn_img btn_auto" /><br><br>
						<input type=button name="add" class="btn_img btn_add"/><br><br>
						<input type=button name="addAll" class="btn_img btn_addAll"/><br><br>
						<input type=button name="remove" class="btn_img btn_remove"/><br><br>
						<input type=button name="removeAll" class="btn_img btn_removeAll"/>
					</td>
					<td style="vertical-align:top;">
						<table class="table_row" cellspacing="0">
							<tr>
								<th style="width:130px;"><%=localeMessage.getString("transformManDetail.tgtLayout")%></th>
								<td>
									<input type="text" name="tgtLayout" style="width:calc(100% - 70px)">
<%-- 									<img id="btn_searchTgtLout" src="<c:url value="/img/btn_pop_search.png" />"level="R" class="btn_img" /> --%>
									<button type="button" class="cssbtn smallBtn2" id="btn_searchTgtLout" style="vertical-align:middle; font-weight:bold;" level="R"><i class="material-icons">search</i><%= localeMessage.getString("button.search") %></button>
								</td>								
							</tr>
							<tr>
								<th><%=localeMessage.getString("transformManDetail.tgtLayoutDesc")%></th>
								<td>
									<input type="text" name="tgtLayoutDesc" readOnly>									
								</td>
							</tr>
						</table>
						<div id="targetLayoutTd" style="margin-bottom:15px;">
							<table id="targetLayout"></table>
							<div id="targetPage"></div>
						</div>
						<table class="table_row" cellspacing="0">
							<tr height="75px">
								<th style="width:130px;"><%=localeMessage.getString("transformManDetail.tgtItemName")%></th>
								<td><textarea  name="CNVSNRSULTITEMPATHNAME"></textarea></td>
							</tr>
							<tr>
								<th><%=localeMessage.getString("transformManDetail.mappSerNo")%></th>
								<td><input type="text"  name="CNVSNITEMSERNO"/></td>
							</tr>
						</table>					
					</td>
				</tr>	
				</table>	
				
				
				
								
			</div><!-- end content_middle -->
		</div><!-- end right_box -->	
	</body>
</html>

