window.thumbnails = new Object();
												thumbnails[1762210] = new thumbnail(1762210,'','','my-portrait-1_thumb.jpg',130, 130,18,'															#');
												thumbnails[2952553] = new thumbnail(2952553,'','','Katherine,-Adam-&-Ellie-Hun_thumb.jpg',130, 138,18,'															#');
												thumbnails[3434237] = new thumbnail(3434237,'','','Katherine & Adam 29-01-09-600 copy_thumb.jpg',130, 194,18,'															#');
												thumbnails[3434239] = new thumbnail(3434239,'','','Katherine & Adam 29-01-09-604 copy_thumb.jpg',130, 194,18,'															#');
												thumbnails[3434249] = new thumbnail(3434249,'','','Katherine & Adam 29-01-09-654 copy_thumb.jpg',130, 194,18,'															#');
												thumbnails[3434257] = new thumbnail(3434257,'','','Katherine & Adam 29-02-09-480 copy_thumb.jpg',130, 163,18,'															#');
												thumbnails[3545965] = new thumbnail(3545965,'','','Katherine__Adam_29-02-09-179_copy_thumb.jpg',130, 194,18,'															#');
												thumbnails[3545978] = new thumbnail(3545978,'','','Katherine__Adam_29-02-09-503_copy_thumb.jpg',130, 163,18,'															#');
												thumbnails[3434235] = new thumbnail(3434235,'','','Katherine & Adam 29-01-09-599 copy_thumb.jpg',130, 87,18,'															#');
												thumbnails[1166035] = new thumbnail(1166035,'','','Mary-&-Tom-9_thumb.jpg',130, 194,18,'															#');
												thumbnails[1166067] = new thumbnail(1166067,'','','Mary-&-Tom-14_thumb.jpg',130, 93,18,'															#');
												thumbnails[1166162] = new thumbnail(1166162,'','','Mary-&-Tom-110_thumb.jpg',130, 87,18,'															#');
												thumbnails[1238732] = new thumbnail(1238732,'','','pauline & mark_thumb.jpg',130, 195,18,'															#');
												thumbnails[1238734] = new thumbnail(1238734,'','','pauline & mark (2)_thumb.jpg',130, 57,18,'															#');
												thumbnails[1238740] = new thumbnail(1238740,'','','pauline & mark (4)_thumb.jpg',130, 113,18,'															#');
												thumbnails[1238747] = new thumbnail(1238747,'','','pauline & mark (8)_thumb.jpg',130, 87,18,'															#');
												thumbnails[1238769] = new thumbnail(1238769,'','','pauline & mark (26)_thumb.jpg',130, 87,18,'															#');
												thumbnails[1650281] = new thumbnail(1650281,'','','Sarah-&-steve_thumb.website-1.jpg',130, 45,18,'															#');
												thumbnails[1650291] = new thumbnail(1650291,'','','Sarah-&-steve_thumb.website-3.jpg',130, 136,18,'															#');
												thumbnails[1650343] = new thumbnail(1650343,'','','Sarah-&-steve_thumb.website-12.jpg',130, 91,18,'															#');
												thumbnails[1650355] = new thumbnail(1650355,'','','Sarah-&-steve_thumb.website-13.jpg',130, 103,18,'															#');
												thumbnails[1650373] = new thumbnail(1650373,'','','Sarah-&-steve_thumb.website-15.jpg',130, 108,18,'															#');
												thumbnails[1650435] = new thumbnail(1650435,'','','Sarah-&-steve_thumb.website-17.jpg',130, 181,18,'															#');
												thumbnails[1650441] = new thumbnail(1650441,'','','Sarah-&-steve_thumb.website-18.jpg',130, 184,18,'															#');
												thumbnails[1650476] = new thumbnail(1650476,'','','Sarah-&-steve_thumb.website-25.jpg',130, 97,18,'															#');
												thumbnails[2081899] = new thumbnail(2081899,'63441','','jpg4web-1_thumb.jpg',130, 180,18,'																			photo_2081899.html');
												thumbnails[2081902] = new thumbnail(2081902,'63441','','jpg4web-2_thumb.jpg',130, 94,18,'																			photo_2081902.html');
												thumbnails[2081910] = new thumbnail(2081910,'63441','','jpg4web-3_thumb.jpg',130, 101,18,'																			photo_2081910.html');
												thumbnails[2081983] = new thumbnail(2081983,'63441','','jpg4web-5_thumb.jpg',130, 96,18,'																			photo_2081983.html');
												thumbnails[2081986] = new thumbnail(2081986,'63441','','jpg4web-6_thumb.jpg',130, 101,18,'																			photo_2081986.html');
												thumbnails[2081994] = new thumbnail(2081994,'63441','','jpg4web-7_thumb.jpg',130, 174,18,'																			photo_2081994.html');
												thumbnails[5820412] = new thumbnail(5820412,'329769','','copper_bleach-redevelop-De_la_warr_1_thumb.jpg',130, 93,18,'																			photo_5820412.html');
												thumbnails[5820415] = new thumbnail(5820415,'329769','','copper_bleach-redevelop-De_La_Warr_2_thumb.jpg',130, 93,18,'																			photo_5820415.html');
												thumbnails[5820419] = new thumbnail(5820419,'329769','','copper_bleach-redevelop-Hudsons_soap_thumb.jpg',130, 193,18,'																			photo_5820419.html');
												thumbnails[5826972] = new thumbnail(5826972,'63441','','beachy_head_Fbrom_V111_21_thumb.jpg',130, 79,18,'																			photo_5826972.html');
												thumbnails[5826973] = new thumbnail(5826973,'63441','','F30_24_4_thumb.jpg',130, 171,18,'																			photo_5826973.html');
												thumbnails[5827001] = new thumbnail(5827001,'63441','','paddy_lith-kentona-selenium1_thumb.jpg',130, 161,18,'																			photo_5827001.html');
												thumbnails[5827005] = new thumbnail(5827005,'63441','','sir_john_B_gld_tnd_lith0011_thumb.jpg',130, 122,18,'																			photo_5827005.html');
												thumbnails[5827116] = new thumbnail(5827116,'329769','','copper_bleach-redevelop-to_the_river_thumb.jpg',130, 197,18,'																			photo_5827116.html');
												thumbnails[5827283] = new thumbnail(5827283,'63441','','variant3720031_thumb.jpg',130, 96,18,'																			photo_5827283.html');
												thumbnails[5827676] = new thumbnail(5827676,'63441','','gherkin-fomabrom21_thumb.jpg',130, 81,18,'																			photo_5827676.html');
												thumbnails[5827762] = new thumbnail(5827762,'63441','','nature5_15ev1_thumb.jpg',130, 73,18,'																			photo_5827762.html');
												thumbnails[5827787] = new thumbnail(5827787,'63441','','shop_nuance_15ev12_thumb.jpg',130, 95,18,'																			photo_5827787.html');
												thumbnails[5827788] = new thumbnail(5827788,'63441','','sthwld_Pier_Fbrom__151_thumb.jpg',130, 100,18,'																			photo_5827788.html');
												thumbnails[5843168] = new thumbnail(5843168,'58297','','cycle_on_railings_MGWT_thumb.jpg',130, 87,18,'																			photo_5843168.html');
												thumbnails[5843169] = new thumbnail(5843169,'58297','','dungeness_foma_131_thumb.jpg',130, 180,18,'																			photo_5843169.html');
												thumbnails[5843171] = new thumbnail(5843171,'58297','','hudsons_soap_foma_131_thumb.jpg',130, 190,18,'																			photo_5843171.html');
												thumbnails[5843173] = new thumbnail(5843173,'58297','','London_Deli_foma_nature_thumb.jpg',130, 91,18,'																			photo_5843173.html');
												thumbnails[5843176] = new thumbnail(5843176,'58297','','milleniun_bridge_thumb.jpg',130, 169,18,'																			photo_5843176.html');
												thumbnails[5843178] = new thumbnail(5843178,'58297','','north_door-kentona_thumb.jpg',130, 88,18,'																			photo_5843178.html');
												thumbnails[5843179] = new thumbnail(5843179,'58297','','petrol_pump_foma_nature_thumb.jpg',130, 105,18,'																			photo_5843179.html');
												thumbnails[5843182] = new thumbnail(5843182,'58297','','Punts-Adox__nuance_thumb.jpg',130, 90,18,'																			photo_5843182.html');
												thumbnails[5951389] = new thumbnail(5951389,'58297','','whitstable_bike-AVC_thumb.jpg',130, 87,18,'																			photo_5951389.html');
												thumbnails[6028650] = new thumbnail(6028650,'329769','','broken_pump_bleach__re-dev-nature_thumb.jpg',130, 103,18,'																			photo_6028650.html');
												thumbnails[6028654] = new thumbnail(6028654,'329769','','face_sculpture-bleach__re-dev_thumb.jpg',130, 89,18,'																			photo_6028654.html');
												thumbnails[6028656] = new thumbnail(6028656,'329769','','london_deli-1-nature-bleachre-dev_thumb.jpg',130, 91,18,'																			photo_6028656.html');
												thumbnails[6028658] = new thumbnail(6028658,'329769','','millenium_bridge-nature-bleach__re-dev_thumb.jpg',130, 168,18,'																			photo_6028658.html');
												thumbnails[6849820] = new thumbnail(6849820,'63441','','AVC15001_thumb.jpg',130, 91,18,'																			photo_6849820.html');
												thumbnails[6849821] = new thumbnail(6849821,'58297','','bike-cambridge001_thumb.jpg',130, 134,18,'																			photo_6849821.html');
												thumbnails[6849822] = new thumbnail(6849822,'63441','','fombromV11215001_thumb.jpg',130, 92,18,'																			photo_6849822.html');
												thumbnails[6849824] = new thumbnail(6849824,'329769','','jarmans_hse_dungeness001_thumb.jpg',130, 70,18,'																			photo_6849824.html');
												thumbnails[6849825] = new thumbnail(6849825,'58297','','jarmans_hse_dungeness002_thumb.jpg',130, 70,18,'																			photo_6849825.html');
												thumbnails[6849826] = new thumbnail(6849826,'63441','','untitled_shoot-002_thumb.jpg',130, 78,18,'																			photo_6849826.html');
												thumbnails[6967471] = new thumbnail(6967471,'58297','','DLW-Gormley_1_thumb.jpg',130, 90,18,'																			photo_6967471.html');
												thumbnails[7215695] = new thumbnail(7215695,'63441','','DLW_stair_detail11_thumb.jpg',130, 193,18,'																			photo_7215695.html');
												thumbnails[817931] = new thumbnail(817931,'58297','','hamish_thumb.jpg',130, 187,18,'																			photo_817931.html');
												thumbnails[790626] = new thumbnail(790626,'58295','','lauren-28-10-06-1-Edit_thumb.jpg',130, 205,18,'																			photo_790626.html');
												thumbnails[1074297] = new thumbnail(1074297,'58295','','mmphoto-F36_thumb.jpg',130, 194,18,'																			photo_1074297.html');
												thumbnails[786203] = new thumbnail(786203,'58295','','imagengine5_thumb.jpg',130, 195,18,'																			photo_786203.html');
												thumbnails[996037] = new thumbnail(996037,'58295','','freya-2_thumb.jpg',130, 102,18,'																			photo_996037.html');
												thumbnails[753530] = new thumbnail(753530,'58295','','lauren5web_thumb.jpg',130, 194,18,'																			photo_753530.html');
												thumbnails[818083] = new thumbnail(818083,'63441','','oar_thumb.jpg',130, 100,18,'																			photo_818083.html');
												thumbnails[818094] = new thumbnail(818094,'63441','','tamaroa_thumb.jpg',130, 90,18,'																			photo_818094.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[329769] = new gallery(329769,'5820419','Bleach & Re-Development','gallery',[5820412,5820415,5820419,5827116,6028650,6028654,6028656,6028658,6849824],0, 0, '', '																																																																																																							gallery_329769.html',0,0);
				  					galleries[58295] = new gallery(58295,'1074297','Digital','gallery',[790626,1074297,786203,996037,753530],0, 0, '', '																																																																																																							gallery_58295.html',0,0);
				  					galleries[63441] = new gallery(63441,'2081986,818083','Lith Prints','gallery',[2081899,2081902,2081910,2081983,2081986,2081994,5826972,5826973,5827001,5827005,5827283,5827676,5827762,5827787,5827788,6849820,6849822,6849826,7215695,818083,818094],0, 0, '', '																																																																																																							gallery_63441.html',0,0);
				  					galleries[58297] = new gallery(58297,'6967471,6849825,6849821,5951389,5843182,5843179,5843178,5843176,5843173,5843171','Monochrome','gallery',[5843168,5843169,5843171,5843173,5843176,5843178,5843179,5843182,5951389,6849821,6849825,6967471,817931],0, 0, '', '																																																																																																							gallery_58297.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7215695,817931,790626';
imageSets[2] = '5820419,2081986,1074297,818083';
imageSets[3] = '818083,817931,790626';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/imagengine/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/imagengine/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/imagengine/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/imagengine/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/imagengine/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/imagengine/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));		}, 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 = 'Michael Morris Photography : ' + 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));    }        
    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>';
	}
					
				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> 							' + (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="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		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 + '<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;
	}
}

		

