window.thumbnails = {};
															thumbnails[1210421] = clik.newPhoto({"id":1210421,"src":"IMG_9849 (Xn)_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_1210421.html","width":130,"caption":"Great Escape","height":119});
															thumbnails[1210461] = clik.newPhoto({"id":1210461,"src":"IMG_6002 - Sid (Xn)_thumb.jpg","galleries_id":86753,"server_id":18,"link":"photo_1210461.html","width":130,"caption":"Sid Burnard was born in Brighton in 1948.  Bristol Guild of Applied Arts gave him a profound understanding of visual arts and crafts.  His love and appreciation of nature led him to the west Wales coast.  His creed is reclamation, conservation and imagination.  Working with found objects, nothing is changed - simply introduced to another.","height":92});
															thumbnails[1514872] = clik.newPhoto({"id":1514872,"src":"PreparingtoJump_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_1514872.html","width":130,"caption":"Preparing To Jump","height":196});
															thumbnails[1541338] = clik.newPhoto({"id":1541338,"src":"MonochromeShorescape_thumb.jpg","galleries_id":193463,"server_id":18,"link":"photo_1541338.html","width":130,"caption":"Monochrome Shorescape","height":65});
															thumbnails[1541350] = clik.newPhoto({"id":1541350,"src":"GalwayHooker_thumb.jpg","galleries_id":193464,"server_id":18,"link":"photo_1541350.html","width":130,"caption":"Galway Hooker","height":86});
															thumbnails[1541365] = clik.newPhoto({"id":1541365,"src":"BlueCrownedBird_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_1541365.html","width":130,"caption":"Blue Crowned Bird","height":86});
															thumbnails[1945432] = clik.newPhoto({"id":1945432,"src":"Red-Sail-Boat012_thumb.jpg","galleries_id":193464,"server_id":18,"link":"photo_1945432.html","width":130,"caption":"Red Sail Boat","height":196});
															thumbnails[1945436] = clik.newPhoto({"id":1945436,"src":"Securicaw02-01_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_1945436.html","width":130,"caption":"Securicaw","height":86});
															thumbnails[1945439] = clik.newPhoto({"id":1945439,"src":"Sid01-01_thumb.jpg","galleries_id":86753,"server_id":18,"link":"photo_1945439.html","width":130,"caption":"Sid 1","height":196});
															thumbnails[1945455] = clik.newPhoto({"id":1945455,"src":"Wader-on-Rocks-011_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_1945455.html","width":130,"caption":"Wader on Rocks","height":196});
															thumbnails[3157310] = clik.newPhoto({"id":3157310,"src":"Benign-Finch_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_3157310.html","width":130,"caption":"Benign Finch","height":196});
															thumbnails[3157320] = clik.newPhoto({"id":3157320,"src":"Bird-of-Paradise-3_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_3157320.html","width":130,"caption":"Bird of Paradise","height":219});
															thumbnails[3157382] = clik.newPhoto({"id":3157382,"src":"Young-Raptor_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_3157382.html","width":130,"caption":"Small Raptor","height":86});
															thumbnails[3561079] = clik.newPhoto({"id":3561079,"src":"Nov08-SB_31_thumb.jpg","galleries_id":193464,"server_id":18,"link":"photo_3561079.html","width":130,"caption":"Pink\/Blue Fishing Boat","height":86});
															thumbnails[4690717] = clik.newPhoto({"id":4690717,"src":"Home_Sweet_Home_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_4690717.html","width":130,"caption":"Home Sweet Home","height":97});
															thumbnails[4773950] = clik.newPhoto({"id":4773950,"src":"Bird_in_Tutu_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_4773950.html","width":130,"caption":"Bird in Tutu","height":173});
															thumbnails[4773988] = clik.newPhoto({"id":4773988,"src":"Fiddler_on_the_roof_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_4773988.html","width":130,"caption":"Fiddler on the roof","height":173});
															thumbnails[4773993] = clik.newPhoto({"id":4773993,"src":"Big_prop_thumb.jpg","galleries_id":193464,"server_id":18,"link":"photo_4773993.html","width":130,"caption":"Big Prop","height":98});
															thumbnails[4773995] = clik.newPhoto({"id":4773995,"src":"Moby_Dick__Two_Ships_thumb.jpg","galleries_id":193464,"server_id":18,"link":"photo_4773995.html","width":130,"caption":"Moby Dick and Two Ships","height":98});
															thumbnails[4774032] = clik.newPhoto({"id":4774032,"src":"BM24J_thumb.jpg","galleries_id":193463,"server_id":18,"link":"photo_4774032.html","width":130,"caption":"BM24J","height":173});
															thumbnails[4774035] = clik.newPhoto({"id":4774035,"src":"Irish_Gorse_thumb.jpg","galleries_id":193463,"server_id":18,"link":"photo_4774035.html","width":130,"caption":"Irish Gorse","height":173});
															thumbnails[4774139] = clik.newPhoto({"id":4774139,"src":"Madagaskar_Teal_thumb.jpg","galleries_id":193463,"server_id":18,"link":"photo_4774139.html","width":130,"caption":"Madagaskar Teal","height":173});
															thumbnails[4774340] = clik.newPhoto({"id":4774340,"src":"River_Boat_thumb.jpg","galleries_id":193464,"server_id":18,"link":"photo_4774340.html","width":130,"caption":"River Boat","height":98});
															thumbnails[4774345] = clik.newPhoto({"id":4774345,"src":"Loo-Seatania_thumb.jpg","galleries_id":193464,"server_id":18,"link":"photo_4774345.html","width":130,"caption":"Loo Seatania","height":98});
															thumbnails[4774349] = clik.newPhoto({"id":4774349,"src":"At_the_disco_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_4774349.html","width":130,"caption":"At the Disco","height":98});
															thumbnails[4774589] = clik.newPhoto({"id":4774589,"src":"Once_a_Living_thumb.jpg","galleries_id":193463,"server_id":18,"link":"photo_4774589.html","width":130,"caption":"Once a Living","height":98});
															thumbnails[4774593] = clik.newPhoto({"id":4774593,"src":"Rope-sided_boat_thumb.jpg","galleries_id":193463,"server_id":18,"link":"photo_4774593.html","width":130,"caption":"Rope-sided boat","height":98});
															thumbnails[4774598] = clik.newPhoto({"id":4774598,"src":"North_Sails_thumb.jpg","galleries_id":193464,"server_id":18,"link":"photo_4774598.html","width":130,"caption":"North Sails","height":173});
															thumbnails[4774735] = clik.newPhoto({"id":4774735,"src":"Courtship_Display_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_4774735.html","width":130,"caption":"Courtship Display","height":98});
															thumbnails[4774736] = clik.newPhoto({"id":4774736,"src":"Marching_Bird_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_4774736.html","width":130,"caption":"Marching Bird","height":173});
															thumbnails[4774737] = clik.newPhoto({"id":4774737,"src":"Blue-crowned_water_fowl_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_4774737.html","width":130,"caption":"Blue-crowned water fowl","height":173});
															thumbnails[4774753] = clik.newPhoto({"id":4774753,"src":"Crocodile_thumb.jpg","galleries_id":193465,"server_id":18,"link":"photo_4774753.html","width":130,"caption":"Crocodile","height":98});
															thumbnails[5995303] = clik.newPhoto({"id":5995303,"src":"Palm_beach_-_73_thumb.jpg","galleries_id":193463,"server_id":18,"link":"photo_5995303.html","width":130,"caption":"Palm Beach","height":98});
															thumbnails[5995307] = clik.newPhoto({"id":5995307,"src":"Central_Heating_-_75_thumb.jpg","galleries_id":193465,"server_id":18,"link":"photo_5995307.html","width":130,"caption":"Central Heating","height":98});
															thumbnails[5995310] = clik.newPhoto({"id":5995310,"src":"Cleared_for_Take_Off_-_72_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_5995310.html","width":130,"caption":"Cleared for take off","height":173});
															thumbnails[5995315] = clik.newPhoto({"id":5995315,"src":"Stagg_-_78_thumb.jpg","galleries_id":193465,"server_id":18,"link":"photo_5995315.html","width":130,"caption":"Stagg","height":173});
															thumbnails[5995324] = clik.newPhoto({"id":5995324,"src":"On_the_Ball_-_76_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_5995324.html","width":130,"caption":"On the ball","height":98});
															thumbnails[5995327] = clik.newPhoto({"id":5995327,"src":"Cock-a-hoop_-_77_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_5995327.html","width":130,"caption":"Cock-a-Hoop","height":98});
															thumbnails[5995334] = clik.newPhoto({"id":5995334,"src":"Preparing_to_Jump_-_29_thumb.jpg","galleries_id":193461,"server_id":18,"link":"photo_5995334.html","width":130,"caption":"Preparing to Jump","height":173});
															thumbnails[5995338] = clik.newPhoto({"id":5995338,"src":"The_Wave_-_35_thumb.jpg","galleries_id":193463,"server_id":18,"link":"photo_5995338.html","width":130,"caption":"The Wave","height":87});
															thumbnails[5995342] = clik.newPhoto({"id":5995342,"src":"Dreamscape_-_104_thumb.jpg","galleries_id":193463,"server_id":18,"link":"photo_5995342.html","width":130,"caption":"Dreamscape","height":87});
															thumbnails[5995345] = clik.newPhoto({"id":5995345,"src":"Home_Visit_-_83_thumb.jpg","galleries_id":193463,"server_id":18,"link":"photo_5995345.html","width":130,"caption":"Home Visit","height":87});
															thumbnails[5995347] = clik.newPhoto({"id":5995347,"src":"Once_a_Living_-_19_thumb.jpg","galleries_id":193463,"server_id":18,"link":"photo_5995347.html","width":130,"caption":"Once a Living","height":87});
															thumbnails[5995361] = clik.newPhoto({"id":5995361,"src":"Evening_Rest_-_102_thumb.jpg","galleries_id":193463,"server_id":18,"link":"photo_5995361.html","width":130,"caption":"Evening Rest","height":98});
															thumbnails[5995363] = clik.newPhoto({"id":5995363,"src":"SS_Cantodarea_Marin_-101_thumb.jpg","galleries_id":193464,"server_id":18,"link":"photo_5995363.html","width":130,"caption":"S.S. Cantodarea-Marin","height":98});
															thumbnails[5995366] = clik.newPhoto({"id":5995366,"src":"Pescafish_-_100_thumb.jpg","galleries_id":193464,"server_id":18,"link":"photo_5995366.html","width":130,"caption":"Pescafish","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[193461] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Birds","link":"gallery_193461.html","maxRecords":0.0,"photoIDs":[1210421.0,1514872.0,1541365.0,1945436.0,1945455.0,3157310.0,3157320.0,3157382.0,4690717.0,4773950.0,4773988.0,4774349.0,4774735.0,4774736.0,4774737.0,5995310.0,5995324.0,5995327.0,5995334.0],"skipIndex":0,"section_code":"gallery","featured_images":"5995334,5995327,5995324,5995310,4774737,4774736,4774735,4774349,4773988,4773950","id":193461,"singleSection":false});				  						galleries[193464] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Boats","link":"gallery_193464.html","maxRecords":0.0,"photoIDs":[1541350.0,1945432.0,3561079.0,4773993.0,4773995.0,4774340.0,4774345.0,4774598.0,5995363.0,5995366.0],"skipIndex":0,"section_code":"gallery","featured_images":"5995366,5995363,4774598,4774345,4774340,4773995,4773993,3561079,1945432,1541350","id":193464,"singleSection":false});				  						galleries[193463] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Pictures","link":"gallery_193463.html","maxRecords":0.0,"photoIDs":[1541338.0,4774032.0,4774035.0,4774139.0,4774589.0,4774593.0,5995303.0,5995338.0,5995342.0,5995345.0,5995347.0,5995361.0],"skipIndex":0,"section_code":"gallery","featured_images":"5995361,5995347,5995345,5995342,5995338,5995303,4774593,4774589,4774139,4774035","id":193463,"singleSection":false});				  						galleries[193465] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Others","link":"gallery_193465.html","maxRecords":0.0,"photoIDs":[4774753.0,5995307.0,5995315.0],"skipIndex":0,"section_code":"gallery","featured_images":"5995315,5995307,4774753","id":193465,"singleSection":false});				  						galleries[86753] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sid Burnard","link":"gallery_86753.html","maxRecords":0.0,"photoIDs":[1210461.0,1945439.0],"skipIndex":0,"section_code":"gallery","featured_images":"1945439,1210461","id":86753,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '5995366,5995363,5995361,5995347,5995345,5995342,5995338,5995334,5995327,5995324,5995315,5995310,5995307,5995303,4774753,4774737,4774736,4774735,4774598,4774593,4774589,4774349,4774345,4774340,4774139,4774035,4774032,4773995,4773993,4773988,4773950,4690717,3561079,3157382,3157320,3157310,1945455,1945439,1945436,1945432,1541365,1541350,1541338,1514872,1210461,1210421';
imageSets[3] = '5995366,5995363,5995361,5995347,5995345,5995342,5995338,5995334,5995327,5995324,5995315,5995310,5995307,5995303,4774753,4774737,4774736,4774735,4774598,4774593,4774589,4774349,4774345,4774340,4774139,4774035,4774032,4773995,4773993,4773988,4773950,4690717,3561079,3157382,3157320,3157310,1945455,1945439,1945436,1945432,1541365,1541350,1541338,1514872,1210461,1210421';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/derekharris/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/derekharris/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/derekharris/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/derekharris/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/derekharris/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/derekharris/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/derekharris/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Sid Burnard Artist: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Sculpture </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photography by  </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* 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, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

