/***************************************************************************
* 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('3407856,3407757,3407738,3407712,3407679,2511442,2511392,1982673,1854859,1854836,1850712,1850615,1849879,1849874,1358153,911510,908976,908975,908966');
	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('3407856,3407757,3407738,3407712,3407679,2511442,2511392,1982673,1854859,1854836,1850712,1850615,1849879,1849874,1358153,911510,908976,908975,908966');
	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) || (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 = 'alston photography : ' + photos[nextImg].caption;
										/* apply 'blank' classname to element where */			if ( photos[nextImg].caption == '') {
				document.getElementById('imageTitle').style.className = 'blank';
			}
			else {
				document.getElementById('imageTitle').style.className = 'normal';
			}
						temp = '';
			if (photos[nextImg].description != '') {
				temp = temp +  '<p id="imageDescription">' + photos[nextImg].description + '</p>';
			}
						if (photos[nextImg].photo_ref != '') {
				temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + photos[nextImg].photo_ref + '</p>';
			}
						if (photos[nextImg].takendate != '') {
				debug('Resetting taken date');
				temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + photos[nextImg].takendate + '</p>';
			}
			
			if (photos[nextImg].location != '') {
				debug('Resetting location');
				temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  photos[nextImg].location + '</p>';
			}
			
			if (photos[nextImg].photographer != '') {
				debug('Resetting photographer');
				temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + photos[nextImg].photographer + '</p>';
			}
			if (temp != '') {				temp = temp + '<div class="spacer"></div>';			}					if (temp == '') {
			document.getElementById('imageDetails').style.display = 'none';
		}
		else {
			document.getElementById('imageDetails').style.display = 'block';
		}
		document.getElementById('imageDetails').innerHTML =temp;	
		
	}
	else {
		debug('Redirecting to id ' + photos[nextImg].id);
		window.location = 'photo_' + photos[nextImg].id + '.html';
	}
}

/***************************************************************************
* Show the previous image for a gallery. field = hidden field containing   *
* image_id                                                                 *
*  img = reference to image object in which to show image                  *
***************************************************************************/
function previous(field,img) {


	imageID = field.value;
	for (j = 0; j < photos.length; j++) {
		if (photos[j].id == imageID) {
			break;
		}
	}
	debug('image is ' + j);
	nextImg = -1;
	k = j -1;
	while (nextImg < 0) {
		for (; k >= 0; k--) {
			if (photos[k].galleries_id == photos[j].galleries_id) {
				nextImg = k;
				break;
			}
		}
		if (nextImg == -1) {
			k = photos.length -1;
		}
	}
	if (nextImg != -1) {
		updateImage(nextImg, field,img);	
	}
}

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.
        *
* Gallery_id = id of gallery to choose                                     *
* 
 img = reference to html image                                       *
* in which to show image                                                   *
***************************************************************************/
function showGalleryImage(gallery_id, img) {
	debug('Gallery = ' + gallery_id);
	for (i = 0; i < galleries.length; i++) {
		if (galleries[i].id == gallery_id) {
			imageID = randomListVal(galleries[i].featured_images);
				for (j = 0; j < photos.length; j++) {
					if (photos[j].id == imageID) {
						
						img.src = photos[j].thumbnail;
						img.width = photos[j].thumbnail_width;
						img.height = photos[j].thumbnail_height;
						
						break;
					}
				}
			break;
		}
	} 
	}

