var img1 = "/images/pic1.jpg"; var img2 = "/images/pic2.jpg"; var img3 = "/images/pic3.jpg"; var img4 = "/images/pic4.jpg"; var img5 = "/images/pic5.jpg"; var img6 = "/images/pic6.jpg"; var img7 = "/images/pic7.jpg"; var img8 = "/images/pic8.jpg"; var img9 = "/images/pic9.jpg"; var img10 = "/images/pic10.jpg"; var img11 = "/images/pic11.jpg"; var img12 = "/images/pic12.jpg"; var img13 = "/images/pic13.jpg"; var img14 = "/images/pic14.jpg"; var img15 = "/images/pic15.jpg"; var img16 = "/images/pic16.jpg"; var img17 = "/images/pic17.jpg"; var img18 = "/images/pic18.jpg"; var img19 = "/images/pic19.jpg"; var img20 = "/images/pic20.jpg"; var img21 = "/images/pic21.jpg"; var img22 = "/images/pic22.jpg"; var img23 = "/images/pic23.jpg"; var img24 = "/images/pic24.jpg"; var img25 = "/images/pic25.jpg"; var slideshowimages = new Array( img1,img2,img3,img4,img5,img6,img7,img8,img9,img10 ,img11,img12,img13,img14,img15,img16,img17,img18,img19,img20 ,img21,img22,img23,img24,img25 ); var currentindex = 0; function opacity(id, opacStart, opacEnd, millisec) { //speed for each frame var speed = Math.round(millisec / 100); var timer = 0; //determine the direction for the blending, if start and end are the same nothing happens if(opacStart > opacEnd) { for(i = opacStart; i >= opacEnd; i--) { setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); timer++; } } else if(opacStart < opacEnd) { for(i = opacStart; i <= opacEnd; i++) { setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); timer++; } } } //change the opacity for different browsers function changeOpac(opacity, id) { var object = document.getElementById(id).style; object.opacity = (opacity / 100); object.MozOpacity = (opacity / 100); object.KhtmlOpacity = (opacity / 100); object.filter = "alpha(opacity=" + opacity + ")"; } function changeImage(divid, newimageurl) { document.getElementById(divid).style.backgroundImage = "url(" + newimageurl + ")"; } function blendimages(divid1, divid2, millisec) { var speed = Math.round(millisec / 100); var timer = 0; for(i = 100; i >= 0; i--) { setTimeout("changeOpac(" + i + ",'" + divid1 + "')",(timer * speed)); setTimeout("changeOpac(" + (100-i) + ",'" + divid2 + "')",(timer * speed)); timer++; } setTimeout("changeImage('" + divid1 + "', '" + slideshowimages[currentindex]+ "')",7000); setTimeout("slideshow('" + divid2 + "', '" + divid1 + "')",8000); } function slideshow(divid1, divid2) { currentindex++; if (currentindex > (slideshowimages.length-1)) currentindex = 0; blendimages(divid1, divid2, 2500); }