/***************************************************************************
* Create a photo object                                                    *
***************************************************************************/
function photo(id, galleries_id, photo_ref, section_code, src, width, height, caption, thumbnail, thumbnail_width, thumbnail_height, home, gallery, description, takendate, photographer, location, item_price, purchase_instruction) {
	this.id = id;
	this.galleries_id = galleries_id;
	this.photo_ref = photo_ref;
	this.section_code = section_code;
	this.src = src;
	this.width = width;
	this.height = height;
	this.caption = caption;
	this.thumbnail = thumbnail;
	this.thumbnail_width = thumbnail_width;
	this.thumbnail_height = thumbnail_height;
	this.home = home;
	this.gallery = gallery;
	this.description = description;
	this.takendate = takendate;
	this.photographer = photographer;
	this.location = location;
	this.item_price = item_price;
	this.purchase_instruction = purchase_instruction;
}
/***************************************************************************
* Create a gallery object                                                  *
***************************************************************************/

function gallery(id,featured_images,title,section_code) {
	this.id = id;
	this.featured_images = featured_images;
	this.title = title;
	this.section_code = section_code;}

/***************************************************************************
* Select a random value from a comma separated list                        *
***************************************************************************/
function randomListVal(list) {
	arrayVals = list.split(',');
	pos = Math.round(Math.random() * (arrayVals.length - 1));
	debug('Returning ' + arrayVals[pos] + ' as random image');
	return arrayVals[pos];
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {

	imageID = randomListVal('1638707,1637360,1637355,1637346,1637342,1637340,1637339,1637336,1637330,1637323,1637321,1637320,1637318,1637306,1637304,1637271,1637262,1637257,1637251,1637245,1637192,1637190,1637187,1637183,1637181,1637177,1636639,1636627,1636623,1636616,1636612,1636607,1636604,1636572,1636569,1636567,1636565,1636562,1636553,1636440,1636438,1636434,1636430,1636424,1636417,1636412,1636407,1636406,1636404,1636403');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if (!basic) {
			img.src = photos[j].src;
			img.width = photos[j].width;
			img.height = photos[j].height;
			}
			else {
				newImage = new Image(photos[j].width,photos[j].height);
				newImage.src = photos[j].src;
				document.images[img.name] = newImage;
				debug(newImage.src);
			}
			break;
		}
	}
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline() {
	
	imageID = randomListVal('1638707,1637360,1637355,1637346,1637342,1637340,1637339,1637336,1637330,1637323,1637321,1637320,1637318,1637306,1637304,1637271,1637262,1637257,1637251,1637245,1637192,1637190,1637187,1637183,1637181,1637177,1636639,1636627,1636623,1636616,1636612,1636607,1636604,1636572,1636569,1636567,1636565,1636562,1636553,1636440,1636438,1636434,1636430,1636424,1636417,1636412,1636407,1636406,1636404,1636403');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if ('gallery' != '') {
						if (photos[j].galleries_id != '') {
						document.write('<a href="' + photos[j].section_code + '_' + photos[j].galleries_id + '.html">');
						}
						else {
						document.write('<a href="gallery.html">');
						}
			}
			document.write('<img src="' + photos[j].src + '" width="' + photos[j].width + '" height="' + photos[j].height + '" class="mainhomepageimage" id="mainSample" name="mainSample" alt="' + photos[j].caption  + '" border="0">');
			if ('gallery' != '') {
				document.write('</a>');
			}
			break;
		}
	}
	
}

