<%
	rs.open "select * from ad where District='a' and pos='30' and datafirst<='"&date&"' and datalast>='"&date&"' and app<>'del'",dsnstr,3,1
	if not rs.eof and not rs.bof then
		if trim(rs("type")&" ")="flash" then
			response.write "<object classid=""clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"" codebase=""http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"" width="""&trim(rs("width")&" ")&""" height="""&trim(rs("height")&" ")&""">"& vbCrLf
			response.write "        <param name=""movie"" value="""&"/ad/flash/"&htmlcode(trim(rs("show")&" "))&""">"& vbCrLf
			response.write "        <param name=""quality"" value=""high"">"& vbCrLf
			response.write "        <embed src="""&"/ad/flash/"&htmlcode(trim(rs("show")&" "))&""" quality=""high"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" type=""application/x-shockwave-flash"" width="""&trim(rs("width")&" ")&""" height="""&trim(rs("height")&" ")&"""></embed></object>"& vbCrLf
		elseif trim(rs("type")&" ")="pic" then
			response.write "<a href="""&"/kingstone/configseting/ad/adcount.asp?district=a&pos=30&url="&htmlcode(trim(rs("url")&" "))&""" target=_blank><img src='"&"/ad/pic/"&htmlcode(trim(rs("show")&" "))&"'  width="""&trim(rs("width")&" ")&""" height="""&trim(rs("height")&" ")&""" border=""0""></a>"
		else
response.write "<object classid=""clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"" codebase=""http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"" width=""775"" height=""85"">"& vbCrLf
response.write "      <param name=""movie"" value=""/images/flash/banner.swf"">"& vbCrLf
response.write "      <param name=""quality"" value=""high"">"& vbCrLf
response.write "      <embed src=""/images/flash/banner.swf"" quality=""high"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" type=""application/x-shockwave-flash"" width=""775"" height=""85""></embed>"& vbCrLf
response.write "    </object>"& vbCrLf
		end if
	else
  randomize
  dim i
  i=cint(rnd*8)
  if i=0 then 
    i=i+1
  end if

if i=1 then			'畅饮美食
response.write "<a href=""/eat/index.asp""><img src=""/eat/images/pic/banner.gif"" width=""775"" height=""85"" border=""0""></a>"
elseif i=2 then		'住家服务
response.write "<a href=""/home/index.asp""><img src=""/home/images/pic/banner01.gif"" width=""775"" height=""85"" border=""0""></a>"
elseif i=3 then		'房产服务
response.write "<a href=""/fanchan/index.asp""><img src=""/fanchan/images/pic/banner.gif"" width=""775"" height=""85"" border=""0""></a>"
elseif i=4 then		'职业中介
response.write "<a href=""/job/index.asp""><img src=""/job/images/pic/banner.gif"" width=""775"" height=""100"" border=""0""></a>"
elseif i=5 then		'交通旅游
response.write "<a href=""/travel/index.asp""><img src=""/travel/ad/banner.gif"" width=""775"" height=""85"" border=""0""></a>"
elseif i=6 then		'二手市场
response.write "<a href=""/market/index.asp""><img src=""/market/images/pic/benner14.jpg"" width=""775"" height=""85"" border=""0""></a>"
elseif i=7 then
response.write "<object classid=""clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"" codebase=""http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"" width=""775"" height=""100"">"& vbCrLf
response.write "        <param name=""movie"" value=""/happy/swf/adadad.swf"">"& vbCrLf
response.write "        <param name=""quality"" value=""high"">"& vbCrLf
response.write "        <param name=""menu"" value=""false"">"& vbCrLf
response.write "        <embed src=""/happy/swf/adadad.swf"" width=""775"" height=""100"" quality=""high"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" type=""application/x-shockwave-flash"" menu=""false""></embed></object>"& vbCrLf
elseif i=8 then		'原来的flash
response.write "<object classid=""clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"" codebase=""http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"" width=""775"" height=""85"">"& vbCrLf
response.write "      <param name=""movie"" value=""/images/flash/banner.swf"">"& vbCrLf
response.write "      <param name=""quality"" value=""high"">"& vbCrLf
response.write "      <embed src=""/images/flash/banner.swf"" quality=""high"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" type=""application/x-shockwave-flash"" width=""775"" height=""85""></embed>"& vbCrLf
response.write "</object>"& vbCrLf
end if
end if
rs.close
%>