<% if (CStr(Request.Cookies("trainingregistry")("length")) = "") then Response.Cookies("trainingregistry")("length") = "1" Response.Cookies("trainingregistry")("1") = CStr(CInt(Request("id"))) else If Not ClassExists(Request("ID")) Then nCourses = CInt(Request.Cookies("trainingregistry")("length")) nCourses = nCourses + 1 Response.Cookies("trainingregistry")("length") = CStr( nCourses ) Response.Cookies("trainingregistry")( CStr( nCourses ) ) = CStr(CInt(Request("id"))) End If end if Function ClassExists(ClassID) Dim intCnt, blnFound blnFound = False If CStr(Request.Cookies("trainingregistry")("length")) <> "" Then For intCnt = 1 To CInt(Request.Cookies("trainingregistry")("length")) If CInt(ClassID) = CInt(Request.Cookies("trainingregistry")(CStr(intCnt))) Then blnFound = True Exit For End If Next ' intCnt End If ClassExists = blnFound End Function Response.Redirect "shopping_cart.html" %>