<%
'#######################################################################################
'텍스트 박스가 세로로 여러개 보여지는 Template
'VARIABLE : 변수 명
'ATTRIBUTE: 속성 정보
'TEXT : 질문 TEXT
'MAXLENGTH: 텍스트 입력 갯수
'ATTMAX : 최소 응답 해야 하는 갯수
'MINLENGTH: 최소 입력 길이
'NFLAG : None 처리
'VIEW : 가로보기
'DUPLE : 중복 검사
'BODYSTR : HTML 사용
'JBODYSTR : 자바스크립트
'#######################################################################################
Function QuestionTEXTBOXATT(VARIABLE,ATTRIBUTE,TEXT,MAXLENGTH,ATTMAX,MINLENGTH,NFLAG,VIEW,DUPLE,ByRef BODYSTR,ByRef JBODYSTR)

	Dim SBody,ITStr,V_COD,iCnt,V1,V2
	Dim JBody
	Dim QName,DSTR,ESTR
	Dim WidthV,HeightV,CTV
	Dim AMX,ML,MH
	Dim XVAR
	
	If MAXLENGTH="" Then 
		ML="255"
	Else
		ML = MAXLENGTH
	End IF
	
	If ATTMAX="" Or ATTMAX="0" Then 
		AMX=1
	Else
		AMX = ATTMAX
	End If
	
	If MINLENGTH="" Or MINLENGTH="0" Then 
		MH="4"
	Else
		MH = MINLENGTH
	End IF

	HeightV = "30px"
	ITStr = Split(ATTRIBUTE,LABELSPLITTER)

	

	SBody = ""
	JBody = ""
	DSTR = ""
	ESTR = ""

	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	
	
	If VIEW="1" Then
		SBody = SBody & "		<div class=""row"">" & vbCRLF
		SBody = SBody & "			<div class=""col-md-12 col-xs-12"">" & vbCRLF
		For iCnt=0 To UBound(ITStr)
			If VarType(ITStr)<>0 And VarType(ITSTR)<>1 Then
				V_COD = Split(ITStr(iCnt),CODESPLITTER)
				V1 = V_COD(0)
				V2 = V_COD(1)
				SBody = SBody & "				<div class=""form-group"">"&vbCRLF
				SBody = SBody & "				<input type=""text"" class=""form-control"" id=""" & VARIABLE & "_" & V1 & """ name=""" & VARIABLE & "_" & V1 & """ maxlength=""" & ML & """ value=""""/>" & vbCRLF
				SBody = SBody & "				</div>"&vbCRLF
				VAR = VAR & VARIABLE & "_" & V1 & ","
				XVAR = XVAR & VARIABLE & "_" & V1 & ","
			End IF
		Next
		
		'SBody = Left(SBody,Len(SBody)-1)

		SBody = SBody & "			</div>" & vbCRLF
		SBody = SBody & "		</div>" & vbCRLF
	Else
		Dim VXFLAG
		V_COD = Split(ITStr(0),CODESPLITTER)
		V1 = V_COD(0)
		V2 = V_COD(1)
		If Trim(V2)="" Then
			VXFLAG = FALSE
		Else
			VXFLAG = TRUE
		End IF
		
		SBody = SBody & "			<table id='" & VARIABLE & "_table' class='table table-hover' cellpadding='0' cellspacing='0' border='0'>" & vbCRLF
		SBody = SBody & "				<colgroup>" & vbCRLF
		If VXFlag Then
		SBody = SBody & "					<col width=""10%""/>" & vbCRLF
		SBody = SBody & "					<col width=""*""/>" & vbCRLF
		Else
		SBody = SBody & "					<col width=""*""/>" & vbCRLF
		End IF
		SBody = SBody & "				</colgroup>" & vbCRLF


		For iCnt=0 To UBound(ITStr)
			If VarType(ITStr)<>0 And VarType(ITSTR)<>1 Then
				V_COD = Split(ITStr(iCnt),CODESPLITTER)
				V1 = V_COD(0)
				V2 = V_COD(1)
				SBody = SBody & "				<tr>" & vbCRLF
				If VXFlag Then
					SBody = SBody & "				<th class=""text-center"" style=""vertical-align:middle;"">" & vbCRLF
					SBody = SBody & "				<label id=""L" & VARIABLE & "_" & V1 & """ for="""& VARIABLE & "_"& V1 &""">" & V2 & "</label>" & vbCRLF
					SBody = SBody & "				</th>" & vbCRLF
					SBody = SBody & "				<td>" & vbCRLF
					SBody = SBody & "				<input type=""TEXT"" class=""form-control"" name=""" & VARIABLE & "_"& V1 & """ id=""" & VARIABLE & "_"& V1 & """ value="""" style=""width:96%;"" maxlength="""& ML & """/>" & vbCRLF
					SBody = SBody & "				</td>" & vbCRLF
				Else
					SBody = SBody & "				<td style=""text-align:center;""><input type=""TEXT"" class=""form-control"" name=""" & VARIABLE & "_"& V1 & """ id=""" & VARIABLE & "_"& V1 & """ value="""" style=""width:96%;"" maxlength="""& ML & """/></td>" & vbCRLF
				End IF
				SBody = SBody & "				</tr>" & vbCRLF

				VAR = VAR & VARIABLE & "_" & V1 & ","
				XVAR = XVAR & VARIABLE & "_" & V1 & ","
				If InStr(V2,"*OTHER")>0 Then
					VAR = VAR & "T" & VARIABLE & "_" & V1 & ","
					XVAR = XVAR & "T" & VARIABLE & "_" & V1 & ","
				End IF
			End IF
		Next

	SBody = SBody & "			</table>" & vbCRLF
	If NFlag Then
		SBody = SBody & "		<p></p><div class=""checkbox""><label style=""cursor:pointer;""><input type=""checkbox"" id="""&VARIABLE&"_NONE"" name="""&VARIABLE&"_NONE"" value=""1""/> "&NONSTR&"</label></div>" & vbCRLF
	End If
	SBody = SBody & "		</div>" & vbCRLF
	SBody = SBody & "	</div>" & vbCRLF

	End if

	If NFlag Then
		Response.Write "<script type=""text/javascript"" language=""javascript"">" & vbCrLF
		Response.Write "<!--" & vbCrLF
		Response.Write "	$(document).ready(function(){" & vbCrLF
		Response.Write "		$(""#"&VARIABLE&"_NONE"").click(function(){" & vbCrLF
		Response.Write "			itemDisabledSetup("""&XVAR&""".split("",""),$(""#"&VARIABLE&"_NONE"").prop(""checked""));" & vbCrLF
		Response.Write "		})" & vbCrLf

		If VIEW="1" Then
			Response.Write "		$(""form[name=Survey]"").addClass(""form-inline"");" & vbCrLF
		End IF
		Response.Write "	});" & vbCrLf
		Response.Write "//-->" & vbCrLF
		Response.Write "</script>"

		VAR = VAR & VARIABLE & "_NONE,"
	Else
		If VIEW="1" Then
			Response.Write "<script type=""text/javascript"" language=""javascript"">" & vbCrLF
			Response.Write "<!--" & vbCrLF
			Response.Write "	$(document).ready(function(){" & vbCrLF
			Response.Write "		$(""form[name=Survey]"").addClass(""form-inline"");" & vbCrLF
			Response.Write "	});" & vbCrLf
			Response.Write "//-->" & vbCrLF
			Response.Write "</script>"
		End IF
	End IF

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

	XVAR = Left(XVAR,Len(XVAR)-1)

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

	If NFlag Then
	JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & "_NONE" & Chr(34) &").is("":checked"")==false){" & vbCrLF
	End if

	For iCnt=0 To AMX-1
		If VarType(ITStr)<>0 And VarType(ITSTR)<>1 Then
			V_COD = Split(ITStr(iCnt),CODESPLITTER)
			V1 = V_COD(0)

			JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & "_" & V1 & Chr(34) &").val()=="""")" & vbCrLF
			JBody = JBody & "	{" & vbCrLF
			If iCnt=0 Then
				JBody = JBody & "		alert("""& LangQuestion(1) &""");" & vbCRLF
			Else
				JBody = JBody & "		alert(""(" & (iCnt+1) & ") "& LangQuestion(1) &""");" & vbCRLF
			End IF
			JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
			JBody = JBody & "		return;" & vbCRLF
			JBody = JBody & "	}" & vbCRLF

		End IF
	Next
	
	JBody = JBody & "	var xx;" & vbCRLF
	JBody = JBody & "	var xy;" & vbCRLF
	JBody = JBody & "	var TextFlag;" & vbCRLF
	V2 = ""

	For iCnt=0 To UBound(ITStr)
		If VarType(ITStr)<>0 And VarType(ITSTR)<>1 Then
			V_COD = Split(ITStr(iCnt),CODESPLITTER)
			V1 = V_COD(0)
			

			JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & "_" & V1 & Chr(34) &").val()!="""")" & vbCrLF
			JBody = JBody & "	{" & vbCrLF

			If iCnt<>0 Then
				JBody = JBody & "		xx = $(""#" & VARIABLE & "_" & V2 & """).val().trim();" & vbCrLF
				JBody = JBody & "		xy = $(""#" & VARIABLE & "_" & V1 & """).val().trim();" & vbCrLF

				JBody = JBody & "		if (xy.length<" & MH & ")" & vbCrLF
				JBody = JBody & "		{" & vbCrLF
				JBody = JBody & "			alert(""" & (iCnt+1) & " "& LangQuestion(2) &""");" & vbCRLF
				JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "			return;" & vbCRLF
				JBody = JBody & "		}" & vbCrLF & vbCrLF

				JBody = JBody & "		if (containsChars(xx," & ERRORSTR & "))" & vbCrLF
				JBody = JBody & "		{" & vbCrLF
				JBody = JBody & "			alert("""& LangQuestion(3) &""");" & vbCrLF
				JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "			return;" & vbCRLF
				JBody = JBody & "		}" & vbCrLF

				If DUPLE<>"" Then

				JBody = JBody & "		TextFlag = TextOverlap("""& VARIABLE & "_" & V1 &""",xy);" & vbCrLF
				JBody = JBody & "		if (TextFlag==false)" & vbCrLF
				JBody = JBody & "		{" & vbCrLF
				JBody = JBody & "			alert(""[""+xy+""] "& LangQuestion(10) &""");" & vbCrLF
				JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "			return;" & vbCRLF
				JBody = JBody & "		}" & vbCrLF
				End IF
				
			Else
				JBody = JBody & "		xx = $(""#" & VARIABLE & "_" & V1 & """).val().trim();" & vbCrLF
				JBody = JBody & "		if (xx.length<" & MH & ")" & vbCrLF
				JBody = JBody & "		{" & vbCrLF
				JBody = JBody & "			alert(""" & (iCnt+1) & " "& LangQuestion(2) &""");" & vbCRLF
				JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "			return;" & vbCRLF
				JBody = JBody & "		}" & vbCrLF & vbCrLF

				JBody = JBody & "		if (containsChars(xx," & ERRORSTR & "))" & vbCrLF
				JBody = JBody & "		{" & vbCrLF
				JBody = JBody & "			alert("""& LangQuestion(3) &""");" & vbCrLF
				JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "			return;" & vbCRLF
				JBody = JBody & "		}" & vbCrLF

				If DUPLE<>"" Then
				JBody = JBody & "		TextFlag = TextOverlap("""& VARIABLE & "_" & V1 &""",xx);" & vbCrLF
				JBody = JBody & "		if (TextFlag==false)" & vbCrLF
				JBody = JBody & "		{" & vbCrLF
				JBody = JBody & "			alert(""[""+xx+""] "& LangQuestion(10) &""");" & vbCrLF
				JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "			return;" & vbCRLF
				JBody = JBody & "		}" & vbCrLF
				End If

			End If			
			JBody = JBody & "	}" & vbCRLF
			V2 = V1
		End IF
	Next

	If NFlag Then
		JBody = JBody & "	}" & vbCRLF
	End if

	BODYSTR = SBody
	JBODYSTR = JBody

