<div id=demo style="overflow:hidden;width:880px;height:140px;border:1px solid #fff;padding-bottom:2px;">
<table align=left cellpadding="0" cellspace="0" border=0>
<tr>
<td id="demo1" valign=top>
<table width="1300" height="140" border="0" align="left" cellpadding="2" cellspacing="2">
<%
set rs=server.CreateObject("adodb.recordset")
sql="Select top 10 * from news where cataid=25 and len(firstImageName)>5 order by ID desc"
rs.Open sql,conn,1,1
if rs.bof and rs.eof then
response.Write "<tr><td align='center'>暂无图片</td></tr>"
else
%>
<tr>
<% for i=1 to 10%>
<td align="center" valign="middle" title="<%=rs("title")%>" width="130"><div style="border:solid 1px #CCC; width:100px; padding:4px;"><a href="news_show.asp?id=<%=rs("id")%>" target="_blank"><img src="new/eWebEditor/UploadFile/<%=rs("firstImageName")%>" width="120" height="100" border="0" /></a></div>
<div style=" margin-top:2px;">
<a href="news_show.asp?id=<%=rs("id")%>" target="_blank" class="tt8">
<%response.write (left(rs("Title"),6))%>
<%if len(rs("Title"))>6 then response.Write("...")%></a>
</a>
</td>
<% rs.movenext
if rs.eof then exit for
next
%>
</tr>
<%
rs.close
end if
%>
</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>