/***************************************************************************
* Show the next image in a gallery.  field = hidden field containing       *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function next(field,img) {

	debug('IN next');
	imageID = field.value;
	
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k= j + 1;
	while (nextImg < 0) {
		for (; k < photos.length; k++) {
			debug('testing image ' + k + ': gallery = ' + photos[k].galleries_id + '(existing: ' + photos[j].galleries_id + ')');
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				debug('setting  nextImg = ' + k);
				break;
			}
		}
		if (nextImg == -1) {
			k = 0;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);
	}


}


/***************************************************************************
* Set a new image on the gallery detail page given its array position      *
***************************************************************************/
function updateImage (nextImg, field,img) {
	debug('Updating image');
	if (!basic && !(1)) {
		debug('In updateImage');
		debug('setting  img src = ' + photos[nextImg].src);
		
					
			document.getElementById('imagePhoto').innerHTML = '<img class="mainphoto" src="' + photos[nextImg].src + ' " id="mainPic" name="mainPic" width="' + photos[nextImg].width + '" height="' + photos[nextImg].height + '" alt="' + photos[nextImg].caption + '" border="0">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = photos[nextImg].caption;
			/* apply 'blank' classname to element where */			if ( photos[nextImg].caption == '') {
				document.getElementById('imageTitle').style.className = 'blank';
			}
			else {
				document.getElementById('imageTitle').style.className = 'normal';
			}
						temp = '';
			if (photos[nextImg].description != '') {
				temp = temp +  '<p id="imageDescription">' + photos[nextImg].description + '</p>';
			}
			if (photos[nextImg].photo_ref != '') {
				temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + photos[nextImg].photo_ref + '</p>';
			}
			if (photos[nextImg].takendate != '') {
				debug('Resetting taken date');
				temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + photos[nextImg].takendate + '</p>';
			}
			
			if (photos[nextImg].location != '') {
				debug('Resetting location');
				temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  photos[nextImg].location + '</p>';
			}
			
			if (photos[nextImg].photographer != '') {
				debug('Resetting photographer');
				temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + photos[nextImg].photographer + '</p>';
			}
			if (temp != '') {				temp = temp + '<div class="spacer"></div>';			}					if (temp == '') {
			document.getElementById('imageDetails').style.display = 'none';
		}
		else {
			document.getElementById('imageDetails').style.display = 'block';
		}
		document.getElementById('imageDetails').innerHTML =temp;	
		
	}
	else {
		debug('Redirecting to id ' + photos[nextImg].id);
		window.location = 'photo_' + photos[nextImg].id + '.html';
	}
}

/***************************************************************************
* Show the previous image for a gallery. field = hidden field containing   *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function previous(field,img) {


	imageID = field.value;
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k = j -1;
	while (nextImg < 0) {
		for (; k >= 0; k--) {
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				break;
			}
		}
		if (nextImg == -1) {
			k = photos.length -1;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);	
	}
}

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.
        *
* Gallery_id = id of gallery to choose                                     *
* 
 img = reference to html image                                       *
* in which to show image                                                   *
***************************************************************************/
function showGalleryImage(gallery_id, img) {
	debug('Gallery = ' + gallery_id);
	for (i = 0; i < galleries.length; i++) {
		if (galleries[i].id == gallery_id) {
			imageID = randomListVal(galleries[i].featured_images);
				for (j = 0; j < photos.length; j++) {
					if (photos[j].id == imageID) {
						
						img.src = photos[j].thumbnail;
						img.width = photos[j].thumbnail_width;
						img.height = photos[j].thumbnail_height;
						
						break;
					}
				}
			break;
		}
	} 
	}

