window.thumbnails = new Object();
												thumbnails[7366347] = new thumbnail(7366347,'','','swpp_thumb.gif',130, 59,1,'#');
												thumbnails[7366368] = new thumbnail(7366368,'','','swpp1_thumb.gif',130, 59,1,'#');
												thumbnails[7366387] = new thumbnail(7366387,'','','swpp2_thumb.gif',130, 59,1,'#');
												thumbnails[7366409] = new thumbnail(7366409,'','','swpp-1_thumb.gif',130, 59,1,'#');
												thumbnails[4073839] = new thumbnail(4073839,'234057','','Becky--Steven00089__thumb.jpg',130, 195,1,'photo_4073839.html');
												thumbnails[4583503] = new thumbnail(4583503,'211997','','Evans0933__thumb.jpg',130, 195,1,'photo_4583503.html');
												thumbnails[4583640] = new thumbnail(4583640,'211997','','Hilder000667__thumb.jpg',130, 195,1,'photo_4583640.html');
												thumbnails[4736014] = new thumbnail(4736014,'211997','','IMG_5243_thumb.jpg',130, 195,1,'photo_4736014.html');
												thumbnails[4736019] = new thumbnail(4736019,'211997','','IMG_7060_thumb.jpg',130, 195,1,'photo_4736019.html');
												thumbnails[5845919] = new thumbnail(5845919,'366296','','Portrait-Comp-2_thumb.jpg',130, 195,1,'photo_5845919.html');
												thumbnails[6094606] = new thumbnail(6094606,'234057','','Gibson_thumb.jpg',130, 195,1,'photo_6094606.html');
												thumbnails[6712404] = new thumbnail(6712404,'366296','','Web_0083_thumb.jpg',130, 195,1,'photo_6712404.html');
												thumbnails[6712408] = new thumbnail(6712408,'366296','','Web_0081_thumb.jpg',130, 195,1,'photo_6712408.html');
												thumbnails[6712424] = new thumbnail(6712424,'366296','','Web_0075_thumb.jpg',130, 195,1,'photo_6712424.html');
												thumbnails[6712430] = new thumbnail(6712430,'366296','','Web_0070_thumb.jpg',130, 195,1,'photo_6712430.html');
												thumbnails[6712439] = new thumbnail(6712439,'366296','','Web_0069_thumb.jpg',130, 195,1,'photo_6712439.html');
												thumbnails[6712441] = new thumbnail(6712441,'366296','','Web_0068_thumb.jpg',130, 195,1,'photo_6712441.html');
												thumbnails[6712445] = new thumbnail(6712445,'211997','','Web_0001_thumb.jpg',130, 195,1,'photo_6712445.html');
												thumbnails[6712448] = new thumbnail(6712448,'234057','','Web_0004_thumb.jpg',130, 195,1,'photo_6712448.html');
												thumbnails[6712449] = new thumbnail(6712449,'234057','','Web_0005_thumb.jpg',130, 195,1,'photo_6712449.html');
												thumbnails[6712452] = new thumbnail(6712452,'234057','','Web_0008_thumb.jpg',130, 195,1,'photo_6712452.html');
												thumbnails[6712455] = new thumbnail(6712455,'234057','','Web_0010_thumb.jpg',130, 195,1,'photo_6712455.html');
												thumbnails[6712456] = new thumbnail(6712456,'211997','','Web_0011_thumb.jpg',130, 195,1,'photo_6712456.html');
												thumbnails[6712464] = new thumbnail(6712464,'211997','','Web_0016_thumb.jpg',130, 195,1,'photo_6712464.html');
												thumbnails[6712467] = new thumbnail(6712467,'211997','','Web_0018_thumb.jpg',130, 195,1,'photo_6712467.html');
												thumbnails[6712469] = new thumbnail(6712469,'211997','','Web_0019_thumb.jpg',130, 195,1,'photo_6712469.html');
												thumbnails[6712478] = new thumbnail(6712478,'234057','','Web_0024_thumb.jpg',130, 195,1,'photo_6712478.html');
												thumbnails[6712479] = new thumbnail(6712479,'234057','','Web_0027_thumb.jpg',130, 195,1,'photo_6712479.html');
												thumbnails[6712482] = new thumbnail(6712482,'366296','','Web_0029_thumb.jpg',130, 195,1,'photo_6712482.html');
												thumbnails[6712484] = new thumbnail(6712484,'366296','','Web_0031_thumb.jpg',130, 195,1,'photo_6712484.html');
												thumbnails[6712495] = new thumbnail(6712495,'211997','','Web_0033_thumb.jpg',130, 195,1,'photo_6712495.html');
												thumbnails[6712500] = new thumbnail(6712500,'211997','','Web_0036_thumb.jpg',130, 195,1,'photo_6712500.html');
												thumbnails[6712503] = new thumbnail(6712503,'211997','','Web_0037_thumb.jpg',130, 195,1,'photo_6712503.html');
												thumbnails[6712506] = new thumbnail(6712506,'211997','','Web_0038_thumb.jpg',130, 195,1,'photo_6712506.html');
												thumbnails[6712507] = new thumbnail(6712507,'211997','','Web_0040_thumb.jpg',130, 195,1,'photo_6712507.html');
												thumbnails[6712509] = new thumbnail(6712509,'211997','','Web_0041_thumb.jpg',130, 195,1,'photo_6712509.html');
												thumbnails[6712510] = new thumbnail(6712510,'211997','','Web_0044_thumb.jpg',130, 195,1,'photo_6712510.html');
												thumbnails[6712511] = new thumbnail(6712511,'211997','','Web_0045_thumb.jpg',130, 195,1,'photo_6712511.html');
												thumbnails[6712512] = new thumbnail(6712512,'211997','','Web_0046_thumb.jpg',130, 195,1,'photo_6712512.html');
												thumbnails[6712514] = new thumbnail(6712514,'211997','','Web_0052_thumb.jpg',130, 195,1,'photo_6712514.html');
												thumbnails[6712516] = new thumbnail(6712516,'211997','','Web_0053_thumb.jpg',130, 195,1,'photo_6712516.html');
												thumbnails[6712517] = new thumbnail(6712517,'211997','','Web_0055_thumb.jpg',130, 87,1,'photo_6712517.html');
												thumbnails[6712518] = new thumbnail(6712518,'234057','','Web_0058_thumb.jpg',130, 195,1,'photo_6712518.html');
												thumbnails[6712519] = new thumbnail(6712519,'234057','','Web_0060_thumb.jpg',130, 195,1,'photo_6712519.html');
												thumbnails[6712520] = new thumbnail(6712520,'234057','','Web_0063_thumb.jpg',130, 195,1,'photo_6712520.html');
												thumbnails[6712521] = new thumbnail(6712521,'234057','','Web_0064_thumb.jpg',130, 195,1,'photo_6712521.html');
												thumbnails[6714051] = new thumbnail(6714051,'366296','','Web_00672_thumb.jpg',130, 195,1,'photo_6714051.html');
												thumbnails[6714056] = new thumbnail(6714056,'366296','','Web_00721_thumb.jpg',130, 195,1,'photo_6714056.html');
												thumbnails[6714057] = new thumbnail(6714057,'366296','','Web_0073_thumb.jpg',130, 195,1,'photo_6714057.html');
												thumbnails[6714058] = new thumbnail(6714058,'366296','','Web_00741_thumb.jpg',130, 195,1,'photo_6714058.html');
												thumbnails[6714061] = new thumbnail(6714061,'366296','','Web_00761_thumb.jpg',130, 195,1,'photo_6714061.html');
												thumbnails[6714063] = new thumbnail(6714063,'366296','','Web_00771_thumb.jpg',130, 195,1,'photo_6714063.html');
												thumbnails[7902398] = new thumbnail(7902398,'366296','','Kids_thumb.jpg',130, 87,1,'photo_7902398.html');
												thumbnails[4583433] = new thumbnail(4583433,'211997','','Evans0599__thumb.jpg',130, 87,1,'photo_4583433.html');
												thumbnails[6712406] = new thumbnail(6712406,'366296','','Web_0082_thumb.jpg',130, 87,1,'photo_6712406.html');
												thumbnails[6712477] = new thumbnail(6712477,'234057','','Web_0023_thumb.jpg',130, 87,1,'photo_6712477.html');
												thumbnails[6712450] = new thumbnail(6712450,'234057','','Web_00061_thumb.jpg',130, 87,1,'photo_6712450.html');
												thumbnails[4736021] = new thumbnail(4736021,'211997','','IMG_7123_thumb.jpg',130, 87,1,'photo_4736021.html');
												thumbnails[6712340] = new thumbnail(6712340,'234057','','Web_0007_thumb.jpg',130, 87,1,'photo_6712340.html');
												thumbnails[4073653] = new thumbnail(4073653,'234057','','Becky--Steven00044__thumb.jpg',130, 87,1,'photo_4073653.html');
												thumbnails[4736030] = new thumbnail(4736030,'211997','','IMG_7568_thumb.jpg',130, 87,1,'photo_4736030.html');
												thumbnails[6712446] = new thumbnail(6712446,'211997','','Web_0002_thumb.jpg',130, 87,1,'photo_6712446.html');
												thumbnails[6712410] = new thumbnail(6712410,'366296','','Web_0080_thumb.jpg',130, 87,1,'photo_6712410.html');
												thumbnails[6712458] = new thumbnail(6712458,'211997','','Web_0012_thumb.jpg',130, 87,1,'photo_6712458.html');
												thumbnails[6712461] = new thumbnail(6712461,'211997','','Web_0014_thumb.jpg',130, 87,1,'photo_6712461.html');
												thumbnails[6712462] = new thumbnail(6712462,'211997','','Web_0015_thumb.jpg',130, 87,1,'photo_6712462.html');
												thumbnails[6712465] = new thumbnail(6712465,'211997','','Web_0017_thumb.jpg',130, 87,1,'photo_6712465.html');
												thumbnails[6712513] = new thumbnail(6712513,'211997','','Web_0050_thumb.jpg',130, 87,1,'photo_6712513.html');
												thumbnails[6712412] = new thumbnail(6712412,'366296','','Web_0078_thumb.jpg',130, 87,1,'photo_6712412.html');
												thumbnails[6712496] = new thumbnail(6712496,'211997','','Web_0034_thumb.jpg',130, 87,1,'photo_6712496.html');
												thumbnails[6714066] = new thumbnail(6714066,'366296','','Web_0079_thumb.jpg',130, 87,1,'photo_6714066.html');
												thumbnails[6712497] = new thumbnail(6712497,'211997','','Web_0035_thumb.jpg',130, 87,1,'photo_6712497.html');
												thumbnails[6714050] = new thumbnail(6714050,'211997','','Web_0066_thumb.jpg',130, 87,1,'photo_6714050.html');
												thumbnails[6712472] = new thumbnail(6712472,'366296','','Web_0020_thumb.jpg',130, 87,1,'photo_6712472.html');
												thumbnails[6712473] = new thumbnail(6712473,'366296','','Web_0021_thumb.jpg',130, 87,1,'photo_6712473.html');
												thumbnails[6712475] = new thumbnail(6712475,'366296','','Web_0022_thumb.jpg',130, 87,1,'photo_6712475.html');
												thumbnails[6712483] = new thumbnail(6712483,'366296','','Web_0030_thumb.jpg',130, 87,1,'photo_6712483.html');
												thumbnails[6712494] = new thumbnail(6712494,'366296','','Web_0032_thumb.jpg',130, 87,1,'photo_6712494.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[366296] = new gallery(366296,'7902398,6714057,5845919','Portraits','gallery',[5845919,6712404,6712408,6712424,6712430,6712439,6712441,6712482,6712484,6714051,6714056,6714057,6714058,6714061,6714063,7902398,6712406,6712410,6712412,6714066,6712472,6712473,6712475,6712483,6712494],0, 0, '', 'gallery_366296.html',0,0);
				  					galleries[234057] = new gallery(234057,'6712521,6712520,6712519,6712518,6712479,6712478,6712477,6712455,6712452,6712450','Wedding Pre Shoots','gallery',[4073839,6094606,6712448,6712449,6712452,6712455,6712478,6712479,6712518,6712519,6712520,6712521,6712477,6712450,6712340,4073653],0, 0, '', 'gallery_234057.html',0,0);
				  					galleries[211997] = new gallery(211997,'6712500,4583503,4583433','Weddings','gallery',[4583503,4583640,4736014,4736019,6712445,6712456,6712464,6712467,6712469,6712495,6712500,6712503,6712506,6712507,6712509,6712510,6712511,6712512,6712514,6712516,6712517,4583433,4736021,4736030,6712446,6712458,6712461,6712462,6712465,6712513,6712496,6712497,6714050],0, 0, '', 'gallery_211997.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7902398,6714057,5845919,4736030';
imageSets[2] = '7902398,6714057,6712500,5845919,4583503,4583433';
imageSets[3] = '7366409,7366387,7366368';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/stodd1963/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/stodd1963/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 = '                        Peter Stoddart 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));      $('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 == undefined) {
    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;
	}
}

			

