DownUp
Auto Dia
Stop
The auto function is included for this example only and is set for 10 seconds.
The links are for these examples only as the scripts run onload by default.
Copy a script into the HEAD section and enter the height of the image at line,
imageheight=Your Image Height
Place the following in the opening BODY tag changing yourimage to suit.
background="yourimage"
Scroll Down
<script language="JavaScript">
<!--
D_time=""
imageheight=Your Image Height
PosDown=0
function ScrollDown(){
clearTimeout(D_time)
PosDown+=2
if (PosDown>=imageheight){
PosDown= 0
}
document.body.style.backgroundPosition="0 "+PosDown
D_time=setTimeout("ScrollDown()",50)
}
setTimeout("ScrollDown()",50)
// -->
</script>
Scroll Up
<script language="JavaScript">
<!--
U_time=""
imageheight=Your Image Height
PosUp=0
function ScrollUp(){
clearTimeout(U_time)
PosUp-=2
if (PosUp<=0){
PosUp= imageheight
}
document.body.style.backgroundPosition="0 "+PosUp
U_time=setTimeout("ScrollUp()",50)
}
setTimeout("ScrollUp()",50)
// >
</script>
Scroll Diagonally
<script language="JavaScript">
<!--
dia_time=""
PosDiag=0
function ScrollDia(){
clearTimeout(dia_time)
PosDiag+=2
if (PosDown>=imageheight){
PosDown= 0
}
document.body.style.backgroundPosition=PosDiag+" "+PosDiag
dia_time=setTimeout("ScrollDia()",50)
}
setTimeout("ScrollDia()",50)
// >
</script>