/***************************************************************************
* 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('263183,260378,260321,260319,260258,260252,182577,182571,182559,182510,181898,181895,181894,181887,181874,181871,181866,180489,180362,180361,178805,178784');
	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('263183,260378,260321,260319,260258,260252,182577,182571,182559,182510,181898,181895,181894,181887,181874,181871,181866,180489,180362,180361,178805,178784');
	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) || (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 + '">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = photos[nextImg].caption;
									document.title = 'Mark Rogers Photography: ' + 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(181864,'16708','','gallery','http://www1.clikpic.com/ballast/images/Arches&Angles.jpg',400,600,'Arches & Angles','http://www1.clikpic.com/ballast/images/Arches&Angles_thumb.jpg',130, 195,0, 1,'View across courtyard of the Bab El Sham Hotel, Dubai, UAE','','','Dubai','','');
photos[1] = new photo(181866,'16708','','gallery','http://www1.clikpic.com/ballast/images/WindowSeat.jpg',400,600,'Window Seat','http://www1.clikpic.com/ballast/images/WindowSeat_thumb.jpg',130, 195,1, 0,'One of many window seats that suround the courtyards and \"fire pits\" of the Bab El Sham Hotel.  The fire pits would be lit in the evening offering a warm fire and light to sit out under the desert night skies.','','','Dubai','','');
photos[2] = new photo(181926,'16708','','gallery','http://www1.clikpic.com/ballast/images/ObTwrLesLandesCloseUpJPG.jpg',400,600,'Observation Tower Close Up','http://www1.clikpic.com/ballast/images/ObTwrLesLandesCloseUpJPG_thumb.jpg',130, 195,0, 0,'CLose view of a WWII German observation tower, part of the defences built in the Channels Islands during WWII.','','','Cliffs above North West coast at Les Landes Jersey, Channel Islands','','');
photos[3] = new photo(260316,'16707','','gallery','http://www1.clikpic.com/ballast/images/flower covered railing0006JPG.jpg',400,600,'Climbing Clematis','http://www1.clikpic.com/ballast/images/flower covered railing0006JPG_thumb.jpg',130, 195,0, 0,'Clematis climbing over garden rails.','','','','','');
photos[4] = new photo(260319,'16707','','gallery','http://www1.clikpic.com/ballast/images/TULIPWITHWATERJPG.jpg',400,644,'Tulip with raindrops','http://www1.clikpic.com/ballast/images/TULIPWITHWATERJPG_thumb.jpg',130, 209,1, 0,'','','','','','');
photos[5] = new photo(260321,'16707','','gallery','http://www1.clikpic.com/ballast/images/tulip0006JPG.jpg',400,600,'Red Tulip','http://www1.clikpic.com/ballast/images/tulip0006JPG_thumb.jpg',130, 195,1, 0,'','','','','','');
photos[6] = new photo(260323,'16707','','gallery','http://www1.clikpic.com/ballast/images/tulip0087JPG.jpg',400,600,'Tulip - pink','http://www1.clikpic.com/ballast/images/tulip0087JPG_thumb.jpg',130, 195,0, 0,'Spring time tulip with rain drops','','','','','');
photos[7] = new photo(178784,'16379','','gallery','http://www1.clikpic.com/ballast/images/roboinonbrambleJPG.jpg',400,505,'Robin sitting on brambles','http://www1.clikpic.com/ballast/images/roboinonbrambleJPG_thumb.jpg',130, 164,1, 1,'Taken from a hide at The Lodge RSPB reserve at Sandy Bedfordshire.','03/03/06','Mark Rogers','RSPB The Lodge, Sandy, Bedfordshire','','');
photos[8] = new photo(178803,'16380','','gallery','http://www1.clikpic.com/ballast/images/gorilla0014JPG.jpg',400,600,'Gorilla','http://www1.clikpic.com/ballast/images/gorilla0014JPG_thumb.jpg',130, 195,0, 0,'Gorilla','','','','','');
photos[9] = new photo(180489,'16381','','gallery','http://www1.clikpic.com/ballast/images/mooringchains.jpg',400,600,'The Weakest Link?','http://www1.clikpic.com/ballast/images/mooringchains_thumb.jpg',130, 195,1, 0,'Rusty mooring chanis, Rozel Harbour, Jersey','','','','','');
photos[10] = new photo(181887,'16376','','gallery','http://www1.clikpic.com/ballast/images/buttermere&FleetwithPikeJPG.jpg',400,600,'Buttermere and Fleetwith Pike,','http://www1.clikpic.com/ballast/images/buttermere&FleetwithPikeJPG_thumb.jpg',130, 195,1, 0,'View of buttermere and Fleetwith Pike','','','Buttermere Western Lakes, Lake District, Cumbria','','');
photos[11] = new photo(180361,'16381','','gallery','http://www1.clikpic.com/ballast/images/cider pressJPG.jpg',400,600,'The Cider Press','http://www1.clikpic.com/ballast/images/cider pressJPG_thumb.jpg',130, 195,1, 0,'Traditional granite cider press.','','Mark Rogers','Jersey','','');
photos[12] = new photo(181890,'16376','','gallery','http://www1.clikpic.com/ballast/images/buttermereRedPikeJPG.jpg',400,600,'Red Pike, Buttermere','http://www1.clikpic.com/ballast/images/buttermereRedPikeJPG_thumb.jpg',130, 195,0, 0,'View across Buttermere Lake to Red Pike','','','','','');
photos[13] = new photo(260271,'16380','','gallery','http://www1.clikpic.com/ballast/images/Rhino0010JPG.jpg',400,600,'Rhino','http://www1.clikpic.com/ballast/images/Rhino0010JPG_thumb.jpg',130, 195,0, 0,'Rhino','','','','','');
photos[14] = new photo(260391,'16379','','gallery','http://www1.clikpic.com/ballast/images/pheasant0017JPG.jpg',400,600,'Pair of Pheasants','http://www1.clikpic.com/ballast/images/pheasant0017JPG_thumb.jpg',130, 195,0, 0,'Male and female pheasants feeding together','','','RSPB reserve, Sandy, Bedfordshire','','');
photos[15] = new photo(181895,'16376','','gallery','http://www1.clikpic.com/ballast/images/GreatOrtonSacrJPG.jpg',400,600,'Limestone Scar','http://www1.clikpic.com/ballast/images/GreatOrtonSacrJPG_thumb.jpg',130, 195,1, 1,'Great Orton Scar - Cumbria.  A different view of another beautiful part of Cumbria - The limestone pavements of Great Orton Scar near Shap.','','','Great Orton Scar, Cumbria','','');
photos[16] = new photo(181905,'16381','','gallery','http://www1.clikpic.com/ballast/images/waterlily4JPG.jpg',400,600,'Close Up - Pink Water Lilly','http://www1.clikpic.com/ballast/images/waterlily4JPG_thumb.jpg',130, 195,0, 0,'','','','Water gardens, Gorey, Jersey, Channel Islands','','');
photos[17] = new photo(260397,'16381','','gallery','http://www1.clikpic.com/ballast/images/mooringchains0023JPG.jpg',400,600,'Mooring chains','http://www1.clikpic.com/ballast/images/mooringchains0023JPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[18] = new photo(180362,'16381','','gallery','http://www1.clikpic.com/ballast/images/castingShadows.jpg',400,600,'Casting shadows','http://www1.clikpic.com/ballast/images/castingShadows_thumb.jpg',130, 195,1, 1,'Patterns cast from a lamp','','','Bab El Sham, Dubai','','');
photos[19] = new photo(181894,'16376','','gallery','http://www1.clikpic.com/ballast/images/fleetwithEdgeJPG.jpg',400,600,'Fleetwith Edge','http://www1.clikpic.com/ballast/images/fleetwithEdgeJPG_thumb.jpg',130, 195,1, 0,'Fleetwith Edge, Feetwith Pike, Buttermere','','','Feetwith Pike, Buttermere, Cumbria','','');
photos[20] = new photo(260288,'16381','','gallery','http://www1.clikpic.com/ballast/images/elisabethcastleatnight0032JPG.jpg',400,600,'Street lights and Moonlight','http://www1.clikpic.com/ballast/images/elisabethcastleatnight0032JPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[21] = new photo(178805,'16380','','gallery','http://www1.clikpic.com/ballast/images/meercat0008aJPG.jpg',400,600,'Under close watch','http://www1.clikpic.com/ballast/images/meercat0008aJPG_thumb.jpg',130, 195,1, 1,'Close up of watchful Meercat','','','','','');
photos[22] = new photo(180339,'16376','','gallery','http://www1.clikpic.com/ballast/images/woodland sunriseJPG.jpg',400,600,'Woodland Sunrise','http://www1.clikpic.com/ballast/images/woodland sunriseJPG_thumb.jpg',130, 195,0, 0,'Oaklands, Trinity Jersey - Spring Sunrise','','','Trinity, Jersey Channel Islands','','');
photos[23] = new photo(180359,'16381','','gallery','http://www1.clikpic.com/ballast/images/stones01JPG.jpg',400,267,'Beach Stones','http://www1.clikpic.com/ballast/images/stones01JPG_thumb.jpg',130, 87,0, 0,'Granite stones on the shingle banks of Les Ecrehous, Jersey captured in the last fading summer evening light.','','Mark Rogers','Les Ecrehous, Jersey','','');
photos[24] = new photo(181902,'16707','','gallery','http://www1.clikpic.com/ballast/images/waterlily1JPG.jpg',400,600,'Pink Water Lily','http://www1.clikpic.com/ballast/images/waterlily1JPG_thumb.jpg',130, 195,0, 0,'Long stemmed water lilies in the water garden at Gorey, Jersey','','','Gorey Water Garden, Gorey, Jersey Channel Islands','','');
photos[25] = new photo(182557,'16799','','gallery','http://www1.clikpic.com/ballast/images/WinterBodyBoardJPG.jpg',400,231,'Winter Body Boarding','http://www1.clikpic.com/ballast/images/WinterBodyBoardJPG_thumb.jpg',130, 75,0, 0,'Body Boarding in the late winter afternoon, St Ouens beach, Jersey','','','St Ouens beach, Jersey','','');
photos[26] = new photo(260394,'16379','','gallery','http://www1.clikpic.com/ballast/images/Lodge0034JPG.jpg',400,600,'Goldfinch','http://www1.clikpic.com/ballast/images/Lodge0034JPG_thumb.jpg',130, 195,0, 0,'Goldfinch perched high waiting to feed.','','','Hertfordshire','','');
photos[27] = new photo(178806,'16380','','gallery','http://www1.clikpic.com/ballast/images/meercatwatching1JPG.jpg',400,702,'Sentry','http://www1.clikpic.com/ballast/images/meercatwatching1JPG_thumb.jpg',130, 228,0, 0,'Adult Meercat keeping watch over the group','','','','','');
photos[28] = new photo(181903,'16707','','gallery','http://www1.clikpic.com/ballast/images/waterlily2JPG.jpg',400,600,'Closed White Lily','http://www1.clikpic.com/ballast/images/waterlily2JPG_thumb.jpg',130, 195,0, 0,'water lillies, Gorey, Jersey','','','Water Gardens, Gorey, Jersey, Channel Islands','','');
photos[29] = new photo(181932,'16376','','gallery','http://www1.clikpic.com/ballast/images/ObTwrLesLandsSentrysViewJPG.jpg',400,600,'Sentry\'s view','http://www1.clikpic.com/ballast/images/ObTwrLesLandsSentrysViewJPG_thumb.jpg',130, 195,0, 0,'View from within WWII German pill-box along to the next post.  PArt of the extensive defensive contruction programme the Germans undertook during the occupation of the Channel Islands','','','Les Landes Jersey, Channel Islands, ','','');
photos[30] = new photo(185908,'16381','','gallery','http://www1.clikpic.com/ballast/images/WaterSculpture.jpg',400,267,'Water Sculpture','http://www1.clikpic.com/ballast/images/WaterSculpture_thumb.jpg',130, 87,0, 0,'Abstract close up of part of a water sculpture representing a ships keel.  The statue is located in the water gardens in Gorey, Jersey and was erected to celebrate the once thriving C19th ship building industry typical that part of Jersey.','','','','','');
photos[31] = new photo(181927,'16376','','gallery','http://www1.clikpic.com/ballast/images/ObTwrLesLandesJPG.jpg',400,600,'field of view','http://www1.clikpic.com/ballast/images/ObTwrLesLandesJPG_thumb.jpg',130, 195,0, 0,'Surving WWII German observation tower on the cliffs at Les Landes, Jersey.  Part of the comprehensive defensive installations built during the occupation of the Channel Islands.','','','Cliffs above North West coast at Les Landes Jersey, Channel Islands','','');
photos[32] = new photo(182510,'16707','','gallery','http://www1.clikpic.com/ballast/images/bouleybayspringDaiseysJPG.jpg',400,600,'Springtime Daisies','http://www1.clikpic.com/ballast/images/bouleybayspringDaiseysJPG_thumb.jpg',130, 195,1, 0,'Springtime Ox-eye daisies','','','Bouley Bay, Jersey','','');
photos[33] = new photo(260277,'16380','','gallery','http://www1.clikpic.com/ballast/images/meercat0012JPG.jpg',400,600,'Young Meercat','http://www1.clikpic.com/ballast/images/meercat0012JPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[34] = new photo(181884,'16707','','gallery','http://www1.clikpic.com/ballast/images/haresTailsJPG.jpg',400,600,'Hares Tails','http://www1.clikpic.com/ballast/images/haresTailsJPG_thumb.jpg',130, 195,0, 0,'Hares Tails caught in the evening sun a midst the sand dunes of St Ouens Bay, Jersey','','','St Ouens Bay, Jersey','','');
photos[35] = new photo(181871,'16707','','gallery','http://www1.clikpic.com/ballast/images/bouleybayspringfoxgloveJPG.jpg',400,600,'Spring Foxglove','http://www1.clikpic.com/ballast/images/bouleybayspringfoxgloveJPG_thumb.jpg',130, 195,1, 0,'Spring Foxglove blowing in the wind on the headland above Bouley Bay, Jersey','','','Bouley Bay, Jersey','','');
photos[36] = new photo(181935,'16376','','gallery','http://www1.clikpic.com/ballast/images/ObTwrLesLandesWithHeatherJPG.jpg',400,600,'Cliff top heather','http://www1.clikpic.com/ballast/images/ObTwrLesLandesWithHeatherJPG_thumb.jpg',130, 195,0, 0,'Surving WWII German observation tower on the cliffs at Les Landes, Jersey.  Part of the comprehensive defensive installations built during the occupation of the Channel Islands.','','','Cliffs above North West coast at Les Landes Jersey, Channel Islands','','');
photos[37] = new photo(260276,'16380','','gallery','http://www1.clikpic.com/ballast/images/meercat0019JPG.jpg',400,600,'Adult Meercat','http://www1.clikpic.com/ballast/images/meercat0019JPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[38] = new photo(179090,'16376','','gallery','http://www1.clikpic.com/ballast/images/GrosnezCastlesepia1JPG.jpg',400,600,'Ruins of Grosnez Castle','http://www1.clikpic.com/ballast/images/GrosnezCastlesepia1JPG_thumb.jpg',130, 195,0, 0,'Ruins of the old gatehouse of Grosnez Castle, originally constructed between 1328 - 1330.','','','Grosnez, Jersey','','');
photos[39] = new photo(179209,'16376','','gallery','http://www1.clikpic.com/ballast/images/plemontRocksJPG.jpg',400,600,'Rocks at Plemont','http://www1.clikpic.com/ballast/images/plemontRocksJPG_thumb.jpg',130, 195,0, 0,'View across Plemont beach, Jersey','','','Plemont, Jersey','','');
photos[40] = new photo(181874,'16707','','gallery','http://www1.clikpic.com/ballast/images/bouleybayspring.jpg',400,600,'Spring Flowers','http://www1.clikpic.com/ballast/images/bouleybayspring_thumb.jpg',130, 195,1, 1,'Spring time Sea Thrift in bloom above the shore line of Bouley Bay','','','Bouley Bay, Jersey','','');
photos[41] = new photo(182572,'16376','','gallery','http://www1.clikpic.com/ballast/images/ledonhiltonSpringJPG.jpg',400,600,'Le Don Hilton - Spring','http://www1.clikpic.com/ballast/images/ledonhiltonSpringJPG_thumb.jpg',130, 195,0, 0,'La Don Hilton, St Ouens Bay in the springtime','','','St Ouens Bay, Jersey','','');
photos[42] = new photo(182577,'16376','','gallery','http://www1.clikpic.com/ballast/images/leDonHiltonSunsetJPG.jpg',400,600,'Le Don Hilton - Sunset','http://www1.clikpic.com/ballast/images/leDonHiltonSunsetJPG_thumb.jpg',130, 195,1, 0,'Le Don Hilton, St Ouens Bay, Jersey at Sunset','','','St Ouens Bay, Jersey','','');
photos[43] = new photo(182571,'16376','','gallery','http://www1.clikpic.com/ballast/images/laroccosunsetJPG.jpg',400,600,'La Rocco tower at Sunset','http://www1.clikpic.com/ballast/images/laroccosunsetJPG_thumb.jpg',130, 195,1, 0,'La Rocco tower at Sunset','','','St Ouens Bay, Jersey','','');
photos[44] = new photo(182576,'16376','','gallery','http://www1.clikpic.com/ballast/images/sunsetJuneBeach.jpg',400,600,'Summer Sunset','http://www1.clikpic.com/ballast/images/sunsetJuneBeach_thumb.jpg',130, 195,0, 0,'Summer sunset across St Ouens Bay Jersey','','','St Ouens Bay, Jersey','','');
photos[45] = new photo(182578,'16376','','gallery','http://www1.clikpic.com/ballast/images/AtlanticSummerSunset.jpg',400,600,'Atlantic Sunset','http://www1.clikpic.com/ballast/images/AtlanticSummerSunset_thumb.jpg',130, 195,0, 0,'Final stages of the summer sun setting over the Atlantic Ocean on the West Coast of Jersey','','','St Ouens Bay, Jersey','','');
photos[46] = new photo(178810,'16379','','gallery','http://www1.clikpic.com/ballast/images/longtailtitJPG.jpg',400,600,'Longtail Tit','http://www1.clikpic.com/ballast/images/longtailtitJPG_thumb.jpg',130, 195,0, 0,'Longtail Tit preparing to feed','','','','','');
photos[47] = new photo(181867,'16708','','gallery','http://www1.clikpic.com/ballast/images/BabElShamCourtyardJPG.jpg',400,267,'Study in Perspective','http://www1.clikpic.com/ballast/images/BabElShamCourtyardJPG_thumb.jpg',130, 87,0, 0,'','','','Bab El Sham, Dubai','','');
photos[48] = new photo(181898,'16380','','gallery','http://www1.clikpic.com/ballast/images/RedSquirrelaJPG.jpg',400,600,'Garden visitor','http://www1.clikpic.com/ballast/images/RedSquirrelaJPG_thumb.jpg',130, 195,1, 0,'Whilst rare on the mainland UK, Red Squirrels are common visitors to gardens in Jersey feeding from peanut feeders intend for bird population.','','','Red Squirrel','','');
photos[49] = new photo(260252,'16799','','gallery','http://www1.clikpic.com/ballast/images/sunsetjazzband0027JPG.jpg',400,600,'Sunset Concert','http://www1.clikpic.com/ballast/images/sunsetjazzband0027JPG_thumb.jpg',130, 195,1, 0,'Musicians playing at the Summer 2005 sunset jazz concert, Jersey.','','','','','');
photos[50] = new photo(260258,'16376','','gallery','http://www1.clikpic.com/ballast/images/ElizabethCastle night & moon0018JPG.jpg',400,600,'Elizabeth Castle By Full Moon','http://www1.clikpic.com/ballast/images/ElizabethCastle night & moon0018JPG_thumb.jpg',130, 195,1, 0,'Moonlit view of Elizabeth Castle, St Aubins Bay, Jersey','','','St Aubins Bay, Jersey','','');
photos[51] = new photo(260267,'16376','','gallery','http://www1.clikpic.com/ballast/images/elisabethcastleatnight0039JPG.jpg',400,600,'Moonlit Waterfront','http://www1.clikpic.com/ballast/images/elisabethcastleatnight0039JPG_thumb.jpg',130, 195,0, 0,'St Helier waterfront lit by full moon.','','','St Helier, Jersey','','');
photos[52] = new photo(181878,'16707','','gallery','http://www1.clikpic.com/ballast/images/campionJPG.jpg',400,267,'Wild Campion','http://www1.clikpic.com/ballast/images/campionJPG_thumb.jpg',130, 87,0, 0,'Wild Campion above Rozel Bay, Jersey','','','Rozel Bay, Jersey','','');
photos[53] = new photo(181899,'16380','','gallery','http://www1.clikpic.com/ballast/images/RedSquirrelbJPG.jpg',400,270,'Paying attention','http://www1.clikpic.com/ballast/images/RedSquirrelbJPG_thumb.jpg',130, 88,0, 0,'Just checking out the scene','','','','','');
photos[54] = new photo(179206,'16376','','gallery','http://www1.clikpic.com/ballast/images/GrosnezCastleJPG.jpg',400,90,'Grosnez Castle, Jersey','http://www1.clikpic.com/ballast/images/GrosnezCastleJPG_thumb.jpg',130, 29,0, 0,'On the cliffs at Les Landes, at the most north-westerly point of Jersey you can find the ruins of Grosnez castle, built between 1328 and 1330.<br>\r\n<br>\r\nWhat is left now is the ruins of the old gatehouse, this fortification is surrounded by many WWII German installations all of which indicate the strategic importance of the Channel Islands over the years.','','Mark Rogers','Grosnez, Les Landes - Jersey, Channel Islands','','');
photos[55] = new photo(181888,'16376','','gallery','http://www1.clikpic.com/ballast/images/buttermereLakeJPG.jpg',400,199,'Buttermere Lake','http://www1.clikpic.com/ballast/images/buttermereLakeJPG_thumb.jpg',130, 65,0, 0,'View of Butermere in Spring','','','Buttermere Western Lakes, Lake District, Cumbria','','');
photos[56] = new photo(181900,'16380','','gallery','http://www1.clikpic.com/ballast/images/RedSquirrelJPG.jpg',400,287,'Keeping out of the wind','http://www1.clikpic.com/ballast/images/RedSquirrelJPG_thumb.jpg',130, 93,0, 0,'Red Squirrels are still common place in Jersey, this one was pictured in winter, and is trying to keep low out of strong wind that was blowing.','','','Jersey, Channel Islands','','');
photos[57] = new photo(181904,'16707','','gallery','http://www1.clikpic.com/ballast/images/waterlily3JPG.jpg',400,267,'Open White Water Lily','http://www1.clikpic.com/ballast/images/waterlily3JPG_thumb.jpg',130, 87,0, 0,'White water lilies, Gorey, Jersey','','','Water Gardens, Gorey, Jersey, Channel Islands','','');
photos[58] = new photo(181892,'16376','','gallery','http://www1.clikpic.com/ballast/images/buttermereViewJPG.jpg',400,267,'Boats ready','http://www1.clikpic.com/ballast/images/buttermereViewJPG_thumb.jpg',130, 87,0, 0,'Boats on Buttermere Lake waiting to be used on a glorious spring day','','','','','');
photos[59] = new photo(181896,'16376','','gallery','http://www1.clikpic.com/ballast/images/ulswater2JPG.jpg',400,267,'Ulswater, Cumbria','http://www1.clikpic.com/ballast/images/ulswater2JPG_thumb.jpg',130, 87,0, 0,'Ulswater, Cumbria','','','Ulswater, Cumbria','','');
photos[60] = new photo(181897,'16376','','gallery','http://www1.clikpic.com/ballast/images/ulswaterJPG.jpg',400,267,'Reflected fells','http://www1.clikpic.com/ballast/images/ulswaterJPG_thumb.jpg',130, 87,0, 0,'Fells reflected in a calm Spring lake, Ullswater','','','Ullswater, Lake Distict, Cumbria','','');
photos[61] = new photo(182573,'16380','','gallery','http://www1.clikpic.com/ballast/images/RockPoolJPG.jpg',400,267,'Rockpool','http://www1.clikpic.com/ballast/images/RockPoolJPG_thumb.jpg',130, 87,0, 0,'Crab in rock pool','','','Bouley Bay, Jersey','','');
photos[62] = new photo(182574,'16376','','gallery','http://www1.clikpic.com/ballast/images/StOuensJPG.jpg',400,266,'St Ouens','http://www1.clikpic.com/ballast/images/StOuensJPG_thumb.jpg',130, 86,0, 0,'View looking south along St Ouens beach with La Rocco tower and Corbierre Lighthouse in the distance','','','St Ouens Bay, Jersey','','');
photos[63] = new photo(178808,'16380','','gallery','http://www1.clikpic.com/ballast/images/otter0007aJPG.jpg',400,267,'Otter on the move','http://www1.clikpic.com/ballast/images/otter0007aJPG_thumb.jpg',130, 87,0, 0,'Otter moving along the waterside','','','','','');
photos[64] = new photo(182567,'16376','','gallery','http://www1.clikpic.com/ballast/images/LaRocco&CorbierreJPG.jpg',400,266,'La Rocco and Corbierre','http://www1.clikpic.com/ballast/images/LaRocco&CorbierreJPG_thumb.jpg',130, 86,0, 0,'View along St Ouens beach on a winters afternoon, view including La Rocco tower and Corbierre Lighthouse','','','St Ouens Bay, Jersey','','');
photos[65] = new photo(180487,'16379','','gallery','http://www1.clikpic.com/ballast/images/SongThrush.jpg',400,574,'Song Thrush','http://www1.clikpic.com/ballast/images/SongThrush_thumb.jpg',130, 187,0, 0,'Song Thrush','','','Hertfordshire','','');
photos[66] = new photo(182559,'16799','','gallery','http://www1.clikpic.com/ballast/images/sunsetjazzbandJPG.jpg',400,600,'Sunset Jazz','http://www1.clikpic.com/ballast/images/sunsetjazzbandJPG_thumb.jpg',130, 195,1, 1,'Sunset jazz concert','','','Jersey','','');
photos[67] = new photo(182569,'16376','','gallery','http://www1.clikpic.com/ballast/images/LaRoccoDuskJPG.jpg',400,267,'La Rocco Tower at Dusk','http://www1.clikpic.com/ballast/images/LaRoccoDuskJPG_thumb.jpg',130, 87,0, 0,'La Rocco tower captured in silhouette as the sun was setting across St Ouens Bay.','','','St Ouens Bay, Jersey','','');
photos[68] = new photo(260281,'16380','','gallery','http://www1.clikpic.com/ballast/images/meercat0009JPG.jpg',400,267,'Meercat watching','http://www1.clikpic.com/ballast/images/meercat0009JPG_thumb.jpg',130, 87,0, 0,'Adult Meercat watching over the group.','','','','','');
photos[69] = new photo(260385,'16379','','gallery','http://www1.clikpic.com/ballast/images/nuthatch0014aJPG.jpg',400,590,'Nuthatch','http://www1.clikpic.com/ballast/images/nuthatch0014aJPG_thumb.jpg',130, 192,0, 0,'Nuthatch emerging from it\'s nest','','','RSBP reserve, Sandy, Bedfordshire','','');
photos[70] = new photo(260386,'16379','','gallery','http://www1.clikpic.com/ballast/images/nuthatch0024aJPG.jpg',400,544,'Nesting Nuthatch','http://www1.clikpic.com/ballast/images/nuthatch0024aJPG_thumb.jpg',130, 177,0, 0,'Nuthatch preparing it\'s nest in spring.','','','RSPB reserve, Sandy, Bedfordshire','','');
photos[71] = new photo(179216,'16376','','gallery','http://www1.clikpic.com/ballast/images/archirondelTwr001JPG.jpg',400,266,'Archirondel Tower - Jersey','http://www1.clikpic.com/ballast/images/archirondelTwr001JPG_thumb.jpg',130, 86,0, 0,'Archirondel Tower - Jersey<br>\r\nThis martello tower is one of many in Jersey, but one of the most distictive, it is situated at the start of what was designed to be a huge breakwater that would have created a sizeable harbour on the east coast of Jersey.  The other arm of the breakwater was completed and is a short distance up the cost at St Catherines breakwater.','','','','','');
photos[72] = new photo(260378,'16379','','gallery','http://www1.clikpic.com/ballast/images/sunsetchimneys0001JPG.jpg',400,600,'Vantage Point','http://www1.clikpic.com/ballast/images/sunsetchimneys0001JPG_thumb.jpg',130, 195,1, 0,'Gull perching on chimney pots.','','','','','');
photos[73] = new photo(276561,'16379','','gallery','http://www1.clikpic.com/ballast/images/BlackHeadedGull.jpg',600,900,'Black Headed Gull','http://www1.clikpic.com/ballast/images/BlackHeadedGull_thumb.jpg',130, 195,0, 0,'Black Headed Gulls - one of the most common and distinctive gulls, creates a great deal of noise especially when in any numbers around nest sites or food.','','','','','');
photos[74] = new photo(276667,'16379','','gallery','http://www1.clikpic.com/ballast/images/RingedPloverJPG.jpg',400,600,'Ringed Plover','http://www1.clikpic.com/ballast/images/RingedPloverJPG_thumb.jpg',130, 195,0, 0,'The ringed plover is a small, dumpy, short-legged wading bird. In flight it shows a broad white wing-stripe. It tends to breed on beaches (esp. shingle beaches) around the coast and feeds on insects and worms from the ground.','','','Snettisham Beach, Norfolk','','');
photos[75] = new photo(185885,'16376','','gallery','http://www1.clikpic.com/ballast/images/PlemontBeachSummerSunset.jpg',400,267,'Plemont Beach Summer Sunset','http://www1.clikpic.com/ballast/images/PlemontBeachSummerSunset_thumb.jpg',130, 87,0, 0,'The setting sun across Plemont beach, Jersey','','','Plemont Beach - Jersey','','');
photos[76] = new photo(263183,'16379','','gallery','http://www1.clikpic.com/ballast/images/IMG_4808JPG.jpg',400,600,'King Vulture','http://www1.clikpic.com/ballast/images/IMG_4808JPG_thumb.jpg',130, 195,1, 0,'','','','','','');
photos[77] = new photo(260296,'16379','','gallery','http://www1.clikpic.com/ballast/images/HumboldtPenguin0012JPG.jpg',400,600,'Humboldt Penguin','http://www1.clikpic.com/ballast/images/HumboldtPenguin0012JPG_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[78] = new photo(181893,'16376','','gallery','http://www1.clikpic.com/ballast/images/chestertonwindmillJPG.jpg',400,290,'Chesterton Windmill','http://www1.clikpic.com/ballast/images/chestertonwindmillJPG_thumb.jpg',130, 94,0, 0,'View across cut corn fields of Chesterton Windmill on a stormy autumn afternoon','','','Chesterton, nr Leamington Spa, Warwickshire','','');
photos[79] = new photo(260286,'16380','','gallery','http://www1.clikpic.com/ballast/images/lemur0014JPG.jpg',400,267,'Lemur','http://www1.clikpic.com/ballast/images/lemur0014JPG_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[80] = new photo(276679,'16379','','gallery','http://www1.clikpic.com/ballast/images/OysterCatcherJPG.jpg',400,600,'Oystercatcher','http://www1.clikpic.com/ballast/images/OysterCatcherJPG_thumb.jpg',130, 195,0, 0,'The oystercatcher is a distinctive large, stocky, black and white wading bird. It is easily recognisable by its bold contrasting colouring and its long, orange-red bill.  In flight, it shows a wide white wing-stripe, a black tail, and a white rump that extends as a ‘V’ between the wings. <br>\r\n<br><br>\r\n\\Tends to feed by probing in the mud for large marine worms and molluscs and is known to prise shellfish from rocks or seaweed','','','Snettisham Beach, Norfolk','','');
photos[81] = new photo(276526,'16379','','gallery','http://www1.clikpic.com/ballast/images/AvocetJPG.jpg',400,600,'Avocet','http://www1.clikpic.com/ballast/images/AvocetJPG_thumb.jpg',130, 195,0, 0,'Avocet in the saline pools at Titchwell Marsh RSPB reserve.  The avocet is graceful delicate looking bird with a distictive upturned bill.<br>\r\n<br><br>\r\nIt is perhaps most widely recognised as the bird that features on the logo for the RSPB itself.','','','Titchwell Marsh, RSPB Reserve, Norfolk','','');
photos[82] = new photo(276528,'16379','','gallery','http://www1.clikpic.com/ballast/images/AvocetWithChickJPG.jpg',400,267,'Avocet with Chick','http://www1.clikpic.com/ballast/images/AvocetWithChickJPG_thumb.jpg',130, 87,0, 0,'Whilst watching this adult for a while from a hide it became clear its behaviour was different to those that were just resting or feeding.  It was when the chick appeared that it became clear the adult had been guarding and protecting the chick.','','','Titchwell Marsh, RSPB Reserve, Norfolk','','');
photos[83] = new photo(276532,'16379','','gallery','http://www1.clikpic.com/ballast/images/AvocetsFeedingJPG.jpg',400,267,'Avocets feeding','http://www1.clikpic.com/ballast/images/AvocetsFeedingJPG_thumb.jpg',130, 87,0, 0,'Avocets feed by using their fine bills in a sideways sweeping motion whilst looking for small shrips and marine worms.<br>\r\n<br><br>\r\nThey prefer to feed in shallow saline water with wet \"fluid\" mud but with drier island sections, this explains their attraction to the salt marshes around North Norfolk.','','','Titchwell Marsh, RSPB Reserve, Norfolk','','');
photos[84] = new photo(262259,'16379','','gallery','http://www1.clikpic.com/ballast/images/marsh harrierJPG.jpg',400,267,'Marsh Harrier','http://www1.clikpic.com/ballast/images/marsh harrierJPG_thumb.jpg',130, 87,0, 0,'Marsh Harrier over St Ouens Pond, Jersey','','','','','');
photos[85] = new photo(260308,'16379','','gallery','http://www1.clikpic.com/ballast/images/springRobin01JPG.jpg',400,267,'Robin in tree','http://www1.clikpic.com/ballast/images/springRobin01JPG_thumb.jpg',130, 87,0, 0,'Robin perched in tree branches during springtime','','','','','');
photos[86] = new photo(263184,'16379','','gallery','http://www1.clikpic.com/ballast/images/Harris Hawk.jpg',400,267,'Harris Hawk','http://www1.clikpic.com/ballast/images/Harris Hawk_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[87] = new photo(260398,'16379','','gallery','http://www1.clikpic.com/ballast/images/treesparrow0008JPG.jpg',400,267,'Sparrow','http://www1.clikpic.com/ballast/images/treesparrow0008JPG_thumb.jpg',130, 87,0, 0,'Female sparrow sitting in a bush','','','','','');
photos[88] = new photo(260382,'16379','','gallery','http://www1.clikpic.com/ballast/images/gull0006JPG.jpg',400,267,'Herring Gull','http://www1.clikpic.com/ballast/images/gull0006JPG_thumb.jpg',130, 87,0, 0,'Herring Gull on cliff top watching over chicks and eggs in the colony.','','','','','');
photos[89] = new photo(260389,'16379','','gallery','http://www1.clikpic.com/ballast/images/pheasant0006JPG.jpg',400,267,'Female Pheasant','http://www1.clikpic.com/ballast/images/pheasant0006JPG_thumb.jpg',130, 87,0, 0,'Female Pheasant feeding','','','RSPB reserve, Sandy, Bedfordshire','','');
photos[90] = new photo(182561,'16379','','gallery','http://www1.clikpic.com/ballast/images/KittiwakesJPG.jpg',400,174,'Kittiwakes feeding','http://www1.clikpic.com/ballast/images/KittiwakesJPG_thumb.jpg',130, 57,0, 0,'Kittiwakes feeding on the shoreline in winter','','','St Ouens Bay, Jersey','','');
photos[91] = new photo(276288,'16380','','gallery','http://www1.clikpic.com/ballast/images/Seals Norfolk0003JPG.jpg',400,267,'Common Seals','http://www1.clikpic.com/ballast/images/Seals Norfolk0003JPG_thumb.jpg',130, 87,0, 0,'Common Seals awaiting the incoming tide.  The sand and shale banks off the North Norfolk Coast are a popular spot for seals to congregate, these common seals where photographed in the spring of Blakeney Point.','','','Blakeney Point, North Norfolk','','');
photos[92] = new photo(276291,'16380','','gallery','http://www1.clikpic.com/ballast/images/CommonSealNorthSeaJPG.jpg',400,267,'Common Seal Swimming','http://www1.clikpic.com/ballast/images/CommonSealNorthSeaJPG_thumb.jpg',130, 87,0, 0,'A Common Seal swimming in the North Sea','','','North Sea off Blakeny Point, North Norfolk','','');
photos[93] = new photo(276680,'16379','','gallery','http://www1.clikpic.com/ballast/images/FeedingOysterCatchersJPG.jpg',400,134,'Feeding Oystercatchers','http://www1.clikpic.com/ballast/images/FeedingOysterCatchersJPG_thumb.jpg',130, 44,0, 0,'A group of Oystercatchers feeding on the shingle beach at Snettisham in Norfolk.  These birds feed of small moluscs, marine worms and shellfish which they either probe for in the mud and shingle or prise from rocks and seaweed.','','','Snettisham Beach, Norfolk','','');
photos[94] = new photo(276337,'16376','','gallery','http://www1.clikpic.com/ballast/images/ObyMill0020JPG.jpg',400,267,'Oby Mill sunrise - Norfolk','http://www1.clikpic.com/ballast/images/ObyMill0020JPG_thumb.jpg',130, 87,0, 0,'The dykes, broads and fens of Norfolk are punctuated with mills some in better states than others.  This mill is on Upton Dyke Norfolk.','','','Oby Mill, Upton, Norfolk','','');
photos[95] = new photo(276408,'16376','','gallery','http://www1.clikpic.com/ballast/images/Blakeney QuayJPG.jpg',400,267,'Creek at Low Tide','http://www1.clikpic.com/ballast/images/Blakeney QuayJPG_thumb.jpg',130, 87,0, 0,'A stormy spring afternoon, awaiting the incoming tide.  A common scence along the North Norfolk coast amoungst the many small inlets and creeks that cut through the salt marshes','','','North Norfolk','','');
photos[96] = new photo(276312,'16376','','gallery','http://www1.clikpic.com/ballast/images/Cornfield SunsetJPG.jpg',400,267,'Cornfield Sunset','http://www1.clikpic.com/ballast/images/Cornfield SunsetJPG_thumb.jpg',130, 87,0, 0,'The sun setting on a spring evening, the early green stages of the corn moving in the wind gave a shimmering silver look to the scene.','','','North Norfolk','','');
photos[97] = new photo(276299,'16376','','gallery','http://www1.clikpic.com/ballast/images/Blakeney Point0008JPG.jpg',400,267,'Old Lifeboat House - Blakeney Point','http://www1.clikpic.com/ballast/images/Blakeney Point0008JPG_thumb.jpg',130, 87,0, 0,'This building was the Blakeny lifeboat station until the changing nature of the mouth of the estuary forced a relocation of the lifeboat.  <br>\r\n<br>\r\nThe building was purchased in 1910 by UCL as a field study centre and is now impotant in the study of coastal habitats, notably shingle ridge, salt marsh and sand dunes.','','','Blakeney Point Norfolk','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(16381,'180362','Abstract','gallery');
galleries[1] = new gallery(16380,'178805','Animals','gallery');
galleries[2] = new gallery(16708,'181864','Architecture','gallery');
galleries[3] = new gallery(16379,'178784','Birds','gallery');
galleries[4] = new gallery(16376,'181895','Landscape','gallery');
galleries[5] = new gallery(16707,'181874','Plants & Flowers','gallery');
galleries[6] = new gallery(16799,'182559','Reportage','gallery');

