// preload photos

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

home3 = new Image(350,262); //2b same as home3
home3.src = "img/home3.jpg";

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

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

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

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

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

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

// SCRIPT FOR ARROW BUTTONS

	var changePhotos = new Array ("img/home6.jpg","img/home3.jpg","img/condo2c.jpg","img/condo2d.jpg","img/condo2e.jpg","img/condo2f.jpg","img/condo2g.jpg","img/condo2h.jpg");

	var changeText = new Array ("The master suite's fantastic leather sleigh bed has the best matress you could ever sleep on. Just what you need after a full day at the parks! There is also a large ensuite and walk-in closet, plus a cable LCD TV.",
	
	"Mickey Mouse Kid's bedroom equipped with Disney TV, DVD player and games console along with a selection of games and movies to entertain them.",
	
	"This room also has a large closet and a talking Mickey Mouse lamp!",
	
	"Second bedroom equipped with a cable LCD TV, large sleigh bed with upgraded matress, alarm radio/clock and a large closet.",
	
	"Living room, with balcony in background. This room has an LCD Cable TV and Xbox with games, and DVD's to watch. Additionally there are also 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, & a dishwasher. There is also a hoover, iron and iron board provided.",
	
	"Master bedroom ensuite bathroom.",
	
	"Second shared bathroom");

	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];
}
