function go(theForm)
	cname		=	theForm.to_name.value
	cyear		=	theForm.to_year.value
	cmonth		= 	theForm.to_month.value
	cday		= 	theForm.to_day.value

 	if cname = "" then
		msgbox("ÀÌ¸§À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä")
		exit function
  	end if
	if isnumeric(cyear) then
		if cyear > 2040 or cyear < 1920 then
			msgbox("1920³â ~ 2040³â¸¸ Áö¿øÇÕ´Ï´Ù. ÀÔ·ÂÇÑ ³âµµ '" & cyear & "' À»  È®ÀÎÇÏ¿© ÁÖ½Ê½Ã¿ä")
			exit function
		end if
	else
		msgbox("1920³â ~ 2040³â¸¸ Áö¿øÇÕ´Ï´Ù. ÀÔ·ÂÇÑ ³âµµ '" & cyear & "' À»  È®ÀÎÇÏ¿© ÁÖ½Ê½Ã¿ä")
		exit function
	end if
	if isnumeric(cmonth) then
		if cmonth > 12 or cmonth < 1 then
			msgbox("1¿ù ~ 12¿ù¸¸ Áö¿øÇÕ´Ï´Ù. ÀÔ·ÂÇÑ ³âµµ '" & cmonth & "' À»  È®ÀÎÇÏ¿© ÁÖ½Ê½Ã¿ä")
			exit function
		end if
	else
		msgbox("1¿ù ~ 12¿ù¸¸ Áö¿øÇÕ´Ï´Ù. ÀÔ·ÂÇÑ ³âµµ '" & cmonth & "' À»  È®ÀÎÇÏ¿© ÁÖ½Ê½Ã¿ä")
		exit function
	end if
	if isnumeric(cday) then
		if cday > 31 or cday < 1 then
			msgbox("1ÀÏ ~ 31ÀÏ¸¸ Áö¿øÇÕ´Ï´Ù. ÀÔ·ÂÇÑ ³âµµ '" & cday & "' À»  È®ÀÎÇÏ¿© ÁÖ½Ê½Ã¿ä")
			exit function
		end if
	else
		msgbox("1ÀÏ ~ 31ÀÏ¸¸ Áö¿øÇÕ´Ï´Ù. ÀÔ·ÂÇÑ ³âµµ '" & cday & "' À»  È®ÀÎÇÏ¿© ÁÖ½Ê½Ã¿ä")
		exit function
	end if

	if theForm.month_type.selectedIndex = 1 then
		if cday > 30 then
			msgbox("À½·ÂÀº 30ÀÏ ÀÌ»óÀ» ÀÔ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù.")
			exit function
		end if
	else
		if not chkDate() then
			msgbox("ÀÔ·ÂµÈ ³¯Â¥ '" & cyear & "-" & cmonth & "-" & cday & "'Àº Á¤»óÀûÀÎ ³¯Â¥°¡ ¾Æ´Õ´Ï´Ù." & vbcrlf & vbcrlf & "´Ù½ÃÇÑ¹ø Á¤È®È÷ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.")
			exit function
		end if
	end if

	'form.to_month.value = Right("0" & form.to_month.value, 2)
	'form.to_day.value = Right("0" & form.to_day.value, 2)

	
	go = 1
	
	'theForm.submit()
end function

function chkDate()
	if isDate(form.to_year.value & "-" & form.to_month.value & "-" & form.to_day.value) then 
		'form.to_year.value = year(Cdate(form.to_year.value & "-" & form.to_month.value & "-" & form.to_day.value))
		'form.to_month.value = Right("0" & form.to_month.value, 2)
		'form.to_day.value = Right("0" & form.to_day.value, 2)
		chkDate = true
	else
		chkDate = false
	end if
end function
