<%
'#######################################################################################
'연도와 월을 받는 형태
'VARIABLE : 변수 명
'TEXT : 질문 TEXT
'MINY : 최소 입력값 - 연도
'MAXY : 최대 입력값 - 연도
'LENGTH : 입력 자리수 - 연도
'MINM : 최소 입력값 - 월
'MAXM : 최대 입력값 - 월
'YLABEL : 연도 - TEXT
'MLABEL : 월 - TEXT
'BODYSTR : HTML 사용
'JBODYSTR : 자바스크립트
'#######################################################################################
Function QuestionYEARMONTH(VARIABLE,TEXT,MINY,MAXY,LENGTH,MINM,MAXM,YLABEL,MLABEL,NFlag,ByRef BODYSTR,ByRef JBODYSTR)

	Dim SBody,iCnt,V1,V2	
	Dim JBody
	Dim QName,DSTR,ESTR
	Dim WidthV,HeightV,CTV
	Dim MIV,MAV,LTH

	If LENGTH="" Or LENGTH="0" Then 
		LTH="1"
	Else
		LTH=LENGTH
	End IF

	HeightV = "30px"

	

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

	VAR = VARIABLE & "_1," & VARIABLE & "_2,"
	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 & "			<div class=""form-group"">" & vbCRLF
	SBody = SBody & "				<div class=""input-group"">" & vbCRLF
	SBody = SBody & "					<input type=""NUMBER"" class=""form-control"" name=""" & VARIABLE & "_1"" id=""" & VARIABLE & "_1"" value="""" min="""&MINY&""" max="""&MAXY&""" size=""20"" maxlength=""" & LTH & """/>" & vbCRLF
	If YLabel<>"" Then
	End If
	SBody = SBody & "					<div class=""input-group-addon"">"&YLabel &"</div>" & vbCRLF
	SBody = SBody & "				</div>" & vbCRLF
	SBody = SBody & "			</div>" & vbCRLF

	SBody = SBody & "			<div class=""form-group"">" & vbCRLF
	SBody = SBody & "				<div class=""input-group"">" & vbCRLF
	SBody = SBody & "					<input type=""NUMBER"" class=""form-control"" name=""" & VARIABLE & "_2"" id=""" & VARIABLE & "_2"" value="""" min="""&MINM&""" max="""&MAXM&""" size=""20"" maxlength=""2""/>" & vbCRLF
	If MLabel<>"" Then
	End If
	SBody = SBody & "					<div class=""input-group-addon"">"&MLabel &"</div>" & vbCRLF
	SBody = SBody & "				</div>" & vbCRLF
	SBody = SBody & "			</div>" & vbCRLF

	If NFlag Then
		SBody = SBody & "		<p></p><div class=""col-md-12 col-xs-12""><div class=""checkbox""><label style=""cursor:pointer;""><input type=""checkbox"" id="""&VARIABLE&"_NONE"" name="""&VARIABLE&"_NONE"" value=""1""/> "&NONSTR&"</label></div></div>" & vbCRLF
		VAR = VAR & VARIABLE & "_NONE,"
	End IF

	SBody = SBody & "		</div>" & vbCRLF
	SBody = SBody & "	</div>" & 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 & "_1" & Chr(34) &").val()=="""")" & vbCrLF
	JBody = JBody & "	{" & vbCrLF
	JBody = JBody & "		alert("""& LangQuestion(1) &""");" & vbCRLF
	JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_1" & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "		return;" & vbCRLF
	JBody = JBody & "	}" & vbCRLF

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

	'숫자인지 체크
	JBody = JBody & "	if (!isNaN($("& Chr(34) & "#" &VARIABLE & "_1" & Chr(34) &").val())==false)" & vbCrLF
	JBody = JBody & "	{" & vbCrLF
	JBody = JBody & "		alert("""& LangQuestion(13) &""");" & vbCRLF
	JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_1" & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "		return;" & vbCRLF
	JBody = JBody & "	}" & vbCRLF

	'숫자인지 체크
	JBody = JBody & "	if (!isNaN($("& Chr(34) & "#" &VARIABLE & "_2" & Chr(34) &").val())==false)" & vbCrLF
	JBody = JBody & "	{" & vbCrLF
	JBody = JBody & "		alert("""& LangQuestion(13) &""");" & vbCRLF
	JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_2" & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "		return;" & vbCRLF
	JBody = JBody & "	}" & vbCRLF
	
	If MinY<>"" Then
		JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & "_1" & Chr(34) &").val())<" & MinY & ")" & vbCrLF
		JBody = JBody & "	{" & vbCrLF
		JBody = JBody & "		alert("""& LangQuestion(6) &""");" & vbCRLF
		JBody = Replace(JBody,"#num#",MINY)
		JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_1" & Chr(34) & ").focus();" & vbCRLF
		JBody = JBody & "		return;" & vbCRLF
		JBody = JBody & "	}" & vbCRLF	
	End If
	
	If MAXY<>"" Then
		JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & "_1" & Chr(34) &").val())>" & MAXY & ")" & vbCrLF
		JBody = JBody & "	{" & vbCrLF
		JBody = JBody & "		alert("""& LangQuestion(7) &""");" & vbCRLF
		JBody = Replace(JBody,"#num#",MAXY)
		JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_1" & Chr(34) & ").focus();" & vbCRLF
		JBody = JBody & "		return;" & vbCRLF
		JBody = JBody & "	}" & vbCRLF	
	End If
	
	If MinM<>"" Then
		JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & "_2" & Chr(34) &").val())<" & MinM & ")" & vbCrLF
		JBody = JBody & "	{" & vbCrLF
		JBody = JBody & "		alert("""& LangQuestion(6) &""");" & vbCRLF
		JBody = Replace(JBody,"#num#",MINM)
		JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_2" & Chr(34) & ").focus();" & vbCRLF
		JBody = JBody & "		return;" & vbCRLF
		JBody = JBody & "	}" & vbCRLF	
	End If
	
	If MAXM<>"" Then
		JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & "_2" & Chr(34) &").val())>" & MAXM & ")" & vbCrLF
		JBody = JBody & "	{" & vbCrLF
		JBody = JBody & "		alert("""& LangQuestion(7) &""");" & vbCRLF
		JBody = Replace(JBody,"#num#",MAXM)
		JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_2" & Chr(34) & ").focus();" & vbCRLF
		JBody = JBody & "		return;" & vbCRLF
		JBody = JBody & "	}" & vbCRLF	
	End IF

	If NFlag Then
		JBody = JBody & "		}" & vbCrLF
	End if
	
	Response.Write vbCrLF
	Response.write "<script type=""text/javascript"" language=""javascript"">" & vbCrLF
	Response.Write "<!--" & vbCRLF
	Response.Write "	$(document).ready(function(){" & vbCrLF
	Response.Write "		$(""#" & VARIABLE & "_1"").numeric();" & vbCrLF
	Response.Write "		$(""#" & VARIABLE & "_1"").css(""ime-mode"",""disabled"");" & vbCrLF
	Response.Write "		$(""#" & VARIABLE & "_2"").numeric();" & vbCrLF
	Response.Write "		$(""#" & VARIABLE & "_2"").css(""ime-mode"",""disabled"");" & vbCrLF
	If NFlag Then
		Response.Write "		$(""#"&VARIABLE&"_NONE"").click(function(){" & vbCrLF
		Response.Write "			itemDisabledSetup("""&VARIABLE&"_1,"&VARIABLE&"_2"".split("",""),$(""#"&VARIABLE&"_NONE"").prop(""checked""));" & vbCrLF
		Response.Write "		})" & vbCrLf
	End If
	Response.write "        $(""form[name='Survey']"").addClass(""form-inline"");" & vbCrLF
	Response.Write "	});" & vbCrLF
	Response.Write "//-->" & vbCrLF
	Response.Write "</script>" & vbCrLF

	BODYSTR = SBody
	JBODYSTR = JBody

