<%
sql = "select max(id) as maxid from tabella where val >= 1000 and attivo = si"
rs.open sql,cn,3,3
do until rs.eof
randomize timer
idrandom = cint((rnd * maxid) +1)
if idrandom = "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9" or "10" or "11" or "12" or "13" or "14" or "15" then
rs.movenext
loop
else
sito = rs("sito")
response.write sito
end if
rs.close
%>

mi dice:

Microsoft VBScript compilation error '800a040e'

'loop' without 'do'

line 10

loop
^