<SCRIPT LANGUAGE="JavaScript"
TYPE="text/javascript">
<!--
if(document.all || document.layers || document.getElementById) //the images used in the animation are preloaded
{
bild=new Array()
bild[0] = new Image()
bild[0].src='bildfil1'
bild[1] = new Image()
bild[1].src='bildfil2'
bild[2] = new Image()
bild[2].src='bildfil3'
bild[3] = new Image()
bild[3].src='bildfil4'
//etc
}
i=0
maxvarv=0 // i keeps track of what image to display // maxvarv keeps track of
//how many times the animation moves across the page
//funktionen startingup()
//kollar vilken webbläsare
//anrop:BODY ONLOAD=startingup()
function startingup()
{
if(document.all) //MSIE4+
{min_bit=document.all['flyttbit']}
if(document.getElementById) //w3
{min_bit=document.getElementById('flyttbit')}
//the function iljmove
//moves the layer and switches the images
function iljmove()
{
if ((document.getElementById&&maxvarv<3) || (document.all&&maxvarv<3))
{
min_bit.style.left=parseInt(min_bit.style.left)-35+"px"
setTimeout("iljmove()",250)
document.iljbild.src=bild[i].src
i++
if(i==bild.length){i=0}
if(parseInt(min_bit.style.left)<-160)
{
min_bit.style.left=340+"px"
maxvarv++
}
}