/***************************************************************************
* 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('1958595,1806150,1798726,1798723,1782857,1782854,1782840,1767364,1767362,1767355,1767328,1767312,1767310,1767298,1767259,1767244,1767239,1767231,1767183,1767176,1767171,1767154,1767148,1767139,1767137,1767128,1767124,1767060,1767052,1767045,1767019,1767011,1766951,1766939,1766929');
	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('1958595,1806150,1798726,1798723,1782857,1782854,1782840,1767364,1767362,1767355,1767328,1767312,1767310,1767298,1767259,1767244,1767239,1767231,1767183,1767176,1767171,1767154,1767148,1767139,1767137,1767128,1767124,1767060,1767052,1767045,1767019,1767011,1766951,1766939,1766929');
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			if ('gallery' != '') {
						if (photos[j].galleries_id != '') {
						document.write('<a href="' + photos[j].section_code + '_' + photos[j].galleries_id + '.html">');
						}
						else {
						document.write('<a href="gallery.html">');
						}
			}
			document.write('<img src="' + photos[j].src + '" width="' + photos[j].width + '" height="' + photos[j].height + '" class="mainhomepageimage" id="mainSample" name="mainSample" alt="' + photos[j].caption  + '" border="0">');
			if ('gallery' != '') {
				document.write('</a>');
			}
			break;
		}
	}
	
}

/***************************************************************************
* Show the next image in a gallery.  field = hidden field containing       *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function next(field,img) {

	debug('IN next');
	imageID = field.value;
	
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k= j + 1;
	while (nextImg < 0) {
		for (; k < photos.length; k++) {
			debug('testing image ' + k + ': gallery = ' + photos[k].galleries_id + '(existing: ' + photos[j].galleries_id + ')');
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				debug('setting  nextImg = ' + k);
				break;
			}
		}
		if (nextImg == -1) {
			k = 0;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);
	}


}


/***************************************************************************
* Set a new image on the gallery detail page given its array position      *
***************************************************************************/
function updateImage (nextImg, field,img) {
	debug('Updating image');
	if (!basic && !(1)) {
		debug('In updateImage');
		debug('setting  img src = ' + photos[nextImg].src);
		
					
			document.getElementById('imagePhoto').innerHTML = '<img class="mainphoto" src="' + photos[nextImg].src + ' " id="mainPic" name="mainPic" width="' + photos[nextImg].width + '" height="' + photos[nextImg].height + '" alt="' + photos[nextImg].caption + '" border="0">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = photos[nextImg].caption;
			/* apply 'blank' classname to element where */			if ( photos[nextImg].caption == '') {
				document.getElementById('imageTitle').style.className = 'blank';
			}
			else {
				document.getElementById('imageTitle').style.className = 'normal';
			}
						temp = '';
			if (photos[nextImg].description != '') {
				temp = temp +  '<p id="imageDescription">' + photos[nextImg].description + '</p>';
			}
			if (photos[nextImg].photo_ref != '') {
				temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + photos[nextImg].photo_ref + '</p>';
			}
			if (photos[nextImg].takendate != '') {
				debug('Resetting taken date');
				temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + photos[nextImg].takendate + '</p>';
			}
			
			if (photos[nextImg].location != '') {
				debug('Resetting location');
				temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  photos[nextImg].location + '</p>';
			}
			
			if (photos[nextImg].photographer != '') {
				debug('Resetting photographer');
				temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + photos[nextImg].photographer + '</p>';
			}
			if (temp != '') {				temp = temp + '<div class="spacer"></div>';			}					if (temp == '') {
			document.getElementById('imageDetails').style.display = 'none';
		}
		else {
			document.getElementById('imageDetails').style.display = 'block';
		}
		document.getElementById('imageDetails').innerHTML =temp;	
		
	}
	else {
		debug('Redirecting to id ' + photos[nextImg].id);
		window.location = 'photo_' + photos[nextImg].id + '.html';
	}
}

