// preload photos

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

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

home4 = new Image(350,262); //4c same as home4
home4.src = "img/home4.jpg";

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

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

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

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

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

// SCRIPT FOR ARROW BUTTONS

	var changePhotos = new Array ("img/condo4a.jpg","img/condo4b.jpg","img/home4.jpg","img/condo4d.jpg","img/condo4e.jpg","img/condo4f.jpg","img/condo4g.jpg","img/condo4h.jpg");

	var changeText = new Array ("WOW! The kids will love this Mickey Mouse theme bedroom. Everything is Mickey Mouse from the TV, to the DVD player, Disney DVD's and even a talking Mickey Mouse lamp!",
	
	"Second Bedroom that has a wonderful view and a cable LCD TV. ",
	
	"Amazing dining and living room. This room includes a cable 32 inch HD LCD TV, DVD player, board games and a whole lot more!",
	
	"Luxury living room. Not only does this room have a 32 inch HD cable TV, but it also comes with a DVD player and Xbox. There is also plenty of games and DVD's to keep everyone entertained.",
	
	"Tropical jungle themed master bedroom. This room includes a cable LCD TV, radio/alarm clock and the finest furniture. This room also has a large walk-in wardobe.",
	
	"This full kitchen comes with a self-cleaning range oven, microwave, washer and dryer, refrigerator with ice maker, and a dishwasher. An iron with iron board are also provided.",
	
	"Master bedroom ensuite bathroom.",
	
	"Second 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];
}
