// preload photos

home2 = new Image(350,262); //1a same as home2
home2.src = "img/home2.jpg";

condo1b = new Image(350,262);
condo1b.src = "img/condo1b.jpg";

condo1c = new Image(350,262);
condo1c.src = "img/condo1c.jpg";

condo1d = new Image(350,262);
condo1d.src = "img/condo1d.jpg";

condo1e = new Image(350,262);
condo1e.src = "img/condo1e.jpg";

condo1f = new Image(350,262);
condo1f.src = "img/condo1f.jpg";

condo1g = new Image(350,262);
condo1g.src = "img/condo1g.jpg";

home1 = new Image(350,262); //1h same as home1
home1.src = "img/home1.jpg";



// SCRIPT FOR ARROW BUTTONS

	var changePhotos = new Array ("img/home2.jpg","img/condo1b.jpg","img/condo1c.jpg","img/condo1d.jpg","img/condo1e.jpg","img/condo1f.jpg","img/condo1g.jpg","img/home1.jpg");

	var changeText = new Array ("Living room, with balcony in background. This room has an LCD Cable TV and Xbox with games. Additionally, there are family board games to pass the time.",
	
	"This full kitchen comes with a self-cleaning range oven. A microwave, washer and dryer, refrigerator with ice maker and dishwasher. There is also an iron and iron board provided.",
	
	"Master Bedroom which has a large ensuite bathroom (equiped with hairdryer) and walk-in wardrobe, plus a cable LCD TV, and finally an alarm clock/radio.",
	
	"Second Bedroom has a great view, large closet and cable TV",
	
	"WOW! Mickey Mouse Kids Bedroom! This rooms has a view of the lake and clubhouse.",
	
	"Disney TV, DVD player and games console with a selection of movies and games to keep the kids happy.",
	
	"Dining room fully equipped for family dinners.",
	
	"Balcony where you can relax and watch the sunset and even hear the Disney fireworks at night.");

	var numberOfPhotos = changePhotos.length;
	var thisCount = 0;
	
function slideshowNext() {

	thisCount ++;
	if (thisCount == numberOfPhotos) {
		thisCount = 0;
	}
	document.getElementById('thisPhoto').src = changePhotos[thisCount];
	document.getElementById('caption').innerHTML = changeText[thisCount];
}


function slideshowBack() {

	thisCount --;
	if (thisCount < 0) {
		thisCount = 7;
	}
	document.getElementById('thisPhoto').src = changePhotos[thisCount];
	document.getElementById('caption').innerHTML = changeText[thisCount];
}
