function photo(filename, icon, caption){
	this.filename = filename;
	this.caption = caption;
	this.icon = icon;
}
function pages(name, parr){
	this.name = name;
	this.parr = parr;
}

var currentpage = 0;
var pnum = 7;
var photoes;

var galleryphotoes = new Array(13);
galleryphotoes[0] = new photo("photoes/p001.jpg", "thumbnails/p001.jpg", "Playground Structure");
galleryphotoes[1] = new photo("photoes/Balls.JPG", "thumbnails/Balls.JPG", "Playground Structure");
galleryphotoes[2] = new photo("photoes/Obstacles.JPG", "thumbnails/Obstacles.JPG", "Playground Structure");
galleryphotoes[3] = new photo("photoes/Structure.JPG", "thumbnails/Structure.JPG", "Playground Structure");
galleryphotoes[4] = new photo("photoes/p010.jpg", "thumbnails/p010.jpg", "Three Bears Garden");
galleryphotoes[5] = new photo("photoes/p007.jpg", "thumbnails/p007.jpg", "Three Bears Garden");

galleryphotoes[6] = new photo("photoes/p002.jpg", "thumbnails/p002.jpg", "Sprouts Patch");
galleryphotoes[7] = new photo("photoes/Play.JPG", "thumbnails/Play.JPG", "Sprouts Patch");
galleryphotoes[8] = new photo("photoes/Toddler Area.JPG", "thumbnails/Toddler Area.JPG", "Sprouts Patch");
galleryphotoes[9] = new photo("photoes/sprouts.jpg", "thumbnails/sprouts.jpg", "Sprouts Patch");
galleryphotoes[10] = new photo("photoes/cars.jpg", "thumbnails/cars.jpg", "Cars");
galleryphotoes[11] = new photo("photoes/sports.jpg", "thumbnails/sports.jpg", "Sports Center");

var cafephotoes = new Array(3);
cafephotoes[0] = new photo("photoes/cafe.jpg", "thumbnails/cafe.jpg", "Cafe");
cafephotoes[1] = new photo("photoes/p004.jpg", "thumbnails/p004.jpg", "Cafe");
cafephotoes[2] = new photo("photoes/p006.jpg", "thumbnails/p006.jpg", "Cafe");

var spaphotoes = new Array(2);
spaphotoes[0] = new photo("photoes/spa2.jpg", "thumbnails/spa2.jpg", "Spa");
spaphotoes[1] = new photo("photoes/spa3.jpg", "thumbnails/spa3.jpg", "Spa");

var pgroups = new Array(3);
pgroups[0] = new pages("gallery.shtml", galleryphotoes);
pgroups[1] = new pages("cafe.shtml", cafephotoes);
pgroups[2] = new pages("spa.shtml", spaphotoes);

var url = document.URL;
for ( i = 0; i < pgroups.length; i++ ){
	var m = url.match( pgroups[i].name + "$" );
	if ( pgroups[i].name == m ){
		photoes = pgroups[i].parr;
		break;
	}
}
