<%
'#######################################################################################
'속성형태 체크박스 - 가로보기
'VARIABLE : 변수 명
'CODES : 코드 라벨
'ATTRIBUTE: 속성
'TEXT : 질문 TEXT
'STEPFLAG : 스텝여부
'XCCNT : 체크 갯수 확인
'BODYSTR : HTML 사용
'JBODYSTR : 자바스크립트 
'#######################################################################################
Function QuestionMultiMATRIX(VARIABLE,CODES,ATTRIBUTE,TEXT,STEPFLAG,XCCNT,ByRef BODYSTR,ByRef JBODYSTR)

	Dim SBody,ITStr,V_COD,iCnt,cCnt,V1,V2
	Dim ATStr,A_COD,A1,A2
	Dim JBody
	Dim QName
	Dim DSTR,ESTR,COL
	Dim WidthV,HeightV,CTV,LTV
	Dim XVX
	Dim HDStr,CODStr
	Dim OSTR
	Dim TXStr
	Dim acnt

	HeightV = "45px"
	

	

	ITStr = Split(CODES,LABELSPLITTER)
	ATStr = Split(ATTRIBUTE,LABELSPLITTER)
	COL = UBound(ITStr)
	CTV = Col

	ReDim OSTR(UBound(ATStr))

	Select Case COL
		Case 0
			XVX = 20
		Case 1
			XVX = 20
		Case 2
			XVX = 50
		Case 3
			XVX = 60
		Case 4
			XVX = 40
		Case 5
			XVX = 40
		Case 6
			XVX = 55
		Case 7
			XVX = 50
		Case 8
			XVX = 60
		Case 9
			XVX = 60
		Case 10
			XVX = 70
		Case Else
			XVX = 70
	End Select
	
	If COL<>0 Then
	WidthV = FormatNumber(CDbl(XVX/COL),2)
	Else
	WidthV = XVX
	End If

	SBody = ""
	JBody = ""

	SBody = SBody & "					<input type=""hidden"" name=""" & VARIABLE & "CNT"" id=""" & VARIABLE & "CNT"" value=""0"">" & vbCRLF
	SBody = SBody & "					<input type=""hidden"" name=""M" & VARIABLE & "CNT"" id=""M" & VARIABLE & "CNT"" value='"&XCCNT&"'>" & vbCRLF
	SBody = SBody & "					<input type=""hidden"" name=""MI" & VARIABLE & "CNT"" id=""MI" & VARIABLE & "CNT"" value='"&XCCNT&"'>" & vbCRLF

	SBody = SBody & "	<div class='panel panel-default'>" & vbCRLF
	SBody = SBody & "		<div class='panel-heading'><h4 style='line-height:150%;'>" & TEXT & "</h4></div>" & vbCRLF

	SBody = SBody & "		<div class='panel-body'>" & vbCRLF
	DSTR = ""	
	HDSTR = ""

	For cCnt=0 To UBound(ATStr)

		If VarType(ATStr(cCnt))<>0 And VarType(ATStr(cCnt))<>1 Then
			A_COD = Split(ATStr(cCnt),CODESPLITTER)
			A1 = A_COD(0)
			A2 = A_COD(1)

			'Header TR 라인 생성
			If cCnt=0 Then
				HDSTR = "					<TR id=""HCOL" & VARIABLE & "_" & A1 & """>" & vbCRLF
				HDSTR = HDSTR & "						<TH class=""hidden-xs hidden-sm"">&nbsp;</TH>" & vbCRLF
			End If

			If ((cCnt+1) Mod 2)=0 Then
				CODStr = " striped"
			Else
				CODStr = ""
			End IF


			'2019년 3월 31일 JK 수정
			If cCnt>0 And STEPFLAG Then
				DSTR = DSTR & "					<TR id=""MCOL" & VARIABLE & "_" & A1 & """ class=""hidden-md hidden-lg"&CODStr&""" style=""display:none;"">" & vbCRLF
				DSTR = DSTR & "						<td colspan="""&UBound(ITStr)+2&""">"& Replace(Replace(A2,"*OTHER",""),"*NONE","") &"</td>" & vbCRLF
				DSTR = DSTR & "					</TR>" & vbCRLF
				DSTR = DSTR & "					<TR id=""COL" & VARIABLE & "_" & A1 & """ class="""&CODStr&""" style=""display:none;"">" & vbCRLF

			Else
				DSTR = DSTR & "					<TR id=""MCOL" & VARIABLE & "_" & A1 & """ class=""hidden-md hidden-lg"&CODStr&""">" & vbCRLF
				DSTR = DSTR & "						<td colspan="""&UBound(ITStr)+2&""">"& Replace(Replace(A2,"*OTHER",""),"*NONE","") &"</td>" & vbCRLF
				DSTR = DSTR & "					</TR>" & vbCRLF
				DSTR = DSTR & "					<TR id=""COL" & VARIABLE & "_" & A1 & """ class="""&CODStr&""">" & vbCRLF
			End If
			
			'2019년 3월 31일 JK 추가
			If InStr(A2,"*OTHER")>0 Then
				DSTR = DSTR & "						<TD class=""ATTHeader hidden-xs hidden-sm""><div class=""checkbox""><label id=""L" & VARIABLE & "_" & A1 & """>" & Replace(Replace(A2,"*OTHER",""),"*NONE","") & "</label></div>&nbsp;"
				DSTR = DSTR & "<input type=""text"" name=""T" & VARIABLE & "_" & A1 & """ id=""T" & VARIABLE & "_" & A1 & """ value="""" maxlength=""50"" style='vertical-align: top;width:200px;'/>&nbsp;"
				DSTR = DSTR & vbtab&vbtab&vbtab&vbtab&vbtab&vbtab & "<input type=""button"" name=""RE" & VARIABLE & "_" & A1 & """ id=""RE" & VARIABLE & "_" & A1 & """ value="""&LangQuestion(11)&""" onclick=""ResetETCRadio('T" & VARIABLE & "_" & A1 & "','" & VARIABLE & "_" & A1 & "')"" style=""cursor:pointer;""/>"
				DSTR = DSTR & vbtab&vbtab&vbtab&vbtab&vbtab&vbtab &"</TD>" & vbCrLF
			Else
				DSTR = DSTR & "						<TD class=""ATTHeader hidden-xs hidden-sm""><h5><span id=""L" & VARIABLE & "_" & A1 & """>" & Replace(Replace(A2,"*OTHER",""),"*NONE","") & "</span></h5></TD>" & vbCrLF
			End IF



			For iCnt=0 To UBound(ITStr)
				If VarType(ITStr(iCnt))<>0 And VarType(ITStr(iCnt))<>1 Then
					V_COD = Split(ITStr(iCnt),CODESPLITTER)
					V1 = V_COD(0)
					V2 = V_COD(1)
					If InStr(ITStr(iCnt),"*NONE")<1 And InStr(ITStr(iCnt),"*OTHER")<1 Then
						DSTR = DSTR & "						<TD style=""text-align:center;vertical-align:middle;"">"
						DSTR = DSTR & "<input type=" & CHR(34) & "checkbox" & CHR(34) & " name=" & CHR(34) & VARIABLE & "_" & A1 & "_" & V1 & CHR(34) & " id=""" & VARIABLE & "_" & A1 & """ class=" & CHR(34) & "radio1" & CHR(34) & " value=" & Chr(34) & V1 & Chr(34) & "/></TD>" & vbCRLF
					ElseIf InStr(ITStr(iCnt),"*NONE")<1 And InStr(ITStr(iCnt),"*OTHER")>0 Then
						DSTR = DSTR & "						<TD style=""text-align:center;vertical-align:middle;"">"
						DSTR = DSTR & "<input type=" & CHR(34) & "checkbox" & CHR(34) & " name=" & CHR(34) & VARIABLE & "_" & A1 & "_" & V1 & CHR(34) & " id=""" & VARIABLE & "_" & A1 & """ class=" & CHR(34) & "radio1" & CHR(34) & " value=" & Chr(34) & V1 & Chr(34) & "/><input type=" & CHR(34) & "text" & CHR(34) & " name=" & CHR(34) & "T" & VARIABLE & "_" & A1 & "_" & V1 & CHR(34) & " id=""" & "T" & VARIABLE & "_" & A1  & CHR(34) & " maxlength=" & Chr(34) & "255" & Chr(34) & " style=""width:95%""/></TD>" & vbCRLF					
						VAR = VAR & "T" & VARIABLE & "_" & A1 & "_" & V1 & ","
						OSTR(cCnt) = OSTR(cCnt) & ";" & V1
					Else
						DSTR = DSTR & "						<TD style=""text-align:center;vertical-align:middle;"">"
						DSTR = DSTR & "<input type=" & CHR(34) & "checkbox" & CHR(34) & " name=" & CHR(34) & VARIABLE & "_" & A1 & "_" & V1 & CHR(34) & " id=""" & VARIABLE & "_" & A1 & """ class=" & CHR(34) & "radio1" & CHR(34) & " value=" & Chr(34) & V1 & Chr(34) & " onclick=""noCheckBoxValue('" & VARIABLE & "_" & A1 & "','" & V1 & "');""/></TD>" & vbCRLF
					End IF

					If cCnt=0 Then
						HDSTR = HDSTR & "						<TH class=""text-center"">" & Replace(Replace(V2,"*OTHER",""),"*NONE","") & "</TH>" & vbCrLF
					End If

					VAR = VAR & VARIABLE & "_" & A1 & "_" & V1 & ","
				End IF
			Next

			If cCnt=0 Then
				HDSTR = HDSTR & "					</TR>" & VBCRLF
			End If

			DSTR = DSTR & "					</TR>"
			DSTR = DSTR & "" & LABELSPLITTER			

			JBody = JBody & "	if (chkCheckBox("& Chr(34) & VARIABLE & "_" & A1 & Chr(34) &")==false)" & vbCrLF
			JBody = JBody & "	{" & vbCrLF
			JBody = JBody & "		alert(" & Chr(34) & "[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""] " & LangQuestion(1) & Chr(34) & ");" & vbCRLF
			JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_" & A1 &":eq(0)" & Chr(34) & ").focus();" & vbCRLF
			JBody = JBody & "		return;" & vbCRLF
			JBody = JBody & "	}" & vbCRLF & vbCRLF

			TXStr =""

			'2019년 3월 31일 JK 수정
'			If XCCNT<>"" Then
			If XCCNT<>"0" Then
			
			For acnt = 0 To UBound(ITStr)
				V_COD = Split(ITStr(acnt),CODESPLITTER)
				V1 = V_COD(0)
				V2 = V_COD(1)
				TXStr= TXStr & VARIABLE & "_" & A1 & "_" & V1 & ","
			Next
				'2019년 3월 31일 JK 추가
				TXStr = Left(TXStr,Len(TXStr)-1)


			'2019년 3월 31일 JK 추가 해당 없은 코드는 무조건 99처리 혹은 그 때마다 코드 수정
			JBody = JBody & "	if (getCheckBoxValue("& Chr(34) & VARIABLE & "_" & A1 &"_99"& Chr(34) &")!="& Chr(34) & "99" & Chr(34) &")" & vbCrLF
			JBody = JBody & "	{" & vbCrLF
			
			JBody = JBody & "		if ((CheckBoxCount('"&TXStr&"'))>parseFloat($(""#M"&VARIABLE&"CNT"").val()))" & vbCrLF
			JBody = JBody & "		{" & vbCrLF
			JBody = JBody & "			alert(""[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""] "&XCCNT&"개 이하로 선택해 주십시오."");" & vbCRLF
			JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE &":eq(0)" & Chr(34) & ").focus();" & vbCRLF
			JBody = JBody & "			return;" & vbCRLF
			JBody = JBody & "		}" & vbCRLF & vbCRLF

			JBody = JBody & "		if ((CheckBoxCount('"&TXStr&"'))<parseFloat($(""#MI"&VARIABLE&"CNT"").val()))" & vbCrLF
			JBody = JBody & "		{" & vbCrLF
			JBody = JBody & "			alert(""[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""] "&XCCNT&"개 까지 선택해 주십시오."");" & vbCRLF
			JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE &":eq(0)" & Chr(34) & ").focus();" & vbCRLF
			JBody = JBody & "			return;" & vbCRLF
			JBody = JBody & "		}" & vbCRLF & vbCRLF
	
			JBody = JBody & "	}" & vbCRLF & vbCRLF

			End If

		End IF
	Next

	SBody = SBody & "				<table id='" & VARIABLE & "_table' class='table table-bordered table-responsive table-st' cellpadding='0' cellspacing='0' border='0'>" & vbCRLF
	SBody = SBody & "					<colgroup>" & vbCRLF
	SBody = SBody & "						<col class=""hidden-xs hidden-sm"" width=""*""/>" & vbCRLF
	For iCnt=0 To Col
		SBody = SBody & "						<col width=" & Chr(34) & WidthV & "%" & Chr(34) &"/>" & vbCRLF
	Next	
	SBody = SBody & "					</colgroup>" & vbCRLF
	SBody = SBody & HDSTR
	ESTR = Split(DSTR,LABELSPLITTER)

	For iCnt=0 To UBound(ESTR)
		If VarType(ESTR(iCnt))<>0 And VarType(ESTR(iCnt))<>1 Then
			SBody = SBody & ESTR(iCnt) & vbCRLF
		End If
	Next

	If iCnt>6 Then
	SBody = SBody & HDSTR
	End IF
	SBody = SBody & "				</table>" & vbCRLF

	SBody = SBody & "		</div>" & vbCRLF
	SBody = SBody & "	</div>" & vbCRLF

	'자바스크립트 처리 부분

	
	
	If STEPFLAG Then
		Response.Write vbCrLF
		Response.write "<script type=""text/javascript"" language=""javascript"">" & vbCrLF
		Response.Write "<!--" & vbCRLF
		Response.Write "	$(document).ready(function(){" & vbCrLf

		Response.Write vbCrLF
		For iCnt=0 To UBound(ATStr)
			If VarType(ATStr(iCnt))<>0 And VarType(ATStr(iCnt))<>1 Then		
				A_COD = Split(ATStr(iCnt),CODESPLITTER)
				A1 = A_COD(0)
				A2 = A_COD(1)

				
				For cCnt=0 To UBound(ITStr)
					If VarType(ITStr(cCnt))<>0 And VarType(ITStr(cCnt))<>1 Then
					V_COD = Split(ITStr(cCnt),CODESPLITTER)
					V1 = V_COD(0)
					V2 = V_COD(0)
					Response.Write "		$(""input[name=" & VARIABLE & "_" & A1 & "_" & V1 &"]"").click(function(){" & vbCrLF
					Response.Write "			console.log($(this).parents(""tr"").html());" & vbCrLF

					Response.Write "			$(this).parents(""tr"").next().fadeIn(800);" & vbCrLF
					Response.Write "			$(this).parents(""tr"").next().next().fadeIn(800);" & vbCrLF
'					Response.Write "			$(this).parents(""tr"").next().show();" & vbCrLF
'					Response.Write "			$(this).parents(""tr"").next().next().show();" & vbCrLF

					'Response.Write "			$(""#" & VARIABLE & "_table tr:nth-child(" & iCnt+4 & ")"").show();" & vbCrLF
					'Response.Write "			$(""#" & VARIABLE & "_table tr:nth-child(" & iCnt+5 & ")"").show();" & vbCrLF
					Response.Write "		});" & vbCrLF
					End If
				Next
				
			End If
		Next
'		Response.Write "		$("".table-st"").addClass(""table-striped"");" & vbCrLF

		Response.Write "	});" & vbCrLF
		Response.Write "//-->" & vbCrLF
		Response.Write "</script>" & vbCrLF

	End If



	For cCnt=0 To UBound(ATStr)
		V_COD = Split(ATStr(cCnt),CODESPLITTER)
		V1 = V_COD(0)
		V2 = V_COD(0)

		If Len(OSTR(cCnt))>0 Then	'기타가 있는 경우 자바스크립트 처리
			Dim tmpOSTR
			tmpOSTR = Split(OSTR(cCnt),";")

			For iCnt=0 To UBound(tmpOSTR)
				If VarType(tmpOSTR(iCnt))<>0 And VarType(tmpOSTR(iCnt))<>1 And tmpOSTR(iCnt)<>"" Then

					JBody = JBody & "	if ((getCheckBoxValue("& Chr(34) & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & Chr(34) &")==" & Chr(34) & tmpOSTR(iCnt) & Chr(34) &")"
					JBody = JBody & "	&& ($('input[name=T" & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & "]').val().trim()==" & Chr(34) & Chr(34) & "))" & vbCrLF
					JBody = JBody & "	{" & vbCrLF
					JBody = JBody & "		alert(""[""+$(""#L" &  VARIABLE & "_" & V1 & """).text().trim()+""]  "& LangQuestion(5) &""");" & vbCRLF
					JBody = JBody & "		$('input[name=T" & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & "]').focus();" & vbCRLF
					JBody = JBody & "		return;" & vbCRLF
					JBody = JBody & "	}" & vbCRLF

					JBody = JBody & "	if ((getCheckBoxValue("& Chr(34) & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & Chr(34) &")!=" & Chr(34) & tmpOSTR(iCnt) & Chr(34) &")"
					JBody = JBody & "	&& ($('input[name=T" & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & "]').val().trim()!=" & Chr(34) & Chr(34) & "))" & vbCrLF
					JBody = JBody & "	{" & vbCrLF
					JBody = JBody & "		alert(""[""+$(""#L" &  VARIABLE & "_" & V1 & """).text().trim()+""]  "& LangQuestion(5) &""");" & vbCRLF
					JBody = JBody & "		$('input[name=T" & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & "]').focus();" & vbCRLF
					JBody = JBody & "		return;" & vbCRLF
					JBody = JBody & "	}" & vbCRLF

					'기타 특수문자
					JBody = JBody & "	if (getCheckBoxValue("& Chr(34) & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & Chr(34) &")==" & Chr(34) & tmpOSTR(iCnt) & Chr(34) &")"
					JBody = JBody & "	{" & vbCrLF
					JBody = JBody & "		if (containsChars($('input[name=T" & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & "]').val().trim()," & ERRORSTR & "))" & vbCrLF
					JBody = JBody & "		{" & vbCrLF
					JBody = JBody & "			alert("""&LangQuestion(3)&""");" & vbCrLF
					JBody = JBody & "			$('input[name=T" & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & "]').focus();" & vbCRLF
					JBody = JBody & "			return;" & vbCRLF
					JBody = JBody & "		}" & vbCrLF
					JBody = JBody & "	}" & vbCrLF

				End IF
			Next
		End IF
	Next

	BODYSTR = SBody
	JBODYSTR = JBody

End Function


'#######################################################################################
'속성형태 체크박스 - 세로보기
'VARIABLE : 변수 명
'CODES : 코드 라벨
'ATTRIBUTE: 속성
'TEXT : 질문 TEXT
'STEPFLAG : 스텝여부
'CCNT : 체크 갯수 확인
'BODYSTR : HTML 사용
'JBODYSTR : 자바스크립트 
'#######################################################################################
Function QuestionMultiMATRIX2(VARIABLE,CODES,ATTRIBUTE,TEXT,STEPFLAG,XCCNT,ByRef BODYSTR,ByRef JBODYSTR)

	Dim SBody,ITStr,V_COD,iCnt,cCnt,V1,V2
	Dim ATStr,A_COD,A1,A2
	Dim JBody
	Dim QName
	Dim DSTR,ESTR,OSTR,COL
	Dim WidthV,HeightV,CTV,LTV
	Dim XVX
	Dim HDStr,TXStr
	Dim acnt
	HeightV = "45px"

	

	ITStr = Split(CODES,LABELSPLITTER)
	ATStr = Split(ATTRIBUTE,LABELSPLITTER)
	COL = UBound(ATStr)
	CTV = Col

	ReDim OSTR(UBound(ITSTR))

	Select Case COL
		Case 0
			WidthV = 30
		Case 1
			WidthV = 20
		Case 2
			WidthV = 20
		Case 3
			WidthV = 15
		Case 4
			WidthV = 18
		Case 5
			WidthV = 10
		Case 6
			WidthV = 10
		Case 7
			WidthV = 11.5
		Case 8
			WidthV = 10
		Case 9
			WidthV = 9
		Case 10
			WidthV = 8
		Case Else
			WidthV = FormatNumber(CDbl(80/COL),2)
	End Select

	SBody = ""
	JBody = ""

	SBody = SBody & "	<div class='panel panel-default'>" & vbCRLF
	SBody = SBody & "		<div class='panel-heading'><h4 style='line-height:150%;'>" & TEXT & "</h4></div>" & vbCRLF

	SBody = SBody & "		<div class='panel-body'>" & vbCRLF
	DSTR = ""	
	HDSTR = ""

	For cCnt=0 To UBound(ITStr)

		If VarType(ITStr(cCnt))<>0 And VarType(ITStr(cCnt))<>1 Then
			V_COD = Split(ITStr(cCnt),CODESPLITTER)
			V1 = V_COD(0)
			V2 = V_COD(1)

			'Header TR 라인 생성
			If cCnt=0 Then
				HDSTR = "					<TR id=""HCOL" & VARIABLE & "_" & A1 & """>" & vbCRLF
				HDSTR = HDSTR & "						<TH>&nbsp;</TH>" & vbCRLF
			End If

			DSTR = DSTR & "					<TR id=""COL" & VARIABLE & "_" & V1 & """>" & vbCRLF
			DSTR = DSTR & "						<TH class=""ATTHeader"" >" & Replace(Replace(V2,"*OTHER",""),"*NONE","") & "</TH>" & vbCrLF

			TXStr = ""

			For iCnt=0 To UBound(ATStr)
				If VarType(ATStr(iCnt))<>0 And VarType(ATStr(iCnt))<>1 Then
					A_COD = Split(ATStr(iCnt),CODESPLITTER)
					A1 = A_COD(0)
					A2 = A_COD(1)
					If InStr(ITStr(cCnt),"*OTHER")>0 Then
						OSTR(iCnt) = OSTR(iCnt) & ";" & V1
						DSTR = DSTR & "						<TD style=""text-align:center;vertical-align:middle;"">"
						DSTR = DSTR & "<input type=" & CHR(34) & "checkbox" & CHR(34) & " name=" & CHR(34) & VARIABLE & "_" & A1 & "_" & V1 & CHR(34) & " id=""" & VARIABLE & "_" & A1 & """ class=" & CHR(34) & "radio1" & CHR(34) & " value=" & Chr(34) & V1 & Chr(34) & "/><br><input type=" & CHR(34) & "text" & CHR(34) & " name=" & CHR(34) & "T" & VARIABLE & "_" & A1 & "_" & V1 & CHR(34) & " id=""" & "T" & VARIABLE & "_" & A1  & CHR(34) & " maxlength=" & Chr(34) & "255" & Chr(34) & " style=""width:95%""/></TD>" & vbCRLF					
					VAR = VAR & "T" & VARIABLE & "_" & A1 & "_" & V1 & ","
					ElseIf InStr(ITStr(cCnt),"*NONE")>0 Then
						DSTR = DSTR & "						<TD style=""text-align:center;vertical-align:middle;"">"
						DSTR = DSTR & "<input type=" & CHR(34) & "checkbox" & CHR(34) & " name=" & CHR(34) & VARIABLE & "_" & A1 & "_" & V1 & CHR(34) & " id=""" & VARIABLE & "_" & A1 & """ class=" & CHR(34) & "radio1" & CHR(34) & " value=" & Chr(34) & V1 & Chr(34) & " onclick=""noCheckBoxValue('" & VARIABLE & "_" & A1 & "','" & V1 & "');""/></TD>" & vbCRLF
					Else
						DSTR = DSTR & "						<TD style=""text-align:center;vertical-align:middle;"">"
						DSTR = DSTR & "<input type=" & CHR(34) & "checkbox" & CHR(34) & " name=" & CHR(34) & VARIABLE & "_" & A1 & "_" & V1 & CHR(34) & " id=""" & VARIABLE & "_" & A1 & """ class=" & CHR(34) & "radio1" & CHR(34) & " value=" & Chr(34) & V1 & Chr(34) & "/></TD>" & vbCRLF					
					End IF

					If cCnt=0 Then
						HDSTR = HDSTR & "						<TH class=""text-center""><label id=""L" & VARIABLE & "_" & A1 & """>" & Replace(Replace(A2,"*OTHER",""),"*NONE","") & "</label></TH>" & vbCrLF
					End If

					VAR = VAR & VARIABLE & "_" & A1 & "_" & V1 & ","