End Function



'#######################################################################################
'이유 받는 TextBox형
'VARIABLE : 변수 명
'TEXT : 질문 TEXT
'MINLENGTH: 최소 입력 길이
'NFLAG : None 처리
'BODYSTR : HTML 사용
'JBODYSTR : 자바스크립트
'#######################################################################################
Function QuestionTEXTBOX(VARIABLE,TEXT,MAXLENGTH,MINLENGTH,NFLAG,ByRef BODYSTR,ByRef JBODYSTR)

	Dim SBody,ITStr,V_COD,iCnt,V1,V2
	Dim JBody
	Dim QName,DSTR,ESTR
	Dim WidthV,HeightV,CTV
	Dim ML,MH

	If MAXLENGTH="" Then 
		ML="255"
	Else
		ML = MAXLENGTH
	End IF
	
	If MINLENGTH="" Or MINLENGTH="0" Then 
		MH="4"
	Else
		MH = MINLENGTH
	End IF

	HeightV = "30px"

	

	SBody = ""
	JBody = ""
	DSTR = ""
	ESTR = ""
	
	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
	SBody = SBody & "		<input type=""TEXT"" class=""form-control"" name=""" & VARIABLE & """ id=""" & VARIABLE & """ value="""" maxlength=""" & ML & """ style=""width:96%;""/>" & vbCRLF

	VAR = VARIABLE & ","

	If NFlag Then
		SBody = SBody & "		<p></p><div class=""checkbox""><label style=""cursor:pointer;""><input type=""checkbox"" id="""&VARIABLE&"_NONE"" name="""&VARIABLE&"_NONE"" value=""1""/>"&NONSTR&"</label></div>" & vbCRLF
		Response.Write "<script type=""text/javascript"" language=""javascript"">" & vbCrLF
		Response.Write "<!--" & vbCrLF
		Response.Write "	$(document).ready(function(){" & vbCrLF
		Response.Write "		$(""#"&VARIABLE&"_NONE"").click(function(){" & vbCrLF
		Response.Write "			itemDisabledSetup("""&VARIABLE&""".split("",""),$(""#"&VARIABLE&"_NONE"").attr(""checked""));" & vbCrLF
		Response.Write "		})" & vbCrLf
		Response.Write "	});" & vbCrLf
		Response.Write "//-->" & vbCrLF
		Response.Write "</script>"

		VAR = VAR & VARIABLE & "_NONE,"
	End IF
	SBody = SBody & "		</div>" & vbCRLF
	SBody = SBody & "	</div>" & vbCRLF

	JBody = JBody & "	var xx;" & vbCRLF
	JBody = JBody & "	xx = $(""#" & VARIABLE & """).val().trim();" & vbCrLF

	If NFlag Then
	JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & "_NONE" & Chr(34) &").is("":checked"")==false){" & vbCrLF
	End if

	JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & Chr(34) &").val().trim()=="""")" & vbCrLF
	JBody = JBody & "	{" & vbCrLF
	JBody = JBody & "		alert("""&LangQuestion(1)&""");" & vbCRLF
	JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "		return;" & vbCRLF
	JBody = JBody & "	}" & vbCRLF

	JBody = JBody & "	if (xx.length<" & MH & ")" & vbCrLF
	JBody = JBody & "	{" & vbCrLF
	JBody = JBody & "		alert("""&LangQuestion(2)&""");" & vbCRLF
	JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "		return;" & vbCRLF
	JBody = JBody & "	}" & vbCrLF & vbCrLF

	JBody = JBody & "	if (containsChars(xx," & ERRORSTR & "))" & vbCrLF
	JBody = JBody & "	{" & vbCrLF
	JBody = JBody & "		alert("""&LangQuestion(3)&""");" & vbCrLF
	JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "		return;" & vbCRLF
	JBody = JBody & "	}" & vbCrLF

	If NFlag Then
		JBody = JBody & "		}" & vbCrLF
	End if

	BODYSTR = SBody
	JBODYSTR = JBody

End Function


'#######################################################################################
'텍스트 박스가 세로로 여러개 보여지는 Template
'VARIABLE : 변수 명
'ATTRIBUTE: 속성 정보
'TEXT : 질문 TEXT
'MAXLENGTH: 텍스트 입력 갯수
'ATTMAX : 최소 응답 해야 하는 갯수
'MINLENGTH: 최소 입력 길이
'NFLAG : None 처리
'BODYSTR : HTML 사용
'JBODYSTR : 자바스크립트
'#######################################################################################
Function QuestionTEXTBOXATTGROUP(VARIABLE,ATTRIBUTE,TEXT,MAXLENGTH,ATTMAX,MINLENGTH,NFLAG,ByRef BODYSTR,ByRef JBODYSTR)

	Dim SBody,ATStr,V_COD,iCnt,V1,V2
	Dim JBody
	Dim QName,DSTR,ESTR
	Dim WidthV,HeightV,CTV
	Dim AMX,ML,MH
	Dim GTStr,TTStr,cCnt
	Dim XCnt
	Dim XVAR

	If MAXLENGTH="" Then 
		ML="255"
	Else
		ML = MAXLENGTH
	End IF
	
	If ATTMAX="" Or ATTMAX="0" Then 
		AMX=1
	Else
		AMX = ATTMAX
	End If
	
	If MINLENGTH="" Or MINLENGTH="0" Then 
		MH="4"
	Else
		MH = MINLENGTH
	End IF

	HeightV = "30px"
	GTSTr = Split(ATTRIBUTE,GROUPSPLITTER)
	'ITStr = Split(ATTRIBUTE,LABELSPLITTER)

	

	SBody = ""
	JBody = ""
	DSTR = ""
	ESTR = ""

	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		
	

	If NFlag Then
	JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & "_NONE" & Chr(34) &").is("":checked"")==false){" & vbCrLF
	End if

	JBody = JBody & "		var xx;" & vbCRLF
	JBody = JBody & "		var xy;" & vbCRLF
	JBody = JBody & "		var TextFlag;" & vbCRLF
	
	xCnt=1
	For cCnt=0 To UBound(GTStr)

		If VarType(GTStr)<>0 And VarType(GTStr)<>1 Then

		TTStr = Split(GTStr(cCnt),GCODESPLITTER)
		ATStr = Split(TTStr(1),LABELSPLITTER)

		DSTR = DSTR & vbCRLF
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "<table id='" & VARIABLE & cCnt+1 &"_table' class='table table-bordered table-hover nomarintable'>" & vbCRLF
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "		<colgroup>" & vbCRLF
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			<col width=""12%"">" & vbCRLF
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			<col width=""20%"">" & vbCRLF
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			<col width=""*"">" & vbCRLF
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "		</colgroup>" & vbCRLF
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "		<tr>" & vbCRLF	
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			<th rowspan="""& UBound(ATStr)+1 &""" class='info' style=""text-align:center;vertical-align:middle;"">" & TTStr(0) & "</th>" & vbCRLF

		For iCnt=0 To UBound(ATStr)
			If VarType(ATStr)<>0 And VarType(ATSTR)<>1 Then
				V_COD = Split(ATStr(iCnt),CODESPLITTER)
				V1 = V_COD(0)
				V2 = V_COD(1)

				If iCnt>0 Then
					DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "		<tr>" & vbCrLF
				End If
				DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			<td class=""Bd"">" & vbCRLF
				DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "				" & V2 & ""&vbCRLF
				DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			</td>" & vbCrLF
				DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			<td>" & vbCRLF
				DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "				<input type=""text"" id=""" & VARIABLE & "_" & V1 & """ name=""" & VARIABLE & "_" & V1 & """ class=""form-control"" style=""width:96%;"" maxlength=""" & ML & """/>"&vbCRLF
				DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			</td>" & vbCrLF
				DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "		</tr>" & vbCrLF

				JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & "_" & V1 & Chr(34) &").val()=="""")" & vbCrLF
				JBody = JBody & "	{" & vbCrLF
				If iCnt=0 Then
					JBody = JBody & "		alert("""&LangQuestion(1)&""");" & vbCRLF
				Else
					JBody = JBody & "		alert(""(" & xCnt & ") "&LangQuestion(1)&""");" & vbCRLF
				End IF
				JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "		return;" & vbCRLF
				JBody = JBody & "	}" & vbCRLF

				JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & "_" & V1 & Chr(34) &").val()!="""")" & vbCrLF
				JBody = JBody & "	{" & vbCrLF

				If iCnt<>0 Then
					JBody = JBody & "		xx = $(""#" & VARIABLE & "_" & V1 & """).val().trim();" & vbCrLF
					JBody = JBody & "		xy = $(""#" & VARIABLE & "_" & V1 & """).val().trim();" & vbCrLF

					JBody = JBody & "		if (xx.length<" & MH & ")" & vbCrLF
					JBody = JBody & "		{" & vbCrLF
					JBody = JBody & "			alert(""" & LangQuestion(2) & """);" & vbCRLF
					JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "			return;" & vbCRLF
					JBody = JBody & "		}" & vbCrLF & vbCrLF

					JBody = JBody & "		if (containsChars(xx," & ERRORSTR & "))" & vbCrLF
					JBody = JBody & "		{" & vbCrLF
					JBody = JBody & "			alert("""&LangQuestion(3)&""");" & vbCrLF
					JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "			return;" & vbCRLF
					JBody = JBody & "		}" & vbCrLF

					JBody = JBody & "		TextFlag = TextOverlap("""& VARIABLE & "_" & V1 &""",xy);" & vbCrLF
					JBody = JBody & "		if (TextFlag==false)" & vbCrLF
					JBody = JBody & "		{" & vbCrLF
					JBody = JBody & "			alert(""[""+xy+""] "&LangQuestion(1)&""");" & vbCrLF
					JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "			return;" & vbCRLF
					JBody = JBody & "		}" & vbCrLF
					
				Else
					JBody = JBody & "		xx = $(""#" & VARIABLE & "_" & V1 & """).val().trim();" & vbCrLF
					JBody = JBody & "		xy = $(""#" & VARIABLE & "_" & V1 & """).val().trim();" & vbCrLF


					JBody = JBody & "		if (xx.length<" & MH & ")" & vbCrLF
					JBody = JBody & "		{" & vbCrLF
					JBody = JBody & "			alert(""" & LangQuestion(2) & """);" & vbCRLF
					JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "			return;" & vbCRLF
					JBody = JBody & "		}" & vbCrLF & vbCrLF

					JBody = JBody & "		if (containsChars(xx," & ERRORSTR & "))" & vbCrLF
					JBody = JBody & "		{" & vbCrLF
					JBody = JBody & "			alert("""&LangQuestion(3)&""");" & vbCrLF
					JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "			return;" & vbCRLF
					JBody = JBody & "		}" & vbCrLF

					JBody = JBody & "		TextFlag = TextOverlap("""& VARIABLE & "_" & V1 &""",xx);" & vbCrLF
					JBody = JBody & "		if (TextFlag==false)" & vbCrLF
					JBody = JBody & "		{" & vbCrLF
					JBody = JBody & "			alert(""[""+xx+""] "&LangQuestion(1)&""");" & vbCrLF
					JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "			return;" & vbCRLF
					JBody = JBody & "		}" & vbCrLF

				End If			
				JBody = JBody & "	}" & vbCRLF

				VAR = VAR & VARIABLE & "_" & V1 & ","
				XVAR = XVAR & VARIABLE & "_" & V1 & ","
				xCnt=xCnt+1
			End IF
		Next
		End If
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "</table>" & vbCRLF
		DSTR = DSTR & "" & LABELSPLITTER
	Next


	If NFlag Then
		JBody = JBody & "}" & vbCrLF
	End if

	SBody = SBody & "				<table id='" & VARIABLE & "_table' cellpadding='0' cellspacing='0' border='0' class='table table-responsive nopadtable'>" & vbCRLF
	SBody = SBody & "					<colgroup>" & vbCRLF
	SBody = SBody & "						<col width=""100%""/>" & vbCRLF
	SBody = SBody & "					</colgroup>" & vbCRLF

	ESTR = Split(DSTR,LABELSPLITTER)

	cCnt=1	
	Dim LC
	LC = UBound(ESTR)

	For iCnt=0 To LC-1
		If UBound(ESTR)>=iCnt Then
			If VarType(ESTR(iCnt))<>0 And VarType(ESTR(iCnt))<>1 And ESTR(iCnt)<>"" Then
				SBody = SBody & "					<tr>" & vbCRLF
				SBody = SBody & "					<td>" & ESTR(iCnt)& "</td>" & vbCRLF
				SBody = SBody & "					</tr>" & vbCRLF
			End If
		End IF
	Next

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

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


	If NFlag Then
		SBody = SBody & "		<p></p><div class=""checkbox""><label style=""cursor:pointer;""><input type=""checkbox"" id="""&VARIABLE&"_NONE"" name="""&VARIABLE&"_NONE"" value=""1""/>"&NONSTR&"</label></div>" & vbCRLF
		Response.Write "<script type=""text/javascript"" language=""javascript"">" & vbCrLF
		Response.Write "<!--" & vbCrLF
		Response.Write "	$(document).ready(function(){" & vbCrLF
		Response.Write "		$(""#"&VARIABLE&"_NONE"").click(function(){" & vbCrLF
		Response.Write "			itemDisabledSetup("""&XVAR&""".split("",""),$(""#"&VARIABLE&"_NONE"").attr(""checked""));" & vbCrLF
		Response.Write "		})" & vbCrLf
		Response.Write "	});" & vbCrLf
		Response.Write "//-->" & vbCrLF
		Response.Write "</script>"

		VAR = VAR & VARIABLE & "_NONE,"
	End IF

	
	BODYSTR = SBody
	JBODYSTR = JBody

End Function


'#######################################################################################
'텍스트 Area가 세로로 여러개 보여지는 Template
'VARIABLE : 변수 명
'ATTRIBUTE: 속성 정보
'TEXT : 질문 TEXT
'ATTMAX : 최소 응답 해야 하는 갯수
'MINLENGTH: 최소 입력 길이
'NFLAG : None 처리
'BODYSTR : HTML 사용
'JBODYSTR : 자바스크립트
'#######################################################################################
Function QuestionTEXTAREAATT(VARIABLE,ATTRIBUTE,TEXT,ATTMAX,MINLENGTH,NFLAG,ByRef BODYSTR,ByRef JBODYSTR)

	Dim SBody,ITStr,V_COD,iCnt,V1,V2
	Dim JBody
	Dim QName,DSTR,ESTR
	Dim WidthV,HeightV,CTV
	Dim AMX,ML,MH
	Dim XVAR
	
	
	If ATTMAX="" Or ATTMAX="0" Then 
		AMX=1
	Else
		AMX = ATTMAX
	End If
	
	If MINLENGTH="" Or MINLENGTH="0" Then 
		MH="4"
	Else
		MH = MINLENGTH
	End IF

	HeightV = "30px"
	ITStr = Split(ATTRIBUTE,LABELSPLITTER)

	SBody = ""
	JBody = ""
	DSTR = ""
	ESTR = ""

	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		

	Dim VXFLAG

	V_COD = Split(ITStr(0),CODESPLITTER)
	V1 = V_COD(0)
	V2 = V_COD(1)

	If Trim(V2)="" Then
		VXFLAG = FALSE
	Else
		VXFLAG = TRUE
	End IF
			
	SBody = SBody & "			<table id='" & VARIABLE & "_table' class='table table-hover' cellpadding='0' cellspacing='0' border='0'>" & vbCRLF
	SBody = SBody & "				<colgroup>" & vbCRLF

	If VXFlag Then
		SBody = SBody & "					<col width=""10%""/>" & vbCRLF
		SBody = SBody & "					<col width=""*""/>" & vbCRLF
	Else
		SBody = SBody & "					<col width=""*""/>" & vbCRLF
	End IF
	SBody = SBody & "				</colgroup>" & vbCRLF

	For iCnt=0 To UBound(ITStr)
		If VarType(ITStr)<>0 And VarType(ITSTR)<>1 Then
			V_COD = Split(ITStr(iCnt),CODESPLITTER)
			V1 = V_COD(0)
			V2 = V_COD(1)
			SBody = SBody & "				<tr>" & vbCRLF
			If VXFlag Then
				SBody = SBody & "				<th class=""text-center"" style=""vertical-align:middle;"">" & vbCRLF
				SBody = SBody & "				<label id=""L" & VARIABLE & "_" & V1 & """ for="""& VARIABLE & "_"& V1 &""">" & V2 & "</label>" & vbCRLF
				SBody = SBody & "				</th>" & vbCRLF
				SBody = SBody & "				<td>" & vbCRLF
				SBody = SBody & "				<textarea class=""form-control"" id=""" & VARIABLE & "_" & V1 & """ name=""" & VARIABLE & "_" & V1 & """ style=""width:98%;height=50px;"" class=""text1""></textarea>" & vbCRLF
				SBody = SBody & "				</td>" & vbCRLF
			Else
				SBody = SBody & "				<td style=""text-align:center;""><textarea class=""form-control"" id=""" & VARIABLE & "_" & V1 & """ name=""" & VARIABLE & "_" & V1 & """ style=""width:98%;height=50px;"" class=""text1""></textarea></td>" & vbCRLF
			End IF
			SBody = SBody & "				</tr>" & vbCRLF

			VAR = VAR & VARIABLE & "_" & V1 & ","
			XVAR = XVAR & VARIABLE & "_" & V1 & ","
			If InStr(V2,"*OTHER")>0 Then
				VAR = VAR & "T" & VARIABLE & "_" & V1 & ","
				XVAR = XVAR & "T" & VARIABLE & "_" & V1 & ","
			End IF
		End IF
	Next
	
	SBody = SBody & "		</table>" & vbCrLF

	If NFlag Then
		SBody = SBody & "		<p></p><div class=""checkbox""><label style=""cursor:pointer;""><input type=""checkbox"" id="""&VARIABLE&"_NONE"" name="""&VARIABLE&"_NONE"" value=""1""/>"&NONSTR&"</label></div>" & vbCRLF
	End If
	SBody = SBody & "		</div>" & vbCRLF
	SBody = SBody & "	</div>" & vbCRLF

	If NFlag Then
		Response.Write "<script type=""text/javascript"" language=""javascript"">" & vbCrLF
		Response.Write "<!--" & vbCrLF
		Response.Write "	$(document).ready(function(){" & vbCrLF
		Response.Write "		$(""#"&VARIABLE&"_NONE"").click(function(){" & vbCrLF
		Response.Write "			itemDisabledSetup("""&XVAR&""".split("",""),$(""#"&VARIABLE&"_NONE"").prop(""checked""));" & vbCrLF
		Response.Write "		})" & vbCrLf
		Response.Write "	});" & vbCrLf
		Response.Write "//-->" & vbCrLF
		Response.Write "</script>"

		VAR = VAR & VARIABLE & "_NONE,"
	End IF

	XVAR = Left(XVAR,Len(XVAR)-1)

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

	If NFlag Then
	JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & "_NONE" & Chr(34) &").is("":checked"")==false){" & vbCrLF
	End if

	For iCnt=0 To AMX-1
		If VarType(ITStr)<>0 And VarType(ITSTR)<>1 Then
			V_COD = Split(ITStr(iCnt),CODESPLITTER)
			V1 = V_COD(0)

			JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & "_" & V1 & Chr(34) &").val()=="""")" & vbCrLF
			JBody = JBody & "	{" & vbCrLF
			JBody = JBody & "		alert($(""#L" & VARIABLE & "_" & V1 &""").html()+"" "&LangQuestion(1)&""");" & vbCRLF
			JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
			JBody = JBody & "		return;" & vbCRLF
			JBody = JBody & "	}" & vbCRLF

		End IF
	Next
	
	JBody = JBody & "	var xx;" & vbCRLF
	JBody = JBody & "	var xy;" & vbCRLF
	V2 = ""

	For iCnt=0 To UBound(ITStr)
		If VarType(ITStr)<>0 And VarType(ITSTR)<>1 Then
			V_COD = Split(ITStr(iCnt),CODESPLITTER)
			V1 = V_COD(0)
			

			JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & "_" & V1 & Chr(34) &").val()!="""")" & vbCrLF
			JBody = JBody & "	{" & vbCrLF

			If iCnt<>0 Then
				JBody = JBody & "		xx = $(""#" & VARIABLE & "_" & V2 & """).val().trim();" & vbCrLF
				JBody = JBody & "		xy = $(""#" & VARIABLE & "_" & V1 & """).val().trim();" & vbCrLF

				JBody = JBody & "		if (xy.length<" & MH & ")" & vbCrLF
				JBody = JBody & "		{" & vbCrLF
				JBody = JBody & "			alert($(""#L" & VARIABLE & "_" & V1 &""").html()+"" " & LangQuestion(2) & """);" & vbCRLF
				JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "			return;" & vbCRLF
				JBody = JBody & "		}" & vbCrLF & vbCrLF

				JBody = JBody & "		if (containsChars(xy," & ERRORSTR & "))" & vbCrLF
				JBody = JBody & "		{" & vbCrLF
				JBody = JBody & "			alert($(""#L" & VARIABLE & "_" & V1 &""").html()+"" "&LangQuestion(3)&""");" & vbCrLF
				JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "			return;" & vbCRLF
				JBody = JBody & "		}" & vbCrLF

				JBody = JBody & "		if (xx==xy)" & vbCrLF
				JBody = JBody & "		{" & vbCrLF
				JBody = JBody & "			alert($(""#L" & VARIABLE & "_" & V1 &""").html()+"" "&LangQuestion(10)&""");" & vbCrLF
				JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "			return;" & vbCRLF
				JBody = JBody & "		}" & vbCrLF
				
			Else
				JBody = JBody & "		xx = $(""#" & VARIABLE & "_" & V1 & """).val().trim();" & vbCrLF
				JBody = JBody & "		if (xx.length<" & MH & ")" & vbCrLF
				JBody = JBody & "		{" & vbCrLF
				JBody = JBody & "			alert($(""#L" & VARIABLE & "_" & V1 &""").html()+"" " & LangQuestion(2) & """);" & vbCRLF
				JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "			return;" & vbCRLF
				JBody = JBody & "		}" & vbCrLF & vbCrLF

				JBody = JBody & "		if (containsChars(xx," & ERRORSTR & "))" & vbCrLF
				JBody = JBody & "		{" & vbCrLF
				JBody = JBody & "			alert($(""#L" & VARIABLE & "_" & V1 &""").html()+"" "&LangQuestion(3)&""");" & vbCrLF
				JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "			return;" & vbCRLF
				JBody = JBody & "		}" & vbCrLF
			End If			
			JBody = JBody & "	}" & vbCRLF
			V2 = V1
		End IF
	Next

	If NFlag Then
		JBody = JBody & "	}" & vbCRLF
	End if

	BODYSTR = SBody
	JBODYSTR = JBody

