function loadimg_slideshow() { var perc = Math.round((loaded_slideshow/count_el_slideshow)*100); document.getElementById("loader_perc_slideshow").style.width = perc + "px"; if (loaded_slideshow == count_el_slideshow) { startup_slideshow(); } else { window.setTimeout("loadimg_slideshow();", 200); } } loadimg_slideshow(); function startup_slideshow() { document.getElementById("slideshow_0").style.zIndex = 10; opacity("loader_slideshow", 100, 0, 500); window.setTimeout("switcher_slideshow()", 3800); } function switcher_slideshow() { cur_el_slideshow++; if (cur_el_slideshow >= count_el_slideshow) { cur_el_slideshow = 0; } var this_el = "slideshow_"+cur_el_slideshow; changeOpac(0, this_el); document.getElementById(this_el).style.zIndex = zorder_slideshow; zorder_slideshow++; opacity(this_el, 0, 100, 1200); window.setTimeout("switcher_slideshow()", 5000); }