window.thumbnails = {};
															thumbnails[769275] = clik.newPhoto({"id":769275,"src":"newonpaper21.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"'Where the layers grow thin'<br>\r\nOil and mixed media on paper<br>\r\nSOLD","height":96});
															thumbnails[3346701] = clik.newPhoto({"id":3346701,"src":"IMG_2268_edited-11_thumb.JPG","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":92});
															thumbnails[6932610] = clik.newPhoto({"id":6932610,"src":"red-squirrel-morning_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Red Squirrel Morning Mixed Media90x80cm SOLD","height":106});
															thumbnails[775055] = clik.newPhoto({"id":775055,"src":"safary21.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Safary Series <br>\r\nOil and mixed media on canvas<br>\r\n12\" x 12\"<br>\r\nSOLD<br>\r\nNFS","height":131});
															thumbnails[775052] = clik.newPhoto({"id":775052,"src":"safary11.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Safary Series<br>\r\noil and mixed media on canvas SOLD","height":130});
															thumbnails[775058] = clik.newPhoto({"id":775058,"src":"safary31.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Safary series Oil and mixed media on canvas<br>\r\n12\" x 12\"","height":132});
															thumbnails[779817] = clik.newPhoto({"id":779817,"src":"little1.jpg","galleries_id":405283,"server_id":1,"link":"photo_779817.html","width":130,"caption":"'Little dog with orange ear haunts my dreams'Oil and mixed media on canvas100x100cmSortlisted for Celeste Prize 2007","height":125});
															thumbnails[818851] = clik.newPhoto({"id":818851,"src":"beginningoflonging11.jpg","galleries_id":405283,"server_id":1,"link":"photo_818851.html","width":130,"caption":"'The Beginning of Longing I'Oil and mixed media on canvasSOLD","height":132});
															thumbnails[818853] = clik.newPhoto({"id":818853,"src":"beginningoflonging21.jpg","galleries_id":405283,"server_id":1,"link":"photo_818853.html","width":130,"caption":"'The Beginning of Longing II'Oil and mixed media on canvasSOLD","height":129});
															thumbnails[818855] = clik.newPhoto({"id":818855,"src":"beginningoflonging31.jpg","galleries_id":405283,"server_id":1,"link":"photo_818855.html","width":130,"caption":"'The Beginning of Longing  III'Oil and Mixed media on canvasSOLD","height":129});
															thumbnails[2485268] = clik.newPhoto({"id":2485268,"src":"IMG_1544_thumb.JPG","galleries_id":405283,"server_id":1,"link":"photo_2485268.html","width":130,"caption":"The Patience of Tides II Oil and Mixed media on canvas60x60cm £450","height":130});
															thumbnails[3346700] = clik.newPhoto({"id":3346700,"src":"IMG_2268_edited-1_thumb.JPG","galleries_id":405279,"server_id":1,"link":"photo_3346700.html","width":130,"caption":"Everytime  Acrylic on canvas 70x50cm £395","height":92});
															thumbnails[3711766] = clik.newPhoto({"id":3711766,"src":"image_1_for_website_thumb.jpg","galleries_id":405277,"server_id":1,"link":"photo_3711766.html","width":130,"caption":"Singing a new song Mixed media with acrylic 70x70cm SOLD","height":128});
															thumbnails[3711771] = clik.newPhoto({"id":3711771,"src":"image_4_for_website_edited-1_thumb.jpg","galleries_id":405282,"server_id":1,"link":"photo_3711771.html","width":130,"caption":"Winged creatures coming in to land Mixed Media and acrylic on canvas £350               ","height":50});
															thumbnails[4985004] = clik.newPhoto({"id":4985004,"src":"day_of_the_dragonfly_i_thumb.jpg","galleries_id":405279,"server_id":1,"link":"photo_4985004.html","width":130,"caption":"Day of the Dragon fly90x90cmAcrylic on canvasSOLD","height":134});
															thumbnails[4985012] = clik.newPhoto({"id":4985012,"src":"harbour_thumb.jpg","galleries_id":405279,"server_id":1,"link":"photo_4985012.html","width":130,"caption":"Harbour Acrylic on canvas 60x60cm £450","height":126});
															thumbnails[4985015] = clik.newPhoto({"id":4985015,"src":"lullaby_thumb.jpg","galleries_id":405277,"server_id":1,"link":"photo_4985015.html","width":130,"caption":"Lullaby 60x60cm Acrylic on canvas  SOLD","height":130});
															thumbnails[6220813] = clik.newPhoto({"id":6220813,"src":"yesterday_I_will_be_alice_5_thumb.jpg","galleries_id":405279,"server_id":1,"link":"photo_6220813.html","width":130,"caption":"Yesterday I will be Alice Acrylic on canvas    SOLD","height":204});
															thumbnails[6220874] = clik.newPhoto({"id":6220874,"src":"moments_of_escape_for_new_blood_edited-3_thumb.jpg","galleries_id":405277,"server_id":1,"link":"photo_6220874.html","width":130,"caption":"Moments of  Escape Acrylic on canvas 70x50cm £450","height":91});
															thumbnails[6535150] = clik.newPhoto({"id":6535150,"src":"braving_the_elements_new_blood_thumb.jpg","galleries_id":405279,"server_id":1,"link":"photo_6535150.html","width":130,"caption":"Braving the elementsAcrylic on canvas","height":349});
															thumbnails[6925303] = clik.newPhoto({"id":6925303,"src":"An-orchard-for-a-dome_thumb.jpg","galleries_id":405282,"server_id":1,"link":"photo_6925303.html","width":130,"caption":"An Orchard for a dome Mixed Media 60x60cm £475 SOLD","height":130});
															thumbnails[7214287] = clik.newPhoto({"id":7214287,"src":"The-dressed-edge-of-the-air_thumb.jpg","galleries_id":405282,"server_id":1,"link":"photo_7214287.html","width":130,"caption":"The Dressed Edge of the Air SOLD","height":130});
															thumbnails[7496360] = clik.newPhoto({"id":7496360,"src":"Changing_thumb.jpg","galleries_id":405283,"server_id":1,"link":"photo_7496360.html","width":130,"caption":"Changing Acrylic and Mixed Media on Canvas 60x60cm £495","height":130});
															thumbnails[7496368] = clik.newPhoto({"id":7496368,"src":"becoming_thumb.jpg","galleries_id":405283,"server_id":1,"link":"photo_7496368.html","width":130,"caption":"Becoming Acrylic and Mixed Media on Canvas 60x60cm £495","height":130});
															thumbnails[7496400] = clik.newPhoto({"id":7496400,"src":"on-the-edge_thumb.jpg","galleries_id":405277,"server_id":1,"link":"photo_7496400.html","width":130,"caption":"On the Edge  Acrylic and Mixed Media on Linen 60x50cm £450","height":106});
															thumbnails[7496411] = clik.newPhoto({"id":7496411,"src":"recollection_thumb.jpg","galleries_id":405277,"server_id":1,"link":"photo_7496411.html","width":130,"caption":"Recollection Acrylic and Mixed Media on Linen 60x50cm £450","height":108});
															thumbnails[7496416] = clik.newPhoto({"id":7496416,"src":"reminder_thumb.jpg","galleries_id":405277,"server_id":1,"link":"photo_7496416.html","width":130,"caption":"Reminder  Acrylic and Mixed media on Linen 60x50cm £450","height":108});
															thumbnails[8081578] = clik.newPhoto({"id":8081578,"src":"Hovering_thumb.jpg","galleries_id":405283,"server_id":1,"link":"photo_8081578.html","width":130,"caption":"Hovering Acrylic and Mixed media on canvas 60cmx60cm £495","height":120});
															thumbnails[8081594] = clik.newPhoto({"id":8081594,"src":"remembering_thumb.jpg","galleries_id":405282,"server_id":1,"link":"photo_8081594.html","width":130,"caption":"Remembering Acylic and mixed media on canvas 60x60cm SOLD","height":114});
															thumbnails[8081608] = clik.newPhoto({"id":8081608,"src":"believing_thumb.jpg","galleries_id":405282,"server_id":1,"link":"photo_8081608.html","width":130,"caption":"Believing Acylic and mixed media on canvas 60x60cm SOLD","height":115});
															thumbnails[8653353] = clik.newPhoto({"id":8653353,"src":"The-stones-learning-to-danc_thumb.jpg","galleries_id":432836,"server_id":35,"link":"photo_8653353.html","width":130,"caption":"Stones learning to dance 100x80cm Acrylic and mixed media on canvas  £950","height":100});
															thumbnails[8650802] = clik.newPhoto({"id":8650802,"src":"i-have-found-shells_thumb.jpg","galleries_id":432836,"server_id":35,"link":"photo_8650802.html","width":130,"caption":"I have found shells at the top of mountains, and trees at the bottom of the sea Mixed media on linen 150x100cm £2750","height":89});
															thumbnails[7214198] = clik.newPhoto({"id":7214198,"src":"the_elegance_of_the_heart_thumb.jpg","galleries_id":432836,"server_id":1,"link":"photo_7214198.html","width":130,"caption":"The Elegance of the Heart  £950","height":90});
															thumbnails[7214335] = clik.newPhoto({"id":7214335,"src":"glittering_caves_of_the_air_thumb.jpg","galleries_id":432836,"server_id":1,"link":"photo_7214335.html","width":130,"caption":"The Glittering Caves of the Air 90x90cm £950 ","height":123});
															thumbnails[8650822] = clik.newPhoto({"id":8650822,"src":"Time-soace-and-all-creature_thumb.jpg","galleries_id":432836,"server_id":35,"link":"photo_8650822.html","width":130,"caption":"Time space and all creatures II Mixed media on canvas £545","height":132});
															thumbnails[8650797] = clik.newPhoto({"id":8650797,"src":"The-surface-of-darkness_thumb.jpg","galleries_id":432836,"server_id":35,"link":"photo_8650797.html","width":130,"caption":"The surface of darkness 60x60cm £545","height":132});
															thumbnails[8269777] = clik.newPhoto({"id":8269777,"src":"time_space_2_thumb.jpg","galleries_id":432836,"server_id":37,"link":"photo_8269777.html","width":130,"caption":"Time Space and all Creatures II media on canvas 60x60cm  £545","height":134});
															thumbnails[8650801] = clik.newPhoto({"id":8650801,"src":"in-the-mirror-of-his-heart_thumb.jpg","galleries_id":432836,"server_id":35,"link":"photo_8650801.html","width":130,"caption":"In the mirror of his heart","height":132});
															thumbnails[8650799] = clik.newPhoto({"id":8650799,"src":"From-the-lights-edge-to-th_thumb.jpg","galleries_id":432836,"server_id":35,"link":"photo_8650799.html","width":130,"caption":"From the light's edge to the sound 60x60cm £545","height":132});
															thumbnails[7214240] = clik.newPhoto({"id":7214240,"src":"winter_walking_thumb.jpg","galleries_id":405283,"server_id":1,"link":"photo_7214240.html","width":130,"caption":"Winter Walking Acrylic and mixed media on Canvas 60x60cm £475","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[432836] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Affordable Art Fair 2011","link":"gallery_432836.html","maxRecords":0.0,"photoIDs":[8653353.0,8650802.0,7214198.0,7214335.0,8650822.0,8650797.0,8269777.0,8650801.0,8650799.0],"skipIndex":0,"section_code":"gallery","featured_images":"8653353,8650822,8650802,8650801,8650799,8650797,8269777,7214335,7214198","id":432836,"singleSection":false});				  						galleries[405277] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Spring","link":"gallery_405277.html","maxRecords":0.0,"photoIDs":[3711766.0,4985015.0,6220874.0,7496400.0,7496411.0,7496416.0],"skipIndex":0,"section_code":"gallery","featured_images":3711766.0,"id":405277,"singleSection":false});				  						galleries[405279] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Summer","link":"gallery_405279.html","maxRecords":0.0,"photoIDs":[3346700.0,4985004.0,4985012.0,6220813.0,6535150.0],"skipIndex":0,"section_code":"gallery","featured_images":4985004.0,"id":405279,"singleSection":false});				  						galleries[405282] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Autumn","link":"gallery_405282.html","maxRecords":0.0,"photoIDs":[3711771.0,6925303.0,7214287.0,8081594.0,8081608.0],"skipIndex":0,"section_code":"gallery","featured_images":"8081608,8081594,7214287,6925303,3711771","id":405282,"singleSection":false});				  						galleries[405283] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Winter","link":"gallery_405283.html","maxRecords":0.0,"photoIDs":[779817.0,818851.0,818853.0,818855.0,2485268.0,7496360.0,7496368.0,8081578.0,7214240.0],"skipIndex":0,"section_code":"gallery","featured_images":"2485268,818855,818853,818851","id":405283,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '4985004,3711766,2485268,818853,775052';
imageSets[2] = '4985004,3711766,2485268,818855,818853,818851,769275';
imageSets[3] = '3346700';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'www.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/lizmeier/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/lizmeier/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 = '   LIZ MEIER  -  Fine 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>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.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;
	}
}

			

