window.thumbnails = new Object();
												thumbnails[2612517] = new thumbnail(2612517,'165844','Oil on Canvas : 8 x 8\" 2008','orange_thumb.jpg',130, 131,32,'photo_2612517.html');
												thumbnails[2612523] = new thumbnail(2612523,'165844','oil on canvas 8 x 8\" 2008','pale_thumb.jpg',130, 132,32,'photo_2612523.html');
												thumbnails[2612527] = new thumbnail(2612527,'165844','oil on canvas 8 x 8\" 2008','red_thumb.jpg',130, 128,32,'photo_2612527.html');
												thumbnails[2612614] = new thumbnail(2612614,'165865',' \'Raghery\' Exhibition 2007,<br>\r\nCarlingford, Co. Louth.','Cairlinn1 2007 _thumb.jpg',130, 164,32,'photo_2612614.html');
												thumbnails[2612616] = new thumbnail(2612616,'165865','Landscapes, oil on canvas.','Cairlinn2 2007_thumb.jpg',130, 75,32,'photo_2612616.html');
												thumbnails[2612619] = new thumbnail(2612619,'165865','Landscapes, oil on canvas.','Cairlinn3_thumb.jpg',130, 98,32,'photo_2612619.html');
												thumbnails[2612998] = new thumbnail(2612998,'165865','','Rathlin lanes_thumb.jpg',130, 173,32,'photo_2612998.html');
												thumbnails[2613000] = new thumbnail(2613000,'165844','Oil on canvas  8 x 8\" 2008','Fuschia_thumb.jpg',130, 129,32,'photo_2613000.html');
												thumbnails[2613009] = new thumbnail(2613009,'165844','Oil on canvas 8 x8 \" 2008','Pink 08_thumb.jpg',130, 131,32,'photo_2613009.html');
												thumbnails[2613011] = new thumbnail(2613011,'165865','Oil on canvas 8 x 8 , 2007','Raghery 7_thumb.jpg',130, 129,32,'photo_2613011.html');
												thumbnails[2613020] = new thumbnail(2613020,'165844','Oil on canvas 6 x 6 2008','Sea Brenda_thumb.jpg',130, 133,32,'photo_2613020.html');
												thumbnails[2613024] = new thumbnail(2613024,'165844','Oil on canvas, 8 x 8 2008','Turquoise_thumb.jpg',130, 131,32,'photo_2613024.html');
												thumbnails[5586175] = new thumbnail(5586175,'165844','Oil on canvas 08','1_thumb.jpg',130, 130,32,'photo_5586175.html');
												thumbnails[5586186] = new thumbnail(5586186,'165844','Oil on canvas 2008','2_thumb.jpg',130, 130,32,'photo_5586186.html');
												thumbnails[5586196] = new thumbnail(5586196,'165844','Oil on canvas 2008','4_thumb.jpg',130, 65,32,'photo_5586196.html');
												thumbnails[5586201] = new thumbnail(5586201,'165844','Oil on canvas 2008','5_thumb.jpg',130, 130,32,'photo_5586201.html');
												thumbnails[5586208] = new thumbnail(5586208,'165844','Oil on canvas 2008','6_thumb.jpg',130, 65,32,'photo_5586208.html');
												thumbnails[5586213] = new thumbnail(5586213,'165844','Oil on canvas 2008','7_thumb.jpg',130, 130,32,'photo_5586213.html');
												thumbnails[5586217] = new thumbnail(5586217,'165844','Oil on canvas 2008','8_thumb.jpg',130, 130,32,'photo_5586217.html');
												thumbnails[5586226] = new thumbnail(5586226,'165844','Oil on canvas 2008','9_thumb.jpg',130, 130,32,'photo_5586226.html');
												thumbnails[5586230] = new thumbnail(5586230,'165844','Oil on paper 2008','10_thumb.jpg',130, 195,32,'photo_5586230.html');
												thumbnails[5586243] = new thumbnail(5586243,'165844','Oil on paper 2008','11_thumb.jpg',130, 195,32,'photo_5586243.html');
												thumbnails[5586700] = new thumbnail(5586700,'165840','\'Red\' 2009 (See News section)','_1_Red_small1_thumb.jpg',130, 108,32,'photo_5586700.html');
												thumbnails[5589688] = new thumbnail(5589688,'165865','Oil on canvas 07','1_2913756D-1D09-001F-995E4AFA2E1B340F_thumb.jpg',130, 130,32,'photo_5589688.html');
												thumbnails[5589689] = new thumbnail(5589689,'165865','Oil on canvas 2007','2_29153A8D-1D09-001F-995E2E6446A4941D_thumb.jpg',130, 130,32,'photo_5589689.html');
												thumbnails[5589690] = new thumbnail(5589690,'165865','Oil on canvas 2007','3_29161DAA-1D09-001F-99FD5C67FB85875F_thumb.jpg',130, 130,32,'photo_5589690.html');
												thumbnails[5589691] = new thumbnail(5589691,'165865','Oil on canvas 2007','4_2916B259-1D09-001F-99236C1112B9A774_thumb.jpg',130, 130,32,'photo_5589691.html');
												thumbnails[5589693] = new thumbnail(5589693,'165865','Oil on canvas 2007','5_29173851-1D09-001F-99868B6C4ECF6A54_thumb.jpg',130, 130,32,'photo_5589693.html');
												thumbnails[5589694] = new thumbnail(5589694,'165865','Oil on canvas 2007','6_2917B88E-1D09-001F-992C1C2935EB64F6_thumb.jpg',130, 130,32,'photo_5589694.html');
												thumbnails[5589726] = new thumbnail(5589726,'165865','Oil on canvas 8 x !6\" 2007','7_29188C29-1D09-001F-99CDE216DB40DE3A_thumb.jpg',130, 64,32,'photo_5589726.html');
												thumbnails[5589727] = new thumbnail(5589727,'165865','Oil on canvas 2007','8_29194A2A-1D09-001F-991A3F3E19DB0720_thumb.jpg',130, 130,32,'photo_5589727.html');
												thumbnails[5589728] = new thumbnail(5589728,'165865','Oil on canvas 2007','9_2919D68C-1D09-001F-99E69C235FEF84A7_thumb.jpg',130, 130,32,'photo_5589728.html');
												thumbnails[5589730] = new thumbnail(5589730,'165865','Oil on canvas 2007','10_291A5F34-1D09-001F-9923D9FABD0F2147_thumb.jpg',130, 65,32,'photo_5589730.html');
												thumbnails[5589731] = new thumbnail(5589731,'165865','Oil on canvas 2007','11_291AE924-1D09-001F-99BD930B60477E87_thumb.jpg',130, 130,32,'photo_5589731.html');
												thumbnails[5589732] = new thumbnail(5589732,'165865','Oil on canvas','12_291B6A6A-1D09-001F-996FD4B969A4CA4C_thumb.jpg',130, 65,32,'photo_5589732.html');
												thumbnails[5722109] = new thumbnail(5722109,'165840','\'Red\' Series 2009','Red_Series_thumb.JPG',130, 33,32,'photo_5722109.html');
												thumbnails[5722179] = new thumbnail(5722179,'165840','Artists Justine Glasgow, Angela Ginn and Joanne Irvine.','P1030743_thumb.jpg',130, 74,32,'photo_5722179.html');
												thumbnails[5742962] = new thumbnail(5742962,'165840','','Opening_Sat_May_15th__7-9pm_Maryville_Street_Belfast__thumb.jpg',130, 60,32,'photo_5742962.html');
												thumbnails[6657845] = new thumbnail(6657845,'165840','','Aurielle_1_sm_thumb.jpg',130, 81,32,'photo_6657845.html');
												thumbnails[6657897] = new thumbnail(6657897,'165840','','Aurielle_3_sm_thumb.jpg',130, 89,32,'photo_6657897.html');
												thumbnails[6657902] = new thumbnail(6657902,'165840','','Aurielle_4_sm_thumb.jpg',130, 89,32,'photo_6657902.html');
												thumbnails[6657905] = new thumbnail(6657905,'165840','','Aurielle_twin_sm_thumb.jpg',130, 87,32,'photo_6657905.html');
												thumbnails[6657910] = new thumbnail(6657910,'165840','','Contour_1_sm_thumb.jpg',130, 173,32,'photo_6657910.html');
												thumbnails[6657918] = new thumbnail(6657918,'165840','','Contour_2_sm_thumb.jpg',130, 173,32,'photo_6657918.html');
												thumbnails[6657929] = new thumbnail(6657929,'165840','','Contour_3_sm_thumb.jpg',130, 173,32,'photo_6657929.html');
												thumbnails[6657935] = new thumbnail(6657935,'165840','','Contour_group_sm_thumb.jpg',130, 101,32,'photo_6657935.html');
												thumbnails[6657940] = new thumbnail(6657940,'165840','','_Feast1_sm_thumb.jpg',130, 260,32,'photo_6657940.html');
												thumbnails[6657950] = new thumbnail(6657950,'165840','','Feast_2_sm_thumb.jpg',130, 260,32,'photo_6657950.html');
												thumbnails[6657961] = new thumbnail(6657961,'165840','','Ros_sm_thumb.jpg',130, 260,32,'photo_6657961.html');
												thumbnails[6729908] = new thumbnail(6729908,'165840','','MIRAcard_invite2_thumb.jpg',130, 61,32,'photo_6729908.html');
												thumbnails[6729916] = new thumbnail(6729916,'165840','','MIRAcard_invite2cover_thumb.jpg',130, 61,32,'photo_6729916.html');
												thumbnails[6730024] = new thumbnail(6730024,'165840','','ACNI_logo_sm_thumb.jpg',130, 173,32,'photo_6730024.html');
												thumbnails[6730025] = new thumbnail(6730025,'165840','','piazzi_sm_thumb.jpg',130, 108,32,'photo_6730025.html');
												thumbnails[6730026] = new thumbnail(6730026,'165840','','_6_MIRA_sm22_thumb.jpg',130, 41,32,'photo_6730026.html');
												thumbnails[6730028] = new thumbnail(6730028,'165840','','Ombelicosm_thumb.jpg',130, 78,32,'photo_6730028.html');
												thumbnails[6730031] = new thumbnail(6730031,'165840','','1_Rossore_sm_thumb.jpg',130, 39,32,'photo_6730031.html');
												thumbnails[6730037] = new thumbnail(6730037,'165840','','limone_sm_thumb.jpg',130, 217,32,'photo_6730037.html');
												thumbnails[6730203] = new thumbnail(6730203,'165840','','aurielle_sm1_thumb.jpg',130, 84,32,'photo_6730203.html');
												thumbnails[6736055] = new thumbnail(6736055,'165840','','fiori_1_sm_thumb.jpg',130, 91,32,'photo_6736055.html');
												thumbnails[6736056] = new thumbnail(6736056,'165840','','fiori_2_sm_thumb.jpg',130, 91,32,'photo_6736056.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[165865] = new gallery(165865,'5589732,5589731,5589730,5589728,5589727,5589726,5589694,5589693,5589691,5589690','\'Raghery\' Exhibition 2007','gallery',[2612614,2612616,2612619,2612998,2613011,5589688,5589689,5589690,5589691,5589693,5589694,5589726,5589727,5589728,5589730,5589731,5589732],0, 0, '', 'gallery_165865.html',0,0);
				  					galleries[165844] = new gallery(165844,'5586243,5586230,5586226,5586217,5586213,5586208,5586201,5586196,5586186,5586175','Rathlin Landscapes 1','gallery',[2612517,2612523,2612527,2613000,2613009,2613020,2613024,5586175,5586186,5586196,5586201,5586208,5586213,5586217,5586226,5586230,5586243],0, 0, '165839', 'gallery_165844.html',0,0);
				  					galleries[165839] = new gallery(165839,'5586243,5586230,5586226,5586217,5586213,5586208,5586201,5586196,5586186,5586175','\'Landed\' Exhibition 2008','gallery',[],0, 0, '', 'gallery_165839.html',0,0);
				  					galleries[165840] = new gallery(165840,'6736056,6736055,6730203,6730037,6730031,6730028,6730026,6730025,6730024,6729916','Exhibitions  2010','gallery',[5586700,5722109,5722179,5742962,6657845,6657897,6657902,6657905,6657910,6657918,6657929,6657935,6657940,6657950,6657961,6729908,6729916,6730024,6730025,6730026,6730028,6730031,6730037,6730203,6736055,6736056],0, 0, '', 'gallery_165840.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '2612523';
imageSets[3] = '6736056,6736055,6730203,6730037,6730031,6730028,6730026,6730025,6730024,6729916,6729908,6657961,6657950,6657940,6657935,6657929,6657918,6657910,6657905,6657902,6657897,6657845,5742962,5722179,5722109,5589732,5589731,5589730,5589728,5589727,5589726,5589694,5589693,5589691,5589690,5589689,5589688,5586700,5586243,5586230,5586226,5586217,5586213,5586208,5586201,5586196,5586186,5586175,2613024,2613020';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/aginn/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/aginn/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/aginn/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/aginn/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/aginn/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/aginn/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {

	imageID = randomListVal('');
		if (!basic) {
	img.src = photos[imageID].src;
	img.width = photos[imageID].width;
	img.height = photos[imageID].height;
  img.parentNode.title = img.alt = photos[imageID].caption;
	}
	else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
				
	}
			}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}
