<script language="JavaScript"> 
<!-- 
var flag=false; 
function DrawImage(ImgD){ 
 var image=new Image(); 
 image.src=ImgD.src; 
 if(image.width>0 && image.height>0){ 
  flag=true; 
  if(image.width/image.height>= 100/40){ 
   if(image.height>40){
    ImgD.height=40; 
    ImgD.width=(image.width*40)/image.height; 
   }else{ 
    ImgD.width=image.width;
    ImgD.height=image.height; 
   } 
  
  } 
 }
}
//--> 
</script> 
<%    
set rs_links=server.createobject("adodb.recordset")
sqltext="select * from links order by id desc"
rs_links.open sqltext,conn,1,1
if not rs_links.EOF then%>
<div id='demo' style='overflow:hidden;height:50px;width:600px;'>
  <!--滚动区的高度和宽度-->
  <table cellpadding='0' cellspace='0' border='0'>
    <tr>
      <td id='demo1' valign='top'><table width='100%' cellpadding='0' cellspacing='0' border='0' align='center'>
        <tr valign='top'>
          <%
	while not rs_links.EOF		
	%>
          <td align='center'><table width=100% border=0 align=center cellpadding=0 cellspacing=0>
            
            <tr>
              <td align="center"><a href='<%=rs_links("link")%>' target=_blank title='<%=rs_links("note")%>'>
           <img border="0" height="40" src="<%if rs_links("piclink")="" then %>Img/nopic.gif<% else %><%=rs_links("piclink") %><% end if %>" width="100" alt="<%=rs_links("note")%>" onload="javascript:DrawImage(this);">

              </a> </td>
            </tr>
          </table></td>
          <%
	  rs_links.MoveNext
	wend
	%>
        </tr>
      </table></td>
      <td id=demo2 valign=top width=7></td>
    </tr>
  </table>
</div>

<script>
var Picspeed=15
demo2.innerHTML=demo1.innerHTML
function Marquee1(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar1=setInterval(Marquee1,Picspeed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee1,Picspeed)}
</script>
	<%
else
	Response.Write "暂 无 友 情 连 接，欢 迎 您 加 入！"
end if
rs_links.close
set rs_links=nothing
%>
<!--最新图文代码结束-->