/***************************************************************************
* Show the previous image for a gallery. field = hidden field containing   *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function previous(field,img) {


	imageID = field.value;
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k = j -1;
	while (nextImg < 0) {
		for (; k >= 0; k--) {
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				break;
			}
		}
		if (nextImg == -1) {
			k = photos.length -1;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);	
	}
}

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.
        *
* Gallery_id = id of gallery to choose                                     *
* 
 img = reference to html image                                       *
* in which to show image                                                   *
***************************************************************************/
function showGalleryImage(gallery_id, img) {
	debug('Gallery = ' + gallery_id);
	for (i = 0; i < galleries.length; i++) {
		if (galleries[i].id == gallery_id) {
			imageID = randomListVal(galleries[i].featured_images);
				for (j = 0; j < photos.length; j++) {
					if (photos[j].id == imageID) {
						
						img.src = photos[j].thumbnail;
						img.width = photos[j].thumbnail_width;
						img.height = photos[j].thumbnail_height;
						
						break;
					}
				}
			break;
		}
	} 
	}

/***************************************************************************
* If we have dynamic HTML                                                  *
*  replace the galleries link with a list that                             *
* doesn't include the current gallery                                      *
***************************************************************************/
function showGalleries(gallery_id) {
	debug('Showing links for gallery ' + gallery_id);
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
			debug('Testing gallery ' + galleries[i].id);
			
			if (galleries[i].id != gallery_id) {
				debug('Adding link');
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="gallery_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}
/***************************************************************************
* Create the array of Photo objects                                        *
***************************************************************************/
photos = new Array();
photos[0] = new photo(1767011,'118751','Dandelion Moon','gallery','http://www1.clikpic.com/carmenwinch/images/Dandelion Moon.jpg',600,383,'Dandelion ','http://www1.clikpic.com/carmenwinch/images/Dandelion Moon_thumb.jpg',130, 83,1, 0,'Moonlight','15/01/08','Carmen Winch','Sussex','','Moonlit Dandelion');
photos[1] = new photo(1767139,'118756','Bewl Sunset 1','gallery','http://www1.clikpic.com/carmenwinch/images/Bewl Sunset.jpg',600,402,'Sunset','http://www1.clikpic.com/carmenwinch/images/Bewl Sunset_thumb.jpg',130, 87,1, 0,'Bewl Water, Kent','15/01/08','Carmen Winch','Bewl Water, Kent','','Sunset over Bewl Water kent, Reservoir');
photos[2] = new photo(1767176,'118756','Pylons at Sunset','gallery','http://www1.clikpic.com/carmenwinch/images/Pylons at Sunset1.jpg',600,355,'Pylon Sky','http://www1.clikpic.com/carmenwinch/images/Pylons at Sunset1_thumb.jpg',130, 77,1, 0,'Sussex','15/01/08','Carmen Winch','Rye','','Row of Pylons silouetted at Sunset with water in foreground');
photos[3] = new photo(1767142,'118756','Duck on Bewl Water at Sunset','gallery','http://www1.clikpic.com/carmenwinch/images/Duck on Bewl Sunset.jpg',500,306,'Duck at Sunset','http://www1.clikpic.com/carmenwinch/images/Duck on Bewl Sunset_thumb.jpg',130, 80,0, 0,'Duck on Bewl Water at Sunset Panorama','15/01/08','Carmen Winch','Bewl Water, Kent','','Bewl Water at Sunset with Duck on Water');
photos[4] = new photo(1782854,'118756','Chichester','gallery','http://www1.clikpic.com/carmenwinch/images/Itchenor Sunset.gif',600,313,'Itchenor Sunset','http://www1.clikpic.com/carmenwinch/images/Itchenor Sunset_thumb.gif',130, 68,1, 0,'Sunset at Itchenor moorings, Chichester, West Sussex','22/01/08','Carmen Winch','Itchenor, West Sussex','','Sunset at Itchenor moorings, Chichester, West Sussex');
photos[5] = new photo(1767171,'118756','Sunset over River Stour','gallery','http://www1.clikpic.com/carmenwinch/images/Stour Sunset Stock.jpg',600,277,'Sunset','http://www1.clikpic.com/carmenwinch/images/Stour Sunset Stock_thumb.jpg',130, 60,1, 0,'River Stour','15/01/08','Carmen Winch','River Stour, Essex','','Sunset over River Stour, Essex with Yacht silouette');
photos[6] = new photo(1767148,'118756','New Forest, Hampshire','gallery','http://www1.clikpic.com/carmenwinch/images/Lymington Sunset.jpg',360,500,'Tree in Sunset and Mist','http://www1.clikpic.com/carmenwinch/images/Lymington Sunset_thumb.jpg',130, 181,1, 0,'New Forest, Hants','15/01/08','Carmen Winch','New Forest, Hampshire, UK','','Sunset in New Forest Silouetting Tree in Mist Portrait');
photos[7] = new photo(1767183,'118756','Quadbikers in Egypt','gallery','http://www1.clikpic.com/carmenwinch/images/Quad bikers in Egypt STock.jpg',600,305,'Quadbikers in Egypt','http://www1.clikpic.com/carmenwinch/images/Quad bikers in Egypt STock_thumb.jpg',130, 66,1, 0,'Sharm el Sheik','15/01/08','Carmen Winch','Egypt','','Quad Bikers in Egyptian Desert at Sunset');
photos[8] = new photo(1767118,'118769','2 Wilderbeast','gallery','http://www1.clikpic.com/carmenwinch/images/2 Wilderbeast AS.jpg',600,478,'Wilderbeast','http://www1.clikpic.com/carmenwinch/images/2 Wilderbeast AS_thumb.jpg',130, 104,0, 0,'Two Wilderbeast Laying Down and facing away from each other','15/01/08','Carmen Winch','Howletts','','Two Wilderbeast');
photos[9] = new photo(1767231,'118776','RAF Falcon Parachute Team in Flight Display','gallery','http://www1.clikpic.com/carmenwinch/images/Falcons RAF Parachute Team.jpg',300,527,'RAF Falcons Parachute Team in flight','http://www1.clikpic.com/carmenwinch/images/Falcons RAF Parachute Team_thumb.jpg',130, 228,1, 0,'Airbourne, Eastbourne 2007','15/01/08','Carmen Winch','Airbourne, Eastbourne','','RAF Falcon Parachute Team in Flight Display');
photos[10] = new photo(1767362,'118769','Two Meerkats','gallery','http://www1.clikpic.com/carmenwinch/images/2 meerkats on log1.jpg',600,468,'Meerkats','http://www1.clikpic.com/carmenwinch/images/2 meerkats on log1_thumb.jpg',130, 101,1, 0,'Lookout','15/01/08','Carmen Winch','Howletts','','Meerkat Tree Africa African animal stump lookout');
photos[11] = new photo(1767121,'118769','Bongo','gallery','http://www1.clikpic.com/carmenwinch/images/Bongo Stock.jpg',600,432,'Bongo','http://www1.clikpic.com/carmenwinch/images/Bongo Stock_thumb.jpg',130, 94,0, 0,'African Bongo Laying Down in Zoo','15/01/08','Carmen Winch','Howletts','','Bongo');
photos[12] = new photo(1767239,'118776','Big Wheel at Sunset','gallery','http://www1.clikpic.com/carmenwinch/images/Ferris Wheel at Sun Down.jpg',500,310,'Big Wheel Sunset','http://www1.clikpic.com/carmenwinch/images/Ferris Wheel at Sun Down_thumb.jpg',130, 81,1, 0,'Big Wheel at Sunset, Ferris Wheel at Sundown showing part of wheel and silouette of family riding in cart','15/01/08','Carmen Winch','Lydd Airshow','','Big Wheel at Sunset, Ferris Wheel at Sundown showing part of wheel and silouette of family riding in cart');
photos[13] = new photo(1767364,'118769','Meerkat Lookout','gallery','http://www1.clikpic.com/carmenwinch/images/Meerkat Sentry.jpg',300,508,'Sentry Duty','http://www1.clikpic.com/carmenwinch/images/Meerkat Sentry_thumb.jpg',130, 220,1, 0,'Meerkat on sentry duty - viewed from below','15/01/08','Carmen Winch','Howletts','','Meerkat Looking out - viewed from below');
photos[14] = new photo(1767124,'118769','Elephant Family','gallery','http://www1.clikpic.com/carmenwinch/images/3 elephants read for stock_edited-1.jpg',600,356,'Elephant Family','http://www1.clikpic.com/carmenwinch/images/3 elephants read for stock_edited-1_thumb.jpg',130, 77,1, 0,'Family on the Move','15/01/08','Carmen Winch','Howletts','','Elephant Family on the Move');
photos[15] = new photo(1767128,'118769','Group of Wilderbeast Resting in Late Afternoon','gallery','http://www1.clikpic.com/carmenwinch/images/Group of Wilderbeast.jpg',600,263,'Wilderbeast Resting','http://www1.clikpic.com/carmenwinch/images/Group of Wilderbeast_thumb.jpg',130, 57,1, 0,'Late Afternoon','15/01/08','Carmen Winch','Howletts','','Group of Wilderbeast laying down in late afternoon sun');
photos[16] = new photo(1767244,'118776','Night Train 1','gallery','http://www1.clikpic.com/carmenwinch/images/Night Train 2 AS.jpg',600,368,'Night Train','http://www1.clikpic.com/carmenwinch/images/Night Train 2 AS_thumb.jpg',130, 80,1, 0,'Speeding through Station','15/01/08','Carmen Winch','Sussex','','Train at Night blurred by speed and lit with various street lights');
photos[17] = new photo(1767133,'118769','Giraffe Head','gallery','http://www1.clikpic.com/carmenwinch/images/Giraffe Head AS.jpg',500,492,'Giraffe','http://www1.clikpic.com/carmenwinch/images/Giraffe Head AS_thumb.jpg',130, 128,0, 0,'Portrait of Giraffe','15/01/08','Carmen Winch','Howletts','','Giraffe Head');
photos[18] = new photo(1767254,'118776','Speeding Train','gallery','http://www1.clikpic.com/carmenwinch/images/Night Train AS.jpg',550,385,'Speeding Train','http://www1.clikpic.com/carmenwinch/images/Night Train AS_thumb.jpg',130, 91,0, 0,'Train Speeding through station blurred and lit with station lighting ','15/01/08','Carmen Winch','Sussex, UK','','Train at Night blurred by speed and lit with station lights');
photos[19] = new photo(1782857,'118776','British Superbikes 2007','gallery','http://www1.clikpic.com/carmenwinch/images/James Toseland Victory.jpg',120,147,'James Toseland Victory','http://www1.clikpic.com/carmenwinch/images/James Toseland Victory_thumb.jpg',130, 159,1, 0,'British Superbikes 2007,James Toseland Victory, Brands Hatch, Kent','22/01/08','Carmen Winch','Brands Hatch, Kent. UK','','British Superbikes 2007,James Toseland Victory, Brands Hatch, Kent');
photos[20] = new photo(1767137,'118769','Charging Rhino','gallery','http://www1.clikpic.com/carmenwinch/images/Rhino 2 AS.jpg',350,569,'Running Rhino','http://www1.clikpic.com/carmenwinch/images/Rhino 2 AS_thumb.jpg',130, 211,1, 0,'Port Lympne','15/01/08','Carmen Winch','Howletts','','Running Rhino');
photos[21] = new photo(1767310,'118776','Tall Ship Rigging','gallery','http://www1.clikpic.com/carmenwinch/images/Tall Ship Rigging AS.jpg',500,486,'Tall Ship Rigging','http://www1.clikpic.com/carmenwinch/images/Tall Ship Rigging AS_thumb.jpg',130, 126,1, 0,'Shot up a Tall Ship\'s mast showing rope rigging and varnished wood mast & crossbars','15/01/08','Carmen Winch','Liverpool','','Shot up a Tall Ship\'s mast showing rope rigging and varnished wood mast & crossbars');
photos[22] = new photo(1767312,'118776','Traction Engine Smoke','gallery','http://www1.clikpic.com/carmenwinch/images/Traction Smoke Stock.jpg',600,395,'Puffing Billy','http://www1.clikpic.com/carmenwinch/images/Traction Smoke Stock_thumb.jpg',130, 86,1, 0,'Traction Engine','15/01/08','Carmen Winch','Hadlow Down, Sussex','','Black & Brass Traction Engine Chimney billowing black & sooty Smoke into the sky');
photos[23] = new photo(1767323,'118776','Lakenheath A-10','gallery','http://www1.clikpic.com/carmenwinch/images/US AS.jpg',600,400,'US Airforce A-10','http://www1.clikpic.com/carmenwinch/images/US AS_thumb.jpg',130, 87,0, 0,'US Airforce A-10 Fighter Jet in Flight','15/01/08','Carmen Winch','RAF Lakenheath','','US Airforce A10 Fighter Jet in Flight');
photos[24] = new photo(1767328,'118776','Fighter Jet in Flight','gallery','http://www1.clikpic.com/carmenwinch/images/US AS 1.jpg',550,402,'US Airforce Fighter Jet A-10A','http://www1.clikpic.com/carmenwinch/images/US AS 1_thumb.jpg',130, 95,1, 0,'US Airforce Fighter Jet in Flight A-10A','15/01/08','Carmen Winch','RAF Lakenheath','','RAF Fighter Jet A-10A');
photos[25] = new photo(1767355,'118769','Ostrich Close Up','gallery','http://www1.clikpic.com/carmenwinch/images/Ostrich Close UP1.jpg',600,499,'Ostrich','http://www1.clikpic.com/carmenwinch/images/Ostrich Close UP1_thumb.jpg',130, 108,1, 0,'Mud for Lipstick','15/01/08','Carmen Winch','Howletts','','Close up of Ostrich head with mud on beak');
photos[26] = new photo(1958595,'118777','','gallery','http://www1.clikpic.com/carmenwinch/images/Ducky Stock.jpg',600,366,'Duck','http://www1.clikpic.com/carmenwinch/images/Ducky Stock_thumb.jpg',130, 79,1, 0,'on Hatchett Pond, Hants','10/02/06','Carmen Winch','Hatchett Pond, Hampshire','','');
photos[27] = new photo(1767359,'118794',' sheep eating hay','gallery','http://www1.clikpic.com/carmenwinch/images/sheep & hay.jpg',600,321,'Sheep','http://www1.clikpic.com/carmenwinch/images/sheep & hay_thumb.jpg',130, 70,0, 0,'Silver bullets rarely work as we expect them too and often kill off the sheep in lieu of the wolf','15/01/08','Carmen Winch','Kent','','Group of sheep eating hay farm flock farmyard barn late afternoon sun');
photos[28] = new photo(1767298,'118777','Two Pelicans in Antigua','gallery','http://www1.clikpic.com/carmenwinch/images/Pelicans.jpg',600,286,'Pelican Brothers','http://www1.clikpic.com/carmenwinch/images/Pelicans_thumb.jpg',130, 62,1, 0,'Antigua','15/01/08','Carmen Winch','Antigua','','Two pelicans by water side appearing to have an argument both turning back on the other - blue ocean in background');
photos[29] = new photo(1806150,'118794','','gallery','http://www1.clikpic.com/carmenwinch/images/Butterfly on flower.jpg',485,600,'The great Taoist master Chuang Tzu once dreamt that he was a butterfly fluttering here and there. In the dream he had no awareness of his individuality as a person. He was only a butterfly. Suddenly, he awoke and found himself laying there, a person once again. But then he thought to himself, \"Was I before a man who dreamt about being a butterfly, or am I now a butterfly who dreams about being a man?\" ','http://www1.clikpic.com/carmenwinch/images/Butterfly on flower_thumb.jpg',130, 161,1, 0,'The Dream of the Butterfly','27/01/08','Carmen Winch','Vendee, France','','Butterfly, zen, leaf, wings, flight, colour');
photos[30] = new photo(1782848,'118794','','gallery','http://www1.clikpic.com/carmenwinch/images/Dolphin love.gif',600,338,'Dolphins','http://www1.clikpic.com/carmenwinch/images/Dolphin love_thumb.gif',130, 73,0, 0,'\"They’re children after all, but your world is not a good place for them.”','22/01/08','Carmen Winch','Sea World USA','','Dolphin Couple at Sea World, Orlando, USA');
photos[31] = new photo(1767259,'118777','Pelican and Beach Hut','gallery','http://www1.clikpic.com/carmenwinch/images/Pelican & Beach Hut Antigua 1.jpg',400,499,'Pelican and Beach Hut','http://www1.clikpic.com/carmenwinch/images/Pelican & Beach Hut Antigua 1_thumb.jpg',130, 162,1, 0,'Pelican flying over sea and Beach Hut in Antigua','15/01/08','Carmen Winch','Antigua','','Pelican and Beach Hut');
photos[32] = new photo(1767317,'118778','Antiguan Wooden Jetty ','gallery','http://www1.clikpic.com/carmenwinch/images/Wooden Jetty Antigua AS.jpg',600,394,'Antiguan Wooden Jetty ','http://www1.clikpic.com/carmenwinch/images/Wooden Jetty Antigua AS_thumb.jpg',130, 85,0, 0,'Wooden Jetty, Pier or Boardwalk on Antigua, draws eye out to sea','15/01/08','Carmen Winch','Antigua','','Wooden Jetty, Pier or Boardwalk on Antigua, draws eye out to sea');
photos[33] = new photo(1782855,'118778','Mooring','gallery','http://www1.clikpic.com/carmenwinch/images/Itchenor yacht on mooring.gif',380,603,'Itchenor Yacht','http://www1.clikpic.com/carmenwinch/images/Itchenor yacht on mooring_thumb.gif',130, 206,0, 0,'Yacht on Mooring at Itchenor, West Sussex','22/01/08','Carmen Winch','Itchenor, West Sussex','','Yacht on Mooring');
photos[34] = new photo(1798726,'118778','','gallery','http://www1.clikpic.com/carmenwinch/images/Final TMA Winchelsea Beach_edited-1.gif',144,68,'Winchelsea Beach, Sussex, UK','http://www1.clikpic.com/carmenwinch/images/Final TMA Winchelsea Beach_edited-1_thumb.gif',130, 61,1, 0,'','27/01/08','Carmen Winch','Winchelsea Beach, Sussex, UK','','Winchelsea Beach, Sussex, UK, posts, sand, pebbles, groin, breakwater, boardwalk, wooden, light, panorama, landscape, beach, coast, sea, shore');
photos[35] = new photo(1782830,'118778','','gallery','http://www1.clikpic.com/carmenwinch/images/Blue Bewl.gif',144,57,'Blue Water','http://www1.clikpic.com/carmenwinch/images/Blue Bewl_thumb.gif',130, 51,0, 0,'Bewl Water, Kent Panorama view','22/01/08','Carmen Winch','Bewl Water, Kent','','Bewl Water, Kent, Panorama, view, lake, reservoir, scenic, scene');
photos[36] = new photo(1798723,'118729','Candlelit Fragrant Lily','gallery','http://www1.clikpic.com/carmenwinch/images/_DSC0023_edited-1.jpg',436,329,'Lily by Candlelight','http://www1.clikpic.com/carmenwinch/images/_DSC0023_edited-1_thumb.jpg',130, 98,1, 0,'','27/01/08','Carmen Winch','Sussex','','Candlelit White Fragrant Lily against black background');
photos[37] = new photo(1766939,'118729','Yellow Rose Bud','gallery','http://www1.clikpic.com/carmenwinch/images/Rose.jpg',600,402,'Yellow Rose Bud','http://www1.clikpic.com/carmenwinch/images/Rose_thumb.jpg',130, 87,1, 0,'Close Up in the rain','15/01/08','Carmen Winch','Sussex, UK','','Yellow Rose Bud in Rain');
photos[38] = new photo(1766964,'118729','Autumn Berries','gallery','http://www1.clikpic.com/carmenwinch/images/Berries.jpg',500,400,'Autumn Berries','http://www1.clikpic.com/carmenwinch/images/Berries_thumb.jpg',130, 104,0, 0,'Bunch of Vari-coloured autumn berries with abstract background','15/01/08','Carmen Winch','Rye','','Sprig of berries in various stages of autumn coloration');
photos[39] = new photo(1766929,'118729','Bee with Balsam 2','gallery','http://www1.clikpic.com/carmenwinch/images/Bee & Balsam 31.jpg',500,409,'Bee with Pink Common Balsam','http://www1.clikpic.com/carmenwinch/images/Bee & Balsam 31_thumb.jpg',130, 106,1, 0,'Close-up of Bee approaching Balsam Flower','15/01/08','Carmen Winch','Rye, Sussex','','Bee flying and taking Nectar from Common Balsam');
photos[40] = new photo(1767045,'118729','Wisteria Pastel Shades','gallery','http://www1.clikpic.com/carmenwinch/images/wisteria.jpg',600,402,'Wisteria Pastels','http://www1.clikpic.com/carmenwinch/images/wisteria_thumb.jpg',130, 87,1, 0,'Landscape picture of Westeria Flowers in pastel shades sunlit from behind','15/01/08','Carmen Winch','Westfield, Sussex','','Landscape picture of Westeria Flowers in pastel shades sunlit from behind');
photos[41] = new photo(1782840,'118729','','gallery','http://www1.clikpic.com/carmenwinch/images/bullrush.jpg',180,269,'Bullrush','http://www1.clikpic.com/carmenwinch/images/bullrush_thumb.jpg',130, 194,1, 0,'Bullrush Abstract','22/01/08','Carmen Winch','Rye, Sussex','','Picture of Bullrush, Plant, Riverbank, River, Marsh, Flower, Plant');
photos[42] = new photo(1766951,'118729','Bee Hanging from Balsam','gallery','http://www1.clikpic.com/carmenwinch/images/Bee & Marsh Balsam Flower.jpg',350,592,'Nectar','http://www1.clikpic.com/carmenwinch/images/Bee & Marsh Balsam Flower_thumb.jpg',130, 220,1, 0,'Bee with Pink Balsam','15/01/08','Carmen Winch','Rye, Sussex','','Bee hanging from Balsam');
photos[43] = new photo(1767019,'118729','Foxglove','gallery','http://www1.clikpic.com/carmenwinch/images/foxglove.jpg',200,546,'Foxglove','http://www1.clikpic.com/carmenwinch/images/foxglove_thumb.jpg',130, 355,1, 0,'Up shot of Garden Foxglove Digitalis Flower with pink and purple petals/flowers showing upward perspective','15/01/08','Carmen Winch','Westfield, Sussex','','Foxglove ');
photos[44] = new photo(1767154,'118729','Poppies in Field','gallery','http://www1.clikpic.com/carmenwinch/images/Poppy.jpg',500,357,'Poppies','http://www1.clikpic.com/carmenwinch/images/Poppy_thumb.jpg',130, 93,1, 0,'Close up of several Deep Pink/Red Poppies in Field with abstract grass background','15/01/08','Carmen Winch','Leicestershire','','Several Close-up Poppies in Field with abstract green scrub background');
photos[45] = new photo(1782862,'119880','Liverpool','gallery','http://www1.clikpic.com/carmenwinch/images/Mersey & Liver Buildings.gif',120,175,'Mersey River and Liver Buildings','http://www1.clikpic.com/carmenwinch/images/Mersey & Liver Buildings_thumb.gif',130, 190,0, 0,'Mersey River and Liver Buildings - solarized abstract','22/01/08','Carmen Winch','Mersey River, Liverpool, UK','','Solarized picture of Liver buildings backdrop to Mersey River, UK');
photos[46] = new photo(1767060,'119069','Solarized Dandelion','gallery','http://www1.clikpic.com/carmenwinch/images/Solarized Dandelion_edited-1.jpg',500,385,'Dandelion Abstract','http://www1.clikpic.com/carmenwinch/images/Solarized Dandelion_edited-1_thumb.jpg',130, 100,1, 0,'Solarized','15/01/08','Carmen Winch','Sussex','','Dandelion Seeds Clock Flower Solarized Abstract Sunlit Backlit Plant Horticulture Garden');
photos[47] = new photo(1767052,'119069','Moonlight','gallery','http://www1.clikpic.com/carmenwinch/images/Stalk in Moonlight Sepia.jpg',550,399,'Moon Plant','http://www1.clikpic.com/carmenwinch/images/Stalk in Moonlight Sepia_thumb.jpg',130, 94,1, 0,'Abstract','15/01/08','Carmen Winch','Sussex','','Branch & Leaves in Moonlight');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(118751,'1767011','Moonlight','gallery');
galleries[1] = new gallery(118756,'1782854,1767183,1767176,1767171,1767148,1767142,1767139','Sunset','gallery');
galleries[2] = new gallery(118769,'1767364,1767362,1767355,1767137,1767133,1767128,1767124,1767121,1767118','African Animals','gallery');
galleries[3] = new gallery(118776,'1782857,1767328,1767323,1767312,1767310,1767254,1767244,1767239,1767231','Transport and Movement','gallery');
galleries[4] = new gallery(118794,'1806150,1782848,1767359','Animals','gallery');
galleries[5] = new gallery(118777,'1958595,1767298,1767259','Birds','gallery');
galleries[6] = new gallery(118778,'1798726,1782855,1782830,1767317','The Sea','gallery');
galleries[7] = new gallery(118729,'1798723,1782840,1767154,1767045,1767019,1766964,1766951,1766939,1766929','Flowers','gallery');
galleries[8] = new gallery(119880,'1782862','Places in the World','gallery');
galleries[9] = new gallery(119069,'1767060,1767052','Abstract','gallery');


