/***************************************************************************
* 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('3338097,3338076,3338073,3338069,3338012,3337998,3337984,3337975,2010727,1408826,1396726,1396686,1396646,1396645,1396640,1396639,1396637,209843,171525,171524,168366,165665,151035,151034,151032,151003,150751,150747,149861');
	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('3338097,3338076,3338073,3338069,3338012,3337998,3337984,3337975,2010727,1408826,1396726,1396686,1396646,1396645,1396640,1396639,1396637,209843,171525,171524,168366,165665,151035,151034,151032,151003,150751,150747,149861');
	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) || (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 + '">';
						field.value = photos[nextImg].id;
			document.getElementById('imageTitle').innerHTML = photos[nextImg].caption;
									document.title = 'mooncoin: ' + 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(651449,'49669','','section73941','http://www3.clikpic.com/richshep/images/Img_11291.jpg',600,900,'local newspapers','http://www3.clikpic.com/richshep/images/Img_11291_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[1] = new photo(651451,'49669','','section73941','http://www3.clikpic.com/richshep/images/Img_1130.jpg',600,427,'travel article for Cross Country magazine','http://www3.clikpic.com/richshep/images/Img_1130_thumb.jpg',130, 93,0, 0,'','','','','','');
photos[2] = new photo(651455,'49669','','section73941','http://www3.clikpic.com/richshep/images/Img_1131.jpg',600,424,'Photography article for Cross Country magazine','http://www3.clikpic.com/richshep/images/Img_1131_thumb.jpg',130, 92,0, 0,'','','','','','');
photos[3] = new photo(651459,'49669','','section73941','http://www3.clikpic.com/richshep/images/Img_1132.jpg',600,853,'Contents page Skywings magazine','http://www3.clikpic.com/richshep/images/Img_1132_thumb.jpg',130, 185,0, 0,'','','','','','');
photos[4] = new photo(651462,'49669','','section73941','http://www3.clikpic.com/richshep/images/Img_1133.jpg',600,859,'Cover Skywings magazine','http://www3.clikpic.com/richshep/images/Img_1133_thumb.jpg',130, 186,0, 0,'','','','','','');
photos[5] = new photo(2010729,'13115','','gallery','http://www3.clikpic.com/richshep/images/SAT.jpg',438,640,'Mark Leavesley again doing a SAT','http://www3.clikpic.com/richshep/images/SAT_thumb.jpg',130, 190,0, 0,'Photomontage','27/03/08','Richard Sheppard','','','');
photos[6] = new photo(150792,'13115','','gallery','http://www3.clikpic.com/richshep/images/006.jpg',400,600,'','http://www3.clikpic.com/richshep/images/006_thumb.jpg',130, 195,0, 0,'A summer\'s day on the beach at Woolacombe.','24/07/05','','Woolacombe, Devon','','');
photos[7] = new photo(150747,'13115','','gallery','http://www3.clikpic.com/richshep/images/Img_6597.jpg',400,266,'','http://www3.clikpic.com/richshep/images/Img_6597_thumb.jpg',130, 86,1, 0,'','06/11/04','','Rhossili, Wales','','');
photos[8] = new photo(150751,'13115','','gallery','http://www3.clikpic.com/richshep/images/Img_65451.jpg',400,266,'','http://www3.clikpic.com/richshep/images/Img_65451_thumb.jpg',130, 86,1, 0,'','06/11/04','','Rhossili, Wales','','');
photos[9] = new photo(151035,'13115','','gallery','http://www3.clikpic.com/richshep/images/birds.jpg',400,266,'','http://www3.clikpic.com/richshep/images/birds_thumb.jpg',130, 86,1, 0,'','','','','','');
photos[10] = new photo(2010727,'13115','','gallery','http://www3.clikpic.com/richshep/images/zoomflat.jpg',431,640,'Mark Leavesley at the Mynd','http://www3.clikpic.com/richshep/images/zoomflat_thumb.jpg',130, 193,1, 0,'Photomontage','','Richard Sheppard','','','');
photos[11] = new photo(2010733,'13115','','gallery','http://www3.clikpic.com/richshep/images/_MG_1866.jpg',600,281,'Paragliding fun','http://www3.clikpic.com/richshep/images/_MG_1866_thumb.jpg',130, 61,0, 0,'','','Richard Sheppard','','','');
photos[12] = new photo(3337975,'13115','IMG_0044.jpg','gallery','http://www3.clikpic.com/richshep/images/IMG_0044.JPG',600,450,'','http://www3.clikpic.com/richshep/images/IMG_0044_thumb.JPG',130, 98,1, 0,'','','Richard Sheppard','','','');
photos[13] = new photo(3337984,'13115','_mg_3481.jpg','gallery','http://www3.clikpic.com/richshep/images/_MG_3481.JPG',600,400,'Rhossili','http://www3.clikpic.com/richshep/images/_MG_3481_thumb.JPG',130, 87,1, 0,'','','Richard Sheppard','','','');
photos[14] = new photo(3337998,'13115','','gallery','http://www3.clikpic.com/richshep/images/IMG_0309.JPG',600,399,'Malverns parawaiting','http://www3.clikpic.com/richshep/images/IMG_0309_thumb.JPG',130, 86,1, 0,'','','','','','');
photos[15] = new photo(3337999,'13115','','gallery','http://www3.clikpic.com/richshep/images/Img_8065.jpg',600,400,'Westbury','http://www3.clikpic.com/richshep/images/Img_8065_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[16] = new photo(3338003,'13115','img_8235','gallery','http://www3.clikpic.com/richshep/images/Img_8235_1.jpg',600,399,'airsports','http://www3.clikpic.com/richshep/images/Img_8235_1_thumb.jpg',130, 86,0, 0,'','','Richard Sheppard','','','');
photos[17] = new photo(3338012,'13115','IMG_8212','gallery','http://www3.clikpic.com/richshep/images/IMG_8212.JPG',600,399,'','http://www3.clikpic.com/richshep/images/IMG_8212_thumb.JPG',130, 86,1, 0,'','','Richard Sheppard','','','');
photos[18] = new photo(3338021,'13115','8246a','gallery','http://www3.clikpic.com/richshep/images/Img_8246a.jpg',600,355,'','http://www3.clikpic.com/richshep/images/Img_8246a_thumb.jpg',130, 77,0, 0,'','','Richard sheppard','','','');
photos[19] = new photo(3338097,'13115','8301','gallery','http://www3.clikpic.com/richshep/images/_MG_83011.jpg',600,400,'Long Mynd','http://www3.clikpic.com/richshep/images/_MG_83011_thumb.jpg',130, 87,1, 0,'','','','','','');
photos[20] = new photo(149580,'13115','','gallery','http://www3.clikpic.com/richshep/images/001.jpg',400,266,'','http://www3.clikpic.com/richshep/images/001_thumb.jpg',130, 86,0, 0,'','12/07/04','Richard Sheppard','Rhossilli, Wales','','');
photos[21] = new photo(149830,'13115','','gallery','http://www3.clikpic.com/richshep/images/0053.jpg',400,600,'','http://www3.clikpic.com/richshep/images/0053_thumb.jpg',130, 195,0, 0,'','12/08/04','','Woolacombe, Devon','','');
photos[22] = new photo(149839,'13115','','gallery','http://www3.clikpic.com/richshep/images/0242.jpg',400,612,'','http://www3.clikpic.com/richshep/images/0242_thumb.jpg',130, 199,0, 0,'','','','','','');
photos[23] = new photo(149842,'13115','','gallery','http://www3.clikpic.com/richshep/images/Carnet at Coombe19912.jpg',400,411,'','http://www3.clikpic.com/richshep/images/Carnet at Coombe19912_thumb.jpg',130, 134,0, 0,'','','','Combe Gibbet, Wilts','','');
photos[24] = new photo(149851,'13115','','gallery','http://www3.clikpic.com/richshep/images/Disco over end of lake Annecy2.jpg',400,591,'','http://www3.clikpic.com/richshep/images/Disco over end of lake Annecy2_thumb.jpg',130, 192,0, 0,'','','','Annecy, France','','');
photos[25] = new photo(149861,'13115','','gallery','http://www3.clikpic.com/richshep/images/Img_6581_filtered2.jpg',400,266,'','http://www3.clikpic.com/richshep/images/Img_6581_filtered2_thumb.jpg',130, 86,1, 0,'','06/11/04','','Rhossili, Wales','','');
photos[26] = new photo(209843,'13115','','gallery','http://www3.clikpic.com/richshep/images/Img_8083.jpg',400,585,'','http://www3.clikpic.com/richshep/images/Img_8083_thumb.jpg',130, 190,1, 0,'','','','','','');
photos[27] = new photo(151463,'13115','','gallery','http://www3.clikpic.com/richshep/images/Img_3704.jpg',400,600,'','http://www3.clikpic.com/richshep/images/Img_3704_thumb.jpg',130, 195,0, 0,'','16/04/05','','','','');
photos[28] = new photo(151464,'13115','','gallery','http://www3.clikpic.com/richshep/images/Img_3716.jpg',400,267,'','http://www3.clikpic.com/richshep/images/Img_3716_thumb.jpg',130, 87,0, 0,'','16/04/05','','','','');
photos[29] = new photo(151465,'13115','','gallery','http://www3.clikpic.com/richshep/images/Img_3718.jpg',400,267,'','http://www3.clikpic.com/richshep/images/Img_3718_thumb.jpg',130, 87,0, 0,'','16/04/05','','','','');
photos[30] = new photo(151003,'14029','','gallery','http://www3.clikpic.com/richshep/images/art in glasses.jpg',400,275,'','http://www3.clikpic.com/richshep/images/art in glasses_thumb.jpg',130, 89,1, 0,'','','','','','');
photos[31] = new photo(168366,'14029','','gallery','http://www3.clikpic.com/richshep/images/kite flying.jpg',333,500,'','http://www3.clikpic.com/richshep/images/kite flying_thumb.jpg',130, 195,1, 0,'','','','','','');
photos[32] = new photo(171524,'14029','','gallery','http://www3.clikpic.com/richshep/images/toni1.jpg',400,267,'','http://www3.clikpic.com/richshep/images/toni1_thumb.jpg',130, 87,1, 0,'','','','','','');
photos[33] = new photo(171525,'14029','','gallery','http://www3.clikpic.com/richshep/images/toni2.jpg',400,600,'','http://www3.clikpic.com/richshep/images/toni2_thumb.jpg',130, 195,1, 0,'','','','','','');
photos[34] = new photo(3338050,'14029','1582c','gallery','http://www3.clikpic.com/richshep/images/_MG_1582c.jpg',600,379,'Misty morning','http://www3.clikpic.com/richshep/images/_MG_1582c_thumb.jpg',130, 82,0, 0,'','','','','','');
photos[35] = new photo(3338069,'14029','4537b','gallery','http://www3.clikpic.com/richshep/images/_MG_4537b.jpg',600,400,'Autumn sky','http://www3.clikpic.com/richshep/images/_MG_4537b_thumb.jpg',130, 87,1, 0,'','','','','','');
photos[36] = new photo(3338073,'14029','0557','gallery','http://www3.clikpic.com/richshep/images/IMG_0557.JPG',600,450,'Springtime','http://www3.clikpic.com/richshep/images/IMG_0557_thumb.JPG',130, 98,1, 0,'','','','','','');
photos[37] = new photo(3338076,'14029','1389','gallery','http://www3.clikpic.com/richshep/images/IMG_1389.jpg',600,400,'Autumn','http://www3.clikpic.com/richshep/images/IMG_1389_thumb.jpg',130, 87,1, 0,'','','','','','');
photos[38] = new photo(3338077,'14029','0806','gallery','http://www3.clikpic.com/richshep/images/IMG_0806.JPG',600,400,'Autumn leaves','http://www3.clikpic.com/richshep/images/IMG_0806_thumb.JPG',130, 87,0, 0,'','','','','','');
photos[39] = new photo(3338107,'14029','3697','gallery','http://www3.clikpic.com/richshep/images/_MG_36971.jpg',600,411,'Cow','http://www3.clikpic.com/richshep/images/_MG_36971_thumb.jpg',130, 89,0, 0,'','','','','','');
photos[40] = new photo(165665,'15908','','gallery','http://www3.clikpic.com/richshep/images/traffic trails.jpg',400,600,'','http://www3.clikpic.com/richshep/images/traffic trails_thumb.jpg',130, 195,1, 0,'','17/02/06','','','','');
photos[41] = new photo(151010,'15908','','gallery','http://www3.clikpic.com/richshep/images/white horse.jpg',400,266,'','http://www3.clikpic.com/richshep/images/white horse_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[42] = new photo(151031,'15908','','gallery','http://www3.clikpic.com/richshep/images/0636.jpg',333,499,'','http://www3.clikpic.com/richshep/images/0636_thumb.jpg',130, 195,0, 0,'','','','','','');
photos[43] = new photo(151033,'15908','','gallery','http://www3.clikpic.com/richshep/images/0750.jpg',400,266,'','http://www3.clikpic.com/richshep/images/0750_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[44] = new photo(151034,'15908','','gallery','http://www3.clikpic.com/richshep/images/0805.jpg',400,266,'','http://www3.clikpic.com/richshep/images/0805_thumb.jpg',130, 86,1, 0,'','','','','','');
photos[45] = new photo(1396645,'15908','','gallery','http://www3.clikpic.com/richshep/images/_MG_0051.jpg',400,600,'Trees and field','http://www3.clikpic.com/richshep/images/_MG_0051_thumb.jpg',130, 195,1, 1,'','','','','','');
photos[46] = new photo(1396726,'15908','','gallery','http://www3.clikpic.com/richshep/images/selfridges.jpg',450,300,'Selfridges Birmingham. Winner of Professional Photographer Magazine POTY architecture category.','http://www3.clikpic.com/richshep/images/selfridges_thumb.jpg',130, 87,1, 0,'','','','','','');
photos[47] = new photo(165637,'15468','','gallery','http://www3.clikpic.com/richshep/images/multicombi.jpg',400,852,'','http://www3.clikpic.com/richshep/images/multicombi_thumb.jpg',130, 277,0, 0,'','','','','','');
photos[48] = new photo(151006,'15909','','gallery','http://www3.clikpic.com/richshep/images/coloured pencils.jpg',400,266,'','http://www3.clikpic.com/richshep/images/coloured pencils_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[49] = new photo(151007,'15909','','gallery','http://www3.clikpic.com/richshep/images/fish on bike 2.jpg',400,266,'','http://www3.clikpic.com/richshep/images/fish on bike 2_thumb.jpg',130, 86,0, 0,'','','','','','');
photos[50] = new photo(151032,'15909','','gallery','http://www3.clikpic.com/richshep/images/0663.jpg',333,499,'','http://www3.clikpic.com/richshep/images/0663_thumb.jpg',130, 195,1, 0,'','','','','','');
photos[51] = new photo(2010734,'15909','','gallery','http://www3.clikpic.com/richshep/images/_MG_5617.jpg',600,331,'The robots are coming','http://www3.clikpic.com/richshep/images/_MG_5617_thumb.jpg',130, 72,0, 0,'','','Richard Sheppard','','','');
photos[52] = new photo(599078,'46095','','gallery','http://www3.clikpic.com/richshep/images/0413.jpg',500,333,'Pink fields near Ledbury','http://www3.clikpic.com/richshep/images/0413_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[53] = new photo(599086,'46095','','gallery','http://www3.clikpic.com/richshep/images/0409.jpg',500,333,'Polytunnels','http://www3.clikpic.com/richshep/images/0409_thumb.jpg',130, 87,0, 0,'','','','','','');
photos[54] = new photo(1396637,'46095','','gallery','http://www3.clikpic.com/richshep/images/_MG_0029.jpg',600,400,'Field from directly above','http://www3.clikpic.com/richshep/images/_MG_0029_thumb.jpg',130, 87,1, 0,'','','','','','');
photos[55] = new photo(1396639,'46095','','gallery','http://www3.clikpic.com/richshep/images/_MG_0043.jpg',600,400,'Ploughed field','http://www3.clikpic.com/richshep/images/_MG_0043_thumb.jpg',130, 87,1, 0,'','','','','','');
photos[56] = new photo(1396640,'46095','','gallery','http://www3.clikpic.com/richshep/images/_MG_0044.jpg',600,400,'Strensham motorway services','http://www3.clikpic.com/richshep/images/_MG_0044_thumb.jpg',130, 87,1, 0,'','','','','','');
photos[57] = new photo(1396646,'46095','','gallery','http://www3.clikpic.com/richshep/images/_MG_7469.jpg',600,400,'Low level mast photography','http://www3.clikpic.com/richshep/images/_MG_7469_thumb.jpg',130, 87,1, 0,'','','','','','');
photos[58] = new photo(1396686,'46095','','gallery','http://www3.clikpic.com/richshep/images/Untitled-1.jpg',600,393,'Low level mast photography','http://www3.clikpic.com/richshep/images/Untitled-1_thumb.jpg',130, 85,1, 0,'','','','','','');
photos[59] = new photo(1408826,'46095','','gallery','http://www3.clikpic.com/richshep/images/_MG_0335_2.jpg',600,365,'Low level mast photography','http://www3.clikpic.com/richshep/images/_MG_0335_2_thumb.jpg',130, 79,1, 0,'','','','','','');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
galleries = new Array();
galleries[0] = new gallery(49669,'651462,651459,651455,651451,651449','published work','section73941');
galleries[1] = new gallery(13115,'3338097,3338021,3338012,3338003,3337999,3337998,3337984,3337975,2010733,2010729','airsports','gallery');
galleries[2] = new gallery(14029,'3338107,3338077,3338076,3338073,3338069,3338050,171525,171524,168366,151003','Around','gallery');
galleries[3] = new gallery(15908,'1396645','Down','gallery');
galleries[4] = new gallery(15468,'165637','photo restoration','gallery');
galleries[5] = new gallery(15909,'2010734,151032,151007,151006','In','gallery');
galleries[6] = new gallery(46095,'1408826,1396686,1396646,1396640,1396639,1396637,599086,599078','Aerial','gallery');

