window.thumbnails = {};
															thumbnails[6196726] = clik.newPhoto({"id":6196726,"src":"IMG_9135_thumb.jpg","galleries_id":344736,"server_id":5,"link":"photo_6196726.html","width":130,"caption":"","height":87});
															thumbnails[6196736] = clik.newPhoto({"id":6196736,"src":"IMG_9117_thumb.jpg","galleries_id":344736,"server_id":5,"link":"photo_6196736.html","width":130,"caption":"","height":86});
															thumbnails[6196797] = clik.newPhoto({"id":6196797,"src":"IMG_9370_thumb.jpg","galleries_id":344736,"server_id":5,"link":"photo_6196797.html","width":130,"caption":"","height":87});
															thumbnails[6254895] = clik.newPhoto({"id":6254895,"src":"IMG_9731_thumb.jpg","galleries_id":347801,"server_id":5,"link":"photo_6254895.html","width":130,"caption":"","height":87});
															thumbnails[6254901] = clik.newPhoto({"id":6254901,"src":"IMG_9610_thumb.jpg","galleries_id":347801,"server_id":5,"link":"photo_6254901.html","width":130,"caption":"","height":87});
															thumbnails[6256031] = clik.newPhoto({"id":6256031,"src":"IMG_9679_thumb.jpg","galleries_id":347801,"server_id":5,"link":"photo_6256031.html","width":130,"caption":"","height":87});
															thumbnails[6256034] = clik.newPhoto({"id":6256034,"src":"IMG_9673_thumb.jpg","galleries_id":347801,"server_id":5,"link":"photo_6256034.html","width":130,"caption":"","height":87});
															thumbnails[6183829] = clik.newPhoto({"id":6183829,"src":"Scan_17_thumb.jpg","galleries_id":344740,"server_id":5,"link":"photo_6183829.html","width":130,"caption":"","height":126});
															thumbnails[6226104] = clik.newPhoto({"id":6226104,"src":"IMG_7152_thumb.jpg","galleries_id":344737,"server_id":5,"link":"photo_6226104.html","width":130,"caption":"","height":195});
															thumbnails[6255998] = clik.newPhoto({"id":6255998,"src":"house_head_thumb.jpg","galleries_id":344517,"server_id":5,"link":"photo_6255998.html","width":130,"caption":"","height":189});
															thumbnails[6280530] = clik.newPhoto({"id":6280530,"src":"yo1_thumb.jpg","galleries_id":348816,"server_id":5,"link":"photo_6280530.html","width":130,"caption":"","height":215});
															thumbnails[6183983] = clik.newPhoto({"id":6183983,"src":"Scan_7_thumb.jpg","galleries_id":344740,"server_id":5,"link":"photo_6183983.html","width":130,"caption":"","height":126});
															thumbnails[6196719] = clik.newPhoto({"id":6196719,"src":"IMG_9130_thumb.JPG","galleries_id":344736,"server_id":5,"link":"photo_6196719.html","width":130,"caption":"","height":87});
															thumbnails[6226115] = clik.newPhoto({"id":6226115,"src":"IMG_7026_thumb.jpg","galleries_id":344737,"server_id":5,"link":"photo_6226115.html","width":130,"caption":"","height":195});
															thumbnails[6279622] = clik.newPhoto({"id":6279622,"src":"sc00fde2d61_thumb.jpg","galleries_id":344517,"server_id":5,"link":"photo_6279622.html","width":130,"caption":"","height":195});
															thumbnails[6280624] = clik.newPhoto({"id":6280624,"src":"tu1_thumb.jpg","galleries_id":348816,"server_id":5,"link":"photo_6280624.html","width":130,"caption":"","height":94});
															thumbnails[6183972] = clik.newPhoto({"id":6183972,"src":"Scan_95_thumb.jpg","galleries_id":344740,"server_id":5,"link":"photo_6183972.html","width":130,"caption":"","height":126});
															thumbnails[6279625] = clik.newPhoto({"id":6279625,"src":"lzdifu1_thumb.jpg","galleries_id":344517,"server_id":5,"link":"photo_6279625.html","width":130,"caption":"","height":193});
															thumbnails[6183837] = clik.newPhoto({"id":6183837,"src":"Scan_12_thumb.jpg","galleries_id":344740,"server_id":5,"link":"photo_6183837.html","width":130,"caption":"","height":134});
															thumbnails[6279641] = clik.newPhoto({"id":6279641,"src":"sc00fe696f_thumb.jpg","galleries_id":344517,"server_id":5,"link":"photo_6279641.html","width":130,"caption":"","height":194});
															thumbnails[6281667] = clik.newPhoto({"id":6281667,"src":"fotuy_thumb.jpg","galleries_id":348816,"server_id":5,"link":"photo_6281667.html","width":130,"caption":"","height":42});
															thumbnails[6184001] = clik.newPhoto({"id":6184001,"src":"Scan_4_thumb.jpg","galleries_id":344740,"server_id":5,"link":"photo_6184001.html","width":130,"caption":"","height":126});
															thumbnails[6226125] = clik.newPhoto({"id":6226125,"src":"IMG_7238_thumb.jpg","galleries_id":344737,"server_id":5,"link":"photo_6226125.html","width":130,"caption":"","height":195});
															thumbnails[6261193] = clik.newPhoto({"id":6261193,"src":"IMG_9313_2_thumb.jpg","galleries_id":344736,"server_id":5,"link":"photo_6261193.html","width":130,"caption":"","height":87});
															thumbnails[6281782] = clik.newPhoto({"id":6281782,"src":"foo1_thumb.jpg","galleries_id":348816,"server_id":5,"link":"photo_6281782.html","width":130,"caption":"","height":115});
															thumbnails[6226201] = clik.newPhoto({"id":6226201,"src":"IMG_7242_thumb.jpg","galleries_id":344737,"server_id":5,"link":"photo_6226201.html","width":130,"caption":"","height":195});
															thumbnails[6255192] = clik.newPhoto({"id":6255192,"src":"IMG_97591_thumb.jpg","galleries_id":347801,"server_id":5,"link":"photo_6255192.html","width":130,"caption":"","height":214});
															thumbnails[6280186] = clik.newPhoto({"id":6280186,"src":"sc0102f7541_thumb.jpg","galleries_id":348816,"server_id":5,"link":"photo_6280186.html","width":130,"caption":"","height":92});
															thumbnails[6184004] = clik.newPhoto({"id":6184004,"src":"Scan_61_thumb.jpg","galleries_id":344740,"server_id":5,"link":"photo_6184004.html","width":130,"caption":"","height":126});
															thumbnails[6184016] = clik.newPhoto({"id":6184016,"src":"Scan_51_thumb.jpg","galleries_id":344740,"server_id":5,"link":"photo_6184016.html","width":130,"caption":"","height":126});
															thumbnails[6254978] = clik.newPhoto({"id":6254978,"src":"IMG_7155_copy_89461C9A-1EC9-D45B-1C040E9D6AB5C3F2_thumb.jpg","galleries_id":344737,"server_id":5,"link":"photo_6254978.html","width":130,"caption":"","height":86});
															thumbnails[6281163] = clik.newPhoto({"id":6281163,"src":"djo_thumb.jpg","galleries_id":348816,"server_id":5,"link":"photo_6281163.html","width":130,"caption":"","height":91});
															thumbnails[6254984] = clik.newPhoto({"id":6254984,"src":"IMG_7105_8947481A-1EC9-D45B-1CE75D49AF687A9A_thumb.jpg","galleries_id":344737,"server_id":5,"link":"photo_6254984.html","width":130,"caption":"","height":86});
															thumbnails[6254652] = clik.newPhoto({"id":6254652,"src":"_MG_5882_thumb.jpg","galleries_id":347790,"server_id":5,"link":"photo_6254652.html","width":130,"caption":"","height":195});
															thumbnails[6254649] = clik.newPhoto({"id":6254649,"src":"_MG_5887_thumb.jpg","galleries_id":347790,"server_id":5,"link":"photo_6254649.html","width":130,"caption":"","height":195});
															thumbnails[6254651] = clik.newPhoto({"id":6254651,"src":"_MG_58771_thumb.jpg","galleries_id":347790,"server_id":5,"link":"photo_6254651.html","width":130,"caption":"","height":195});
															thumbnails[6254671] = clik.newPhoto({"id":6254671,"src":"_MG_5896_thumb.jpg","galleries_id":347790,"server_id":5,"link":"photo_6254671.html","width":130,"caption":"","height":195});
															thumbnails[6254781] = clik.newPhoto({"id":6254781,"src":"_MG_58891_thumb.jpg","galleries_id":347790,"server_id":5,"link":"photo_6254781.html","width":130,"caption":"","height":195});
															thumbnails[6254635] = clik.newPhoto({"id":6254635,"src":"_MG_5893_thumb.JPG","galleries_id":347790,"server_id":5,"link":"photo_6254635.html","width":130,"caption":"","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[348816] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"drawings","link":"section411843_348816.html","maxRecords":0.0,"photoIDs":[6280530.0,6280624.0,6281667.0,6281782.0,6280186.0,6281163.0],"skipIndex":0,"section_code":"section411843","featured_images":6281667.0,"id":348816,"singleSection":false});				  						galleries[347780] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"installations","link":"section411843_347780.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section411843","featured_images":"6254984,6254901,6196726","id":347780,"singleSection":false});				  						galleries[347790] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"shadows in water","link":"gallery.html","maxRecords":0.0,"photoIDs":[6254652.0,6254649.0,6254651.0,6254671.0,6254781.0,6254635.0],"skipIndex":0,"section_code":"gallery","featured_images":6254671.0,"id":347790,"singleSection":true});				  						galleries[344517] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"analog photography","link":"section411843_344517.html","maxRecords":0.0,"photoIDs":[6255998.0,6279622.0,6279625.0,6279641.0],"skipIndex":0,"section_code":"section411843","featured_images":6255998.0,"id":344517,"singleSection":false});				  						galleries[344740] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"ghost paintings","link":"section411843_344740.html","maxRecords":0.0,"photoIDs":[6183829.0,6183983.0,6183972.0,6183837.0,6184001.0,6184004.0,6184016.0],"skipIndex":0,"section_code":"section411843","featured_images":6183829.0,"id":344740,"singleSection":false});				  						galleries[344737] = clik.newGallery({"parentGallery":347780,"usePopups":false,"title":"the anxiety of perfection.","link":"section411843_344737.html","maxRecords":0.0,"photoIDs":[6226104.0,6226115.0,6226125.0,6226201.0,6254978.0,6254984.0],"skipIndex":0,"section_code":"section411843","featured_images":6254984.0,"id":344737,"singleSection":false});				  						galleries[344736] = clik.newGallery({"parentGallery":347780,"usePopups":false,"title":"usoapia","link":"section411843_344736.html","maxRecords":0.0,"photoIDs":[6196726.0,6196736.0,6196797.0,6196719.0,6261193.0],"skipIndex":0,"section_code":"section411843","featured_images":6196726.0,"id":344736,"singleSection":false});				  						galleries[347801] = clik.newGallery({"parentGallery":347780,"usePopups":false,"title":"cardboard houses","link":"section411843_347801.html","maxRecords":0.0,"photoIDs":[6254895.0,6254901.0,6256031.0,6256034.0,6255192.0],"skipIndex":0,"section_code":"section411843","featured_images":6254901.0,"id":347801,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6183972,6183829';
imageSets[2] = '6281667,6255998,6254984,6254901,6254671,6196726,6183829';
imageSets[3] = '6281782,6281667,6281163,6280624,6280530,6280186,6279641,6279625,6261193,6256034,6256031,6255998,6255192,6254984,6254978,6254901,6254895,6254781,6254671,6254652,6254651,6254649,6254635,6226201,6226125,6226115,6226104,6196797,6196736,6196726,6196719,6184016,6184004,6184001,6183983,6183972,6183837,6183829';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/natalierose/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/natalierose/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/natalierose/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/natalierose/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/natalierose/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/natalierose/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/natalierose/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 += 'section411843.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 && 'section411843' != '') {
					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 = 'Natalie Hutton: ' + 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({					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 += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