/***************************************************************************
* If we have dynamic HTML                                                  *
*  replace the galleries link with a list that                             *
* doesn't include the current gallery                                      *
***************************************************************************/
function showGalleries(gallery_id) {
	debug('Showing links for gallery ' + gallery_id);
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
			debug('Testing gallery ' + galleries[i].id);
			
			if (galleries[i].id != gallery_id) {
				debug('Adding link');
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="gallery_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}
/***************************************************************************
* Create the array of Photo objects                                        *
***************************************************************************/
photos = new Array();
photos[0] = new photo(3407757,'69310','','gallery','http://www3.clikpic.com/bev/images/grouse on wall web.jpg',600,400,'','http://www3.clikpic.com/bev/images/grouse on wall web_thumb.jpg',130, 87,1, 0,'Red Grouse','03/02/09','Beverley Ridley','Near Garrigill','','');
photos[1] = new photo(1849874,'69310','Red Grouse Female','gallery','http://www3.clikpic.com/bev/images/grouse3hen.jpg',510,480,'Red Grouse Hen','http://www3.clikpic.com/bev/images/grouse3hen_thumb.jpg',130, 122,1, 1,'Red Grouse','13/02/08','Beverley Ridley','Garrigill','','');
photos[2] = new photo(1850615,'69310','','gallery','http://www3.clikpic.com/bev/images/red grouse cock.jpg',600,423,'','http://www3.clikpic.com/bev/images/red grouse cock_thumb.jpg',130, 92,1, 1,'Red Grouse (male)','13/02/08','Beverley Ridley','Garrigill','','');
photos[3] = new photo(1854836,'69310','','gallery','http://www3.clikpic.com/bev/images/grouse cock.jpg',567,480,'Red Grouse Cock','http://www3.clikpic.com/bev/images/grouse cock_thumb.jpg',130, 110,1, 1,'Red Grouse Cock High in the North Pennines near Garrigill','13/02/08','Beverley Ridley','Garrigill','','');
photos[4] = new photo(1314256,'69406','','gallery','http://www3.clikpic.com/bev/images/grouse shooters1web.jpg',600,450,'Grouse shooting on the moors near Garrigill','http://www3.clikpic.com/bev/images/grouse shooters1web_thumb.jpg',130, 98,0, 0,'Grouse shooters on Yadmoss grouse moor near Garrigill','25/08/07','Beverley Ridley','Yadmoss, Near Garrigill','','');
photos[5] = new photo(1314274,'69406','','gallery','http://www3.clikpic.com/bev/images/grouse shooters5.jpg',279,240,'','http://www3.clikpic.com/bev/images/grouse shooters5_thumb.jpg',130, 112,0, 0,'Grouse shooters enjoying lunch on the moor','25/08/07','Beverley Ridley','Yadmoss near Garrigill','','');
photos[6] = new photo(1314328,'69406','','gallery','http://www3.clikpic.com/bev/images/shooting party.jpg',600,450,'','http://www3.clikpic.com/bev/images/shooting party_thumb.jpg',130, 98,0, 0,'','25/08/07','Beverley Ridley','Yadmoss Near Garrigill','','');
photos[7] = new photo(1314306,'69406','','gallery','http://www3.clikpic.com/bev/images/DSCF4166 1.jpg',272,240,'Cumberland and Westmorland Wrestling','http://www3.clikpic.com/bev/images/DSCF4166 1_thumb.jpg',130, 115,0, 0,'Cumberland and Westmorland wrestlers in traditional costume at Dalemain','13/05/07','Beverley Ridley','Dalemain','','');
photos[8] = new photo(1314322,'69406','','gallery','http://www3.clikpic.com/bev/images/DSCF4194 1.jpg',320,177,'','http://www3.clikpic.com/bev/images/DSCF4194 1_thumb.jpg',130, 72,0, 0,'','13/05/07','Beverley Ridley','Dalemain','','');
photos[9] = new photo(908975,'69310','','gallery','http://www3.clikpic.com/bev/images/swans head 2.jpg',500,442,'','http://www3.clikpic.com/bev/images/swans head 2_thumb.jpg',130, 115,1, 1,'swans head','03/04/07','Beverley Ridley','Cleethorpes','','');
photos[10] = new photo(908355,'69310','','gallery','http://www3.clikpic.com/bev/images/gulls on windermere.jpg',500,375,'','http://www3.clikpic.com/bev/images/gulls on windermere_thumb.jpg',130, 98,0, 0,'Gulls at Winderemere','','Beverley Ridley','Windermere','','');
photos[11] = new photo(908363,'69310','','gallery','http://www3.clikpic.com/bev/images/bumble bee.jpg',500,375,'','http://www3.clikpic.com/bev/images/bumble bee_thumb.jpg',130, 98,0, 0,'','','Beverley Ridley','Alston','','');
photos[12] = new photo(908587,'69318','','gallery','http://www3.clikpic.com/bev/images/edited ewes on the road.jpg',500,251,'','http://www3.clikpic.com/bev/images/edited ewes on the road_thumb.jpg',130, 65,0, 0,'','','Beverley Ridley','Meadow Flatt Farm, Near Alston','','');
photos[13] = new photo(908661,'69318','','gallery','http://www3.clikpic.com/bev/images/cheviot ewes.jpg',500,375,'','http://www3.clikpic.com/bev/images/cheviot ewes_thumb.jpg',130, 98,0, 1,'cheviot ewes at Alwinton show','','Beverley Ridley','Alwinton','','');
photos[14] = new photo(908966,'69310','','gallery','http://www3.clikpic.com/bev/images/black grouse web.jpg',600,386,'','http://www3.clikpic.com/bev/images/black grouse web_thumb.jpg',130, 84,1, 0,'Black grouse','','Beverley Ridley','Yadmoss Near Garrigill','','');
photos[15] = new photo(908976,'69310','','gallery','http://www3.clikpic.com/bev/images/grey hen1.jpg',600,424,'','http://www3.clikpic.com/bev/images/grey hen1_thumb.jpg',130, 92,1, 0,'Grey hen (female black grouse)','','Beverley Ridley','','','');
photos[16] = new photo(911032,'69318','','gallery','http://www3.clikpic.com/bev/images/alwinton show1.jpg',500,205,'','http://www3.clikpic.com/bev/images/alwinton show1_thumb.jpg',130, 53,0, 0,'showing sheep at Alwinton Show','','Beverley Ridley','Alwinton','','');
photos[17] = new photo(911035,'69310','','gallery','http://www3.clikpic.com/bev/images/blackgrouse2.jpg',500,361,'','http://www3.clikpic.com/bev/images/blackgrouse2_thumb.jpg',130, 94,0, 0,'Black Grouse (Tetrao Tetrix)','','Beverley Ridley','Moors near Garrigill','','');
photos[18] = new photo(911037,'69318','','gallery','http://www3.clikpic.com/bev/images/footrotting swaledale.jpg',500,434,'','http://www3.clikpic.com/bev/images/footrotting swaledale_thumb.jpg',130, 113,0, 0,'','','Beverley Ridley','Meadow Flatt Farm, Near Alston','','');
photos[19] = new photo(911041,'69406','','gallery','http://www3.clikpic.com/bev/images/glorious12th.jpg',500,375,'','http://www3.clikpic.com/bev/images/glorious12th_thumb.jpg',130, 98,0, 0,'Grouse Shooting on the glorious 12th','','Beverley Ridley','Moors near Garrigill','','');
photos[20] = new photo(911042,'69318','','gallery','http://www3.clikpic.com/bev/images/highland cow.jpg',500,375,'','http://www3.clikpic.com/bev/images/highland cow_thumb.jpg',130, 98,0, 0,'','','Beverley Ridley','Scotland','','');
photos[21] = new photo(911045,'69406','','gallery','http://www3.clikpic.com/bev/images/jumpinglogs.jpg',500,447,'','http://www3.clikpic.com/bev/images/jumpinglogs_thumb.jpg',130, 116,0, 0,'Jackie Thompson riding \"Dipped in Silver\"','','Beverley Ridley','Bywell','','');
photos[22] = new photo(911046,'69318','','gallery','http://www3.clikpic.com/bev/images/lambs.jpg',500,312,'','http://www3.clikpic.com/bev/images/lambs_thumb.jpg',130, 81,0, 0,'','','Beverley Ridley','Middleton in Teesdale','','');
photos[23] = new photo(911047,'69310','','gallery','http://www3.clikpic.com/bev/images/littlegill squirrel.jpg',500,446,'','http://www3.clikpic.com/bev/images/littlegill squirrel_thumb.jpg',130, 116,0, 0,'red squirrel on bird table','','Beverley Ridley','Littlegill near Garrigill','','');
photos[24] = new photo(911048,'69310','','gallery','http://www3.clikpic.com/bev/images/red1.jpg',500,523,'Red Squirrel','http://www3.clikpic.com/bev/images/red1_thumb.jpg',130, 136,0, 0,'red squirrel','','Beverley Ridley','Near Alston','','');
photos[25] = new photo(911049,'69310','','gallery','http://www3.clikpic.com/bev/images/red2.jpg',500,486,'','http://www3.clikpic.com/bev/images/red2_thumb.jpg',130, 126,0, 0,'red squirrel','','Beverley Ridley','Near Alston','','');
photos[26] = new photo(911056,'69406','','gallery','http://www3.clikpic.com/bev/images/scramble.jpg',500,423,'','http://www3.clikpic.com/bev/images/scramble_thumb.jpg',130, 110,0, 0,'Motorbike trials','','Beverley Ridley','Harwood in Teesdale','','');
photos[27] = new photo(911510,'69310','','gallery','http://www3.clikpic.com/bev/images/red squirrel at tree.jpg',500,540,'','http://www3.clikpic.com/bev/images/red squirrel at tree_thumb.jpg',130, 140,1, 1,'Red Squirrel','','Beverley Ridley','Alston','','');
photos[28] = new photo(914094,'69310','','gallery','http://www3.clikpic.com/bev/images/swan2.jpg',500,401,'','http://www3.clikpic.com/bev/images/swan2_thumb.jpg',130, 104,0, 0,'','','Beverley Ridley','Saltcoats','','');
photos[29] = new photo(914100,'69310','','gallery','http://www3.clikpic.com/bev/images/swan1.jpg',500,479,'','http://www3.clikpic.com/bev/images/swan1_thumb.jpg',130, 125,0, 0,'','','','','','');
photos[30] = new photo(914102,'69310','','gallery','http://www3.clikpic.com/bev/images/red21.jpg',500,541,'','http://www3.clikpic.com/bev/images/red21_thumb.jpg',130, 141,0, 0,'','','','','','');
photos[31] = new photo(914205,'69310','','gallery','http://www3.clikpic.com/bev/images/scotland2 119.jpg',500,375,'','http://www3.clikpic.com/bev/images/scotland2 119_thumb.jpg',130, 98,0, 0,'Swans with signets','','Beverley Ridley','Saltcoats, South West Scotland','','');
photos[32] = new photo(1358169,'69406','','gallery','http://www3.clikpic.com/bev/images/grouse web.jpg',600,800,'Grouse shooting in the North Pennines','http://www3.clikpic.com/bev/images/grouse web_thumb.jpg',130, 173,0, 0,'','','','Near Garrigill','','');
photos[33] = new photo(1358175,'69318','','gallery','http://www3.clikpic.com/bev/images/DSCF1167.jpg',320,240,'','http://www3.clikpic.com/bev/images/DSCF1167_thumb.jpg',130, 98,0, 0,'Mr Dodd \"the last horseman\"','','Beverley Ridley','Plankey Mill','','');
photos[34] = new photo(1620140,'69318','','gallery','http://www3.clikpic.com/bev/images/horses ploughing web.jpg',600,450,'','http://www3.clikpic.com/bev/images/horses ploughing web_thumb.jpg',130, 98,0, 0,'horse drawn plough','','Beverley Ridley','Plankey Mill. Northumberland','','');
photos[35] = new photo(1849879,'69310','','gallery','http://www3.clikpic.com/bev/images/IMG_3587.jpg',320,213,'','http://www3.clikpic.com/bev/images/IMG_3587_thumb.jpg',130, 87,1, 1,'Hedgehog','','Beverley Ridley','','','');
photos[36] = new photo(1849883,'69310','','gallery','http://www3.clikpic.com/bev/images/snowdrop.jpg',421,480,'','http://www3.clikpic.com/bev/images/snowdrop_thumb.jpg',130, 148,0, 0,'Snowdrop','','Beverley Ridley','','','');
photos[37] = new photo(1850697,'69310','','gallery','http://www3.clikpic.com/bev/images/oyster catcher.jpg',600,441,'Oyster Catcher','http://www3.clikpic.com/bev/images/oyster catcher_thumb.jpg',130, 96,0, 0,'','','Beverley Ridley','','','');
photos[38] = new photo(1850700,'69310','','gallery','http://www3.clikpic.com/bev/images/DSCF3861 1.jpg',533,480,'','http://www3.clikpic.com/bev/images/DSCF3861 1_thumb.jpg',130, 117,0, 0,'','','Beverley Ridley','','','');
photos[39] = new photo(1854859,'69310','','gallery','http://www3.clikpic.com/bev/images/Buzzard11.jpg',600,426,'','http://www3.clikpic.com/bev/images/Buzzard11_thumb.jpg',130, 92,1, 0,'Buzzard','','Beverley Ridley','Carlisle','','');
photos[40] = new photo(1982673,'69310','','gallery','http://www3.clikpic.com/bev/images/red grouse web.jpg',600,400,'red grouse','http://www3.clikpic.com/bev/images/red grouse web_thumb.jpg',130, 87,1, 1,'','','Beverley Ridley','','','');
photos[41] = new photo(2511392,'69310','','gallery','http://www3.clikpic.com/bev/images/IMG_4331_edited-1.jpg',600,400,'Red Grouse','http://www3.clikpic.com/bev/images/IMG_4331_edited-1_thumb.jpg',130, 87,1, 0,'','','Beverley Ridley','','','');
photos[42] = new photo(2511442,'69310','','gallery','http://www3.clikpic.com/bev/images/red squirrel web.jpg',600,400,'','http://www3.clikpic.com/bev/images/red squirrel web_thumb.jpg',130, 87,1, 1,'Red Squirrel','','Beverley Ridley','','','');
photos[43] = new photo(2511465,'69310','','gallery','http://www3.clikpic.com/bev/images/196_edited-1.jpg',600,400,'','http://www3.clikpic.com/bev/images/196_edited-1_thumb.jpg',130, 87,0, 0,'Black Grouse lekking','','Beverley Ridley','','','');
photos[44] = new photo(2511470,'69310','','gallery','http://www3.clikpic.com/bev/images/196_edited-11.jpg',600,400,'','http://www3.clikpic.com/bev/images/196_edited-11_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[45] = new photo(3407679,'69310','','gallery','http://www3.clikpic.com/bev/images/robin for web.jpg',600,426,'','http://www3.clikpic.com/bev/images/robin for web_thumb.jpg',130, 92,1, 0,'','','Beverley Ridley','Brampton','','');
photos[46] = new photo(3407712,'69310','','gallery','http://www3.clikpic.com/bev/images/pheasant in snow web.jpg',600,538,'','http://www3.clikpic.com/bev/images/pheasant in snow web_thumb.jpg',130, 117,1, 0,'','','Beverley Ridley','Yad Moss near Garrigill','','');
photos[47] = new photo(3407738,'69310','','gallery','http://www3.clikpic.com/bev/images/barn owl web.jpg',600,476,'','http://www3.clikpic.com/bev/images/barn owl web_thumb.jpg',130, 103,1, 0,'Barn Owl','','Beverley Ridley','Near Alston','','');
photos[48] = new photo(3407856,'69310','','gallery','http://admin.clikpic.com/bev/images/black cock web.jpg',600,401,'This photograph was taken at 5 oclock in the morning while it was snowing hence poor light','http://admin.clikpic.com/bev/images/black cock web_thumb.jpg',130, 87,1, 0,'Black Grouse','','Beverley Ridley','Near Garrigill','','');
photos[49] = new photo(1358151,'69289','','gallery','http://www3.clikpic.com/bev/images/harwood.jpg',600,382,'','http://www3.clikpic.com/bev/images/harwood_thumb.jpg',130, 83,0, 0,'Forest in Teesdale','09/09/07','','','','');
photos[50] = new photo(908368,'69289','','gallery','http://www3.clikpic.com/bev/images/derwent water 2.jpg',500,375,'','http://www3.clikpic.com/bev/images/derwent water 2_thumb.jpg',130, 98,0, 0,'','','Beverley Ridley','Derwent Water','','');
photos[51] = new photo(908372,'69289','','gallery','http://www3.clikpic.com/bev/images/ullswater edited.jpg',500,375,'','http://www3.clikpic.com/bev/images/ullswater edited_thumb.jpg',130, 98,0, 0,'Ullswater','','Beverley Ridley','Ullswater. Lake district','','');
photos[52] = new photo(908670,'69289','','gallery','http://www3.clikpic.com/bev/images/DSCF2573.JPG',500,375,'','http://www3.clikpic.com/bev/images/DSCF2573_thumb.JPG',130, 98,0, 0,'Low Ashgill Force','','Beverley ridley','Ashgill near Garrigill','','');
photos[53] = new photo(911054,'69289','','gallery','http://www3.clikpic.com/bev/images/scotland blk n white.jpg',500,375,'','http://www3.clikpic.com/bev/images/scotland blk n white_thumb.jpg',130, 98,0, 0,'Scotlands south West Coast','','Beverley Ridley','Scotland','','');
photos[54] = new photo(911058,'69289','','gallery','http://www3.clikpic.com/bev/images/sunrise.jpg',500,375,'','http://www3.clikpic.com/bev/images/sunrise_thumb.jpg',130, 98,0, 0,'sunrise over Cleethorpes','','Beverley Ridley','Cleethorpes','','');
photos[55] = new photo(911060,'69289','','gallery','http://www3.clikpic.com/bev/images/sunrise-boats.jpg',500,375,'','http://www3.clikpic.com/bev/images/sunrise-boats_thumb.jpg',130, 98,0, 0,'Sunrise behind two boats at Cleethorpes','','Beverley Ridley','Cleethorpes','','');
photos[56] = new photo(914107,'69289','','gallery','http://www3.clikpic.com/bev/images/boats.jpg',500,155,'','http://www3.clikpic.com/bev/images/boats_thumb.jpg',130, 40,0, 0,'','','Beverley Ridley','','','');
photos[57] = new photo(1358153,'69289','','gallery','http://www3.clikpic.com/bev/images/Alston view framed web.jpg',600,792,'Alston Moor','http://www3.clikpic.com/bev/images/Alston view framed web_thumb.jpg',130, 172,1, 0,'view of Alston','','','','','');
photos[58] = new photo(1849902,'69289','','gallery','http://www3.clikpic.com/bev/images/talkin tarn.jpg',600,287,'','http://www3.clikpic.com/bev/images/talkin tarn_thumb.jpg',130, 62,0, 0,'Talkin Tarn','','Beverley Ridley','Talkin Tarn, Brampton','','');
photos[59] = new photo(1850605,'69289','','gallery','http://www3.clikpic.com/bev/images/frosted tree 1.jpg',320,480,'','http://www3.clikpic.com/bev/images/frosted tree 1_thumb.jpg',130, 195,0, 0,'','','Beverley Ridley','','','');
photos[60] = new photo(1850712,'69289','','gallery','http://www3.clikpic.com/bev/images/Loch Tummel.jpg',600,450,'','http://www3.clikpic.com/bev/images/Loch Tummel_thumb.jpg',130, 98,1, 1,'Reflections','','Beverley Ridley','Loch Tummel, Scotland','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(69318,'908661','Farming','gallery');
galleries[1] = new gallery(69310,'2511442,1982673,1854836,1850615,1849879,1849874,911510,908975','nature','gallery');
galleries[2] = new gallery(69406,'1358169,1314328,1314322,1314306,1314274,1314256,911056,911045,911041','sport and leisure','gallery');
galleries[3] = new gallery(69289,'1850712','Landscapes','gallery');

