/***************************************************************************
* 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('2103146,2103005,2102598,138020');
	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('2103146,2103005,2102598,138020');
	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 && !(0)) {
		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(138020,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf17147.jpg',600,400,'COMMON POPPY','http://www1.clikpic.com/geoffdufeu/images/gdf17147_thumb.jpg',130, 87,1, 1,'','','','','','');
photos[1] = new photo(2102591,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf07340.jpg',350,500,'RED TULIP','http://www1.clikpic.com/geoffdufeu/images/gdf07340_thumb.jpg',130, 186,0, 0,'','','','','','');
photos[2] = new photo(2102593,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf06080.jpg',500,325,'TWO GEESE AT DAWN ON NORFOLK BROADS','http://www1.clikpic.com/geoffdufeu/images/gdf06080_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[3] = new photo(2102594,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf03393.jpg',500,328,'HERON ON POST AT DAWN ON NORFOLK BROADS','http://www1.clikpic.com/geoffdufeu/images/gdf03393_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[4] = new photo(2102596,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf17618.jpg',333,500,'RED DAHLIA 2','http://www1.clikpic.com/geoffdufeu/images/gdf17618_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[5] = new photo(2102606,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf176191.jpg',500,333,'RED DAHLIA 1','http://www1.clikpic.com/geoffdufeu/images/gdf176191_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[6] = new photo(2102598,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf17296.jpg',372,500,'MISTY TREES - HICKLING BROAD','http://www1.clikpic.com/geoffdufeu/images/gdf17296_thumb.jpg',130, 175,1, 0,'','','','','','');
photos[7] = new photo(2102607,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf033661.jpg',333,500,'SUNRISE THROUGH WILLOW BRANCHES','http://www1.clikpic.com/geoffdufeu/images/gdf033661_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[8] = new photo(2102621,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf04691.jpg',500,374,'JAPANESE MAPLE IN AUTUMN COLOURS','http://www1.clikpic.com/geoffdufeu/images/gdf04691_thumb.jpg',130, 97,0, 0,'','','','','','');
photos[9] = new photo(2102780,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf14378.jpg',500,328,'GEESE IN FLIGHT AT SUNSET 1','http://www1.clikpic.com/geoffdufeu/images/gdf14378_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[10] = new photo(2102781,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf14400.jpg',500,328,'GEESE IN FLIGHT AT SUNSET 2','http://www1.clikpic.com/geoffdufeu/images/gdf14400_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[11] = new photo(2102788,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf17626.jpg',333,500,'POPPY FLOWER','http://www1.clikpic.com/geoffdufeu/images/gdf17626_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[12] = new photo(2102812,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf15561.jpg',333,500,'FUSCHIA FLOWER BUDS','http://www1.clikpic.com/geoffdufeu/images/gdf15561_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[13] = new photo(2102622,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/C1799.jpg',375,500,'RAY OF SUNLIGHT - THIRLEMERE','http://www1.clikpic.com/geoffdufeu/images/C1799_thumb.jpg',130, 173,0, 0,'','','','','','');
photos[14] = new photo(2102813,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf17627.jpg',500,338,'REEDS AT SUNRISE','http://www1.clikpic.com/geoffdufeu/images/gdf17627_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[15] = new photo(2102814,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf15643.jpg',333,500,'CALENDULA FLOWERS','http://www1.clikpic.com/geoffdufeu/images/gdf15643_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[16] = new photo(2102868,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf07345.jpg',333,500,'CALENDULA  FLOWER','http://www1.clikpic.com/geoffdufeu/images/gdf07345_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[17] = new photo(2102985,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf17628.jpg',372,500,'SUMMER MEADOW 4','http://www1.clikpic.com/geoffdufeu/images/gdf17628_thumb.jpg',130, 175,0, 0,'','','','','','');
photos[18] = new photo(2102988,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf17624.jpg',331,500,'SUMMER MEADOW 5','http://www1.clikpic.com/geoffdufeu/images/gdf17624_thumb.jpg',130, 196,0, 0,'','','','','','');
photos[19] = new photo(2102992,'655','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf17015.jpg',333,500,'SUMMER MEADOW 1','http://www1.clikpic.com/geoffdufeu/images/gdf17015_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[20] = new photo(2102997,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf17610.jpg',500,344,'SUMMER MEADOW 2','http://www1.clikpic.com/geoffdufeu/images/gdf17610_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[21] = new photo(2103001,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf17612.jpg',500,333,'SUMMER MEADOW 3','http://www1.clikpic.com/geoffdufeu/images/gdf17612_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[22] = new photo(2103005,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf17621_border.jpg',500,205,'MEADOW SWIRL','http://www1.clikpic.com/geoffdufeu/images/gdf17621_border_thumb.jpg',130, 53,1, 0,'','','','','','');
photos[23] = new photo(2103008,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf17548.jpg',333,500,'BANANA LEAF','http://www1.clikpic.com/geoffdufeu/images/gdf17548_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[24] = new photo(2103137,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf15495.jpg',343,500,'JAPANESE MAPLE LEAVES 1','http://www1.clikpic.com/geoffdufeu/images/gdf15495_thumb.jpg',130, 190,0, 0,'','','','','','');
photos[25] = new photo(2103145,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf15491.jpg',333,500,'JAPANESE MAPLE LEAVES 2','http://www1.clikpic.com/geoffdufeu/images/gdf15491_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[26] = new photo(2103146,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/E1693.jpg',500,330,'RUNNING BUFFALO','http://www1.clikpic.com/geoffdufeu/images/E1693_thumb.jpg',130, 86,1, 0,'','','','','','');
photos[27] = new photo(2103371,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/FC85381.jpg',326,500,'CRYSTALS OF CITRIC ACID','http://www1.clikpic.com/geoffdufeu/images/FC85381_thumb.jpg',130, 199,0, 0,'','','','','','');
photos[28] = new photo(2103373,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/FC8539.jpg',326,500,'CRYSTALS OF CITRIC ACID','http://www1.clikpic.com/geoffdufeu/images/FC8539_thumb.jpg',130, 199,0, 0,'','','','','','');
photos[29] = new photo(2103388,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf17625.jpg',500,333,'BEECH TREES 1','http://www1.clikpic.com/geoffdufeu/images/gdf17625_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[30] = new photo(2103394,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf04677.jpg',372,500,'BEECH TREES 2','http://www1.clikpic.com/geoffdufeu/images/gdf04677_thumb.jpg',130, 175,0, 0,'','','','','','');
photos[31] = new photo(2103663,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf04581.jpg',500,335,'GREEN TREE','http://www1.clikpic.com/geoffdufeu/images/gdf04581_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[32] = new photo(2103396,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf15240.jpg',333,500,'WATER DROP ON GREEN FEATHER','http://www1.clikpic.com/geoffdufeu/images/gdf15240_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[33] = new photo(2103401,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf15241.jpg',329,500,'WATER DROP ON BLUE FEATHER','http://www1.clikpic.com/geoffdufeu/images/gdf15241_thumb.jpg',130, 198,0, 0,'','','','','','');
photos[34] = new photo(2103480,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf15685.jpg',500,332,'RIPPLES 1','http://www1.clikpic.com/geoffdufeu/images/gdf15685_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[35] = new photo(2103485,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf17606.jpg',500,333,'RIPPLES 2','http://www1.clikpic.com/geoffdufeu/images/gdf17606_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[36] = new photo(2103511,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf05253.jpg',500,372,'GREYLAG GEESE','http://www1.clikpic.com/geoffdufeu/images/gdf05253_thumb.jpg',130, 97,0, 0,'','','','','','');
photos[37] = new photo(2103512,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf06711.jpg',500,330,'CANADA GOOSE TAKING FLIGHT 1','http://www1.clikpic.com/geoffdufeu/images/gdf06711_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[38] = new photo(2103525,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf06713.jpg',500,333,'CANADA GOOSE TAKING FLIGHT 2','http://www1.clikpic.com/geoffdufeu/images/gdf06713_thumb.jpg',130, 87,0, 1,'','','','','','');
photos[39] = new photo(2103532,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/gdf07720.jpg',333,500,'COMMON DAISY','http://www1.clikpic.com/geoffdufeu/images/gdf07720_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[40] = new photo(2103554,'140132','','gallery','http://www1.clikpic.com/geoffdufeu/images/E4335.jpg',500,326,'HYDRANGEA FLOWER ON ROSE LEAF','http://www1.clikpic.com/geoffdufeu/images/E4335_thumb.jpg',130, 85,0, 0,'','','','','','');
photos[41] = new photo(7213,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Poppy Field - North Norfolk.jpg',400,270,'Poppy Field - North Norfolk','http://www1.clikpic.com/geoffdufeu/images/Poppy Field - North Norfolk_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[42] = new photo(7341,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/swall.jpg',400,536,'Swallowtail Butterfly - Hickling','http://www1.clikpic.com/geoffdufeu/images/swall_thumb.jpg',130, 174,0, 0,'','','','','','');
photos[43] = new photo(7354,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Cock Pheasant Displaying - Hickling.jpg',400,270,'Cock Pheasant Displaying','http://www1.clikpic.com/geoffdufeu/images/Cock Pheasant Displaying - Hickling_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[44] = new photo(7364,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Horsey Mill.jpg',400,592,'Horsey Mill - Norfolk','http://www1.clikpic.com/geoffdufeu/images/Horsey Mill_thumb.jpg',130, 192,0, 0,'','','','','','');
photos[45] = new photo(7379,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Brown Hare - Hickling.jpg',400,592,'Brown Hare - Norfolk','http://www1.clikpic.com/geoffdufeu/images/Brown Hare - Hickling_thumb.jpg',130, 192,0, 0,'','','','','','');
photos[46] = new photo(7380,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Pony in Snow - Hickling.jpg',400,270,'Pony in Snow - Hickling','http://www1.clikpic.com/geoffdufeu/images/Pony in Snow - Hickling_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[47] = new photo(7499,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Turf Fen Mill.jpg',400,581,'Turf Fen Mill - How Hill, Norfolk','http://www1.clikpic.com/geoffdufeu/images/Turf Fen Mill_thumb.jpg',130, 189,0, 0,'','','','','','');
photos[48] = new photo(7501,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Sailing at Sunset.jpg',400,270,'Sailing at Sunset - Horsey Mere','http://www1.clikpic.com/geoffdufeu/images/Sailing at Sunset_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[49] = new photo(7503,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Pink Rose.jpg',400,274,'Pink Rose','http://www1.clikpic.com/geoffdufeu/images/Pink Rose_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[50] = new photo(7504,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Greylag Goose at Sunrise.jpg',400,274,'Greylag Goose at Sunrise -Hickling Broad','http://www1.clikpic.com/geoffdufeu/images/Greylag Goose at Sunrise_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[51] = new photo(7505,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Mute Swan at Sunrise - Hickling Broad.jpg',400,274,'Mute Swan at Sunrise','http://www1.clikpic.com/geoffdufeu/images/Mute Swan at Sunrise - Hickling Broad_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[52] = new photo(7619,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Barn Owl at Sunset - Hickling.jpg',400,274,'Barn Owl at Sunset','http://www1.clikpic.com/geoffdufeu/images/Barn Owl at Sunset - Hickling_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[53] = new photo(7648,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Sunflowers-Hickling.jpg',400,270,'Sunflowers - Norfolk','http://www1.clikpic.com/geoffdufeu/images/Sunflowers-Hickling_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[54] = new photo(7649,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Kestral at Sunset-Horsey Marshes.jpg',400,270,'Kestral at Sunset - Horsey Marshes','http://www1.clikpic.com/geoffdufeu/images/Kestral at Sunset-Horsey Marshes_thumb.jpg',130, 88,0, 0,'','','','','','');
photos[55] = new photo(7928,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Oak Tree in Poppy Field-.jpg',400,560,'Oak Tree in Poppy Field - Norfolk','http://www1.clikpic.com/geoffdufeu/images/Oak Tree in Poppy Field-_thumb.jpg',130, 182,0, 0,'','','','','','');
photos[56] = new photo(17128,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Broad-bodied Chaser Dragonfly (Male) - Hickling.jpg',400,592,'Broad-bodied Chaser Dragonfly - Hickling','http://www1.clikpic.com/geoffdufeu/images/Broad-bodied Chaser Dragonfly (Male) - Hickling_thumb.jpg',130, 192,0, 0,'','','','','','');
photos[57] = new photo(17130,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Great Spotted Woodpecker - Hickling.jpg',400,592,'Great Spotted Woodpecker - Hickling','http://www1.clikpic.com/geoffdufeu/images/Great Spotted Woodpecker - Hickling_thumb.jpg',130, 192,0, 1,'','','','','','');
photos[58] = new photo(22162,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Fishing Boat at Sunrise - Hickling Broad.jpg',400,273,'Fishing Boat in Misty Dawn - Hickling Broad Norfolk','http://www1.clikpic.com/geoffdufeu/images/Fishing Boat at Sunrise - Hickling Broad_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[59] = new photo(22164,'656','','gallery','http://www1.clikpic.com/geoffdufeu/images/Grey Seal Pup - Horsey Beach Norfolk.jpg',400,270,'Grey Seal Pup - Horsey Beach Norfolk','http://www1.clikpic.com/geoffdufeu/images/Grey Seal Pup - Horsey Beach Norfolk_thumb.jpg',130, 88,0, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(655,'138020','Fine Art Prints','gallery');
galleries[1] = new gallery(140132,'2103525','Fine Art Prints 2','gallery');
galleries[2] = new gallery(656,'17130','Greeting Cards','gallery');