End Function

'#######################################################################################
'2개 의 기간을 받는 경우
'VARIABLE : 변수 명
'TEXT : 질문 TEXT
'MINY : 최소 입력값 - 연도
'MAXY : 최대 입력값 - 연도
'LENGTH : 입력 자리수 - 연도
'MINM : 최소 입력값 - 월
'MAXM : 최대 입력값 - 월
'YLABEL : 연도 - TEXT
'MLABEL : 월 - TEXT
'BODYSTR : HTML 사용
'JBODYSTR : 자바스크립트
'#######################################################################################
Function QuestionBETWEEN(VARIABLE,TEXT,MINY,MAXY,LENGTH,MINM,MAXM,YLABEL,MLABEL,NFlag,ByRef BODYSTR,ByRef JBODYSTR)

	Dim SBody,iCnt,V1,V2	
	Dim JBody
	Dim QName,DSTR,ESTR
	Dim WidthV,HeightV,CTV
	Dim MIV,MAV,LTH

	If LENGTH="" Or LENGTH="0" Then 
		LTH="1"
	Else
		LTH=LENGTH
	End IF

	HeightV = "30px"

	

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

	VAR = VARIABLE & ","
	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 & "			<div class=""form-group"">" & vbCRLF
	SBody = SBody & "				<div class=""input-group"">" & vbCRLF
	SBody = SBody & "					<input type=""NUMBER"" class=""form-control"" name=""" & VARIABLE & "_1"" id=""" & VARIABLE & "_1"" value="""" min="""&MINY&""" max="""&MAXY&""" size=""10"" maxlength=""" & LTH & """/>" & vbCRLF
	If YLabel<>"" Then
	End If
	SBody = SBody & "					<div class=""input-group-addon"">"&YLabel &"</div>" & vbCRLF
	SBody = SBody & "				</div>" & vbCRLF
	SBody = SBody & "				<div class=""input-group"">" & vbCRLF
	SBody = SBody & "					<input type=""NUMBER"" class=""form-control"" name=""" & VARIABLE & "_2"" id=""" & VARIABLE & "_2"" value="""" min="""&MINM&""" max="""&MAXM&""" size=""10"" maxlength=""" & LTH & """/>" & vbCRLF
	If MLabel<>"" Then
	End If
	SBody = SBody & "					<div class=""input-group-addon"">"&MLabel &"</div>" & vbCRLF
	SBody = SBody & "				</div>" & vbCRLF


	SBody = SBody & "			</div>" & vbCRLF
	SBody = SBody & "			<label>~</label>" & vbCRLF
	SBody = SBody & "			<div class=""form-group"">" & vbCRLF
	SBody = SBody & "				<div class=""input-group"">" & vbCRLF
	SBody = SBody & "					<input type=""NUMBER"" class=""form-control"" name=""" & VARIABLE & "_3"" id=""" & VARIABLE & "_3"" value="""" min="""&MINY&""" max="""&MAXY&""" size=""10"" maxlength=""" & LTH & """/>" & vbCRLF
	If YLabel<>"" Then
	End If
	SBody = SBody & "					<div class=""input-group-addon"">"&YLabel &"</div>" & vbCRLF
	SBody = SBody & "				</div>" & vbCRLF
	SBody = SBody & "				<div class=""input-group"">" & vbCRLF
	SBody = SBody & "					<input type=""NUMBER"" class=""form-control"" name=""" & VARIABLE & "_4"" id=""" & VARIABLE & "_4"" value="""" min="""&MINM&""" max="""&MAXM&""" size=""10"" maxlength=""" & LTH & """/>" & vbCRLF
	If MLabel<>"" Then
	End If
	SBody = SBody & "					<div class=""input-group-addon"">"&MLabel &"</div>" & vbCRLF
	SBody = SBody & "				</div>" & vbCRLF

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


	If NFlag Then
		SBody = SBody & "		<p></p><div class=""col-md-12 col-xs-12""><div class=""checkbox""><label style=""cursor:pointer;""><input type=""checkbox"" id="""&VARIABLE&"_NONE"" name="""&VARIABLE&"_NONE"" value=""1""/> "&NONSTR&"</label></div></div>" & vbCRLF
		VAR = VAR & VARIABLE & "_NONE,"
	End IF

	SBody = SBody & "		</div>" & vbCRLF
	SBody = SBody & "	</div>" & 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 & "_1" & Chr(34) &").val()=="""")" & vbCrLF
	JBody = JBody & "	{" & vbCrLF
	JBody = JBody & "		alert("""& LangQuestion(1) &""");" & vbCRLF
	JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_1" & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "		return;" & vbCRLF
	JBody = JBody & "	}" & vbCRLF

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

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

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

	'숫자인지 체크
	JBody = JBody & "	if (!isNaN($("& Chr(34) & "#" &VARIABLE & "_1" & Chr(34) &").val())==false)" & vbCrLF
	JBody = JBody & "	{" & vbCrLF
	JBody = JBody & "		alert("""& LangQuestion(13) &""");" & vbCRLF
	JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_1" & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "		return;" & vbCRLF
	JBody = JBody & "	}" & vbCRLF

	JBody = JBody & "	if (!isNaN($("& Chr(34) & "#" &VARIABLE & "_2" & Chr(34) &").val())==false)" & vbCrLF
	JBody = JBody & "	{" & vbCrLF
	JBody = JBody & "		alert("""& LangQuestion(13) &""");" & vbCRLF
	JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_2" & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "		return;" & vbCRLF
	JBody = JBody & "	}" & vbCRLF

	JBody = JBody & "	if (!isNaN($("& Chr(34) & "#" &VARIABLE & "_3" & Chr(34) &").val())==false)" & vbCrLF
	JBody = JBody & "	{" & vbCrLF
	JBody = JBody & "		alert("""& LangQuestion(13) &""");" & vbCRLF
	JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_3" & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "		return;" & vbCRLF
	JBody = JBody & "	}" & vbCRLF

	JBody = JBody & "	if (!isNaN($("& Chr(34) & "#" &VARIABLE & "_4" & Chr(34) &").val())==false)" & vbCrLF
	JBody = JBody & "	{" & vbCrLF
	JBody = JBody & "		alert("""& LangQuestion(13) &""");" & vbCRLF
	JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_4" & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "		return;" & vbCRLF
	JBody = JBody & "	}" & vbCRLF
	
	If MinY<>"" Then
		JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & "_1" & Chr(34) &").val())<" & MinY & ")" & vbCrLF
		JBody = JBody & "	{" & vbCrLF
		JBody = JBody & "		alert("""& LangQuestion(6) &""");" & vbCRLF
		JBody = Replace(JBody,"#num#",MINY)
		JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_1" & Chr(34) & ").focus();" & vbCRLF
		JBody = JBody & "		return;" & vbCRLF
		JBody = JBody & "	}" & vbCRLF	
	End If
	
	If MAXY<>"" Then
		JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & "_1" & Chr(34) &").val())>" & MAXY & ")" & vbCrLF
		JBody = JBody & "	{" & vbCrLF
		JBody = JBody & "		alert("""& LangQuestion(7) &""");" & vbCRLF
		JBody = Replace(JBody,"#num#",MAXY)
		JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_1" & Chr(34) & ").focus();" & vbCRLF
		JBody = JBody & "		return;" & vbCRLF
		JBody = JBody & "	}" & vbCRLF	
	End If
	
	If MinM<>"" Then
		JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & "_2" & Chr(34) &").val())<" & MinM & ")" & vbCrLF
		JBody = JBody & "	{" & vbCrLF
		JBody = JBody & "		alert("""& LangQuestion(6) &""");" & vbCRLF
		JBody = Replace(JBody,"#num#",MINM)
		JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_2" & Chr(34) & ").focus();" & vbCRLF
		JBody = JBody & "		return;" & vbCRLF
		JBody = JBody & "	}" & vbCRLF	
	End If
	
	If MAXM<>"" Then
		JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & "_2" & Chr(34) &").val())>" & MAXM & ")" & vbCrLF
		JBody = JBody & "	{" & vbCrLF
		JBody = JBody & "		alert("""& LangQuestion(7) &""");" & vbCRLF
		JBody = Replace(JBody,"#num#",MAXM)
		JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_2" & Chr(34) & ").focus();" & vbCRLF
		JBody = JBody & "		return;" & vbCRLF
		JBody = JBody & "	}" & vbCRLF	
	End If

	If MinY<>"" Then
		JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & "_3" & Chr(34) &").val())<" & MinY & ")" & vbCrLF
		JBody = JBody & "	{" & vbCrLF
		JBody = JBody & "		alert("""& LangQuestion(6) &""");" & vbCRLF
		JBody = Replace(JBody,"#num#",MINY)
		JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_3" & Chr(34) & ").focus();" & vbCRLF
		JBody = JBody & "		return;" & vbCRLF
		JBody = JBody & "	}" & vbCRLF	
	End If
	
	If MAXY<>"" Then
		JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & "_3" & Chr(34) &").val())>" & MAXY & ")" & vbCrLF
		JBody = JBody & "	{" & vbCrLF
		JBody = JBody & "		alert("""& LangQuestion(7) &""");" & vbCRLF
		JBody = Replace(JBody,"#num#",MAXY)
		JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_3" & Chr(34) & ").focus();" & vbCRLF
		JBody = JBody & "		return;" & vbCRLF
		JBody = JBody & "	}" & vbCRLF	
	End If

	If MinM<>"" Then
		JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & "_4" & Chr(34) &").val())<" & MinM & ")" & vbCrLF
		JBody = JBody & "	{" & vbCrLF
		JBody = JBody & "		alert("""& LangQuestion(6) &""");" & vbCRLF
		JBody = Replace(JBody,"#num#",MINM)
		JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_4" & Chr(34) & ").focus();" & vbCRLF
		JBody = JBody & "		return;" & vbCRLF
		JBody = JBody & "	}" & vbCRLF	
	End If
	
	If MAXM<>"" Then
		JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & "_4" & Chr(34) &").val())>" & MAXM & ")" & vbCrLF
		JBody = JBody & "	{" & vbCrLF
		JBody = JBody & "		alert("""& LangQuestion(7) &""");" & vbCRLF
		JBody = Replace(JBody,"#num#",MAXM)
		JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_4" & Chr(34) & ").focus();" & vbCRLF
		JBody = JBody & "		return;" & vbCRLF
		JBody = JBody & "	}" & vbCRLF	
	End If

	JBody = JBody & "	asum = (parseFloat($("& Chr(34) & "#" &VARIABLE & "_1" & Chr(34) &").val()) * 100) + parseFloat($("& Chr(34) & "#" &VARIABLE & "_2" & Chr(34) &").val());"& vbCRLF
	JBody = JBody & "	bsum = (parseFloat($("& Chr(34) & "#" &VARIABLE & "_3" & Chr(34) &").val()) * 100) + parseFloat($("& Chr(34) & "#" &VARIABLE & "_4" & Chr(34) &").val());"& vbCRLF

	JBody = JBody & "if (asum>bsum)" & vbCRLF	
	JBody = JBody & "{" & vbCRLF	
	JBody = JBody & "		alert("""& LangQuestion(16) &""");" & vbCRLF
	JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_3" & Chr(34) & ").focus();" & vbCRLF
	JBody = JBody & "		return;" & vbCRLF
	JBody = JBody & "}" & vbCRLF	

	If NFlag Then
		JBody = JBody & "		}" & vbCrLF
	End if
	
	Response.Write vbCrLF
	Response.write "<script type=""text/javascript"" language=""javascript"">" & vbCrLF
	Response.Write "<!--" & vbCRLF
	Response.Write "	var asum,bsum;"& vbCRLF
	Response.Write "	asum=0; bsum=0;"& vbCRLF
	Response.Write "	$(document).ready(function(){" & vbCrLF
	Response.Write "		$(""#" & VARIABLE & "_1"").numeric();" & vbCrLF
	Response.Write "		$(""#" & VARIABLE & "_1"").css(""ime-mode"",""disabled"");" & vbCrLF
	Response.Write "		$(""#" & VARIABLE & "_2"").numeric();" & vbCrLF
	Response.Write "		$(""#" & VARIABLE & "_2"").css(""ime-mode"",""disabled"");" & vbCrLF
	Response.Write "		$(""#" & VARIABLE & "_3"").numeric();" & vbCrLF
	Response.Write "		$(""#" & VARIABLE & "_3"").css(""ime-mode"",""disabled"");" & vbCrLF
	Response.Write "		$(""#" & VARIABLE & "_4"").numeric();" & vbCrLF
	Response.Write "		$(""#" & VARIABLE & "_4"").css(""ime-mode"",""disabled"");" & vbCrLF
	Response.write "        $(""form[name='Survey']"").addClass(""form-inline"");" & vbCrLF
	If NFlag Then
		Response.Write "		$(""#"&VARIABLE&"_NONE"").click(function(){" & vbCrLF
		Response.Write "			itemDisabledSetup("""&VARIABLE&"_1,"&VARIABLE&"_2,"&VARIABLE&"_3,"&VARIABLE&"_4"".split("",""),$(""#"&VARIABLE&"_NONE"").prop(""checked""));" & vbCrLF
		Response.Write "		})" & vbCrLf
	End IF
	Response.Write "	});" & vbCrLF
	Response.Write "//-->" & vbCrLF
	Response.Write "</script>" & vbCrLF

	BODYSTR = SBody
	JBODYSTR = JBody

