<%pic=""
plink=""
ptext=""
sql="select top 5 * from tyinfo where len(newsimage)>0 and pingbai like '%家庭影院%' order by [date] desc"
set rs=conn.execute(sql)
do while not rs.eof
pic=pic&"http://www.ty360.com/"&rs("newsimage")&"|"
link=rs("link-page")
if link="" then link="2007/news_detail.asp?id="&rs("id")
link="http://www.ty360.com/"&link
plink=plink&link&"|"
ptext=ptext&rs("head")&"|"
rs.movenext
loop
rs.close
set rs=nothing
set sql=nothing
pic=left(pic,len(pic)-1)
plink=left(plink,len(plink)-1)
ptext=left(ptext,len(ptext)-1)
%>
var istop=1;
var LorR=0;
var speed=30;
var demo = document.getElementById("demo");
var marquePic1 = document.getElementById("marquePic1");
var marquePic2 = document.getElementById("marquePic2");
marquePic2.innerHTML=marquePic1.innerHTML;
demo.scrollLeft=marquePic1.scrollWidth/2;
function left(){
LorR=0;
}
function right(){
LorR=1;
}
function spd(n){
speed=n;
clearInterval(MyMar);
MyMar=setInterval(Marquee,speed);
}
function Marquee(){
if(LorR) MarqueeRight();
else MarqueeLeft();
}
function MarqueeLeft(){
with (demo) {
if(scrollLeft>=marquePic1.scrollWidth){
scrollLeft=0
}else{
scrollLeft++
}
}
}
function MarqueeRight(){
with (demo) {
if(scrollLeft<=0){
scrollLeft=marquePic1.scrollWidth
}else{
scrollLeft--
}
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}