End Function


'#######################################################################################
'이유 받는 TextArea형
'VARIABLE : 변수 명
'TEXT : 질문 TEXT
'MINLENGTH: 최소 입력 길이
'NFLAG : None 처리
'BODYSTR : HTML 사용
'JBODYSTR : 자바스크립트
'#######################################################################################
Function QuestionTEXTAREABOX(VARIABLE,TEXT,MINLENGTH,NFLAG,ByRef BODYSTR,ByRef JBODYSTR)

	Dim SBody,ITStr,V_COD,iCnt,V1,V2
	Dim JBody
	Dim QName,DSTR,ESTR
	Dim WidthV,HeightV,CTV
	Dim ML,MH
	
	If MINLENGTH="" Or MINLENGTH="0" Then 
		MH="4"
	Else
		MH = MINLENGTH
	End IF

	HeightV = "30px"

	SBody = ""
	JBody = ""
	DSTR = ""
	ESTR = ""

	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
	
	SBody = SBody & "		<textarea class=""form-control"" name=""" & VARIABLE & """ id=""" & VARIABLE & """ style=""width:96%;height:50px;"" class=""text1""/></textarea>" & vbCRLF

	VAR = VAR & VARIABLE & ","

	If NFlag Then
		SBody = SBody & "		<p></p><div class=""checkbox""><label style=""cursor:pointer;""><input type=""checkbox"" id="""&VARIABLE&"_NONE"" name="""&VARIABLE&"_NONE"" value=""1""/>"&NONSTR&"</label></div>" & vbCRLF

		Response.Write "<script type=""text/javascript"" language=""javascript"">" & vbCrLF
		Response.Write "<!--" & vbCrLF
		Response.Write "	$(document).ready(function(){" & vbCrLF
		Response.Write "		$(""#"&VARIABLE&"_NONE"").click(function(){" & vbCrLF
		Response.Write "			itemDisabledSetup("""&VARIABLE&""".split("",""),$(""#"&VARIABLE&"_NONE"").attr(""checked""));" & vbCrLF
		Response.Write "		})" & vbCrLf
		Response.Write "	});" & vbCrLf
		Response.Write "//-->" & vbCrLF
		Response.Write "</script>"

		VAR = VAR & VARIABLE & "_NONE,"

	End IF

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

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

	JBody = JBody & "	var xx;" & vbCRLF
	JBody = JBody & "	xx = $(""#" & VARIABLE & """).val().trim();" & vbCrLF

	If NFlag Then
	JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & "_NONE" & Chr(34) &").is("":checked"")==false){" & vbCrLF
	End if

	JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & Chr(34) &").val().trim()=="""")" & vbCrLF
	JBody = JBody & "	{" & vbCrLF
	JBody = JBody & "		alert("""&LangQuestion(1)&""");" & vbCRLF
	JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "		return;" & vbCRLF
	JBody = JBody & "	}" & vbCRLF

	JBody = JBody & "	if (xx.length<" & MH & ")" & vbCrLF
	JBody = JBody & "	{" & vbCrLF
	JBody = JBody & "		alert("""&LangQuestion(2)&""");" & vbCRLF
	JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "		return;" & vbCRLF
	JBody = JBody & "	}" & vbCrLF & vbCrLF

	JBody = JBody & "		if (containsChars(xx," & ERRORSTR & "))" & vbCrLF
	JBody = JBody & "		{" & vbCrLF
	JBody = JBody & "			alert("""&LangQuestion(3)&""");" & vbCrLF
	JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "			return;" & vbCRLF
	JBody = JBody & "		}" & vbCrLF

	If NFlag Then
		JBody = JBody & "		}" & vbCrLF
	End if

	BODYSTR = SBody
	JBODYSTR = JBody

End Function


'#######################################################################################
'텍스트 박스가 세로로 여러개 보여지는 Template
'VARIABLE : 변수 명
'ATTRIBUTE: 속성 정보
'TEXT : 질문 TEXT
'ATTMAX : 최소 응답 해야 하는 갯수
'MINLENGTH: 최소 입력 길이
'NFLAG : None 처리
'BODYSTR : HTML 사용
'JBODYSTR : 자바스크립트
'#######################################################################################
Function QuestionTEXTAREABOXATTGROUP(VARIABLE,ATTRIBUTE,TEXT,ATTMAX,MINLENGTH,NFLAG,ByRef BODYSTR,ByRef JBODYSTR)


	Dim SBody,ATStr,V_COD,iCnt,V1,V2
	Dim JBody
	Dim QName,DSTR,ESTR
	Dim WidthV,HeightV,CTV
	Dim AMX,ML,MH
	Dim GTStr,TTStr,cCnt
	Dim XCnt
	Dim XVAR
	
	If ATTMAX="" Or ATTMAX="0" Then 
		AMX=1
	Else
		AMX = ATTMAX
	End If
	
	If MINLENGTH="" Or MINLENGTH="0" Then 
		MH="4"
	Else
		MH = MINLENGTH
	End IF

	HeightV = "30px"
	GTSTr = Split(ATTRIBUTE,GROUPSPLITTER)
	'ITStr = Split(ATTRIBUTE,LABELSPLITTER)

	

	SBody = ""
	JBody = ""
	DSTR = ""
	ESTR = ""

	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		
	

	If NFlag Then
	JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & "_NONE" & Chr(34) &").is("":checked"")==false){" & vbCrLF
	End if

	JBody = JBody & "		var xx;" & vbCRLF
	JBody = JBody & "		var xy;" & vbCRLF
	JBody = JBody & "		var TextFlag;" & vbCRLF
	
	xCnt=1
	For cCnt=0 To UBound(GTStr)

		If VarType(GTStr)<>0 And VarType(GTStr)<>1 Then

		TTStr = Split(GTStr(cCnt),GCODESPLITTER)
		ATStr = Split(TTStr(1),LABELSPLITTER)

		DSTR = DSTR & vbCRLF
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "<table id='" & VARIABLE & cCnt+1 &"_table' class='table table-bordered table-hover nomarintable'>" & vbCRLF
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "		<colgroup>" & vbCRLF
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			<col width=""12%"">" & vbCRLF
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			<col width=""20%"">" & vbCRLF
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			<col width=""*"">" & vbCRLF
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "		</colgroup>" & vbCRLF
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "		<tr>" & vbCRLF	
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			<th rowspan="""& UBound(ATStr)+1 &""" class='info' style=""text-align:center;vertical-align:middle;"">" & TTStr(0) & "</th>" & vbCRLF

		For iCnt=0 To UBound(ATStr)
			If VarType(ATStr)<>0 And VarType(ATSTR)<>1 Then
				V_COD = Split(ATStr(iCnt),CODESPLITTER)
				V1 = V_COD(0)
				V2 = V_COD(1)

				If iCnt>0 Then
					DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "		<tr>" & vbCrLF
				End If
				DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			<td class=""Bd"">" & vbCRLF
				DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "				" & V2 & ""&vbCRLF
				DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			</td>" & vbCrLF
				DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			<td>" & vbCRLF
				DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "				<textarea class=""form-control"" name=""" & VARIABLE & "_" & V1 &  """ id=""" & VARIABLE & "_" & V1 &""" style=""width:96%;height:50px;"" class=""text1""/></textarea>"&vbCRLF
				DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "			</td>" & vbCrLF
				DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "		</tr>" & vbCrLF

				JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & "_" & V1 & Chr(34) &").val()=="""")" & vbCrLF
				JBody = JBody & "	{" & vbCrLF
				If iCnt=0 Then
					JBody = JBody & "		alert("""&LangQuestion(1)&""");" & vbCRLF
				Else
					JBody = JBody & "		alert(""(" & xCnt & ") "&LangQuestion(1)&""");" & vbCRLF
				End IF
				JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "		return;" & vbCRLF
				JBody = JBody & "	}" & vbCRLF

				JBody = JBody & "	if ($("& Chr(34) & "#" & VARIABLE & "_" & V1 & Chr(34) &").val()!="""")" & vbCrLF
				JBody = JBody & "	{" & vbCrLF

				If iCnt<>0 Then
					JBody = JBody & "		xx = $(""#" & VARIABLE & "_" & V1 & """).val().trim();" & vbCrLF
					JBody = JBody & "		xy = $(""#" & VARIABLE & "_" & V1 & """).val().trim();" & vbCrLF

					JBody = JBody & "		if (xx.length<" & MH & ")" & vbCrLF
					JBody = JBody & "		{" & vbCrLF
					JBody = JBody & "			alert(""" & LangQuestion(2) & """);" & vbCRLF
					JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "			return;" & vbCRLF
					JBody = JBody & "		}" & vbCrLF & vbCrLF

					JBody = JBody & "		if (containsChars(xx," & ERRORSTR & "))" & vbCrLF
					JBody = JBody & "		{" & vbCrLF
					JBody = JBody & "			alert("""&LangQuestion(3)&""");" & vbCrLF
					JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "			return;" & vbCRLF
					JBody = JBody & "		}" & vbCrLF

					JBody = JBody & "		TextFlag = TextOverlap("""& VARIABLE & "_" & V1 &""",xy);" & vbCrLF
					JBody = JBody & "		if (TextFlag==false)" & vbCrLF
					JBody = JBody & "		{" & vbCrLF
					JBody = JBody & "			alert(""[""+xy+""] "&LangQuestion(1)&""");" & vbCrLF
					JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "			return;" & vbCRLF
					JBody = JBody & "		}" & vbCrLF
					
				Else
					JBody = JBody & "		xx = $(""#" & VARIABLE & "_" & V1 & """).val().trim();" & vbCrLF
					JBody = JBody & "		xy = $(""#" & VARIABLE & "_" & V1 & """).val().trim();" & vbCrLF


					JBody = JBody & "		if (xx.length<" & MH & ")" & vbCrLF
					JBody = JBody & "		{" & vbCrLF
					JBody = JBody & "			alert(""" & LangQuestion(2) & """);" & vbCRLF
					JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "			return;" & vbCRLF
					JBody = JBody & "		}" & vbCrLF & vbCrLF

					JBody = JBody & "		if (containsChars(xx," & ERRORSTR & "))" & vbCrLF
					JBody = JBody & "		{" & vbCrLF
					JBody = JBody & "			alert("""&LangQuestion(3)&""");" & vbCrLF
					JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "			return;" & vbCRLF
					JBody = JBody & "		}" & vbCrLF

					JBody = JBody & "		TextFlag = TextOverlap("""& VARIABLE & "_" & V1 &""",xx);" & vbCrLF
					JBody = JBody & "		if (TextFlag==false)" & vbCrLF
					JBody = JBody & "		{" & vbCrLF
					JBody = JBody & "			alert(""[""+xx+""] "&LangQuestion(1)&""");" & vbCrLF
					JBody = JBody & "			$(" & Chr(34) & "#" & VARIABLE  & "_" & V1 & Chr(34) & ").focus();" & vbCRLF
					JBody = JBody & "			return;" & vbCRLF
					JBody = JBody & "		}" & vbCrLF

				End If			
				JBody = JBody & "	}" & vbCRLF

				VAR = VAR & VARIABLE & "_" & V1 & ","
				XVAR = XVAR & VARIABLE & "_" & V1 & ","
				xCnt=xCnt+1
			End IF
		Next
		End If
		DSTR = DSTR & vbTab & vbTab & vbTab & vbTab & vbTab & "</table>" & vbCRLF
		DSTR = DSTR & "" & LABELSPLITTER
	Next


	If NFlag Then
		JBody = JBody & "}" & vbCrLF
	End if

	SBody = SBody & "				<table id='" & VARIABLE & "_table' cellpadding='0' cellspacing='0' border='0' class='table table-responsive nopadtable'>" & vbCRLF
	SBody = SBody & "					<colgroup>" & vbCRLF
	SBody = SBody & "						<col width=""100%""/>" & vbCRLF
	SBody = SBody & "					</colgroup>" & vbCRLF

	ESTR = Split(DSTR,LABELSPLITTER)

	cCnt=1	
	Dim LC
	LC = UBound(ESTR)

	For iCnt=0 To LC-1
		If UBound(ESTR)>=iCnt Then
			If VarType(ESTR(iCnt))<>0 And VarType(ESTR(iCnt))<>1 And ESTR(iCnt)<>"" Then
				SBody = SBody & "					<tr>" & vbCRLF
				SBody = SBody & "					<td>" & ESTR(iCnt)& "</td>" & vbCRLF
				SBody = SBody & "					</tr>" & vbCRLF
			End If
		End IF
	Next

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

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


	If NFlag Then

		SBody = SBody & "		<p></p><div class=""checkbox""><label style=""cursor:pointer;""><input type=""checkbox"" id="""&VARIABLE&"_NONE"" name="""&VARIABLE&"_NONE"" value=""1""/>"&NONSTR&"</label></div>" & vbCRLF
		Response.Write "<script type=""text/javascript"" language=""javascript"">" & vbCrLF
		Response.Write "<!--" & vbCrLF
		Response.Write "	$(document).ready(function(){" & vbCrLF
		Response.Write "		$(""#"&VARIABLE&"_NONE"").click(function(){" & vbCrLF
		Response.Write "			itemDisabledSetup("""&XVAR&""".split("",""),$(""#"&VARIABLE&"_NONE"").attr(""checked""));" & vbCrLF
		Response.Write "		})" & vbCrLf
		Response.Write "	});" & vbCrLf
		Response.Write "//-->" & vbCrLF
		Response.Write "</script>"

		VAR = VAR & VARIABLE & "_NONE,"
	End IF

	
	BODYSTR = SBody
	JBODYSTR = JBody


End Function

%>