/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
  var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
		if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
    
  updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
  var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
      op = $.extend({},defaults,options),
      html = '', temp = '',
      photoId = op.nextPhoto.id,
      photoCaption = op.nextPhoto.caption,
      photoSrc = op.nextPhoto.src;
		
		if (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    if (op.$photo.length > 0) {
      html = $('<img/>',{
        'class': 'mainphoto photo',
        src: photoSrc,
        id: 'mainPic',
        name: 'mainPic',
        width: op.nextPhoto.width,
        height: op.nextPhoto.height,
        alt: photoCaption,
        css: op.css || {}
      });
      if (op.href) {
      	if (op.href.match(/<a/)) {
      	  html = $(op.href).append(html);
      	} else {
		  html = $('<a/>', {
			href: op.href,
			title: photoCaption
		  }).append(html);
	    }
      } else {
      	html = $('<a/>', {
			title: photoCaption
		  }).append(html);
      }
      if (op.speed == 0) {        op.$photo.html(html);        if (op.onBefore) {          op.onBefore.apply(op.$photo);        }        if (op.onAfter) {          op.onAfter.apply(op.$photo);        }      } else {        op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){            if (op.onAfter) {		    op.onAfter.apply(this);          }		  clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));		  $('body').trigger('clikUpdate');		}, op.onBefore);
      }    }
    	if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'angelaginn.co.uk: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {};	    	      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object') {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
				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;
	}
}

			

