window.thumbnails = new Object();
												thumbnails[4096776] = new thumbnail(4096776,'245782','Jaguar','jaguar_thumb.jpg',130, 169,15,'photo_4096776.html');
												thumbnails[4096788] = new thumbnail(4096788,'245782','Meerkat','meerkat-print_thumb.jpg',130, 177,15,'photo_4096788.html');
												thumbnails[4096797] = new thumbnail(4096797,'245782','OTTER','otter_thumb.jpg',130, 97,15,'photo_4096797.html');
												thumbnails[4096810] = new thumbnail(4096810,'245782','Pot Bellied pig','pot-bellied-pig_thumb.jpg',130, 125,15,'photo_4096810.html');
												thumbnails[4096856] = new thumbnail(4096856,'245782','Tiger','tiger-print_thumb.jpg',130, 129,15,'photo_4096856.html');
												thumbnails[3960174] = new thumbnail(3960174,'213280','Bluebells at Holwell Lawn','bluebells2_thumb.jpg',130, 87,15,'photo_3960174.html');
												thumbnails[3960247] = new thumbnail(3960247,'213280','Bluebells 2','bluebellsclick_thumb.jpg',130, 87,15,'photo_3960247.html');
												thumbnails[3511100] = new thumbnail(3511100,'214730','Breaking waves','brakingwaves_thumb.jpg',130, 81,15,'photo_3511100.html');
												thumbnails[3511133] = new thumbnail(3511133,'214730','Waterfall','waterfall_thumb.jpg',130, 147,15,'photo_3511133.html');
												thumbnails[3511113] = new thumbnail(3511113,'214730','Fistral with Surfers','fistral_thumb.jpg',130, 110,15,'photo_3511113.html');
												thumbnails[3489069] = new thumbnail(3489069,'213280','Moorland Scene','moorlandscen_thumb.jpg',130, 87,15,'photo_3489069.html');
												thumbnails[3489079] = new thumbnail(3489079,'213280','Windswept Tree 1 ','windswepttree1_thumb.jpg',130, 87,15,'photo_3489079.html');
												thumbnails[3489118] = new thumbnail(3489118,'213280','Windswept tree 2','windsweptree2_thumb.jpg',130, 89,15,'photo_3489118.html');
												thumbnails[3489166] = new thumbnail(3489166,'213281','amaryllis','amaryllis_thumb.jpg',130, 87,15,'photo_3489166.html');
												thumbnails[3489171] = new thumbnail(3489171,'213281','Dahlia Close up','Dahliadetail_thumb.jpg',130, 98,15,'photo_3489171.html');
												thumbnails[3489173] = new thumbnail(3489173,'213281','Clematis','clematis_thumb.jpg',130, 94,15,'photo_3489173.html');
												thumbnails[3489183] = new thumbnail(3489183,'213281','Potentilla Flamenco Red','Pointellaflamenco_thumb.jpg',130, 119,15,'photo_3489183.html');
												thumbnails[3489208] = new thumbnail(3489208,'213281','Wild Strawberry Flower','strawberryflower_thumb.jpg',130, 98,15,'photo_3489208.html');
												thumbnails[3489258] = new thumbnail(3489258,'213281','Phalanopsis Orchid','Orchid_thumb.jpg',130, 98,15,'photo_3489258.html');
												thumbnails[3489440] = new thumbnail(3489440,'213393',' Amaryllis','amarylis_thumb.jpg',130, 177,15,'photo_3489440.html');
												thumbnails[3489450] = new thumbnail(3489450,'213393','Tree by Clapper Bridge Dartmoor','blackandwhite clapper2_thumb.jpg',130, 89,15,'photo_3489450.html');
												thumbnails[3492510] = new thumbnail(3492510,'213281','Cosmos','cosmos_thumb.jpg',130, 98,15,'photo_3492510.html');
												thumbnails[3492514] = new thumbnail(3492514,'213281','Apifera (Bee Orchid)','orhidapifera_thumb.jpg',130, 194,15,'photo_3492514.html');
												thumbnails[3492536] = new thumbnail(3492536,'213393','Poppy with insect','poppybw_thumb.jpg',130, 123,15,'photo_3492536.html');
												thumbnails[3492579] = new thumbnail(3492579,'213280','River','river_thumb.jpg',130, 87,15,'photo_3492579.html');
												thumbnails[3510882] = new thumbnail(3510882,'213393','No.42','no42_thumb.jpg',130, 87,15,'photo_3510882.html');
												thumbnails[3510954] = new thumbnail(3510954,'213280','Gorse and Heather','heathergorse_thumb.jpg',130, 87,15,'photo_3510954.html');
												thumbnails[3510978] = new thumbnail(3510978,'213280','TOR2','tor21_thumb.jpg',130, 87,15,'photo_3510978.html');
												thumbnails[3511063] = new thumbnail(3511063,'214728','Robin','14a Robin_thumb.jpg',130, 98,15,'photo_3511063.html');
												thumbnails[3511071] = new thumbnail(3511071,'214728','Swan','best swan_thumb.jpg',130, 97,15,'photo_3511071.html');
												thumbnails[3511082] = new thumbnail(3511082,'214728','Herring Gull','herringgull_thumb.jpg',130, 94,15,'photo_3511082.html');
												thumbnails[3511088] = new thumbnail(3511088,'214728','Swans','swans_thumb.jpg',130, 90,15,'photo_3511088.html');
												thumbnails[3511123] = new thumbnail(3511123,'214730','Rocks and Wave','scabbacombe_thumb.jpg',130, 173,15,'photo_3511123.html');
												thumbnails[3513911] = new thumbnail(3513911,'213280','Dark clouds at \'Chinkwell Tor\'','threateningsky_thumb.jpg',130, 83,15,'photo_3513911.html');
												thumbnails[3543148] = new thumbnail(3543148,'213280',' Dartmoor Pony','whiteponywhole1_thumb.jpg',130, 95,15,'photo_3543148.html');
												thumbnails[3543153] = new thumbnail(3543153,'213280','Stone Cross','stonecrossbest2_thumb.jpg',130, 195,15,'photo_3543153.html');
												thumbnails[3543173] = new thumbnail(3543173,'213280','Dartmoor pony','dartmoorpony2_thumb.jpg',130, 133,15,'photo_3543173.html');
												thumbnails[3543177] = new thumbnail(3543177,'213280','Backlit pony','scratchingpony_thumb.jpg',130, 89,15,'photo_3543177.html');
												thumbnails[3547934] = new thumbnail(3547934,'217285','Fly','fly_thumb.jpg',130, 104,15,'photo_3547934.html');
												thumbnails[3547941] = new thumbnail(3547941,'217285','Cabbage White Butterfly','cabbage-white_thumb.jpg',130, 87,15,'photo_3547941.html');
												thumbnails[3547972] = new thumbnail(3547972,'217285','Pair of Marbled White<br>\r\n    Butterflies','marbledwhite_thumb.jpg',130, 159,15,'photo_3547972.html');
												thumbnails[3547981] = new thumbnail(3547981,'217285','Ladybird','ladybird2_thumb.jpg',130, 114,15,'photo_3547981.html');
												thumbnails[3547992] = new thumbnail(3547992,'217285','Grasshopper','hopper1_thumb.jpg',130, 107,15,'photo_3547992.html');
												thumbnails[3548009] = new thumbnail(3548009,'217285','Damselfly','dragonfly_thumb.jpg',130, 158,15,'photo_3548009.html');
												thumbnails[3548031] = new thumbnail(3548031,'217285','Common Grasshopper','grasshopper2691_thumb.jpg',130, 162,15,'photo_3548031.html');
												thumbnails[3555929] = new thumbnail(3555929,'213281','Osteospernum','yellowdaisy_thumb.jpg',130, 98,15,'photo_3555929.html');
												thumbnails[3555956] = new thumbnail(3555956,'213281','Petals','osteospernumpetals_thumb.jpg',130, 93,15,'photo_3555956.html');
												thumbnails[3704651] = new thumbnail(3704651,'213393','Pottery Buildings <br>\r\n (Coalport)','Coalport-pottery_thumb.jpg',130, 90,15,'photo_3704651.html');
												thumbnails[3709207] = new thumbnail(3709207,'213281','Phaphiopedilum','orchid-cut-out_thumb.jpg',130, 97,15,'photo_3709207.html');
												thumbnails[3709252] = new thumbnail(3709252,'213280','Windswept tree 3','windswepte-tree3_thumb.jpg',130, 87,15,'photo_3709252.html');
												thumbnails[3726437] = new thumbnail(3726437,'213281','Primrose','bestprimrose_thumb.jpg',130, 108,15,'photo_3726437.html');
												thumbnails[7432339] = new thumbnail(7432339,'403055','merrivale sunset','Sunsetmerrivale2010_thumb.jpg',160, 125,15,'photo_7432339.html');
												thumbnails[7434051] = new thumbnail(7434051,'403055','Foggintor Ruins','foggintor_thumb.jpg',160, 120,15,'photo_7434051.html');
												thumbnails[7434113] = new thumbnail(7434113,'403045','\'Brinkley\'','brinkley_thumb.jpg',160, 160,15,'photo_7434113.html');
												thumbnails[7434119] = new thumbnail(7434119,'403045','\'keeping an eye on things\'','blacklab_thumb.jpg',160, 129,15,'photo_7434119.html');
												thumbnails[7434145] = new thumbnail(7434145,'403045','\' Enjoying the Moors\'','brinkley2_thumb.jpg',160, 219,15,'photo_7434145.html');
												thumbnails[7434151] = new thumbnail(7434151,'403037','Frozen waterfall','ice_thumb.jpg',160, 240,15,'photo_7434151.html');
												thumbnails[7434162] = new thumbnail(7434162,'403037','ice crystals','icecrystals_thumb.jpg',160, 131,15,'photo_7434162.html');
												thumbnails[7434165] = new thumbnail(7434165,'403037','snow covered branches','snowbranch_thumb.jpg',160, 107,15,'photo_7434165.html');
												thumbnails[7449229] = new thumbnail(7449229,'403055','Dark sky over Merrivale','darkskymerrivale_thumb.jpg',160, 107,15,'photo_7449229.html');
												thumbnails[7449231] = new thumbnail(7449231,'403037','','winterwalk_thumb.jpg',160, 120,15,'photo_7449231.html');
												thumbnails[7450805] = new thumbnail(7450805,'403055','misty gateway','gatewaymist_thumb.jpg',160, 86,15,'photo_7450805.html');
												thumbnails[7450879] = new thumbnail(7450879,'403055','','skyboulder_thumb.jpg',160, 107,15,'photo_7450879.html');
												thumbnails[7450882] = new thumbnail(7450882,'403037','Trees after snow','treesinwinter_thumb.jpg',160, 120,15,'photo_7450882.html');
												thumbnails[7450885] = new thumbnail(7450885,'403055','Old oak in mist','moodywistmans_thumb.jpg',160, 107,15,'photo_7450885.html');
												thumbnails[7450893] = new thumbnail(7450893,'403037','Light on Trees after snow','snow11_thumb.jpg',160, 107,15,'photo_7450893.html');
												thumbnails[7450951] = new thumbnail(7450951,'403055','gnarled oak \'Wistmans Wood \'','gnarledoak_thumb.jpg',160, 240,15,'photo_7450951.html');
												thumbnails[7450956] = new thumbnail(7450956,'403037','Frozen Waterfall','icefall_thumb.jpg',160, 220,15,'photo_7450956.html');
												thumbnails[7450958] = new thumbnail(7450958,'403037','icicle','icicle_thumb.jpg',160, 240,15,'photo_7450958.html');
												thumbnails[7451249] = new thumbnail(7451249,'213281','snowdrop at Cockington','snowdrop__thumb.jpg',160, 240,15,'photo_7451249.html');
												thumbnails[7451355] = new thumbnail(7451355,'403045','Just resting','justresting_thumb.jpg',160, 111,15,'photo_7451355.html');
												thumbnails[7451356] = new thumbnail(7451356,'403045','Having fun!','havingfun_thumb.jpg',160, 128,15,'photo_7451356.html');
												thumbnails[4096750] = new thumbnail(4096750,'245782','Lynx','lynx-print_thumb.jpg',130, 145,15,'photo_4096750.html');
												thumbnails[4096732] = new thumbnail(4096732,'245782','Fox in Grass','fox-in-grass_thumb.jpg',130, 87,15,'photo_4096732.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[403045] = new gallery(403045,'7451356,7451355,7434145,7434119,7434113','*NEW* Our Black Labrador','gallery',[7434113,7434119,7434145,7451355,7451356],0, 1, '', 'gallery_403045.html',0,0);
				  					galleries[403037] = new gallery(403037,'7450958,7450956,7450893,7450882,7449231,7434165,7434162,7434151','*NEW* Winter 2010/11','gallery',[7434151,7434162,7434165,7449231,7450882,7450893,7450956,7450958],0, 1, '', 'gallery_403037.html',0,0);
				  					galleries[403055] = new gallery(403055,'7450951,7450885,7450879,7450805,7449229,7434051,7432339','*New*Latest Dartmoor','gallery',[7432339,7434051,7449229,7450805,7450879,7450885,7450951],0, 1, '', 'gallery_403055.html',0,0);
				  					galleries[245782] = new gallery(245782,'4096776','Wildlife','gallery',[4096776,4096788,4096797,4096810,4096856,4096750,4096732],0, 1, '', 'gallery_245782.html',0,0);
				  					galleries[213281] = new gallery(213281,'7451249,3726437,3709207,3555956,3555929,3492514,3492510,3489258,3489208,3489183','Flowers','gallery',[3489166,3489171,3489173,3489183,3489208,3489258,3492510,3492514,3555929,3555956,3709207,3726437,7451249],0, 1, '', 'gallery_213281.html',0,0);
				  					galleries[213280] = new gallery(213280,'3489079','Dartmoor','gallery',[3960174,3960247,3489069,3489079,3489118,3492579,3510954,3510978,3513911,3543148,3543153,3543173,3543177,3709252],0, 1, '', 'gallery_213280.html',0,0);
				  					galleries[214730] = new gallery(214730,'3511133,3511123,3511113,3511100','Coastal Images','gallery',[3511100,3511133,3511113,3511123],0, 1, '', 'gallery_214730.html',0,0);
				  					galleries[214728] = new gallery(214728,'3511088,3511082,3511071,3511063','Birds','gallery',[3511063,3511071,3511082,3511088],0, 1, '', 'gallery_214728.html',0,0);
				  					galleries[213393] = new gallery(213393,'3704651,3510882,3492536,3489450,3489440','Black and White images','gallery',[3489440,3489450,3492536,3510882,3704651],0, 1, '', 'gallery_213393.html',0,0);
				  					galleries[217285] = new gallery(217285,'3548031,3548009,3547992,3547981,3547972,3547941,3547934','Insects','gallery',[3547934,3547941,3547972,3547981,3547992,3548009,3548031],0, 1, '', 'gallery_217285.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7432339';
imageSets[2] = '4096776,3489079';
imageSets[3] = '7451356,7451355,7451249,7450958,7450956,7450951,7450893,7450885,7450882,7450879,7450805,7449231,7449229,7434165,7434162,7434151,7434145,7434119,7434113,7434051,7432339,4096856,4096810,4096797,4096788,4096776,4096750,4096732,3960247,3960174,3726437,3709252,3709207,3704651,3555956,3555929,3548031,3548009,3547992,3547981,3547972,3547941,3547934,3543177,3543173,3543153,3543148,3513911,3511133,3511123';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/christinab/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/christinab/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/christinab/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/christinab/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/christinab/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/christinab/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:'',
                    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 (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    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));		  $('body').trigger('clikUpdate');		}, op.onBefore);
      }    }
    	if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'The Photography of Christina Burton: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {};	    	      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object') {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			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').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
	temp = temp + this.fnGetPaymentInfo();
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp = temp + '<p>Order this print:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = 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 = temp + '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
	temp = temp + '	<input type="hidden" name="item_option" value="' + item_option + '">';
	temp = temp + '	<input type="hidden" name="site" value="CHRISTINAB">';
		temp = temp + '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp = temp + '	<input type="hidden" name="quantity" value="1">';
								temp = temp + '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
			temp = temp + '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
	temp = temp + '</form>';
		temp = temp + '<div class="clearing">&nbsp;</div>';
	temp = temp + '<div id="confirmContainer">';
	temp = temp + '<div id="paymentConfirm">Item added to cart</div>';
	temp = temp + '</div>';
			temp = 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({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* 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 + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