End Function

'#######################################################################################
'날짜 속성형
'VARIABLE : 변수 명
'ATTRIBUTE: 속성
'TEXT : 질문 TEXT
'MINV : 최소 입력값
'MAXV : 최대 입력값
'LENGTH : 입력 자리수
'PLABEL : 텍스트 박스 앞자리 TEXT
'BLABEL : 텍스트 박스 뒷자리 TEXT
'BODYSTR : HTML 사용
'JBODYSTR : 자바스크립트
'#######################################################################################
Function QuestionDATEMATRIX(VARIABLE,ATTRIBUTE,TEXT,MINY,MAXY,LENGTH,MINM,MAXM,YLABEL,MLABEL,ByRef BODYSTR,ByRef JBODYSTR)

	Dim SBody,iCnt,V1,V2
	Dim ATStr,A_COD,A1,A2
	Dim JBody
	Dim QName,DSTR,ESTR
	Dim WidthV,HeightV,CTV
	Dim MIV,MAV,LTH
	Dim COL

	If LENGTH="" Or LENGTH="0" Then 
		LTH="1"
	Else
		LTH=LENGTH
	End IF

	HeightV = "30px"
	ATStr = Split(ATTRIBUTE,LABELSPLITTER)
	COL = UBound(ATStr)

	

	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 & "			<table id='" & VARIABLE & "_table' class='table table-striped' cellpadding='0' cellspacing='0' border='0'>" & vbCRLF
	SBody = SBody & "				<colgroup>" & vbCRLF
	SBody = SBody & "					<col width=""*""/>" & vbCRLF
	SBody = SBody & "					<col width=""35%""/>" & vbCRLF

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

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

	For iCnt=0 To UBound(ATStr)
		If VarType(ATStr)<>0 And VarType(ATSTR)<>1 Then
			A_COD = Split(ATStr(iCnt),CODESPLITTER)
			A1 = A_COD(0)
			A2 = A_COD(1)
			SBody = SBody & "				<tr>" & vbCRLF
			SBody = SBody & "				<th><label id=""L" & VARIABLE & "_" & A1 & """>" & A2 & "</label></th>" & vbCRLF
			SBody = SBody & "				<td class='text-left'>" & vbCRLF

			SBody = SBody & "			<div class=""form-group"">" & vbCRLF
			SBody = SBody & "				<div class=""input-group"">" & vbCRLF
			SBody = SBody & "					<input type=""NUMBER"" class=""form-control"" name=""" & VARIABLE & "_"& A1 & "_1"" id=""" & VARIABLE & "_"& A1 & "_1"" value="""" min="""&MINY&""" max="""&MAXY&""" size=""10"" maxlength=""" & LTH & """/>" & vbCRLF
			If YLabel<>"" Then
			End If
			SBody = SBody & "					<div class=""input-group-addon"">"&YLabel &"</div>" & vbCRLF
			SBody = SBody & "				</div>" & vbCRLF
			SBody = SBody & "			</div>" & vbCRLF

			SBody = SBody & "			<div class=""form-group"">" & vbCRLF
			SBody = SBody & "				<div class=""input-group"">" & vbCRLF
			SBody = SBody & "					<input type=""NUMBER"" class=""form-control"" name=""" & VARIABLE & "_" & A1 & "_2"" id=""" & VARIABLE & "_"& A1 & "_2"" value="""" min="""&MINM&""" max="""&MAXM&""" size=""10"" maxlength=""2""/>" & vbCRLF
			If MLabel<>"" Then
			End If
			SBody = SBody & "					<div class=""input-group-addon"">"&MLabel &"</div>" & vbCRLF
			SBody = SBody & "				</div>" & vbCRLF
			SBody = SBody & "			</div>" & vbCRLF

			SBody = SBody &	"			</td>" & vbCRLF
			SBody = SBody & "				</tr>" & vbCRLF

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

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

			'숫자인지 체크
			JBody = JBody & "	if (!isNaN($("& Chr(34) & "#" &VARIABLE & "_" & A1 & "_1" & Chr(34) &").val())==false)" & vbCrLF
			JBody = JBody & "	{" & vbCrLF
			JBody = JBody & "		alert(""[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""]  "& LangQuestion(13) &""");" & vbCRLF
			JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_" & A1 & "_1" & Chr(34) & ").focus();" & vbCRLF
			JBody = JBody & "		return;" & vbCRLF
			JBody = JBody & "	}" & vbCRLF

			'숫자인지 체크
			JBody = JBody & "	if (!isNaN($("& Chr(34) & "#" &VARIABLE & "_" & A1 & "_2" & Chr(34) &").val())==false)" & vbCrLF
			JBody = JBody & "	{" & vbCrLF
			JBody = JBody & "		alert(""[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""]  "& LangQuestion(13) &""");" & vbCRLF
			JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_" & A1 & "_2" & Chr(34) & ").focus();" & vbCRLF
			JBody = JBody & "		return;" & vbCRLF
			JBody = JBody & "	}" & vbCRLF
			
			If MinY<>"" Then
				JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & "_" & A1 & "_1" & Chr(34) &").val())<" & MinY & ")" & vbCrLF
				JBody = JBody & "	{" & vbCrLF
				JBody = JBody & "		alert(""[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""]  "& LangQuestion(6) &""");" & vbCRLF
				JBody = Replace(JBody,"#num#",MINY)
				JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_" & A1 & "_1" & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "		return;" & vbCRLF
				JBody = JBody & "	}" & vbCRLF	
			End If
			
			If MAXY<>"" Then
				JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & "_" & A1 & "_1" & Chr(34) &").val())>" & MAXY & ")" & vbCrLF
				JBody = JBody & "	{" & vbCrLF
				JBody = JBody & "		alert(""[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""]  "& LangQuestion(7) &""");" & vbCRLF
				JBody = Replace(JBody,"#num#",MAXY)
				JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & "_" & A1 & "_1" & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "		return;" & vbCRLF
				JBody = JBody & "	}" & vbCRLF	
			End If
			
			If MinM<>"" Then
				JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & A1 & "_2" & Chr(34) &").val())<" & MinM & ")" & vbCrLF
				JBody = JBody & "	{" & vbCrLF
				JBody = JBody & "		alert(""[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""]  "& LangQuestion(6) &""");" & vbCRLF
				JBody = Replace(JBody,"#num#",MINM)
				JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & A1 & "_2" & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "		return;" & vbCRLF
				JBody = JBody & "	}" & vbCRLF	
			End If
			
			If MAXM<>"" Then
				JBody = JBody & "	if (parseFloat($("& Chr(34) & "#" &VARIABLE & A1 & "_2" & Chr(34) &").val())>" & MAXM & ")" & vbCrLF
				JBody = JBody & "	{" & vbCrLF
				JBody = JBody & "		alert(""[""+$(""#L" &  VARIABLE & "_" & A1 & """).text()+""]  "& LangQuestion(7) &""");" & vbCRLF
				JBody = Replace(JBody,"#num#",MAXM)
				JBody = JBody & "		$(" & Chr(34) & "#" & VARIABLE & A1 & "_2" & Chr(34) & ").focus();" & vbCRLF
				JBody = JBody & "		return;" & vbCRLF
				JBody = JBody & "	}" & vbCRLF	
			End IF

			VAR = VAR & VARIABLE & "_" & A1 & "_1,"& VARIABLE & "_" & A1 & "_2,"
			
			Response.Write "		$(""#" & VARIABLE & "_" & A1 & "_1"").numeric();" & vbCrLF
			Response.Write "		$(""#" & VARIABLE & "_" & A1 & "_1"").css(""ime-mode"",""disabled"");" & vbCrLF
			Response.Write "		$(""#" & VARIABLE & "_" & A1 & "_2"").numeric();" & vbCrLF
			Response.Write "		$(""#" & VARIABLE & "_" & A1 & "_2"").css(""ime-mode"",""disabled"");" & vbCrLF

		End If		
	Next
	Response.write "        $(""form[name='Survey']"").addClass(""form-inline"");" & vbCrLF
	Response.Write "	});" & vbCrLF
	Response.Write "//-->" & vbCrLF
	Response.Write "</script>" & vbCrLF

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

	BODYSTR = SBody
	JBODYSTR = JBody

End Function
%>