window.thumbnails = {};
															thumbnails[7208618] = clik.newPhoto({"id":7208618,"src":"Susan-profile_thumb_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":50,"caption":"","height":42});
															thumbnails[8684509] = clik.newPhoto({"id":8684509,"src":"IMG_9374_edit_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":130});
															thumbnails[6875778] = clik.newPhoto({"id":6875778,"src":"Friends_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":70,"caption":"Horses, Camargue","height":70});
															thumbnails[8611881] = clik.newPhoto({"id":8611881,"src":"IMG_9266_edit_sm_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":130});
															thumbnails[5025470] = clik.newPhoto({"id":5025470,"src":"Iceland-light-2_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":70,"caption":"Iceland light","height":70});
															thumbnails[8618583] = clik.newPhoto({"id":8618583,"src":"IMG_1499_final_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":130});
															thumbnails[8618528] = clik.newPhoto({"id":8618528,"src":"IMG_9120_final_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":130});
															thumbnails[8960980] = clik.newPhoto({"id":8960980,"src":"IMG_0891_edit_bw_sm_thumb.jpg","galleries_id":381812,"server_id":15,"link":"photo_8960980.html","width":130,"caption":"","height":130});
															thumbnails[8960987] = clik.newPhoto({"id":8960987,"src":"IMG_0937_edit_sm_thumb.jpg","galleries_id":381812,"server_id":15,"link":"photo_8960987.html","width":130,"caption":"","height":130});
															thumbnails[8960990] = clik.newPhoto({"id":8960990,"src":"IMG_1023_edit_sm_thumb.jpg","galleries_id":381812,"server_id":15,"link":"photo_8960990.html","width":130,"caption":"","height":130});
															thumbnails[8905285] = clik.newPhoto({"id":8905285,"src":"IMG_0714_edit_sm_thumb.jpg","galleries_id":468298,"server_id":15,"link":"photo_8905285.html","width":130,"caption":"Dhow and pineapple seller","height":130});
															thumbnails[6875781] = clik.newPhoto({"id":6875781,"src":"IMG_0751_edit_sm_thumb.jpg","galleries_id":384437,"server_id":15,"link":"photo_6875781.html","width":130,"caption":"","height":130});
															thumbnails[8303781] = clik.newPhoto({"id":8303781,"src":"IMG_3402_edit_sm_web_thumb.jpg","galleries_id":441742,"server_id":15,"link":"photo_8303781.html","width":130,"caption":"","height":130});
															thumbnails[8501960] = clik.newPhoto({"id":8501960,"src":"IMG_8889_edit_web_thumb.jpg","galleries_id":449374,"server_id":15,"link":"photo_8501960.html","width":130,"caption":"","height":130});
															thumbnails[8618530] = clik.newPhoto({"id":8618530,"src":"IMG_1418_final_thumb.jpg","galleries_id":381812,"server_id":15,"link":"photo_8618530.html","width":130,"caption":"","height":130});
															thumbnails[8618588] = clik.newPhoto({"id":8618588,"src":"IMG_7888_final_thumb.jpg","galleries_id":381813,"server_id":15,"link":"photo_8618588.html","width":130,"caption":"","height":130});
															thumbnails[8905238] = clik.newPhoto({"id":8905238,"src":"IMG_0757_edit_sm_thumb.jpg","galleries_id":468298,"server_id":15,"link":"photo_8905238.html","width":130,"caption":"Zanzibar","height":130});
															thumbnails[9070638] = clik.newPhoto({"id":9070638,"src":"IMG_3456_edit_sm_thumb.jpg","galleries_id":441742,"server_id":15,"link":"photo_9070638.html","width":130,"caption":"","height":130});
															thumbnails[9094593] = clik.newPhoto({"id":9094593,"src":"IMG_0427_edit_thumb_2.jpg","galleries_id":479912,"server_id":15,"link":"photo_9094593.html","width":130,"caption":"Zanzibar life","height":130});
															thumbnails[8965818] = clik.newPhoto({"id":8965818,"src":"IMG_0228_edit_sm2_thumb.jpg","galleries_id":468298,"server_id":15,"link":"photo_8965818.html","width":130,"caption":"In the distance","height":130});
															thumbnails[6875784] = clik.newPhoto({"id":6875784,"src":"Fun_thumb.jpg","galleries_id":384437,"server_id":15,"link":"photo_6875784.html","width":130,"caption":"","height":130});
															thumbnails[8303774] = clik.newPhoto({"id":8303774,"src":"IMG_3440_edit_sm_web_thumb.jpg","galleries_id":441742,"server_id":15,"link":"photo_8303774.html","width":130,"caption":"","height":130});
															thumbnails[8583689] = clik.newPhoto({"id":8583689,"src":"IMG_8917_edit_sm_thumb.jpg","galleries_id":449374,"server_id":15,"link":"photo_8583689.html","width":130,"caption":"","height":130});
															thumbnails[8618532] = clik.newPhoto({"id":8618532,"src":"IMG_1451_final_thumb.jpg","galleries_id":381812,"server_id":15,"link":"photo_8618532.html","width":130,"caption":"","height":130});
															thumbnails[8618589] = clik.newPhoto({"id":8618589,"src":"IMG_3574_edit_sm_thumb.jpg","galleries_id":381813,"server_id":15,"link":"photo_8618589.html","width":130,"caption":"","height":130});
															thumbnails[8905282] = clik.newPhoto({"id":8905282,"src":"IMG_0204_edit_sm_thumb.jpg","galleries_id":468298,"server_id":15,"link":"photo_8905282.html","width":130,"caption":"Racing dhows","height":130});
															thumbnails[8303782] = clik.newPhoto({"id":8303782,"src":"IMG_3515_edit_sm_web_thumb.jpg","galleries_id":441742,"server_id":15,"link":"photo_8303782.html","width":130,"caption":"","height":130});
															thumbnails[9036971] = clik.newPhoto({"id":9036971,"src":"IMG_1511_web_thumb.jpg","galleries_id":449374,"server_id":15,"link":"photo_9036971.html","width":130,"caption":"","height":130});
															thumbnails[6875815] = clik.newPhoto({"id":6875815,"src":"IMG_1094-Eye-spy_thumb.jpg","galleries_id":384437,"server_id":15,"link":"photo_6875815.html","width":130,"caption":"","height":130});
															thumbnails[8618533] = clik.newPhoto({"id":8618533,"src":"IMG_8959_final1_thumb.jpg","galleries_id":381812,"server_id":15,"link":"photo_8618533.html","width":130,"caption":"","height":130});
															thumbnails[8618590] = clik.newPhoto({"id":8618590,"src":"IMG_8720_final_thumb.jpg","galleries_id":381813,"server_id":15,"link":"photo_8618590.html","width":130,"caption":"","height":130});
															thumbnails[8905284] = clik.newPhoto({"id":8905284,"src":"IMG_9987_edit_sm_thumb.jpg","galleries_id":468298,"server_id":15,"link":"photo_8905284.html","width":130,"caption":"Serengeti","height":130});
															thumbnails[8919698] = clik.newPhoto({"id":8919698,"src":"IMG_0851_edit_sm_thumb.jpg","galleries_id":449374,"server_id":15,"link":"photo_8919698.html","width":130,"caption":"","height":130});
															thumbnails[8912428] = clik.newPhoto({"id":8912428,"src":"IMG_0216_edit_sm_thumb.jpg","galleries_id":468298,"server_id":15,"link":"photo_8912428.html","width":130,"caption":"Zanzibar, dhow sails","height":130});
															thumbnails[6875886] = clik.newPhoto({"id":6875886,"src":"IMG_1077_final_thumb.jpg","galleries_id":384437,"server_id":15,"link":"photo_6875886.html","width":130,"caption":"","height":130});
															thumbnails[8303784] = clik.newPhoto({"id":8303784,"src":"IMG_3928_tryptich1_web_thumb.jpg","galleries_id":441742,"server_id":15,"link":"photo_8303784.html","width":130,"caption":"","height":130});
															thumbnails[8618544] = clik.newPhoto({"id":8618544,"src":"IMG_1505-swanage_thumb.jpg","galleries_id":381812,"server_id":15,"link":"photo_8618544.html","width":130,"caption":"","height":130});
															thumbnails[8618592] = clik.newPhoto({"id":8618592,"src":"IMG_3319-Edit_thumb.jpg","galleries_id":381813,"server_id":15,"link":"photo_8618592.html","width":130,"caption":"","height":130});
															thumbnails[8618417] = clik.newPhoto({"id":8618417,"src":"IMG_3827_edit2_web1_thumb.jpg","galleries_id":441742,"server_id":15,"link":"photo_8618417.html","width":130,"caption":"","height":130});
															thumbnails[9037026] = clik.newPhoto({"id":9037026,"src":"IMG_1485_web_thumb.jpg","galleries_id":449374,"server_id":15,"link":"photo_9037026.html","width":130,"caption":"","height":130});
															thumbnails[6875843] = clik.newPhoto({"id":6875843,"src":"Reflective_thumb.jpg","galleries_id":384437,"server_id":15,"link":"photo_6875843.html","width":130,"caption":"","height":130});
															thumbnails[8618604] = clik.newPhoto({"id":8618604,"src":"IMG_8685_final_thumb.jpg","galleries_id":381813,"server_id":15,"link":"photo_8618604.html","width":130,"caption":"","height":130});
															thumbnails[8912431] = clik.newPhoto({"id":8912431,"src":"IMG_0243_edit_sm_thumb.jpg","galleries_id":468298,"server_id":15,"link":"photo_8912431.html","width":130,"caption":"Dhow at sunset","height":130});
															thumbnails[9036967] = clik.newPhoto({"id":9036967,"src":"IMG_1463_web_thumb.jpg","galleries_id":449374,"server_id":15,"link":"photo_9036967.html","width":130,"caption":"","height":130});
															thumbnails[9037010] = clik.newPhoto({"id":9037010,"src":"IMG_1084_edit_web_thumb.jpg","galleries_id":449374,"server_id":15,"link":"photo_9037010.html","width":130,"caption":"","height":130});
															thumbnails[8618393] = clik.newPhoto({"id":8618393,"src":"IMG_3752_edit_sm_thumb.jpg","galleries_id":441742,"server_id":15,"link":"photo_8618393.html","width":130,"caption":"","height":130});
															thumbnails[8618585] = clik.newPhoto({"id":8618585,"src":"IMG_1482-Keyhaven_thumb.jpg","galleries_id":381812,"server_id":15,"link":"photo_8618585.html","width":130,"caption":"","height":130});
															thumbnails[8618600] = clik.newPhoto({"id":8618600,"src":"IMG_1558_final_thumb.jpg","galleries_id":381813,"server_id":15,"link":"photo_8618600.html","width":130,"caption":"","height":130});
															thumbnails[8618607] = clik.newPhoto({"id":8618607,"src":"Must_be_love_final_thumb.jpg","galleries_id":384437,"server_id":15,"link":"photo_8618607.html","width":130,"caption":"","height":130});
															thumbnails[8965809] = clik.newPhoto({"id":8965809,"src":"IMG_0068_edit_sm2_thumb.jpg","galleries_id":468298,"server_id":15,"link":"photo_8965809.html","width":130,"caption":"Shades of blue","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[479912] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"COMING SOON - Special Profiles","link":"gallery_479912.html","maxRecords":0.0,"photoIDs":[9094593.0],"skipIndex":0,"section_code":"gallery","featured_images":9094593.0,"id":479912,"singleSection":false});				  						galleries[468298] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Zanzibar and Tanzania","link":"gallery_468298.html","maxRecords":0.0,"photoIDs":[8905285.0,8905238.0,8965818.0,8905282.0,8905284.0,8912428.0,8912431.0,8965809.0],"skipIndex":0,"section_code":"gallery","featured_images":8905238.0,"id":468298,"singleSection":false});				  						galleries[441742] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Icescapes","link":"gallery_441742.html","maxRecords":0.0,"photoIDs":[8303781.0,9070638.0,8303774.0,8303782.0,8303784.0,8618417.0,8618393.0],"skipIndex":0,"section_code":"gallery","featured_images":"9070638,8303781","id":441742,"singleSection":false});				  						galleries[381812] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Waterscapes","link":"gallery_381812.html","maxRecords":0.0,"photoIDs":[8960980.0,8960987.0,8960990.0,8618530.0,8618532.0,8618533.0,8618544.0,8618585.0],"skipIndex":0,"section_code":"gallery","featured_images":8960990.0,"id":381812,"singleSection":false});				  						galleries[449374] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Seascapes","link":"gallery_449374.html","maxRecords":0.0,"photoIDs":[8501960.0,8583689.0,9036971.0,8919698.0,9037026.0,9036967.0,9037010.0],"skipIndex":0,"section_code":"gallery","featured_images":"9036971,8919698,8501960","id":449374,"singleSection":false});				  						galleries[381813] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_381813.html","maxRecords":0.0,"photoIDs":[8618588.0,8618589.0,8618590.0,8618592.0,8618604.0,8618600.0],"skipIndex":0,"section_code":"gallery","featured_images":8618588.0,"id":381813,"singleSection":false});				  						galleries[384437] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wildscapes","link":"gallery_384437.html","maxRecords":0.0,"photoIDs":[6875781.0,6875784.0,6875815.0,6875886.0,6875843.0,8618607.0],"skipIndex":0,"section_code":"gallery","featured_images":"6875886,6875781","id":384437,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8960990,8960987,8960980,9094593,9070638,8905238,8618588,8618530,8501960,8303781,6875781,8965818,8618589,8618532,8583689,8303774,6875784,9036971,8303782,8919698,8618533,6875815,8912428,8618592,8618544,6875886,8618417,9037026,9036967,8912431,8618604,6875843,9037010,8618600,8618585,8965809';
imageSets[2] = '8960990,9094593,9070638,8905238,8618588,8501960,8303781,6875781,9036971,8611881,8919698,5025470,6875886';
imageSets[3] = '9094593,9070638,9037026,9037010,9036971,9036967,8965818,8965809,8960990,8960987,8960980,8919698,8912431,8912428,8905285,8905284,8905282,8905238,8684509,8618607,8618604,8618600,8618592,8618590,8618589,8618588,8618585,8618583,8618544,8618533,8618532,8618530,8618528,8618417,8618393,8611881,8583689,8501960,8303784,8303782,8303781,8303774,7208618,6875886,6875843,6875815,6875784,6875781,6875778,5025470';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/furbers/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/furbers/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/furbers/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/furbers/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/furbers/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/furbers/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/furbers/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/furbers/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 || photos || {})[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 = 'susan furber photography: ' + 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>Ref: </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>Photographer: </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> ' + (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.item_price !== '') {
			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;
	}
}

			

