/***************************************************************************
* 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('685577');
	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('685577');
	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 = 'landscape photographs: ' + 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(688696,'52385','The Major Oak','gallery','http://www1.clikpic.com/JimNicholson/images/Major_Oak_Sherwood.jpg',400,264,'The Major Oak','http://www1.clikpic.com/JimNicholson/images/Major_Oak_Sherwood_thumb.jpg',130, 86,0, 0,'At the heart of Sherwood Forest near the Nottinghamshire village of Edwinstowe proudly stands the ancient oak tree known as \"The Major Oak\". It is in an area, even today rich in old native deciduous trees, perhaps highlighted by the ancient oaks of which none surpass this majestic tree. Set in an area famous for the legendary tales of Robin Hood.<br>\r\n<br>\r\n<strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>Nature Pictures</em>','15/05/06','Jim Nicholson','The Major Oak, Edwinstowe, Nottinghamshire, England','','');
photos[1] = new photo(686263,'52385','3 frogs in March','gallery','http://www1.clikpic.com/JimNicholson/images/3_frogs_in_March.jpg',400,326,'3 frogs in March','http://www1.clikpic.com/JimNicholson/images/3_frogs_in_March_thumb.jpg',130, 106,0, 0,'Three Frogs in March. At the frenzied height of the spawning season a second male frog mounts the female. Clumber Lake in Nottinghamshire, England  <br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>Nature pictures</em>','15/03/06','Jim Nicholson','Clumber Park, Nottinghamshire, England','','');
photos[2] = new photo(686226,'52385','trapped','gallery','http://www1.clikpic.com/JimNicholson/images/trapped.jpg',400,307,'trapped','http://www1.clikpic.com/JimNicholson/images/trapped_thumb.jpg',130, 100,0, 0,'Rich pickings for the spider that spun this web! Greenfly and other insects were caught in this deadly trap which was stategically placed on a small bridge across a stream dividing arable fields of Nottinghamshire, England.<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>Nature pictures</em>','','Jim Nicholson','Nottinghamshire, England','','');
photos[3] = new photo(685615,'52385','dandelion sunset ','gallery','http://www1.clikpic.com/JimNicholson/images/dandelion_sunset.jpg',400,281,'dandelion sunset','http://www1.clikpic.com/JimNicholson/images/dandelion_sunset_thumb.jpg',130, 91,0, 1,'Set against the May sunset, the seed head of a dandelion. The seeds on natures \"parachutes\" wait for the gentle breeze at this high point in the Nottinghamshire countryside. Propagation, the wonder and the continuity of the natural world, mirrored in this simple scene.  <br>\r\n<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>Nature pictures</em>','10/05/06','Jim Nicholson','Newark, Notts, England','','');
photos[4] = new photo(686190,'52380','Clumber Park in November','gallery','http://www1.clikpic.com/JimNicholson/images/Clumber_Park_in_November.jpg',400,288,'Clumber Park in November','http://www1.clikpic.com/JimNicholson/images/Clumber_Park_in_November_thumb.jpg',130, 94,0, 0,'The estate of Clumber Park formed part of Sherwood Forest upto 1707 when a licence was granted to the Duke of Newcastle to enclose the area as a hunting park for Queen Anne. Successive dukes developed Clumber until it was acquired by the National Trust in 1946 for the enjoyment of us all. With nearly 4000 acres of parkland to explore, Clumber is now one of the most visited country parks in Britain. In this photograph the view is towards Clumber Chapel on a November day.<br>\r\n<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>Landscape photographs</em>','15/11/06','Jim Nicholson','Clumber Park, Nottinghamshire, England','','');
photos[5] = new photo(686181,'52380','snow in Clumber Park','gallery','http://www1.clikpic.com/JimNicholson/images/Snow_in_Clumber_Park.jpg',400,258,'snow in Clumber Park','http://www1.clikpic.com/JimNicholson/images/Snow_in_Clumber_Park_thumb.jpg',130, 84,0, 0,'The estate of Clumber Park in Nottinghamshire formed part of Sherwood Forest upto 1707 when a licence was granted to the Duke of Newcastle to enclose the area as a hunting park for Queen Anne. Successive dukes developed Clumber until it was acquired by the National Trust in 1946 for the enjoyment of us all. With nearly 4000 acres of parkland to explore, Clumber is now one of the most visited country parks in Britain. This picture captures the wide open spaces after a snowfall on a winters day.<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>Landscape photographs</em>','','Jim Nicholson','Clumber Park, Nottinghamshire, England','','');
photos[6] = new photo(686262,'52380','A1(M) at Ferrybridge','gallery','http://www1.clikpic.com/JimNicholson/images/A1(M)_at_Ferrybridge.jpg',400,311,'A1(M) at Ferrybridge','http://www1.clikpic.com/JimNicholson/images/A1(M)_at_Ferrybridge_thumb.jpg',130, 101,0, 0,'Travelling North on the A1(M) where the road ahead passes close to Ferrybridge Power Station and approaching the M62 junction for Manchester and Leeds. The need of both transport and electical power today but at what cost to our environment in pollution and CO2 emissions for our world tomorrow.<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>Landscape photographs</em>','','Jim Nicholson','Northbound on A1(M) approaching M62 junction, England','','');
photos[7] = new photo(685557,'52380','Rainbow','gallery','http://www1.clikpic.com/JimNicholson/images/rainbow.jpg',400,205,'Rainbow','http://www1.clikpic.com/JimNicholson/images/rainbow_thumb.jpg',130, 67,0, 1,'Mickleton, Teesdale in County Durham, the country lane leading into the spectacular rainbow. The vivid lighting highlighting the fields and hills of this beautiful countryside close to the River Tees in the Pennine Hills.<br>\r\n<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>Landscape photographs</em>','','Jim Nicholson','Mickleton, Teesdale, Co Durham, England,','','');
photos[8] = new photo(691074,'52384','Osprey alert and waiting','gallery','http://www1.clikpic.com/JimNicholson/images/osprey_alert_and_waiting.jpg',400,317,'Osprey alert and waiting','http://www1.clikpic.com/JimNicholson/images/osprey_alert_and_waiting_thumb.jpg',130, 103,0, 0,'An osprey <em>Pandion haliaetus</em> alert and watching the very slow flowing waters of the Everglades National Park, Florida. A bird of prey which lives entirely on a food diet of fish, here it is ready to swoop into the waters below to make its catch.<br>\r\n<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>pictures of birds</em>','','Jim Nicholson','Everglades National Park, Florida, America','','');
photos[9] = new photo(691677,'52384','White peacock Busch Gardens','gallery','http://www1.clikpic.com/JimNicholson/images/white_peacock_Busch_Gardens.jpg',400,283,'White peacock Busch Gardens','http://www1.clikpic.com/JimNicholson/images/white_peacock_Busch_Gardens_thumb.jpg',130, 92,0, 0,'A beautiful white peacock proudly displays his spectacular tail feathers at Busch Gardens in Tampa. Florida, America. The peacock is just one of more than 2700 animals representing over 320 species of mammals, birds, reptiles, amphibians and spiders in this major, multi-faceted family theme park attraction,- the largest on the west coast of Florida, and just over an hours travelling time from Orlando.<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>pictures of birds</em>','','Jim Nicholson','Busch Gardens, Tampa. Florida, America.','','');
photos[10] = new photo(685607,'52384','Puffin on Farne Islands','gallery','http://www1.clikpic.com/JimNicholson/images/puffin_on_Farne_Islands.jpg',400,398,'Puffin on Farne Islands','http://www1.clikpic.com/JimNicholson/images/puffin_on_Farne_Islands_thumb.jpg',130, 129,0, 1,'Puffin (Fratercula arctica) on the Farne Islands off the Northumerland coastline in Spring Bank Holiday. This stocky seabird with a large head and large strongly compressed red and yellow striped bill comes onto these islands to breed, where it nests in burrows in dense colonies. It feeds on the sandeels. <br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>pictures of birds</em>','01/06/06','Jim Nicholson','Farne Islands','','');
photos[11] = new photo(686502,'52480','Lincoln Cathedral','gallery','http://www1.clikpic.com/JimNicholson/images/Lincoln_Cathedral.jpg',400,258,'Lincoln Cathedral','http://www1.clikpic.com/JimNicholson/images/Lincoln_Cathedral_thumb.jpg',130, 84,0, 0,'Taken from the Castle walls this scene encaptures the beautiful historic Cathedral and some of the old part of the City of Lincoln, a city dating back to Roman times.<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>pictures of towns</em>','15/04/06','','Lincoln','','');
photos[12] = new photo(685914,'52480','Wedding in Cusco','gallery','http://www1.clikpic.com/JimNicholson/images/wedding_in_Cusco.jpg',400,331,'Wedding in Cusco','http://www1.clikpic.com/JimNicholson/images/wedding_in_Cusco_thumb.jpg',130, 108,0, 1,'The lovely historic city of Cusco is enclosed between the high hills of the Andes Mountains in Peru. Built by the Spanish on the remains of the temples and palaces of Inca civilisation, today Cusco is a very welcoming and relatively unspoilt place. The population of 300,000 are mostly native Quechua Indians and there is a wealth of traditional culture. The picturesque scene is here enriched by the beautiful bride on her wedding day.<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>photographs of towns</em>','','Jim Nicholson','Cusco, Peru, South America','','');
photos[13] = new photo(686164,'52480','rainbow over Middleton','gallery','http://www1.clikpic.com/JimNicholson/images/Rainbow_over_Middleton.jpg',400,300,'rainbow over Middleton','http://www1.clikpic.com/JimNicholson/images/Rainbow_over_Middleton_thumb.jpg',130, 98,0, 0,'Set in the High Pennine Hills of Co Durham, Middleton-in-Teesdale is a beautiful village / town of stone built traditional properties. A centre for walkers and hikers as it is skirted by the Pennine Way. The pictureque scene in this photo is supplemented by natures spectacular lighting display - a remarkable rainbow which lasted for some two hours in its full splendour.<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','Jim Nicholson','Middleton-in-Teesdale, Co Durham, England','','');
photos[14] = new photo(691056,'52480','Market day in Retford','gallery','http://www1.clikpic.com/JimNicholson/images/market_day_in_Retford.jpg',400,298,'Market day in Retford','http://www1.clikpic.com/JimNicholson/images/market_day_in_Retford_thumb.jpg',130, 97,0, 0,'A traditional market is held each Thursday and Saturday, with a flea market on Fridays in the historic Nottinghamshire market town of East Retford. Here shoppers leisurely amble through the fruit and other colourful market stalls.<br>\r\n<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>photographs of towns</em>','','Jim Nicholson','East Retford, Nottinghamshire, England','','');
photos[15] = new photo(691090,'52480','','gallery','http://www1.clikpic.com/JimNicholson/images/Florence.jpg',400,260,'Florence','http://www1.clikpic.com/JimNicholson/images/Florence_thumb.jpg',130, 85,0, 0,'The River Arno in Florence, Tuscany,Italy  looking towards the beautiful \"old bridge\" vibrant with its shops, Florence,- A bustling City known as the cradle of the Renaissance. The City of Michelangelo \'s David, and Batticelli \'s Birth of Venus. A city where the Italian language was formalised and its literature born under the poet Dante. Where a teenage Michelangelo used a hammer and chisel, and where Galileo was protected from the Inquisition. A wonderful City to visit or stay awash with history and numerous sites of interest.<br>\r\n<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong><br>\r\n<br>\r\n<br>\r\n<em>photographs of towns</em>','','Jim Nicholson','Florence, Tuscany, Italy','','');
photos[16] = new photo(691122,'52480','','gallery','http://www1.clikpic.com/JimNicholson/images/relaxing_in_Miami-.jpg',400,272,'relaxing in Miami as sailboat passes','http://www1.clikpic.com/JimNicholson/images/relaxing_in_Miami-_thumb.jpg',130, 88,0, 0,'</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','','','','');
photos[17] = new photo(686269,'52457','','gallery','http://www1.clikpic.com/JimNicholson/images/Italian_Coast_at_viareggio.jpg',400,265,'Enjoying the Italian scenery','http://www1.clikpic.com/JimNicholson/images/Italian_Coast_at_viareggio_thumb.jpg',130, 86,0, 1,'</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','','','','');
photos[18] = new photo(691444,'52457','','gallery','http://www1.clikpic.com/JimNicholson/images/Paphos.jpg',400,307,'Through the boats at Paphos harbour','http://www1.clikpic.com/JimNicholson/images/Paphos_thumb.jpg',130, 100,0, 0,'</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','','','','');
photos[19] = new photo(691483,'52457','','gallery','http://www1.clikpic.com/JimNicholson/images/Mount_Olympos.jpg',400,270,'Mount Olympos, Trodos Mountains, Cyprus','http://www1.clikpic.com/JimNicholson/images/Mount_Olympos_thumb.jpg',130, 88,0, 0,'</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','','','','');
photos[20] = new photo(691494,'52457','','gallery','http://www1.clikpic.com/JimNicholson/images/Mid_day_on_Main_Street.jpg',400,267,'Main Street, Magic Kingdom, Disneyland, Florida','http://www1.clikpic.com/JimNicholson/images/Mid_day_on_Main_Street_thumb.jpg',130, 87,0, 0,'</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','','','','');
photos[21] = new photo(691497,'52457','','gallery','http://www1.clikpic.com/JimNicholson/images/dragon.jpg',400,267,'dragon at Downtown Disney','http://www1.clikpic.com/JimNicholson/images/dragon_thumb.jpg',130, 87,0, 0,'</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','','','','');
photos[22] = new photo(685577,'52457','','gallery','http://www1.clikpic.com/JimNicholson/images/Machu_Picchu.jpg',400,346,'Machu Picchu, spectacular Inca settlement high in the Andes of Peru, South America','http://www1.clikpic.com/JimNicholson/images/Machu_Picchu_thumb.jpg',130, 112,1, 0,'</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','','','','');
photos[23] = new photo(684831,'52213','AndeanLady','gallery','http://www1.clikpic.com/JimNicholson/images/AndeanLady.jpg',400,300,'Peruvian lady of the High Andees at Cusco.','http://www1.clikpic.com/JimNicholson/images/AndeanLady_thumb.jpg',130, 98,0, 1,'An old Lady of the High Andes at Cusco, Peru. The population of 300,000 are mostly native Quechua Indians and there is a wealth of traditional culture. A welcoming and hospitable people of charm and charachter, reflected in the face of the Peruvian lady. A kindly face of hardship and toil.<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','15/11/06','Jim Nicholson','Cusco,Peru,South America','','');
photos[24] = new photo(720848,'52213','Girl on Floating Lake','gallery','http://www1.clikpic.com/JimNicholson/images/Girl on Floating Lake.jpg',400,335,'Girl on Floating Lake','http://www1.clikpic.com/JimNicholson/images/Girl on Floating Lake_thumb.jpg',130, 109,0, 0,'The man made Uros Islands on Lake Titica, Peru, are inhabited by a few hundred Uros Indians,- a mixture of the original Uros and the larger Aymara tribe. Their islands are made from layer upon layer of tortora reeds,the dominant plant in the shallows of the Lake,which is a source of food, and building material for roofing, walling and fishing rafts. The picture of a pretty girl of this welcoming and hospitable people.<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','Jim Nicholson','Uros Islands, Lake Titicaca, Peru, South America','','');
photos[25] = new photo(691720,'52213','','gallery','http://www1.clikpic.com/JimNicholson/images/Peruvian_ladies_ with_lama.jpg',400,335,'ladies with lama in Cusco, Peru','http://www1.clikpic.com/JimNicholson/images/Peruvian_ladies_ with_lama_thumb.jpg',130, 109,0, 0,'</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','','','','');
photos[26] = new photo(691687,'52213','','gallery','http://www1.clikpic.com/JimNicholson/images/Samburu_tribesman.jpg',400,543,'Samburu tribesma, Kenya','http://www1.clikpic.com/JimNicholson/images/Samburu_tribesman_thumb.jpg',130, 176,0, 0,'</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','','','','');
photos[27] = new photo(691487,'52379','Orca - Killer Whale','gallery','http://www1.clikpic.com/JimNicholson/images/Orca_killer_whale.jpg',400,265,'Orca Killer Whale','http://www1.clikpic.com/JimNicholson/images/Orca_killer_whale_thumb.jpg',130, 86,0, 0,'At the Shamu stadium in Seaworld Adventure Park, Orlando, Florida, a killer whale jumps. The Orcas and their trainers engage in spectacular stunts. These huge majestic whales put on 2 shows,- the Shamu Adventure during the day, and Shamu Rocks America at night. It is an unforgetable experience and wonderful entertainment.<br>\r\n<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','Jim Nicholson','Shamu stadium, Seaworld Adventure Park, Orlando, Florida, America','','');
photos[28] = new photo(691495,'52379','','gallery','http://www1.clikpic.com/JimNicholson/images/rhodesian_ridgeback.jpg',400,333,'Rhodesian Ridgeback dog','http://www1.clikpic.com/JimNicholson/images/rhodesian_ridgeback_thumb.jpg',130, 108,0, 0,'</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','','','','');
photos[29] = new photo(691656,'52379','tiger','gallery','http://www1.clikpic.com/JimNicholson/images/tiger.jpg',400,260,'tiger','http://www1.clikpic.com/JimNicholson/images/tiger_thumb.jpg',130, 85,0, 0,'One of the spectacular rare white Bengal tigers at Busch Gardens in Tampa. Florida, America. The white tiger relaxes at its home in this major, multi-faceted family theme park attraction, the largest on the west coast of Florida, and just over an hours travelling time from Orlando.<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','Jim Nicholson','Tampa, Florida, America','','');
photos[30] = new photo(684875,'52379','SealPup','gallery','http://www1.clikpic.com/JimNicholson/images/sealpup.jpg',400,271,'sealpup','http://www1.clikpic.com/JimNicholson/images/sealpup_thumb.jpg',130, 88,0, 1,'A grey seal pup, (or Atlantic seal), on the Lincolnshire Wildlife Trust Nature Reserve at Donna Nook, Lincolnshire. The total British population of grey seals is of major international conservation importance, making up around 50% of the world population. The majority of the pups at Donna Nook are born on the edge of the sand dunes and the pups appear in late October, with the beaches mainly empty by the new year.<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','01/11/06','Jim Nicholson','Donna Nook,Lincolnshire,England','','');
photos[31] = new photo(686255,'52469','','gallery','http://www1.clikpic.com/JimNicholson/images/chicken_and_egg_situation.jpg',400,275,'chicken and egg situation','http://www1.clikpic.com/JimNicholson/images/chicken_and_egg_situation_thumb.jpg',130, 89,0, 0,'</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','','','','');
photos[32] = new photo(691094,'52469','','gallery','http://www1.clikpic.com/JimNicholson/images/trolley_man.jpg',400,267,'Man collecting shopping trolleys in rain','http://www1.clikpic.com/JimNicholson/images/trolley_man_thumb.jpg',130, 87,0, 0,'</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','','','','');
photos[33] = new photo(691501,'52469','','gallery','http://www1.clikpic.com/JimNicholson/images/TVR.jpg',400,287,'TVR sports car','http://www1.clikpic.com/JimNicholson/images/TVR_thumb.jpg',130, 93,0, 0,'</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','','','','');
photos[34] = new photo(720980,'52469','colourful brushes of Latin America','gallery','http://www1.clikpic.com/JimNicholson/images/colourful brushes of Latin America.jpg',400,300,'colourful brushes of Latin America','http://www1.clikpic.com/JimNicholson/images/colourful brushes of Latin America_thumb.jpg',130, 98,0, 1,'Leaning against the brightly painted blue wall, near Lima, Peru, these brushes have been left by Christian, the young man responsible for the cleaning, the brushing and the sweeping. I saw a colourful picture representing the vibrancy which is Latin America. Christian saw his tools of work during the day, before he starts his study time at home. His young and industrious life stated in his ambition to go to North America.<br>\r\n<br>\r\n</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','Jim Nicholson','South America, Peru, Lima','','');
photos[35] = new photo(685727,'52469','','gallery','http://www1.clikpic.com/JimNicholson/images/victorian_dolls.jpg',400,300,'portrait of two Victorian dolls in windsor chair','http://www1.clikpic.com/JimNicholson/images/victorian_dolls_thumb.jpg',130, 98,0, 0,'</strong<strong><a href=\"http://www.alamy.com/stock-photography/E07EB64F-4A24-49CF-B1A7-BFFCFDF7BD9F/Jim+Nicholson - www.photosof.eu.html\">Stock photography by Jim Nicholson -www.photosof.eu at Alamy</a></strong> <strong>To purchase any picture follow this link, or proceed to the \"contact us\" page requesting information.</strong>','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(52385,'685615','Nature','gallery');
galleries[1] = new gallery(52380,'685557','Landscapes','gallery');
galleries[2] = new gallery(52384,'685607','Birds','gallery');
galleries[3] = new gallery(52480,'685914','Towns & Cities','gallery');
galleries[4] = new gallery(52457,'686269','Travel','gallery');
galleries[5] = new gallery(52213,'684831','People','gallery');
galleries[6] = new gallery(52379,'684875','Animals','gallery');
galleries[7] = new gallery(52469,'720980','miscellaneous','gallery');

