var plpix = new Array();
plpix[0] = 'images/home_1_1.jpg'; //starting set
plpix[1] = 'images/home_2_1.jpg';
plpix[2] = 'images/home_1_2.jpg'; //2nd set
plpix[3] = 'images/home_2_2.jpg';
plpix[4] = 'images/home_1_3.jpg'; //3rd set
plpix[5] = 'images/home_2_3.jpg';
plpix[6] = 'images/home_1_4.jpg'; //4th set
plpix[7] = 'images/home_2_4.jpg';
plpix[8] = 'images/home_1_5.jpg'; //5th set
plpix[9] = 'images/home_2_5.jpg';
plpix[10] = 'images/home_1_6.jpg'; //6th set
plpix[11] = 'images/home_2_6.jpg';
plpix[12] = 'images/home_1_7.jpg'; //7th set
plpix[13] = 'images/home_2_7.jpg';

var pl = new Array(); //preloader
for (i = 0; i < plpix.length; i++){
   pl[i] = new Image();
   pl[i].src = plpix[i];
}

var x = 2; //number of switching images on page (where to start switching)
var y = 4000; //delay in ms
var z = 2; //transition duration

function slide() {
	var hx = eval('document.images.' + plpix[x].substring(7,13)); //find img name attributes from page using img names from plpix array
	if (document.all){
		hx.style.filter="blendTrans(duration=" + z + ")";
		hx.filters.blendTrans.Apply();
	}
	hx.src = pl[x].src;
	if (document.all){
		hx.filters.blendTrans.Play();
	}
	x += 1;
	if (x > (plpix.length-1)) {x=0;}
	setTimeout('slide()', y);
}
