<!--#include file="bugs.asp"-->
<%
    
    Function SetGameNo(id)
        If Not isNumeric(id) Then id = 1
        If CInt(id)<0 Or CInt(id)>bug.bugsTotal Then id = 1
        bug.iCurr = id
        SetCookies "g_b_ID", id
        iCurr=id
    End Function

    Dim iCurr, iBugsCount
    SetGameNo(GetCookies("g_b_ID"))
    sCorrect = GetCookies("Correct")

    If Len(Request("ID"))>0 Then sCorrect = SetGameNo(Request("ID"))

    If Len(sCorrect)-Len(Replace(sCorrect,"|",""))=bug.bugsCount() Then
        SetGameNo(iCurr + 1)
    End If
    iBugsCount = bug.bugsCount()
    iBugsTotal = bug.bugsTotal
%>