<div id=rolllink style=overflow:hidden;height:140;width:140>
<div id=rolllink1>
<table cellspacing=0 cellpadding=0 border=0 width='100%'>
<%
dim nname,url,pic
sql="select * from links where hidden=1 and sort='fir' order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
    id=rs("id")
    nname=rs("nname")
    url=rs("url")
    pic=rs("pic")
%>
<tr><td align=center><a href='<%response.write url%>'  alt='"&joekoe_cms.code_js(rs("nname"),1)&"'><img src='<%response.write pic%>' border=0 width=88 height=31></a></td></tr>
<tr><td height=5></td></tr>
<%
rs.movenext
loop
rs.close
%></table>
</div><div id=rolllink2></div></div>
<script language=javascript>
   var rollspeed=50
   rolllink2.innerHTML=rolllink1.innerHTML //克隆rolllink1为rolllink2
   function Marquee(){
   if(rolllink2.offsetTop-rolllink.scrollTop<=0) //当滚动至rolllink1与rolllink2交界时
   rolllink.scrollTop-=rolllink1.offsetHeight  //rolllink跳到最顶端
   else{
   rolllink.scrollTop++
   }
   }
   var MyMar=setInterval(Marquee,rollspeed) //设置定时器
   rolllink.onmouseover=function() {clearInterval(MyMar)}//鼠标移上时清除定时器达到滚动停止的目的
   rolllink.onmouseout=function() {MyMar=setInterval(Marquee,rollspeed)}//鼠标移开时重设定时器
</script>  