'					TXStr = TXStr & VARIABLE & "_" & A1 & "_" & V1 & ","

				End If
				
				If cCnt=0 Then
					JBody = JBody & "	if (chkCheckBox("& Chr(34) & VARIABLE & "_" & A1 & Chr(34) &")==false)" & vbCrLF
					JBody = JBody & "	{" & vbCrLF
					JBody = JBody & "		alert(" & Chr(34) & "[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""] " & LangQuestion(1) & Chr(34) & ");" & vbCRLF
					JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_" & A1 &":eq(0)" & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "		return;" & vbCRLF
					JBody = JBody & "	}" & vbCRLF & vbCRLF				
				ElseIf cCnt= UBound(ITStr) Then
					TXStr =""
						For acnt = 0 To UBound(ITStr)
							V_COD = Split(ITStr(acnt),CODESPLITTER)
							V1 = V_COD(0)
							V2 = V_COD(1)

							TXStr= TXStr & VARIABLE & "_" & A1 & "_" & V1 & ","
						Next
					
					JBody = JBody & "	if ((CheckBoxCount('"&TXStr&"'))>parseFloat($(""#M"&VARIABLE&"CNT"").val()))" & vbCrLF
					JBody = JBody & "	{" & vbCrLF
					JBody = JBody & "		alert(""[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""] "&XCCNT&"개 이하로 선택해 주십시오."");" & vbCRLF
					JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE &":eq(0)" & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "		return;" & vbCRLF
					JBody = JBody & "	}" & vbCRLF & vbCRLF

					JBody = JBody & "	if ((CheckBoxCount('"&TXStr&"'))<parseFloat($(""#MI"&VARIABLE&"CNT"").val()))" & vbCrLF
					JBody = JBody & "	{" & vbCrLF
					JBody = JBody & "		alert(""[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""] "&XCCNT&"개 까지 선택해 주십시오."");" & vbCRLF
					JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE &":eq(0)" & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "		return;" & vbCRLF
					JBody = JBody & "	}" & vbCRLF & vbCRLF
				End If
				
			Next

			If cCnt=0 Then
				HDSTR = HDSTR & "					</TR>" & VBCRLF
			End If

			DSTR = DSTR & "					</TR>"
			DSTR = DSTR & "" & LABELSPLITTER			

		End IF
	Next

	SBody = SBody & "					<input type=""hidden"" name=""" & VARIABLE & "CNT"" id=""" & VARIABLE & "CNT"" value=""0"">" & vbCRLF
	SBody = SBody & "					<input type=""hidden"" name=""M" & VARIABLE & "CNT"" id=""M" & VARIABLE & "CNT"" value='"&XCCNT&"'>" & vbCRLF
	SBody = SBody & "					<input type=""hidden"" name=""MI" & VARIABLE & "CNT"" id=""MI" & VARIABLE & "CNT"" value='"&XCCNT&"'>" & vbCRLF
	SBody = SBody & "					<tr>" & vbCRLF

	SBody = SBody & "				<table id='" & VARIABLE & "_table' class='table table-bordered table-striped table-responsive' cellpadding='0' cellspacing='0' border='0'>" & vbCRLF
	SBody = SBody & "					<colgroup>" & vbCRLF
	SBody = SBody & "						<col width=""*""/>" & vbCRLF
	For iCnt=0 To Col
		SBody = SBody & "						<col width=" & Chr(34) & WidthV & "%" & Chr(34) &"/>" & vbCRLF
	Next	
	SBody = SBody & "					</colgroup>" & vbCRLF
	SBody = SBody & HDSTR
	ESTR = Split(DSTR,LABELSPLITTER)

	For iCnt=0 To UBound(ESTR)
		If VarType(ESTR(iCnt))<>0 And VarType(ESTR(iCnt))<>1 Then
			SBody = SBody & ESTR(iCnt) & vbCRLF
		End If
	Next

	If iCnt>6 Then
		'SBody = SBody & HDSTR
	End IF
	SBody = SBody & "				</table>" & vbCRLF

	SBody = SBody & "		</div>" & vbCRLF
	SBody = SBody & "	</div>" & vbCRLF

	'자바스크립트 처리 부분
	'Step 처리
	
	If STEPFLAG Then
		Response.Write vbCrLF
		Response.write "<script type=""text/javascript"" language=""javascript"">" & vbCrLF
		Response.Write "<!--" & vbCRLF
		Response.Write "	$(document).ready(function(){" & vbCrLf

		For iCnt=1 To UBound(ATStr)
			If VarType(ATStr(iCnt))<>0 And VarType(ATStr(iCnt))<>1 Then		
				Response.Write "		$(""#" & VARIABLE & "_table td:nth-child(" & iCnt+2 & ")"").hide(); " & vbCrLF
			End If
		Next
		Response.Write vbCrLF
		For iCnt=0 To UBound(ATStr)
			If VarType(ATStr(iCnt))<>0 And VarType(ATStr(iCnt))<>1 Then		
				A_COD = Split(ATStr(iCnt),CODESPLITTER)
				A1 = A_COD(0)
				A2 = A_COD(1)
				For cCnt=0 To UBound(ITStr)
					If VarType(ITStr(cCnt))<>0 And VarType(ITStr(cCnt))<>1 Then
					V_COD = Split(ITStr(cCnt),CODESPLITTER)
					V1 = V_COD(0)
					V2 = V_COD(0)
					Response.Write "		$(""input[name=" & VARIABLE & "_" & A1 & "_" & V1 &"]"").click(function(){" & vbCrLF
					Response.Write "			if (($(""#" & VARIABLE & "_table td:nth-child(" & iCnt+3 & ")"").is(':visible')==false) && (chkCheckBoxCnt("""&VARIABLE&"_"&A1&""","&XCCNT&"))){" & vbCrLF
					Response.Write "			objShow($(""#" & VARIABLE & "_table td:nth-child(" & iCnt+3 & ")""));" & vbCrLF
					Response.Write "			}" & vbCrLf
					Response.Write "		});" & vbCrLF
					End If
				Next
			End If
		Next

		Response.Write "	});" & vbCrLF
		Response.Write "//-->" & vbCrLF
		Response.Write "</script>" & vbCrLF
	End If

	For cCnt=0 To UBound(ATStr)
					V_COD = Split(ATStr(cCnt),CODESPLITTER)
					V1 = V_COD(0)
					V2 = V_COD(0)

						If Len(OSTR(cCnt))>0 Then	'기타가 있는 경우 자바스크립트 처리
							Dim tmpOSTR
							tmpOSTR = Split(OSTR(cCnt),";")

							For iCnt=0 To UBound(tmpOSTR)
								If VarType(tmpOSTR(iCnt))<>0 And VarType(tmpOSTR(iCnt))<>1 And tmpOSTR(iCnt)<>"" Then
									JBody = JBody & "	if ((getCheckBoxValue("& Chr(34) & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & Chr(34) &")==" & Chr(34) & tmpOSTR(iCnt) & Chr(34) &")"
									JBody = JBody & "	&& ($('input[name=T" & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & "]').val().trim()==" & Chr(34) & Chr(34) & "))" & vbCrLF
									JBody = JBody & "	{" & vbCrLF
									JBody = JBody & "		alert("""& LangQuestion(5) &""");" & vbCRLF
									JBody = JBody & "		$('input[name=T" & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & "]').focus();" & vbCRLF
									JBody = JBody & "		return;" & vbCRLF
									JBody = JBody & "	}" & vbCRLF

									JBody = JBody & "	if ((getCheckBoxValue("& Chr(34) & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & Chr(34) &")!=" & Chr(34) & tmpOSTR(iCnt) & Chr(34) &")"
									JBody = JBody & "	&& ($('input[name=T" & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & "]').val().trim()!=" & Chr(34) & Chr(34) & "))" & vbCrLF
									JBody = JBody & "	{" & vbCrLF
									JBody = JBody & "		alert("""&  LangQuestion(5) &""");" & vbCRLF
									JBody = JBody & "		$('input[name=T" & VARIABLE & "_" & V1 & "_" & tmpOSTR(iCnt) & "]').focus();" & vbCRLF
									JBody = JBody & "		return;" & vbCRLF
									JBody = JBody & "	}" & vbCRLF
								End IF
							Next
					End IF
	Next

	BODYSTR = SBody
	JBODYSTR = JBody

End Function

'#######################################################################################
'속성형태 체크박스, 코드가 속성 갯수만큼 나타남
'VARIABLE : 변수 명
'CODES : 코드 라벨
'ATTRIBUTE: 속성
'TEXT : 질문 TEXT
'BODYSTR : HTML 사용
'JBODYSTR : 자바스크립트 
'#######################################################################################
Function QuestionMultiMATRIXCODE(VARIABLE,CODES,ATTRIBUTE,TEXT,ByRef BODYSTR,ByRef JBODYSTR)

	Dim SBody,ITStr,V_COD,iCnt,cCnt,V1,V2,TTStr
	Dim ATStr,A_COD,A1,A2
	Dim JBody
	Dim QName
	Dim DSTR,ESTR,OSTR,COL
	Dim WidthV,HeightV,CTV,LTV
	Dim XVX
	Dim HDStr,XSTR
	HeightV = "45px"
	OSTR = ""

	

	ITStr = Split(CODES,ARRAYSPLITTER)
	ATStr = Split(ATTRIBUTE,LABELSPLITTER)
	COL = UBound(ITStr)
	CTV = Col

	SBody = ""
	JBody = ""

	SBody = SBody & "	<div class='panel panel-default'>" & vbCRLF
	SBody = SBody & "		<div class='panel-heading'><h4 style='line-height:150%;'>" & TEXT & "</h4></div>" & vbCRLF

	SBody = SBody & "		<div class='panel-body'>" & vbCRLF
	DSTR = ""	
	HDSTR = ""

	For cCnt=0 To UBound(ATStr)

		If VarType(ATStr(cCnt))<>0 And VarType(ATStr(cCnt))<>1 Then
			A_COD = Split(ATStr(cCnt),CODESPLITTER)
			A1 = A_COD(0)
			A2 = A_COD(1)

			'Header TR 라인 생성
			HDSTR = "					<TR id=""HCOL" & VARIABLE & "_" & A1 & """>" & vbCRLF
			HDSTR = HDSTR & "						<TH>&nbsp;</TH>" & vbCRLF


			XSTR = "					<TR id=""COL" & VARIABLE & "_" & A1 & """>" & vbCRLF
			XSTR = XSTR & "						<TD class=""ATTHeader"" ><label id=""L" & VARIABLE & "_" & A1 & """>" & Replace(Replace(A2,"*OTHER",""),"*NONE","") & "</label></TD>" & vbCrLF
			TTStr = Split(ITStr(cCnt),LABELSPLITTER)
			
			If cCnt=0 Then

			COL = UBound(TTStr)

			Select Case COL
				Case 0
					XVX = 20
				Case 1
					XVX = 20
				Case 2
					XVX = 50
				Case 3
					XVX = 60
				Case 4
					XVX = 60
				Case 5
					XVX = 50
				Case 6
					XVX = 60
				Case 7
					XVX = 60
				Case 8
					XVX = 60
				Case 9
					XVX = 70
				Case 10
					XVX = 70
				Case Else
					XVX = 80
			End Select

			WidthV = FormatNumber(CDbl(XVX/COL),2)

			End If

			For iCnt=0 To UBound(TTStr)
				If VarType(TTStr(iCnt))<>0 And VarType(TTStr(iCnt))<>1 Then
					V_COD = Split(TTStr(iCnt),CODESPLITTER)
					V1 = V_COD(0)
					V2 = V_COD(1)
					If InStr(TTStr(iCnt),"*NONE")<1 And InStr(TTStr(iCnt),"*OTHER")<1 Then
						XSTR = XSTR & "						<TD style=""text-align:center;vertical-align:middle;"">"
						XSTR = XSTR & "<input type=" & CHR(34) & "checkbox" & CHR(34) & " name=" & CHR(34) & VARIABLE & "_" & A1 & "_" & V1 & CHR(34) & " id=""" & VARIABLE & "_" & A1 & """ class=" & CHR(34) & "radio1" & CHR(34) & " value=" & Chr(34) & V1 & Chr(34) & "/></TD>" & vbCRLF
					Else
						XSTR = XSTR & "						<TD style=""text-align:center;vertical-align:middle;"">"
						XSTR = XSTR & "<input type=" & CHR(34) & "checkbox" & CHR(34) & " name=" & CHR(34) & VARIABLE & "_" & A1 & "_" & V1 & CHR(34) & " id=""" & VARIABLE & "_" & A1 & """ class=" & CHR(34) & "radio1" & CHR(34) & " value=" & Chr(34) & V1 & Chr(34) & " onclick=""noCheckBoxValue('" & VARIABLE & "_" & A1 & "','" & V1 & "');""/></TD>" & vbCRLF
					End If

					HDSTR = HDSTR & "						<TH class=""text-center"">" & Replace(Replace(V2,"*OTHER",""),"*NONE","") & "</TH>" & vbCrLF
				End IF
			Next

			HDSTR = HDSTR & "					</TR>" & VBCRLF

			XSTR = XSTR & "					</TR>"
			DSTR = DSTR & HDSTR & LABELSPLITTER & XSTR & LABELSPLITTER
			VAR = VAR & VARIABLE & "_" & A1 & "_" & V1 & ","

			JBody = JBody & "	if (chkCheckBox("& Chr(34) & VARIABLE & "_" & A1 & Chr(34) &")==false)" & vbCrLF
			JBody = JBody & "	{" & vbCrLF
			JBody = JBody & "		alert(" & Chr(34) & "[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""] " & LangQuestion(1) & Chr(34) & ");" & vbCRLF
			JBody = JBody & "		$(" & Chr(34) & "input[name=" & VARIABLE & "_" & A1 &"]:eq(0)" & Chr(34) & ").focus();" & vbCRLF
			JBody = JBody & "		return;" & vbCRLF
			JBody = JBody & "	}" & vbCRLF & vbCRLF

		End IF
	Next

	SBody = SBody & "				<table id='" & VARIABLE & "_table' class='table table-bordered table-striped table-responsive' cellpadding='0' cellspacing='0' border='0'>" & vbCRLF
	SBody = SBody & "					<colgroup>" & vbCRLF
	SBody = SBody & "						<col width=""*""/>" & vbCRLF
	For iCnt=0 To Col
		SBody = SBody & "						<col width=" & Chr(34) & WidthV & "%" & Chr(34) &"/>" & vbCRLF
	Next	
	SBody = SBody & "					</colgroup>" & vbCRLF

	ESTR = Split(DSTR,LABELSPLITTER)
	For iCnt=0 To UBound(ESTR)

		If VarType(ESTR(iCnt))<>0 And VarType(ESTR(iCnt))<>1 Then
			SBody = SBody & ESTR(iCnt) & vbCRLF
		End If

	Next
	SBody = SBody & "				</table>" & vbCRLF

	SBody = SBody & "		</div>" & vbCRLF
	SBody = SBody & "	</div>" & vbCRLF

	'자바스크립트 처리 부분

	BODYSTR = SBody
	JBODYSTR = JBody

End Function

'#######################################################################################
'속성형태 체크박스 - 가로보기 (그룹)
'VARIABLE : 변수 명
'CODES : 코드 라벨
'ATTRIBUTE: 속성
'TEXT : 질문 TEXT
'STEPFLAG : 스텝여부
'BODYSTR : HTML 사용
'JBODYSTR : 자바스크립트 
'#######################################################################################
Function QuestionMultiMATRIXGROUP(VARIABLE,CODES,ATTRIBUTE,TEXT,XCCNT,ByRef BODYSTR,ByRef JBODYSTR)

	Dim SBody,ITStr,V_COD,iCnt,cCnt,V1,V2
	Dim ATStr,A_COD,A1,A2
	Dim JBody
	Dim QName
	Dim DSTR,ESTR,OSTR,COL
	Dim GTStr,TTStr,xCnt
	Dim WidthV,HeightV,CTV,LTV
	Dim XVX,GWD
	Dim HDStr,TXStr
	Dim aCnt

	GWD = 12 '그룹 타이틀 영역
	HeightV = "45px"
	OSTR = ""

	

	ITStr = Split(CODES,LABELSPLITTER)
	GTSTr = Split(ATTRIBUTE,GROUPSPLITTER)
	COL = UBound(ITStr)
	CTV = Col

	Select Case COL
		Case 0
			XVX = 40-GWD
		Case 1
			XVX = 40-GWD
		Case 2
			XVX = 40-GWD
		Case 3
			XVX = 40-GWD
		Case 4
			XVX = 60-GWD
		Case 5
			XVX = 40-GWD
		Case 6
			XVX = 50-GWD
		Case 7
			XVX = 50-GWD
		Case 8
			XVX = 60-GWD
		Case 9
			XVX = 60-GWD
		Case 10
			XVX = 70-GWD
		Case Else
			XVX = 70-GWD
	End Select

	WidthV = FormatNumber(CDbl(XVX/COL),2)

	SBody = ""
	JBody = ""

	SBody = SBody & "					<input type=""hidden"" name=""" & VARIABLE & "CNT"" id=""" & VARIABLE & "CNT"" value=""0"">" & vbCRLF
	SBody = SBody & "					<input type=""hidden"" name=""M" & VARIABLE & "CNT"" id=""M" & VARIABLE & "CNT"" value='"&XCCNT&"'>" & vbCRLF
	SBody = SBody & "					<input type=""hidden"" name=""MI" & VARIABLE & "CNT"" id=""MI" & VARIABLE & "CNT"" value='"&XCCNT&"'>" & vbCRLF


	SBody = SBody & "	<div class='panel panel-default'>" & vbCRLF
	SBody = SBody & "		<div class='panel-heading'><h4 style='line-height:150%;'>" & TEXT & "</h4></div>" & vbCRLF

	SBody = SBody & "		<div class='panel-body'>" & vbCRLF
	DSTR = ""	
	HDSTR = ""

	For xCnt=0 To UBound(GTStr)

	If VarType(GTStr)<>0 And VarType(GTStr)<>1 Then
		TTStr = Split(GTStr(xCnt),GCODESPLITTER)
		ATStr = Split(TTSTR(1),LABELSPLITTER)

		For cCnt=0 To UBound(ATStr)

			If VarType(ATStr(cCnt))<>0 And VarType(ATStr(cCnt))<>1 Then
				A_COD = Split(ATStr(cCnt),CODESPLITTER)
				A1 = A_COD(0)
				A2 = A_COD(1)

				'Header TR 라인 생성
				If xCnt=0 Then
					HDSTR = "					<TR id=""HCOL" & VARIABLE & "_" & A1 & """>" & vbCRLF
					HDSTR = HDSTR & "						<TH Colspan=""2"">&nbsp;</TH>" & vbCRLF
				End If

				DSTR = DSTR & "					<TR id=""COL" & VARIABLE & "_" & A1 & """>" & vbCRLF

				If cCnt=0 Then
				DSTR = DSTR & "						<TD style=""vertical-align:middle;"" class=""ATTHeader info text-center"" rowspan="""&UBound(ATStr)+1&""">" & TTStr(0) & "</TD>" & vbCrLF	
				End If

				DSTR = DSTR & "						<TD class=""ATTHeader""><span id=""L" & VARIABLE & "_" & A1 & """>" & Replace(Replace(A2,"*OTHER",""),"*NONE","") & "</span></TD>" & vbCrLF

				For iCnt=0 To UBound(ITStr)
					If VarType(ITStr(iCnt))<>0 And VarType(ITStr(iCnt))<>1 Then
						V_COD = Split(ITStr(iCnt),CODESPLITTER)
						V1 = V_COD(0)
						V2 = V_COD(1)
						If InStr(ITStr(iCnt),"*NONE")<1 And InStr(ITStr(iCnt),"*OTHER")<1 Then
							DSTR = DSTR & "						<TD style=""text-align:center;vertical-align:middle;"">"
							DSTR = DSTR & "<input type=" & CHR(34) & "checkbox" & CHR(34) & " name=" & CHR(34) & VARIABLE & "_" & A1 & "_" & V1 & CHR(34) & " id=""" & VARIABLE & "_" & A1 & """ class=" & CHR(34) & "radio1" & CHR(34) & " value=" & Chr(34) & V1 & Chr(34) & "/></TD>" & vbCRLF
						Else
							DSTR = DSTR & "						<TD style=""text-align:center;vertical-align:middle;"">"
							DSTR = DSTR & "<input type=" & CHR(34) & "checkbox" & CHR(34) & " name=" & CHR(34) & VARIABLE & "_" & A1 & "_" & V1 & CHR(34) & " id=""" & VARIABLE & "_" & A1 & """ class=" & CHR(34) & "radio1" & CHR(34) & " value=" & Chr(34) & V1 & Chr(34) & " onclick=""noCheckBoxValue('" & VARIABLE & "_" & A1 & "','" & V1 & "');""/></TD>" & vbCRLF
						End IF

						If xCnt=0 Then
							HDSTR = HDSTR & "						<TH class=""text-center"">" & Replace(Replace(V2,"*OTHER",""),"*NONE","") & "</TH>" & vbCrLF
						End If
					End If
					
					VAR = VAR & VARIABLE & "_" & A1 & "_" & V1 & ","
				Next

				If xCnt=0 Then
					HDSTR = HDSTR & "					</TR>" & VBCRLF
				End If

				DSTR = DSTR & "					</TR>"
				DSTR = DSTR & "" & LABELSPLITTER				

				JBody = JBody & "	if (chkCheckBox("& Chr(34) & VARIABLE & "_" & A1 & Chr(34) &")==false)" & vbCrLF
				JBody = JBody & "	{" & vbCrLF
				JBody = JBody & "		alert(" & Chr(34) & "[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""] " & LangQuestion(1) & Chr(34) & ");" & vbCRLF
				JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_" & A1 &":eq(0)" & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "		return;" & vbCRLF
				JBody = JBody & "	}" & vbCRLF & vbCRLF


				TXStr =""
						For acnt = 0 To UBound(ITStr)
							V_COD = Split(ITStr(acnt),CODESPLITTER)
							V1 = V_COD(0)
							V2 = V_COD(1)

							TXStr= TXStr & VARIABLE & "_" & A1 & "_" & V1 & ","
						Next
				TXStr = left(TXStr, len(TXStr)-1)

				' JBody = JBody & "	if ((CheckBoxCount('"&TXStr&"'))>parseFloat($(""#M"&VARIABLE&"CNT"").val()))" & vbCrLF
				' JBody = JBody & "	{" & vbCrLF
				' JBody = JBody & "		alert(""[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""] "&XCCNT&"개 이하로 선택해 주십시오."");" & vbCRLF
				' JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE &":eq(0)" & Chr(34) & ").focus();" & vbCRLF
				' JBody = JBody & "		return;" & vbCRLF
				' JBody = JBody & "	}" & vbCRLF & vbCRLF

				JBody = JBody & "	if ((CheckBoxCount('"&TXStr&"'))<parseFloat($(""#MI"&VARIABLE&"CNT"").val()))" & vbCrLF
				JBody = JBody & "	{" & vbCrLF
				JBody = JBody & "		alert(""[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""] "&XCCNT&"개 까지 선택해 주십시오."");" & vbCRLF
				JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE &":eq(0)" & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "		return;" & vbCRLF
				JBody = JBody & "	}" & vbCRLF & vbCRLF


			End IF
		Next
	End If
	Next

	SBody = SBody & "				<table id='" & VARIABLE & "_table' class='table table-bordered table-striped table-responsive' cellpadding='0' cellspacing='0' border='0'>" & vbCRLF
	SBody = SBody & "					<colgroup>" & vbCRLF
	SBody = SBody & "						<col width="""&GWD&"%""/>" & vbCRLF
	SBody = SBody & "						<col width=""*""/>" & vbCRLF
	For iCnt=0 To Col
		SBody = SBody & "						<col width=" & Chr(34) & WidthV & "%" & Chr(34) &"/>" & vbCRLF
	Next	
	SBody = SBody & "					</colgroup>" & vbCRLF
	SBody = SBody & HDSTR
	ESTR = Split(DSTR,LABELSPLITTER)

	For iCnt=0 To UBound(ESTR)
		If VarType(ESTR(iCnt))<>0 And VarType(ESTR(iCnt))<>1 Then
			SBody = SBody & ESTR(iCnt) & vbCRLF
		End If
	Next

	If iCnt>10 Then
	SBody = SBody & HDSTR
	End IF
	SBody = SBody & "				</table>" & vbCRLF

	SBody = SBody & "		</div>" & vbCRLF
	SBody = SBody & "	</div>" & vbCRLF

	BODYSTR = SBody
	JBODYSTR = JBody

End Function


%>