2006-02-16 15:45:30建榮

圖片水平捲動顯示

<SCRIPT>
var w=500 //修改顯示寬度
var speed=4 //修改捲動速度

var side=new Array()
var slide=''
side[0]='<a href="1.htm" target="1"><img src="photo/P1010334.JPG" width=150 height=100 border=0></a>'
side[1]='<a href="2.htm" target="1"><img src="photo/P1010325.JPG" width=150 height=100 border=0></a>'
side[2]='<a href="3.htm" target="1"><img src="photo/P1010323.JPG" width=150 height=100 border=0></a>'
side[3]='<a href="4.htm" target="1"><img src="photo/P1010309.JPG" width=150 height=100 border=0></a>'
side[4]='<a href="5.htm" target="1"><img src="photo/P1010286.JPG" width=150 height=100 border=0></a>'






var picspeed=speed
for (i=0;i<side.length;i++)
slide=slide+side[i]+"  "

if (document.all){
document.write('<marquee id="logo" scrollAmount=0 style="width:'+w+'">'+slide+'</marquee>')
logo.onmouseover=new Function("logo.scrollAmount=0")
logo.onmouseout=new Function("if (document.readyState=='complete') logo.scrollAmount=speed")
}

function load(){
window.location.reload()
}
function load2(){
if (document.layers){
document.idea.visibility="show"
setTimeout("window.onresize=load",450)
inside()
}
if (document.all)
logo.scrollAmount=speed
}

function inside(){
document.idea.document.yan.document.write('<nobr>'+slide+'</nobr>')
document. idea.document.yan.document.close()
thelength=document.idea.document.yan.document.width
scride()
}

function scride(){
if (document.idea.document.yan.left>=thelength*(-1)){
document.idea.document.yan.left-=speed
setTimeout("scride()",100)
}
else{
document.idea.document.yan.left=w
scride()
}
}
window.onload=load2
</SCRIPT>