<div id=demo style="overflow:hidden;width:800px;height:158px;">
<table align=left cellpadding="0" cellspace="0" border=0>
<tr>
<td id=demo1 valign=top>
<table width="800" height="155" border="0" align="left" cellpadding="0" cellspacing="0">
<% set rs=server.CreateObject("adodb.recordset")
sql="select * from news where len(firstImageName)>5 and cataid=51 order by id desc"
rs.open sql,constr,1,1
if not (rs.bof and rs.eof ) then
%>
<tr>
<%
for i=1 to rs.recordcount %>
<td align="center" valign="middle" width="180" height="155">
<table width="180" border="0" cellspacing="0" cellpadding="0" class="line">
<tr>
<td height="130" align="center" valign="middle"><a href="new_show.asp?id=<%=rs("id")%>" target="_blank"><img src="admin/eWebEditor/UploadFile/<%=rs("firstImageName")%>" width="170" height="120" border="0"></a></td>
</tr>
<tr>
<td height="23" align="center" valign="middle" bgcolor="#EBEBEB"><%=left(rs("title"),10)%></td>
</tr>
</table>
</td>
<% rs.movenext
if rs.eof then exit for
next
end if
rs.close
set rs=nothing
%>
</tr>
</table></td>
<td id=demo2 valign=top></td>
</tr>
</table>
</div>
<script>
var speed=15
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>