<% set rs = server.createobject("adodb.Recordset") rs.open "select imageid,imgWidth,imgHeight from activityimages where Category = 'Sport'" , sIntranetDSN,adOpenStatic,,adCmdText while rs.eof = false c = c+ 1 rs.movenext wend Randomize iRandomNum = Int(Rnd() * (c)+ 1) rs.movefirst For x = 1 to iRandomNum-1 rs.movenext next iShowImageCounter = iRandomNum session("ImageID") = rs("ImageID") iImgWidth = rs("ImgWidth") iImgHeight = rs("ImgHeight") iNumHSpaces = 44 - (iImgWidth/10) rs.close Set rs=server.createobject("adodb.recordset") rs.open "Select ActivityName,ID,Season from ActivityNames where Category = 'Sport' order by ActivityName",sIntranetDSN,adOpenKeyset,adLockOptimistic,adCmdText Dim sSeason(4) //sSeason(1) = "Winter" sSeason(2) = "Spring" //sSeason(3) = "Fall" //sSeason(4) = "Summer" %>
<%For x = 1 to inumHspaces response.write " " Next%>


Directions                

<%For x = 1 to 4 rs.filter = "Season = '" + sSeason(x) + "'" If rs.EOF = False then %> <%=sSeason(x)%>

<%While rs.EOF = false%> " > <%=rs("ActivityName")%>
<%rs.Movenext Wend%>
<%End If%>
<%Next rs.close%>