/***************************************************************************
* If we have dynamic HTML                                                  *
*  replace the galleries link with a list that                             *
* doesn't include the current gallery                                      *
***************************************************************************/
function showGalleries(gallery_id) {
	debug('Showing links for gallery ' + gallery_id);
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
			debug('Testing gallery ' + galleries[i].id);
			
			if (galleries[i].id != gallery_id) {
				debug('Adding link');
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="gallery_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}
/***************************************************************************
* Create the array of Photo objects                                        *
***************************************************************************/
photos = new Array();
photos[0] = new photo(1636391,'110835','','gallery','http://www1.clikpic.com/peterscherub/images/blue shuttersJPG.jpg',332,500,'Blue Shutters','http://www1.clikpic.com/peterscherub/images/blue shuttersJPG_thumb.jpg',130, 196,0, 0,'','','Judy Dean','France','','');
photos[1] = new photo(1636400,'110835','','gallery','http://www1.clikpic.com/peterscherub/images/Cotswold hillsJPG.jpg',500,333,'Cotswold Hills','http://www1.clikpic.com/peterscherub/images/Cotswold hillsJPG_thumb.jpg',130, 87,0, 0,'','','Judy Dean','Cotswolds','','');
photos[2] = new photo(1636412,'110835','','gallery','http://www1.clikpic.com/peterscherub/images/French rooftopJPG.jpg',500,332,'French rooftops','http://www1.clikpic.com/peterscherub/images/French rooftopJPG_thumb.jpg',130, 86,0, 0,'','','Judy Dean','France','','');
photos[3] = new photo(1636434,'110835','','gallery','http://www1.clikpic.com/peterscherub/images/graveJPG.jpg',330,500,'Pushing up daisies!','http://www1.clikpic.com/peterscherub/images/graveJPG_thumb.jpg',130, 197,0, 0,'','','Judy Dean','Princes Risborough','','');
photos[4] = new photo(1636440,'110835','','gallery','http://www1.clikpic.com/peterscherub/images/IMG_6128JPG.jpg',500,332,'Coastal meadow','http://www1.clikpic.com/peterscherub/images/IMG_6128JPG_thumb.jpg',130, 86,0, 0,'','','Judy Dean','Dorset','','');
photos[5] = new photo(1636607,'110835','','gallery','http://www1.clikpic.com/peterscherub/images/M25!JPG.jpg',500,375,'M25!','http://www1.clikpic.com/peterscherub/images/M25!JPG_thumb.jpg',130, 98,0, 0,'','','Judy Dean','M25','','');
photos[6] = new photo(1636612,'110835','','gallery','http://www1.clikpic.com/peterscherub/images/Malverns2JPG.jpg',329,500,'Malvern Hills','http://www1.clikpic.com/peterscherub/images/Malverns2JPG_thumb.jpg',130, 198,0, 0,'','','Judy Dean','Malvern','','');
photos[7] = new photo(1637177,'110835','','gallery','http://www1.clikpic.com/peterscherub/images/northumberland2JPG.jpg',500,332,'Bamborough Castle','http://www1.clikpic.com/peterscherub/images/northumberland2JPG_thumb.jpg',130, 86,0, 0,'','','Judy Dean','Northumberland','','');
photos[8] = new photo(1637181,'110835','','gallery','http://www1.clikpic.com/peterscherub/images/northumberland3JPG.jpg',500,332,'Weather beaten hills','http://www1.clikpic.com/peterscherub/images/northumberland3JPG_thumb.jpg',130, 86,0, 0,'','','Judy Dean','Northumberland','','');
photos[9] = new photo(1637183,'110835','','gallery','http://www1.clikpic.com/peterscherub/images/northumberland5JPG.jpg',500,319,'Bamborough Castle','http://www1.clikpic.com/peterscherub/images/northumberland5JPG_thumb.jpg',130, 83,0, 0,'','','Judy Dean','Northumberland','','');
photos[10] = new photo(1637190,'110835','','gallery','http://www1.clikpic.com/peterscherub/images/northumberland7JPG.jpg',332,500,'The dunes','http://www1.clikpic.com/peterscherub/images/northumberland7JPG_thumb.jpg',130, 196,0, 0,'','','Judy Dean','Northumberland','','');
photos[11] = new photo(1637304,'110835','','gallery','http://www1.clikpic.com/peterscherub/images/pebblesJPG.jpg',332,500,'Pebbles','http://www1.clikpic.com/peterscherub/images/pebblesJPG_thumb.jpg',130, 196,0, 0,'','','Judy Dean','','','');
photos[12] = new photo(1637330,'110835','','gallery','http://www1.clikpic.com/peterscherub/images/StourheadJPG.jpg',391,500,'Stourhead gardens','http://www1.clikpic.com/peterscherub/images/StourheadJPG_thumb.jpg',130, 166,0, 0,'','','Judy Dean','Stourhead','','');
photos[13] = new photo(1637339,'110835','','gallery','http://www1.clikpic.com/peterscherub/images/Rousillon windowJPG.jpg',401,500,'Ochre window','http://www1.clikpic.com/peterscherub/images/Rousillon windowJPG_thumb.jpg',130, 162,0, 0,'','','Judy Dean','Rousillon, France','','');
photos[14] = new photo(1636401,'110837','','gallery','http://www1.clikpic.com/peterscherub/images/Dorset coast 3JPG.jpg',500,326,'Dorset Coast','http://www1.clikpic.com/peterscherub/images/Dorset coast 3JPG_thumb.jpg',130, 85,0, 0,'','','Judy Dean','Dorset','','');
photos[15] = new photo(1636403,'110837','','gallery','http://www1.clikpic.com/peterscherub/images/Dorset coastJPG.jpg',500,319,'Dorset coaet','http://www1.clikpic.com/peterscherub/images/Dorset coastJPG_thumb.jpg',130, 83,0, 0,'','','Judy Dean','Dorset','','');
photos[16] = new photo(1636404,'110837','','gallery','http://www1.clikpic.com/peterscherub/images/Dorset coast 2JPG1.jpg',500,332,'Dorset coast','http://www1.clikpic.com/peterscherub/images/Dorset coast 2JPG1_thumb.jpg',130, 86,0, 0,'','','Judy Dean','Dorset','','');
photos[17] = new photo(1636406,'110837','','gallery','http://www1.clikpic.com/peterscherub/images/fishing at ChesilJPG.jpg',500,332,'Fishing at Chesil','http://www1.clikpic.com/peterscherub/images/fishing at ChesilJPG_thumb.jpg',130, 86,0, 0,'','','Judy Dean','Chesil Beach','','');
photos[18] = new photo(1636417,'110837','','gallery','http://www1.clikpic.com/peterscherub/images/from ChesilJPG.jpg',500,326,'From Chesil','http://www1.clikpic.com/peterscherub/images/from ChesilJPG_thumb.jpg',130, 85,0, 0,'','','Judy Dean','Chesil Beach','','');
photos[19] = new photo(1637187,'110837','','gallery','http://www1.clikpic.com/peterscherub/images/northumberland6JPG.jpg',302,500,'Northumbrian beach','http://www1.clikpic.com/peterscherub/images/northumberland6JPG_thumb.jpg',130, 215,0, 0,'','','Judy Dean','Northumberland','','');
photos[20] = new photo(1637318,'110837','','gallery','http://www1.clikpic.com/peterscherub/images/pool bluesJPG.jpg',375,500,'Pool blues','http://www1.clikpic.com/peterscherub/images/pool bluesJPG_thumb.jpg',130, 173,0, 0,'','','Judy Dean','','','');
photos[21] = new photo(1636384,'110838','','gallery','http://www1.clikpic.com/peterscherub/images/barn owl in flightJPG.jpg',399,500,'Horrible Horace flies','http://www1.clikpic.com/peterscherub/images/barn owl in flightJPG_thumb.jpg',130, 163,0, 0,'','','Judy Dean','Batsford Falconry Centre','','');
photos[22] = new photo(1636389,'110838','','gallery','http://www1.clikpic.com/peterscherub/images/barn owlJPG.jpg',500,332,'Wow-owl','http://www1.clikpic.com/peterscherub/images/barn owlJPG_thumb.jpg',130, 86,0, 0,'','','Judy Dean','Batsford falconry centre','','');
photos[23] = new photo(1636553,'110838','','gallery','http://www1.clikpic.com/peterscherub/images/IMG_6363JPG.jpg',500,333,'Cotswold Lions','http://www1.clikpic.com/peterscherub/images/IMG_6363JPG_thumb.jpg',130, 87,0, 0,'','','Judy Dean','Cotswolds','','');
photos[24] = new photo(1637192,'110838','','gallery','http://www1.clikpic.com/peterscherub/images/Octopus 2JPG.jpg',500,375,'Octopus','http://www1.clikpic.com/peterscherub/images/Octopus 2JPG_thumb.jpg',130, 98,0, 0,'','','Judy Dean','','','');
photos[25] = new photo(1637245,'110838','','gallery','http://www1.clikpic.com/peterscherub/images/octopus in the acquariumJPG.jpg',500,375,'Octopus in aquarium','http://www1.clikpic.com/peterscherub/images/octopus in the acquariumJPG_thumb.jpg',130, 98,0, 0,'','','Judy Dean','','','');
photos[26] = new photo(1637271,'110838','','gallery','http://www1.clikpic.com/peterscherub/images/peacock featherJPG.jpg',500,367,'Peacock feather','http://www1.clikpic.com/peterscherub/images/peacock featherJPG_thumb.jpg',130, 95,0, 0,'','','Judy Dean','','','');
photos[27] = new photo(1637323,'110838','','gallery','http://www1.clikpic.com/peterscherub/images/swanJPG.jpg',500,358,'Swan','http://www1.clikpic.com/peterscherub/images/swanJPG_thumb.jpg',130, 93,0, 0,'','','Judy Dean','','','');
photos[28] = new photo(1637355,'110838','','gallery','http://www1.clikpic.com/peterscherub/images/seagullJPG.jpg',500,403,'Seagull','http://www1.clikpic.com/peterscherub/images/seagullJPG_thumb.jpg',130, 105,0, 0,'','','Judy Dean','','','');
photos[29] = new photo(1638707,'110838','','gallery','http://www1.clikpic.com/peterscherub/images/1233376123_aad9a6ccf4.jpg',500,332,'Hi Nellie!','http://www1.clikpic.com/peterscherub/images/1233376123_aad9a6ccf4_thumb.jpg',130, 86,0, 0,'','','Judy Dean','South Africa','','');
photos[30] = new photo(1636303,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/autumn greensJPG.jpg',500,332,'autumn greens','http://www1.clikpic.com/peterscherub/images/autumn greensJPG_thumb.jpg',130, 86,0, 0,'','','judy dean','Stourhead','','');
photos[31] = new photo(1636314,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/autumn redsJPG.jpg',500,308,'autumn reds','http://www1.clikpic.com/peterscherub/images/autumn redsJPG_thumb.jpg',130, 80,0, 0,'','','judy dean','','','');
photos[32] = new photo(1636318,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/autumn reflectionsJPG.jpg',500,758,'autumn reflections at Stourhead','http://www1.clikpic.com/peterscherub/images/autumn reflectionsJPG_thumb.jpg',130, 197,0, 0,'','','judy dean','Stourhead','','');
photos[33] = new photo(1636397,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/Clematis seedJPG.jpg',500,332,'Clematis seedhead','http://www1.clikpic.com/peterscherub/images/Clematis seedJPG_thumb.jpg',130, 86,0, 0,'','','Judy Dean','','','');
photos[34] = new photo(1636407,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/formium leafJPG.jpg',332,500,'Formium leaf','http://www1.clikpic.com/peterscherub/images/formium leafJPG_thumb.jpg',130, 196,0, 0,'','','Judy Dean','','','');
photos[35] = new photo(1636430,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/grassesJPG.jpg',332,500,'Coastal grasses','http://www1.clikpic.com/peterscherub/images/grassesJPG_thumb.jpg',130, 196,0, 0,'','','Judy Dean','Chesil Beach','','');
photos[36] = new photo(1636438,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/IMG_4297JPG.jpg',500,332,'A rose amended','http://www1.clikpic.com/peterscherub/images/IMG_4297JPG_thumb.jpg',130, 86,0, 0,'','','Judy Dean','','','');
photos[37] = new photo(1636562,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/Lily 1JPG.jpg',333,500,'Lily 1','http://www1.clikpic.com/peterscherub/images/Lily 1JPG_thumb.jpg',130, 195,0, 0,'','','Judy Dean','','','');
photos[38] = new photo(1636565,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/Lily 2JPG.jpg',333,500,'Lily 2','http://www1.clikpic.com/peterscherub/images/Lily 2JPG_thumb.jpg',130, 195,0, 0,'','','Judy Dean','','','');
photos[39] = new photo(1636567,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/Lily 3JPG.jpg',333,500,'Lily 3','http://www1.clikpic.com/peterscherub/images/Lily 3JPG_thumb.jpg',130, 195,0, 0,'','','Judy Dean','','','');
photos[40] = new photo(1636569,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/Lily 4JPG.jpg',500,333,'Lily 4','http://www1.clikpic.com/peterscherub/images/Lily 4JPG_thumb.jpg',130, 87,0, 0,'','','Judy Dean','','','');
photos[41] = new photo(1636572,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/Lily 5JPG.jpg',333,500,'Lily 5','http://www1.clikpic.com/peterscherub/images/Lily 5JPG_thumb.jpg',130, 195,0, 0,'','','Judy Dean','','','');
photos[42] = new photo(1636604,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/Lily 6JPG.jpg',500,333,'Lily 6','http://www1.clikpic.com/peterscherub/images/Lily 6JPG_thumb.jpg',130, 87,0, 0,'','','Judy Dean','','','');
photos[43] = new photo(1636623,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/mimosaJPG.jpg',333,500,'Mimosa','http://www1.clikpic.com/peterscherub/images/mimosaJPG_thumb.jpg',130, 195,0, 0,'','','Judy Dean','','','');
photos[44] = new photo(1636627,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/Morning gloryJPG.jpg',500,393,'Morning Glory','http://www1.clikpic.com/peterscherub/images/Morning gloryJPG_thumb.jpg',130, 102,0, 0,'','','Judy Dean','','','');
photos[45] = new photo(1636639,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/northumberland1JPG.jpg',500,332,'Pastoral scene','http://www1.clikpic.com/peterscherub/images/northumberland1JPG_thumb.jpg',130, 86,0, 0,'','','Judy Dean','Northumberland','','');
photos[46] = new photo(1637251,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/orange flowerJPG.jpg',500,333,'Orange on black','http://www1.clikpic.com/peterscherub/images/orange flowerJPG_thumb.jpg',130, 87,0, 0,'','','Judy Dean','','','');
photos[47] = new photo(1637257,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/passionflower2JPG.jpg',332,500,'Passionflower 1','http://www1.clikpic.com/peterscherub/images/passionflower2JPG_thumb.jpg',130, 196,0, 0,'','','Judy Dean','','','');
photos[48] = new photo(1637262,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/passionflower3JPG1.jpg',500,332,'Passionflower 2 ','http://www1.clikpic.com/peterscherub/images/passionflower3JPG1_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[49] = new photo(1637306,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/poppyJPG.jpg',500,332,'Poppy','http://www1.clikpic.com/peterscherub/images/poppyJPG_thumb.jpg',130, 86,0, 0,'','','Judy Dean','','','');
photos[50] = new photo(1637320,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/red rose_1JPG.jpg',342,500,'Red, red rose','http://www1.clikpic.com/peterscherub/images/red rose_1JPG_thumb.jpg',130, 190,0, 0,'','','Judy Dean','','','');
photos[51] = new photo(1637321,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/rosebudJPG.jpg',332,500,'Rosebud','http://www1.clikpic.com/peterscherub/images/rosebudJPG_thumb.jpg',130, 196,0, 0,'','','Judy Dean','','','');
photos[52] = new photo(1637336,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/sunflowersJPG.jpg',332,500,'Sunflowers','http://www1.clikpic.com/peterscherub/images/sunflowersJPG_thumb.jpg',130, 196,0, 0,'','','Judy Dean','','','');
photos[53] = new photo(1637340,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/rose1JPG.jpg',500,332,'Rose 1','http://www1.clikpic.com/peterscherub/images/rose1JPG_thumb.jpg',130, 86,0, 0,'','','Judy Dean','','','');
photos[54] = new photo(1637342,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/rose2JPG.jpg',500,332,'Rose petals','http://www1.clikpic.com/peterscherub/images/rose2JPG_thumb.jpg',130, 86,0, 0,'','','Judy Dean','','','');
photos[55] = new photo(1637346,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/rose6JPG.jpg',332,500,'Pink roses','http://www1.clikpic.com/peterscherub/images/rose6JPG_thumb.jpg',130, 196,0, 0,'','','Judy Dean','','','');
photos[56] = new photo(1637360,'110839','','gallery','http://www1.clikpic.com/peterscherub/images/tiny little daisiesJPG.jpg',333,500,'Tiny little daisies','http://www1.clikpic.com/peterscherub/images/tiny little daisiesJPG_thumb.jpg',130, 195,0, 0,'','','Judy Dean','','','');
photos[57] = new photo(1636424,'110840','','gallery','http://www1.clikpic.com/peterscherub/images/grandadJPG.jpg',332,500,'Look Grandad!','http://www1.clikpic.com/peterscherub/images/grandadJPG_thumb.jpg',130, 196,0, 0,'','','Judy Dean','Cotswolds','','');
photos[58] = new photo(1636616,'110840','','gallery','http://www1.clikpic.com/peterscherub/images/MikeJPG.jpg',332,500,'Mike','http://www1.clikpic.com/peterscherub/images/MikeJPG_thumb.jpg',130, 196,0, 0,'','','Judy Dean','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(110835,'1637339,1637330,1637304,1637190,1637183,1637181,1637177,1636612,1636607,1636440','earth','gallery');
galleries[1] = new gallery(110837,'1637318,1637187,1636417,1636406,1636404,1636403,1636401','water','gallery');
galleries[2] = new gallery(110838,'1638707,1637355,1637323,1637271,1637245,1637192,1636553,1636389,1636384','fauna','gallery');
galleries[3] = new gallery(110839,'1637360,1637346,1637342,1637340,1637336,1637321,1637320,1637306,1637262,1637257','flora','gallery');
galleries[4] = new gallery(110840,'1636616,1636424','people','gallery');


