
theimage = new Array();


// The dimensions of ALL the images should be the same or some of them may look stretched or reduced in Netscape 4.
// Format: theimage[...]=[image URL, link URL, name/description]
theimage[0]=["images/Poludnica.gif", "", "zjazdovky - okolie apartmanu"];
theimage[1]=["images/Opalisko.jpg", "", "vlek vzdialeny 800 m"];
theimage[2]=["images/sedacka.jpg", "", "vlek vzdialeny 800 m"];
theimage[3]=["images/delo.jpg", "", "vlek vzdialeny 800 m"];
theimage[4]=["images/maly.jpg", "", "vlek vzdialeny 800 m"];
theimage[5]=["images/Lyziar.jpg", "", "upravene lyziarske svahy"];
theimage[6]=["images/Jasna.jpg", "", "nedaleka Jasna - Chopok"];
theimage[7]=["images/B1.jpg", "", "nedaleky aquapark Tatralandia"];
theimage[8]=["images/B2.jpg", "", "aquapark Besenova"];
theimage[9]=["images/Tatry-008.jpg", "", "vyhlad z nedalekej hory"];
theimage[10]=["images/Vyletnalod.jpg", "", "nedaleka vodna nadrz Lipt. Mara"];
theimage[11]=["images/penzion2.jpg", "", "penzion"];
theimage[12]=["images/terasagril.jpg", "", "terasa s grilom pred penzionom"];
theimage[13]=["images/izba_1.jpg", "", "izba s kupelnou"];
theimage[14]=["images/izba_3.jpg", "", "dalsia izba s kupelnou"];
theimage[15]=["images/izba_2.jpg", "", "dalsia izba s kupelnou"];
theimage[16]=["images/jedalen1.jpg", "", "jedalensky stol penzionu"];
theimage[17]=["images/herna.jpg", "", "spolocenska miestnost - jedalen"];
theimage[18]=["images/kuchyn.gif", "", "kuchynka apartmanu"];

///// Plugin variables

playspeed=3000;// The playspeed determines the delay for the "Play" button in ms
dotrans=1; // if value = 1 then there are transitions played in IE
transtype='blendTrans';// 'blendTrans' or 'revealtrans'
transattributes='23';// duration=seconds,transition=#<24
//#####
//key that holds where in the array currently are
i=0;


//###########################################
window.onload=function(){

        //set transitions
        GetTrans();

        //set the first slide
        SetSlide(0);

        //autoplay
        PlaySlide();
}

//###########################################
function SetSlide(num) {
        //too big
        i=num%theimage.length;
        //too small
        if(i<0)i=theimage.length-1;

        //switch the image
        if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslide.filters.'+transtype+'.Apply()')
        document.images.imgslide.src=theimage[i][0];
        if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslide.filters.'+transtype+'.Play()')

        //if they want name of current slide
        document.getElementById('slidebox').innerHTML=theimage[i][2];

}


//###########################################
function PlaySlide() {
        if (!window.playing) {
                PlayingSlide(i+1);
                if(document.slideshow.play){
                        document.slideshow.play.value="   Stop   ";
                }
        }
        else {
                playing=clearTimeout(playing);
                if(document.slideshow.play){
                        document.slideshow.play.value="   Play   ";
                }
        }
        // if you have to change the image for the "playing" slide
        if(document.images.imgPlay){
                setTimeout('document.images.imgPlay.src="'+imgStop+'"',1);
                imgStop=document.images.imgPlay.src
        }
}


//###########################################
function PlayingSlide(num) {
        playing=setTimeout('PlayingSlide(i+1);SetSlide(i+1);', playspeed);
}


//###########################################
//desc: picks the transition to apply to the images
function GetTrans() {
        //si=document.slideshow.trans.selectedIndex;

                if((document.slideshow.trans && document.slideshow.trans.selectedIndex == 0) || (!document.slideshow.trans && dotrans==0)){
                dotrans=0;
        }
        else if ((document.slideshow.trans && document.slideshow.trans.selectedIndex == 1) || (!document.slideshow.trans && transtype == 'blendTrans')){
                dotrans=1;
                transtype='blendTrans';
                document.imgslide.style.filter = "blendTrans(duration=1,transition=1)";
        }else{
                dotrans=1;
                transtype='revealtrans';
                if(document.slideshow.trans) transattributes=document.slideshow.trans[document.slideshow.trans.selectedIndex].value;
                document.imgslide.style.filter = "revealTrans(duration=1,transition=" +transattributes+ ")";
        }

}


