
//Set of Pictures - 1 : Packages
var Pic1 = new Array('images/animation/p1.jpg','images/animation/p2.jpg','images/animation/p3.jpg','images/animation/p4.jpg','images/animation/p5.jpg');

var f = 0;
var w = Pic1.length;

var preLoad1 = new Array();

for (d = 0; d < w; d++){
	preLoad1[d] = new Image();
	preLoad1[d].src = Pic1[d];
}


//Set of Pictures - 2 : Destinations
var Pic2 = new Array('images/animation/d1.jpg','images/animation/d2.jpg','images/animation/d3.jpg','images/animation/d4.jpg','images/animation/d5.jpg','images/animation/d6.jpg');

var b = 0;
var q = Pic2.length;

var preLoad2 = new Array();

for (a = 0; a < q; a++){
	preLoad2[a] = new Image();
	preLoad2[a].src = Pic2[a];
}


// Timed Change - 1 : Packages

        function timedChange1(delay)
        {
        {
        setInterval("imageChange1(0)", delay); // 0 is random, 1 is one after the other
        }
        }      
        

// Timed Change - 2 : Destinations

        function timedChange2(delay)
        {
        {
        setInterval("imageChange2(0)", delay); // 0 is random, 1 is one after the other
        }
        }  
        
        
// Start Image Change - 1 : Packages
        
        function imageChange1(y){
	if (document.all){
		document.images.SlideShow1.style.filter="blendTrans(duration=3)";
		document.images.SlideShow1.filters.blendTrans.Apply();
	}
	if (y == "1"){f = f + 1;if (f > (w-1)) f=0;} // one after the other
	if (y == "0"){f = Math.round(Math.random() * w);if (f > (w-1)) f=0;} // random
	document.images.SlideShow1.src = preLoad1[f].src;

	if (document.all){
		document.images.SlideShow1.filters.blendTrans.Play();
	}
}
        
        
// Start Image Change - 2 : Destinations
        
        function imageChange2(x){
	if (document.all){
		document.images.SlideShow2.style.filter="blendTrans(duration=3)";
		document.images.SlideShow2.filters.blendTrans.Apply();
	}
	if (x == "1"){b = b + 1;if (b > (q-1)) b=0;} // one after the other
	if (x == "0"){b = Math.round(Math.random() * q);if (b > (q-1)) b=0;} // random
	document.images.SlideShow2.src = preLoad2[b].src;

	if (document.all){
		document.images.SlideShow2.filters.blendTrans.Play();
	}
}
        
