<%'!--#include file="conn.asp"--%><!--自己加上去的-->
<%
Const New_img=5     
set rs_Product=server.createobject("adodb.recordset")
sqltext="select * from news where bigclassname='学生作品' and filename2<>'null' order by id desc"
rs_Product.open sqltext,conn,1,1
if not rs_Product.EOF then%>

<DIV align=center>
<table cellPadding=1 width=100 height=1 border=0>
<TBODY>
<TR>
<TD>

<script>
var rollspeed=30
rolllink2.innerHTML=rolllink1.innerHTML //克隆rolllink1为rolllink2
function Marquee1(){
if(rolllink2.offsetTop-rolllink.scrollTop<=0) //当滚动至rolllink1与rolllink2交界时
rolllink.scrollTop-=rolllink1.offsetHeight //rolllink跳到最顶端
else{
rolllink.scrollTop++
} 
} 
var MyMar1=setInterval(Marquee1,rollspeed) //设置定时器
rolllink.onmouseover=function() {clearInterval(MyMar1)}//鼠标移上时清除定时器达到滚动停止的目的
rolllink.onmouseout=function() {MyMar1=setInterval(Marquee1,rollspeed)}//鼠标移开时重设定时器
</script>
</TD></TR></TBODY>

</TD></TR></TBODY></TABLE>



<div id=demo style="overflow:hidden; width:180px; height:250px;"> 
<div id=demo1> 

<table  style="line-height:22px" height="100" border="0" cellpadding="0" cellspacing="0">
                            
<%while not rs_Product.EOF
	fileExt=lcase(getFileExtName(rs_Product("filename2")))		
	%>   <tr>
  <td align="center">
  <table width="150" border="0" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
  <tr>
<td bgcolor="#FFFFFF">
<a href='Article.asp?ID=<%=rs_Product("id")%>' target="_blank" title='<%=rs_Product("title")%>'><img border="0" height="100" src="<%=rs_Product("filename2")%>" width="150" alt="<%=rs_Product("title")%>" /></a>
</td>
       </tr>
      <tr>
<td bgcolor="#FFFFFF" align="center" ><a href='Article.asp.asp?ID=<%=rs_Product("id")%>' target="_blank" title='<%=rs_Product("title")%>' alt="<%=rs_Product("title")%>" ><%=rs_Product("title")%> (<%=rs_Product("author")%>) </a></td>
  </tr>
  </table>
   </td></tr> 
     <%
	  rs_Product.MoveNext
	  wend
	end if%>
      </table>


</div> 
<div id=demo2></div> 
</div> 
<script language="javascript"> 
var speed=30 
demo2.innerHTML=demo1.innerHTML 
function Marquee(){ 
if(demo2.offsetTop-demo.scrollTop<=0) 
demo.scrollTop-=demo1.offsetHeight 
else{ 
demo.scrollTop++ 
} 
} 
var MyMar=setInterval(Marquee,speed) 
demo.onmouseover=function() {clearInterval(MyMar)} 
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} 
</script>
