<%
function val_code(vts)
  dim vt,valcode:vt="v"&vts
  select case vt
  case "v2"
    valcode=request.cookies(web_cookies)("val_code")
    valcode=right(valcode,len(valcode)-2)
    val_code="<table border=0 cellspacing=0 cellpadding=0>" & _
	     "<tr><td><input type=text name=valcode size=15 maxlength=10 class=inputbg value="&valcode&">"&redx&"</td><td>" & _
	     "  <table cellspacing=1 cellpadding=1><tr><td>&nbsp;"&valcode&"&nbsp;</td></tr></table>" & _
	     "</td></tr></table>"
  case "v3"
    val_code="yes"
    valcode="jk"&trim(request.form("valcode"))
    if valcode<>request.cookies(web_cookies)("val_code") or len(valcode)<1 then val_code="no"
    response.cookies(web_cookies)("val_code")=objv7.rand_num(6)
    call cookies_yes()
  case "v4"
    valcode=request.cookies(web_cookies)("val_code")
    valcode=right(valcode,len(valcode)-2)
    val_code=""&valcode&""
  case "v5"
    val_code="yes"
    valcode="jk"&trim(request("valcode"))
    if valcode<>request.cookies(web_cookies)("val_code") or len(valcode)<1 then val_code="no"
    response.cookies(web_cookies)("val_code")=objv7.rand_num(6)
    call cookies_yes()
  case else
    valcode=objv7.rand_num(6)
    response.cookies(web_cookies)("val_code")="jk"&valcode
    call cookies_yes()
    val_code=""
  end select
end function
%>