/***************************************************************************
* 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('714561,714555,714554,714513,714503,714153,713893,713887,126288,117306');
	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('714561,714555,714554,714513,714503,714153,713893,713887,126288,117306');
	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;
			document.title = 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(714524,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/2006_07_15@16.09.43.jpg',266,400,'Indian Runner duckling','http://www1.clikpic.com/kevinwells/images/2006_07_15@16_thumb.09.43.jpg',130, 195,0, 0,'A 1 day old duckling, enjoying its first day out in the sunshine.','','Kevin Wells, LRPS','','','');
photos[1] = new photo(714542,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/2006_08_25@11.36.44.jpg',266,400,'Dragonfly','http://www1.clikpic.com/kevinwells/images/2006_08_25@11_thumb.36.44.jpg',130, 195,0, 0,'','','Kevin Wells, LRPS','','','');
photos[2] = new photo(714503,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/2006_12_17@11.29.38.jpg',266,400,'Sanderling','http://www1.clikpic.com/kevinwells/images/2006_12_17@11_thumb.29.38.jpg',130, 195,1, 1,'Latin name: Calidris alba<br />\r\nShown with its white winter plumage, often seen racing along the waters edge on sandy beaches.','','Kevin Wells, LRPS','','','');
photos[3] = new photo(117306,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/DSC_0298_A3.jpg',400,266,'Peacock','http://www1.clikpic.com/kevinwells/images/DSC_0298_A3_thumb.jpg',130, 86,1, 0,'A peacock displays its colours, at Elsham Hall in Lincolnshire. To get the viewpoint, this photograph was taken by laying down on the ground - never seems worthwhile going out with a camera wearing decent clothes.','17/04/05','Kevin Wells, LRPS','Elsham Hall, Lincolnshire','','');
photos[4] = new photo(714553,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/2006_08_06@11.32.15_A3.jpg',400,266,'Caterpillars','http://www1.clikpic.com/kevinwells/images/2006_08_06@11_thumb.32.15_A3.jpg',130, 86,0, 0,'A pair of cabbage white caterpillars','','Kevin Wells, LRPS','','','');
photos[5] = new photo(57097,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/DSC_1448_A4.jpg',400,266,'Seal pup','http://www1.clikpic.com/kevinwells/images/DSC_1448_A4_thumb.jpg',130, 86,0, 0,'Seal pup at Donna Nook seal sanctuary. Taken at 7am on a cold day in December while there was still frost on the ground.','07/12/04','Kevin Wells, LRPS','Donna Nook Lincolnshire','','');
photos[6] = new photo(117813,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/D2x_2005_11_16_0136.jpg',400,266,'Seal pup close up','http://www1.clikpic.com/kevinwells/images/D2x_2005_11_16_0136_thumb.jpg',130, 86,0, 0,'A close up of an inquisitive seal pup.','12/11/05','Kevin Wells, LRPS','Donna Nook, Lincolnshire','','');
photos[7] = new photo(117283,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/D2x_2005_11_16_0073a.jpg',400,266,'Mother seal with pup','http://www1.clikpic.com/kevinwells/images/D2x_2005_11_16_0073a_thumb.jpg',130, 86,0, 0,'A mother with her baby seal.','12/11/05','Kevin Wells, LRPS','Donna Nook, Lincolnshire','','');
photos[8] = new photo(117282,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/D2x_2005_11_12_0181_A3.jpg',400,266,'Young mother seal','http://www1.clikpic.com/kevinwells/images/D2x_2005_11_12_0181_A3_thumb.jpg',130, 86,0, 0,'This is the mother of the seal pup in the image \"gazing at the sky\". Both of these images were taken from ground level - laying in wet sand and slowly crawling forwards so as not to disturb them.','12/11/05','Kevin Wells, LRPS','Donna Nook, Lincolnshire','','');
photos[9] = new photo(126285,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/D2x_2005_12_28_0142.jpg',266,400,'First Snow','http://www1.clikpic.com/kevinwells/images/D2x_2005_12_28_0142_thumb.jpg',130, 195,0, 0,'Seal pup\'s first experience of snow at about 4 weeks old.','','Kevin Wells, LRPS','Donna Nook, Lincolnshire','','');
photos[10] = new photo(117273,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/D2x_2005_11_12_0169.jpg',266,400,'Young seal pup','http://www1.clikpic.com/kevinwells/images/D2x_2005_11_12_0169_thumb.jpg',130, 195,0, 0,'A young seal pup, looking at the sky. Thought to be about 1 or 2 days old.','12/11/05','Kevin Wells, LRPS','Donna Nook, Lincolnshire','','');
photos[11] = new photo(713769,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/07.jpg',266,400,'Goose \"Goggs\"','http://www1.clikpic.com/kevinwells/images/07_thumb.jpg',130, 195,0, 0,'Pet goose brought up in the garden, very tame and inquisitive.','','Kevin Wells, LRPS','','','');
photos[12] = new photo(713772,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/032.jpg',400,266,'Falconry','http://www1.clikpic.com/kevinwells/images/032_thumb.jpg',130, 86,0, 0,'Photograph taken at the falconry centre at Elsham Hall, Lincolnshire','','Kevin Wells, LRPS','','','');
photos[13] = new photo(713858,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/2006_04_29@13.15.12.jpg',400,266,'Gannet in flight','http://www1.clikpic.com/kevinwells/images/2006_04_29@13_thumb.15.12.jpg',130, 86,0, 0,'','','Kevin Wells, LRPS','','','');
photos[14] = new photo(713853,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/2006_04_29@07.43.13_A3.jpg',400,266,'Gannet','http://www1.clikpic.com/kevinwells/images/2006_04_29@07_thumb.43.13_A3.jpg',130, 86,0, 0,'','','Kevin Wells, LRPS','','','');
photos[15] = new photo(714551,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/2006_04_23@18.01.26.jpg',266,400,'Mallard duck','http://www1.clikpic.com/kevinwells/images/2006_04_23@18_thumb.01.26.jpg',130, 195,0, 0,'Latin name: Anas platyrhynchos<br />\r\nMale mallard (drake).','','Kevin wells, LRPS','','','');
photos[16] = new photo(714541,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/2006_09_03@14.55.03a.jpg',266,400,'Mating flesh flies','http://www1.clikpic.com/kevinwells/images/2006_09_03@14_thumb.55.03a.jpg',130, 195,0, 0,'Latin name: Sarcophaga carnaria','','Kevin Wells, LRPS','','','');
photos[17] = new photo(57124,'5710','','gallery','http://www1.clikpic.com/kevinwells/images/Cranefly-2.jpg',266,400,'Cranefly','http://www1.clikpic.com/kevinwells/images/Cranefly-2_thumb.jpg',130, 195,0, 0,'\"Daddy Long legs\" found in a lavender hedge. Backlit from late afternoon sunshine.','','Kevin Wells, LRPS','Scunthorpe','','');
photos[18] = new photo(713862,'10884','','gallery','http://www1.clikpic.com/kevinwells/images/2006_07_01@10.32.15.jpg',266,400,'RAF Falcons','http://www1.clikpic.com/kevinwells/images/2006_07_01@10_thumb.32.15.jpg',130, 195,0, 0,'Parachute display team','','Kevin Wells, LRPS','','','');
photos[19] = new photo(714155,'10884','','gallery','http://www1.clikpic.com/kevinwells/images/2006_07_01@15.36.14.jpg',266,400,'Aerobatic display team','http://www1.clikpic.com/kevinwells/images/2006_07_01@15_thumb.36.14.jpg',130, 195,0, 0,'','','Kevin Wells, LRPS','','','');
photos[20] = new photo(714153,'10884','','gallery','http://www1.clikpic.com/kevinwells/images/2006_07_01@16.14.12_01_A3.jpg',266,400,'Red Arrows','http://www1.clikpic.com/kevinwells/images/2006_07_01@16_thumb.14.12_01_A3.jpg',130, 195,1, 1,'','','Kevin Wells, LRPS','','','');
photos[21] = new photo(714543,'10884','','gallery','http://www1.clikpic.com/kevinwells/images/2006_07_01@12.01.50.jpg',400,266,'Aerobatic display','http://www1.clikpic.com/kevinwells/images/2006_07_01@12_thumb.01.50.jpg',130, 86,0, 0,'','','Kevin Wells, LRPS','','','');
photos[22] = new photo(714154,'10884','','gallery','http://www1.clikpic.com/kevinwells/images/2006_07_01@16.06.51.jpg',400,266,'Red Arrows','http://www1.clikpic.com/kevinwells/images/2006_07_01@16_thumb.06.51.jpg',130, 86,0, 0,'','','Kevin Wells, LRPS','','','');
photos[23] = new photo(713887,'10884','','gallery','http://www1.clikpic.com/kevinwells/images/2006_07_01@16.08.01.jpg',400,266,'Red Arrows','http://www1.clikpic.com/kevinwells/images/2006_07_01@16_thumb.08.01.jpg',130, 86,1, 0,'Red Arrows display team','','Kevin Wells, LRPS','','','');
photos[24] = new photo(714544,'10884','','gallery','http://www1.clikpic.com/kevinwells/images/2006_07_01@11.04.56.jpg',400,266,'Wing walker','http://www1.clikpic.com/kevinwells/images/2006_07_01@11_thumb.04.56.jpg',130, 86,0, 0,'Utterly Butterly wing walker display','','Kevin Wells, LRPS','','','');
photos[25] = new photo(714157,'10884','','gallery','http://www1.clikpic.com/kevinwells/images/2006_07_01@14.26.03_a4.jpg',400,266,'Eurofighter Typhoon','http://www1.clikpic.com/kevinwells/images/2006_07_01@14_thumb.26.03_a4.jpg',130, 86,0, 0,'','','Kevin Wells, LRPS','','','');
photos[26] = new photo(714156,'10884','','gallery','http://www1.clikpic.com/kevinwells/images/2006_07_01@13.53.01.jpg',400,266,'Spitfire','http://www1.clikpic.com/kevinwells/images/2006_07_01@13_thumb.53.01.jpg',130, 86,0, 0,'','','Kevin Wells, LRPS','','','');
photos[27] = new photo(57121,'5716','','gallery','http://www1.clikpic.com/kevinwells/images/kuramathi-jetty-FL.jpg',400,266,'Jetty at Kuramathi','http://www1.clikpic.com/kevinwells/images/kuramathi-jetty-FL_thumb.jpg',130, 86,0, 0,'A view of the jetty at Kuramathi. This image illustrates the rule of thirds and lines (especially when from a corner).','','Kevin Wells, LRPS','Kuramathi, Maldives','','');
photos[28] = new photo(57120,'5716','','gallery','http://www1.clikpic.com/kevinwells/images/10.jpg',400,266,'Jetty at Kuramathi','http://www1.clikpic.com/kevinwells/images/10_thumb.jpg',130, 86,0, 0,'One of the best jetties encountered so far on visits to the Maldives. This is at Kuramathi.','','Kevin Wells, LRPS','Kuramathi, Maldives','','');
photos[29] = new photo(57122,'5716','','gallery','http://www1.clikpic.com/kevinwells/images/kuramathi-jetty-04-FL.jpg',400,266,'Tropical shelter','http://www1.clikpic.com/kevinwells/images/kuramathi-jetty-04-FL_thumb.jpg',130, 86,0, 0,'Situated at the end of the jetty, this shelter is highlighted well against the dark tropical storm clouds that are approaching.','','Kevin Wells, LRPS','Kuramathi, Maldives','','');
photos[30] = new photo(57126,'5716','','gallery','http://www1.clikpic.com/kevinwells/images/26.jpg',266,400,'Central Palace, Bangkok','http://www1.clikpic.com/kevinwells/images/26_thumb.jpg',130, 195,0, 0,'A popular and \"must see\" highlight of Bangkok.','','Kevin Wells, LRPS','Central Palace, Bangkok, Thailand','','');
photos[31] = new photo(57125,'5716','','gallery','http://www1.clikpic.com/kevinwells/images/25.jpg',266,400,'Loi Krathong Festival','http://www1.clikpic.com/kevinwells/images/25_thumb.jpg',130, 195,0, 1,'During November in Thailand, the Loi Krathong festival is known as the \"Festival of Lights\"','','Kevin Wells, LRPS','Chiang Mai, Thailand','','');
photos[32] = new photo(117861,'5716','','gallery','http://www1.clikpic.com/kevinwells/images/Reethi-01a-poster-print.jpg',266,400,'Maldivian Sunset','http://www1.clikpic.com/kevinwells/images/Reethi-01a-poster-print_thumb.jpg',130, 195,0, 0,'One of the most peaceful destinations ever found.','','Kevin Wells, LRPS','Reethi Rah Resort, Maldives','','');
photos[33] = new photo(714513,'5715','','gallery','http://www1.clikpic.com/kevinwells/images/2006_09_02@15.31.35a_A4.jpg',266,400,'Muscovy duckling','http://www1.clikpic.com/kevinwells/images/2006_09_02@15_thumb.31.35a_A4.jpg',130, 195,1, 1,'A young male muscovy duckling, about 1 week old.','','Kevin Wells, LRPS','','','');
photos[34] = new photo(57100,'5715','','gallery','http://www1.clikpic.com/kevinwells/images/05.jpg',266,400,'White falcon','http://www1.clikpic.com/kevinwells/images/05_thumb.jpg',130, 195,0, 0,'White falcon taken at the falconry centre at Elsham Hall, North Lincolnshire.','','Kevin Wells, LRPS','Elsham Hall, Lincolnshire','','');
photos[35] = new photo(714550,'5715','','gallery','http://www1.clikpic.com/kevinwells/images/2006_03_23@19.22.50.jpg',266,400,'Studio portrait','http://www1.clikpic.com/kevinwells/images/2006_03_23@19_thumb.22.50.jpg',130, 195,0, 0,'','','Kevin Wells, LRPS','','','');
photos[36] = new photo(714554,'5715','','gallery','http://www1.clikpic.com/kevinwells/images/2006_08_23@13.28.40.jpg',400,266,'Ball bearings','http://www1.clikpic.com/kevinwells/images/2006_08_23@13_thumb.28.40.jpg',130, 86,1, 0,'Stainless steel ball bearings, indoor studio shot.','','Kevin Wells, LRPS','','','');
photos[37] = new photo(714546,'5715','','gallery','http://www1.clikpic.com/kevinwells/images/2005_12_29@11.29.46.jpg',400,266,'Winter landscape','http://www1.clikpic.com/kevinwells/images/2005_12_29@11_thumb.29.46.jpg',130, 86,0, 0,'','','Kevin Wells, LRPS','','','');
photos[38] = new photo(714548,'5715','','gallery','http://www1.clikpic.com/kevinwells/images/D2x_2005_12_29_0014.jpg',400,266,'Winter landscape','http://www1.clikpic.com/kevinwells/images/D2x_2005_12_29_0014_thumb.jpg',130, 86,0, 0,'','','Kevin Wells, LRPS','','','');
photos[39] = new photo(126288,'5715','','gallery','http://www1.clikpic.com/kevinwells/images/Donna-Nook-winter.jpg',266,400,'Winter landscape','http://www1.clikpic.com/kevinwells/images/Donna-Nook-winter_thumb.jpg',130, 195,1, 0,'View of Donna Nook on a morning when 2 inches of snow fell overnight. This was the first experience of snow for many of the new born seal pups.','','Kevin Wells, LRPS','Donna Nook, Lincolnshire','','');
photos[40] = new photo(57115,'5715','','gallery','http://www1.clikpic.com/kevinwells/images/16.jpg',266,400,'Sunlight','http://www1.clikpic.com/kevinwells/images/16_thumb.jpg',130, 195,0, 0,'Sunlight through the trees in the Lake District','','Kevin Wells, LRPS','Lake District','','');
photos[41] = new photo(714555,'5715','','gallery','http://www1.clikpic.com/kevinwells/images/HV-Lab-10a.jpg',266,400,'High voltage lab','http://www1.clikpic.com/kevinwells/images/HV-Lab-10a_thumb.jpg',130, 195,1, 0,'Simulated lightning strike across a wooden frame with resistance wire. The wire instantly melts and drops to the floor.','','Kevin Wells, LRPS','','','');
photos[42] = new photo(714728,'5715','','gallery','http://www1.clikpic.com/kevinwells/images/2006_07_15@16.33.07.jpg',400,266,'Garden frog','http://www1.clikpic.com/kevinwells/images/2006_07_15@16_thumb.33.07.jpg',130, 86,0, 0,'','','Kevin Wells, LRPS','','','');
photos[43] = new photo(714726,'5715','','gallery','http://www1.clikpic.com/kevinwells/images/2006_06_10@12.23.03.jpg',400,266,'Gazania flower','http://www1.clikpic.com/kevinwells/images/2006_06_10@12_thumb.23.03.jpg',130, 86,0, 0,'Close up of a Gazania','','Kevin Wells, LRPS','','','');
photos[44] = new photo(117304,'5715','','gallery','http://www1.clikpic.com/kevinwells/images/D2x_2005_10_16_0176.jpg',400,266,'Speedway','http://www1.clikpic.com/kevinwells/images/D2x_2005_10_16_0176_thumb.jpg',130, 86,0, 0,'Scunthorpe Scorpions Team Captain Wayne Carter in action. The late afternoon sun highlights his concentration on the last bend before winning the race.','16/10/05','Kevin Wells, LRPS','Scunthorpe, Lincolnshire','','');
photos[45] = new photo(117305,'5723','','gallery','http://www1.clikpic.com/kevinwells/images/Waterski-3D.jpg',266,400,'Waterski','http://www1.clikpic.com/kevinwells/images/Waterski-3D_thumb.jpg',130, 195,0, 1,'Using an original photograph, this image was produced in Adobe Photoshop to give a three-dimensional effect. The frame, shadow and lighting effects have all been produced digitally.','01/02/05','Kevin Wells, LRPS','Originally taken in Greece, but created on a PC','','');
photos[46] = new photo(713893,'5723','','gallery','http://www1.clikpic.com/kevinwells/images/Evaporation.jpg',400,266,'Evaporation','http://www1.clikpic.com/kevinwells/images/Evaporation_thumb.jpg',130, 86,1, 0,'Original photograph taken in the Maldives, but manipulated to illstrate water droplets evaporating from the ocean.','','Kevin Wells, LRPS','','','');
photos[47] = new photo(714561,'5723','','gallery','http://www1.clikpic.com/kevinwells/images/smokeart5a.jpg',266,400,'Smoke skeleton','http://www1.clikpic.com/kevinwells/images/smokeart5a_thumb.jpg',130, 195,1, 0,'Using several photographs of smoke trails, this composite image has been created using Adobe PhotoShop.','','Kevin Wells, LRPS','','','');
photos[48] = new photo(714733,'5723','','gallery','http://www1.clikpic.com/kevinwells/images/Panoramic-room-A4.jpg',400,266,'3D Room','http://www1.clikpic.com/kevinwells/images/Panoramic-room-A4_thumb.jpg',130, 86,0, 0,'A montage of several photographs, created with a wide range of PhotoShop tools and techniques to create a 3-dimensional perspective of a room.','','Kevin Wells, LRPS','','','');
photos[49] = new photo(713897,'10883','','gallery','http://www1.clikpic.com/kevinwells/images/Reethi-rule-thirds.jpg',266,400,'Rule of thirds','http://www1.clikpic.com/kevinwells/images/Reethi-rule-thirds_thumb.jpg',130, 195,0, 1,'By dividing the photograph into thirds, both top to bottom and left to right. Subjects of interest are placed along the lines and at intersection points.','','Kevin Wells, LRPS','','','');
photos[50] = new photo(714730,'10883','','gallery','http://www1.clikpic.com/kevinwells/images/kuramathi-03.jpg',266,400,'Leading Lines','http://www1.clikpic.com/kevinwells/images/kuramathi-03_thumb.jpg',130, 195,0, 0,'Use of lines from both bottom corners of the photograph, which gives perspective and depth to the image.','','Kevin Wells, LRPS','','','');
photos[51] = new photo(714151,'10883','','gallery','http://www1.clikpic.com/kevinwells/images/2006_07_01@16.15.40.jpg',266,400,'Leading lines','http://www1.clikpic.com/kevinwells/images/2006_07_01@16_thumb.15.40.jpg',130, 195,0, 0,'Lines are used to draw the attention of the viewer into a photograph, ideally from corners. A good starting point is the bottom left hand corner as seen here, and the main subject is also on the intersection of 1/3 down and 1/3 in from the right (see other comments on the rule of thirds).','','Kevin Wells, LRPS','','','');
photos[52] = new photo(713898,'10883','','gallery','http://www1.clikpic.com/kevinwells/images/speedway-rule-thirds.jpg',400,266,'Rule of thirds','http://www1.clikpic.com/kevinwells/images/speedway-rule-thirds_thumb.jpg',130, 86,0, 0,'Another example using the rule of thirds - the main point of interest is the head and face, which is at the intersection of two lines.','','Kevin Wells, LRPS','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(5710,'714503','Wildlife','gallery');
galleries[1] = new gallery(10884,'714153','Aviation','gallery');
galleries[2] = new gallery(5716,'57125','Travel','gallery');
galleries[3] = new gallery(5715,'714513','General','gallery');
galleries[4] = new gallery(5723,'117305','Digital Graphics','gallery');
galleries[5] = new gallery(10883,'713897','Techniques','gallery');

