﻿	var slideShowSpeed = 5000;
	var crossFadeDuration = 3;
	var Pic = new Array();
	
	Pic[0] = '/foto/rozne/slajdy/1.jpg'
	Pic[1] = '/foto/rozne/slajdy/2.jpg'
	Pic[2] = '/foto/rozne/slajdy/3.jpg'
	Pic[3] = '/foto/rozne/slajdy/4.jpg'
	Pic[4] = '/foto/rozne/slajdy/5.jpg'
	Pic[4] = '/foto/rozne/slajdy/6.jpg'
	Pic[4] = '/foto/rozne/slajdy/7.jpg'
	Pic[4] = '/foto/rozne/slajdy/8.jpg'

	var t;
	var j = 0;
	var p = Pic.length;
	var preLoad = new Array();
	for (i = 0; i < p; i++) {
		preLoad[i] = new Image();
		preLoad[i].src = Pic[i];
	}
    function runSlideShow() {
		if (document.images.SlideShow!=null) {
			if (document.all) {
				document.images.SlideShow.style.filter="blendTrans(duration=2)";
				document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
				document.images.SlideShow.filters.blendTrans.Apply();
			}	
			document.images.SlideShow.src = preLoad[j].src;
			if (document.all) {
				document.images.SlideShow.filters.blendTrans.Play();
			}
			j = j + 1;
			if (j > (p - 1)) j = 0;
			t = setTimeout('runSlideShow()', slideShowSpeed);
		}
	}	



    function foto_pow(plik) {
        obrazek = new Image()
        obrazek.src=plik
        okno=window.open(obrazek.src,'powiększenie','top=10,left=10,width=400,height=400,scrollbars=no')
        okno.document.writeln("<img src='"+obrazek.src+"' border='2' />")
        okno.document.writeln("<p align='center'><input type='button' name='b1' value='zamknij' onclick='window.close()'></p>")
        setTimeout('laduj_obrazek()',200)
    }
    function laduj_obrazek() {
        if (obrazek.width == 0) {
          setTimeout('laduj_obrazek()',200)
        } else {
          tworz_okno()
        }
    }
    function tworz_okno() {
        okno.resizeTo(obrazek.width+33,obrazek.height+160)
    }