theimg = document.getElementById('photo'); theimg2 = document.getElementById('photo2'); var img = new Array(); img[2] = new Image(); img[2].src = 'gall1/im01.jpg'; img[3] = new Image(); img[3].src = 'gall1/im02.jpg'; img[4] = new Image(); img[4].src = 'gall1/im03.jpg'; img[5] = new Image(); img[5].src = 'gall1/im04.jpg'; img[6] = new Image(); img[6].src = 'gall1/im05.jpg'; marker = 'gall1/im01.jpg'; marker2 = 'gall1/im02.jpg'; function nextimg(){ if(marker2=='gall1/im01.jpg'){ marker = marker2; marker2 = 'gall1/im02.jpg'; theimg.src = marker; counter=100; newop = counter/100; theimg.style.opacity = newop; ieop = 'alpha(opacity=' + counter + ')'; theimg.style.filter = ieop; l = setTimeout('theimg2.src = marker2',500); t = setTimeout('fadedown()',4000); } else{ if(marker2=='gall1/im02.jpg'){ marker = marker2; marker2 = 'gall1/im03.jpg'; theimg.src = marker; counter=100; newop = counter/100; theimg.style.opacity = newop; ieop = 'alpha(opacity=' + counter + ')'; theimg.style.filter = ieop; l = setTimeout('theimg2.src = marker2',500); t = setTimeout('fadedown()',4000); } else{ if(marker2=='gall1/im03.jpg'){ marker = marker2; marker2 = 'gall1/im04.jpg'; theimg.src = marker; counter=100; newop = counter/100; theimg.style.opacity = newop; ieop = 'alpha(opacity=' + counter + ')'; theimg.style.filter = ieop; l = setTimeout('theimg2.src = marker2',500); t = setTimeout('fadedown()',4000); } else{ if(marker2=='gall1/im04.jpg'){ marker = marker2; marker2 = 'gall1/im05.jpg'; theimg.src = marker; counter=100; newop = counter/100; theimg.style.opacity = newop; ieop = 'alpha(opacity=' + counter + ')'; theimg.style.filter = ieop; l = setTimeout('theimg2.src = marker2',500); t = setTimeout('fadedown()',4000); } else{ if(marker2=='gall1/im05.jpg'){ marker = marker2; marker2 = 'gall1/im01.jpg'; theimg.src = marker; counter=100; newop = counter/100; theimg.style.opacity = newop; ieop = 'alpha(opacity=' + counter + ')'; theimg.style.filter = ieop; l = setTimeout('theimg2.src = marker2',500); t = setTimeout('fadedown()',4000); } } } } } } counter = 100; function fadeup(){ counter=100; newop = counter/100; theimg.style.opacity = newop; ieop = 'alpha(opacity=' + counter + ')'; theimg.style.filter = ieop; t = setTimeout('fadedown()',4000); } function fadedown(){ counter--; newop = counter/100; theimg.style.opacity = newop; ieop = 'alpha(opacity=' + counter + ')'; theimg.style.filter = ieop; if(counter>0){ t = setTimeout('fadedown()',15); } else{ nextimg(); } } t = setTimeout('fadedown()',4000);