<%
	rs.open "select * from ad where District='a' and pos='41' 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=41&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/banner02.swf"">"& vbCrLf
response.write "      <param name=""quality"" value=""high"">"& vbCrLf
response.write "      <embed src=""/images/flash/banner02.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
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/banner02.swf"">"& vbCrLf
response.write "      <param name=""quality"" value=""high"">"& vbCrLf
response.write "      <embed src=""/images/flash/banner02.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
	rs.close
%>
