i is defined here in a loop (function that calls the first function at the end for infinite loop) and note this is only one of many identical functions that only change the opacity.
Code:
function pic1h(){
i = 2;
// return i; only reason i dont put it in is because it stops timeout from calling the next function
document.myimg.style.opacity = 1/10;
document.myimg.style.filter = 'alpha(opacity=' + 1*10 + ')';
setTimeout('pic1i ()', 100);
}
And here is the function that is calling i to tell the picture to fade out.
The beggining of this code is executed onclick
Code:
function box1end(i){
if (i == 2)
{
document.myimg4.style.opacity = 0/10;
document.myimg4.style.filter = 'alpha(opacity=' + 0*10 + ')';
document.getElementById('gal4').style.opacity = 0/10;
document.getElementById('gal4').style.filter = 'alpha(opacity=' + 0*10 + ')';
document.getElementById('gal5').style.opacity = 0/10;
document.getElementById('gal5').style.filter = 'alpha(opacity=' + 0*10 + ')';
document.getElementById('gal6').style.opacity = 0/10;
document.getElementById('gal6').style.filter = 'alpha(opacity=' + 0*10 + ')';
}
else
{
document.myimg4.style.opacity = 10/10;
document.myimg4.style.filter = 'alpha(opacity=' + 10*10 + ')';
setTimeout('box1end()', 100);
}
}
Bookmarks