<%
Set conn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.recordset")
conn.open dsn
sqlm = "select * from AF_Banners where BannerType=1 and Visible=1 order by BannerID desc"
rs.open sqlm, conn
if not rs.eof then%>
Flash Banners
<%n=0
rs.movefirst
while not rs.eof
if rs("Landing")<>"" then
Landing=rs("Landing")
else
Landing=siteHomepage
end if
n=n+1%>
<%rs.movenext
wend%>
<%end if
rs.close%>
<%
sqlm = "select * from AF_Banners where BannerType=2 and Visible=1 order by Iwidth desc"
rs.open sqlm, conn
if not rs.eof then%>
Image Banners
<%n=0
rs.movefirst
while not rs.eof
if rs("Landing")<>"" then
Landing=rs("Landing")
else
Landing=siteHomepage
end if
if rs("Iwidth")>500 then
imgwidth=500
else
imgwidth=rs("Iwidth")
end if
n=n+1%>