window.thumbnails = {};
															thumbnails[8942809] = clik.newPhoto({"id":8942809,"src":"chicken_dreaming_of_chicken_cmprssd_thumb_424D441E-1EC9-DFB6-097363D0BC3915BC.jpg","galleries_id":470706,"server_id":18,"link":"photo_8942809.html","width":160,"caption":"chicken dreaming ","height":158});
															thumbnails[8942814] = clik.newPhoto({"id":8942814,"src":"111018youreadreamtwister_thumb_426F1C2C-1EC9-DFB6-09BAAA791F81E691.jpg","galleries_id":470706,"server_id":18,"link":"photo_8942814.html","width":160,"caption":"you're a dream twister","height":155});
															thumbnails[9050967] = clik.newPhoto({"id":9050967,"src":"110308nighttimecoogeebeach1_thumb_97FE5D9F-1EC9-DFB6-099FBC745092B504.jpg","galleries_id":476529,"server_id":18,"link":"photo_9050967.html","width":160,"caption":"night time coogee beach","height":136});
															thumbnails[9046670] = clik.newPhoto({"id":9046670,"src":"wednesday_night_tamarama_thumb_59848538-1EC9-DFB6-09800D62293EC734.jpg","galleries_id":476529,"server_id":18,"link":"photo_9046670.html","width":160,"caption":"wednesday night tamarama : crossing the beach","height":144});
															thumbnails[9050940] = clik.newPhoto({"id":9050940,"src":"120122maroubrabeachfissionbirds_thumb_977E6DB0-1EC9-DFB6-09FD478531B00025.jpg","galleries_id":476529,"server_id":18,"link":"photo_9050940.html","width":160,"caption":"maroubra beach fission birds","height":159});
															thumbnails[9050947] = clik.newPhoto({"id":9050947,"src":"120122maroubrabeachnightwalkers_thumb_979C7683-1EC9-DFB6-09C7BDAF30ACF4CD.jpg","galleries_id":476529,"server_id":18,"link":"photo_9050947.html","width":160,"caption":"maroubra beach night walkers","height":132});
															thumbnails[8942815] = clik.newPhoto({"id":8942815,"src":"111226chimpywithredwall_thumb_427E9AC0-1EC9-DFB6-09F4FB2A5283289B.jpg","galleries_id":470706,"server_id":18,"link":"photo_8942815.html","width":160,"caption":"and chimpy dreamed the wall was red","height":156});
															thumbnails[9050984] = clik.newPhoto({"id":9050984,"src":"120122maroubranightbeach_thumb_985C3B09-1EC9-DFB6-097441CE7365E521.jpg","galleries_id":476529,"server_id":18,"link":"photo_9050984.html","width":160,"caption":"maroubra night beach (speaking to some french girl who said she knew me well.. )","height":145});
															thumbnails[9132290] = clik.newPhoto({"id":9132290,"src":"120212watersedgedoublebay_1_thumb1_1.jpg","galleries_id":476529,"server_id":18,"link":"photo_9132290.html","width":160,"caption":"water's edge double bay","height":156});
															thumbnails[9133438] = clik.newPhoto({"id":9133438,"src":"120212nightnearthesea_1_thumb1_1.jpg","galleries_id":476529,"server_id":18,"link":"photo_9133438.html","width":160,"caption":"night near the sea double bay","height":150});
															thumbnails[8942824] = clik.newPhoto({"id":8942824,"src":"111120portraitofchimpy_thumb_42B2BF6A-1EC9-DFB6-09672255C50EF8E6.jpg","galleries_id":470706,"server_id":18,"link":"photo_8942824.html","width":160,"caption":"portrait of chimpy","height":159});
															thumbnails[9133441] = clik.newPhoto({"id":9133441,"src":"120212nightdogcalling_1_thumb1_1.jpg","galleries_id":476529,"server_id":18,"link":"photo_9133441.html","width":160,"caption":"night dog calling","height":141});
															thumbnails[8942857] = clik.newPhoto({"id":8942857,"src":"111211nightchickendreaming_thumb_42DA16D6-1EC9-DFB6-0921D92C2FFCAA7F.jpg","galleries_id":470706,"server_id":18,"link":"photo_8942857.html","width":160,"caption":"night chicken dreaming","height":145});
															thumbnails[9133476] = clik.newPhoto({"id":9133476,"src":"111203manandboyovercoogeebeachintherainwithsoutinetree1_1_thumb1_1.jpg","galleries_id":482156,"server_id":18,"link":"photo_9133476.html","width":160,"caption":"man and boy over coogee beach in the rain","height":126});
															thumbnails[8943078] = clik.newPhoto({"id":8943078,"src":"111229andchimpydremedhewaskingintherain_thumb_47939739-24E8-5EC4-4FA814A118FEE703.jpg","galleries_id":470706,"server_id":18,"link":"photo_8943078.html","width":160,"caption":"and chimpy dreamed he was king in the rain","height":149});
															thumbnails[9133502] = clik.newPhoto({"id":9133502,"src":"110611cr_anzac_pde_storey_str_1_thumb1_1.jpg","galleries_id":482156,"server_id":18,"link":"photo_9133502.html","width":160,"caption":"corner anzac parade and storey str","height":127});
															thumbnails[8957039] = clik.newPhoto({"id":8957039,"src":"120101andchimpydreamedmightilyofangels_thumb_E2F169AA-1EC9-DFB6-0951DE1622840BEE.jpg","galleries_id":470706,"server_id":18,"link":"photo_8957039.html","width":160,"caption":"and chimpy dreamed mightily of angels","height":149});
															thumbnails[9133529] = clik.newPhoto({"id":9133529,"src":"110414blumtnsfriendsandfam_1_thumb1_1.jpg","galleries_id":482156,"server_id":18,"link":"photo_9133529.html","width":160,"caption":"cottage in the blue mountains","height":135});
															thumbnails[8957040] = clik.newPhoto({"id":8957040,"src":"120101coffeedrinker_thumb_E302BCF1-1EC9-DFB6-09650E376460B54C.jpg","galleries_id":470706,"server_id":18,"link":"photo_8957040.html","width":160,"caption":"coffee drinker","height":155});
															thumbnails[8957043] = clik.newPhoto({"id":8957043,"src":"120101chimpydreamtitwashispartyandtherewerechickens_thumb_E4223D9A-24E8-5EC4-4FC56C8632E3E175.jpg","galleries_id":470706,"server_id":18,"link":"photo_8957043.html","width":160,"caption":"chimpy dreamed it was his party and there were chickens","height":159});
															thumbnails[9133533] = clik.newPhoto({"id":9133533,"src":"111120sketchinalex1_1_thumb1_1.jpg","galleries_id":482156,"server_id":18,"link":"photo_9133533.html","width":160,"caption":"sketch in Alex","height":153});
															thumbnails[9100907] = clik.newPhoto({"id":9100907,"src":"120206andchimpyaskedwhyheshouldswimorfly_1_thumb1_1.jpg","galleries_id":470706,"server_id":18,"link":"photo_9100907.html","width":160,"caption":"and chimpy asked why.. he should swim or fly","height":152});
															thumbnails[9100908] = clik.newPhoto({"id":9100908,"src":"120206inthisdreamchimpycaptaindapyrateship_1_thumb1_1.jpg","galleries_id":470706,"server_id":18,"link":"photo_9100908.html","width":160,"caption":"and in this dream.. chimpy captain'd a pyrate ship","height":148});
															thumbnails[9100963] = clik.newPhoto({"id":9100963,"src":"120206monalisacopy_1_thumb1_1.jpg","galleries_id":470706,"server_id":18,"link":"photo_9100963.html","width":160,"caption":"mona lisa","height":185});
															thumbnails[9132279] = clik.newPhoto({"id":9132279,"src":"120212rosebayjustoffnewsouthhead_1_thumb1_1.jpg","galleries_id":482156,"server_id":18,"link":"photo_9132279.html","width":160,"caption":"rosebay just off new southhead","height":123});
															thumbnails[9143533] = clik.newPhoto({"id":9143533,"src":"120215streetinNBondi_1_thumb1_1.jpg","galleries_id":482156,"server_id":18,"link":"photo_9143533.html","width":160,"caption":"street in north bondi","height":131});
															thumbnails[9165781] = clik.newPhoto({"id":9165781,"src":"120220lovethicklikemolasses_1_thumb1_1.jpg","galleries_id":482156,"server_id":18,"link":"photo_9165781.html","width":160,"caption":"love thick like molasses","height":143});
															thumbnails[9031795] = clik.newPhoto({"id":9031795,"src":"110202_playing_in_the_studio_thumb_83C32F64-1EC9-D45B-1C7D5543D89069DE.jpg","galleries_id":470707,"server_id":18,"link":"photo_9031795.html","width":160,"caption":"playing in the studio","height":155});
															thumbnails[9031796] = clik.newPhoto({"id":9031796,"src":"1201194amchimpydreamingofangels_thumb_8401C62B-1EC9-D45B-1CFEE272FA357A88.jpg","galleries_id":470707,"server_id":18,"link":"photo_9031796.html","width":160,"caption":"4am chimpy dreaming of angels","height":141});
															thumbnails[9042372] = clik.newPhoto({"id":9042372,"src":"120122firstnightjervisbay_thumb_1E9EA552-1EC9-D45B-1C3F93D860F1EBA9.jpg","galleries_id":470707,"server_id":18,"link":"photo_9042372.html","width":160,"caption":"first night jervis bay","height":152});
															thumbnails[9133535] = clik.newPhoto({"id":9133535,"src":"111018urbancreep_1_thumb1_1.jpg","galleries_id":470707,"server_id":18,"link":"photo_9133535.html","width":160,"caption":"urban creep","height":126});
															thumbnails[9133540] = clik.newPhoto({"id":9133540,"src":"111011_dalya_batmitzvah_pic1_1_thumb1_1.jpg","galleries_id":470707,"server_id":18,"link":"photo_9133540.html","width":160,"caption":"drawing for Dalya","height":157});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[470706] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"recent paintings","link":"gallery_470706.html","maxRecords":0.0,"photoIDs":[8942809.0,8942814.0,8942815.0,8942824.0,8942857.0,8943078.0,8957039.0,8957040.0,8957043.0,9100907.0,9100908.0,9100963.0],"skipIndex":0,"section_code":"gallery","featured_images":"9100963,9100908,9100907,8957043,8957040,8957039,8943078,8942857,8942824,8942815","id":470706,"singleSection":false});				  						galleries[470707] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"works on paper","link":"gallery_470707.html","maxRecords":0.0,"photoIDs":[9031795.0,9031796.0,9042372.0,9133535.0,9133540.0],"skipIndex":0,"section_code":"gallery","featured_images":"9133540,9133535,9042372,9031796,9031795","id":470707,"singleSection":false});				  						galleries[476529] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"night time with the sea","link":"gallery_476529.html","maxRecords":0.0,"photoIDs":[9050967.0,9046670.0,9050940.0,9050947.0,9050984.0,9132290.0,9133438.0,9133441.0],"skipIndex":0,"section_code":"gallery","featured_images":"9133441,9133438,9132290,9050984,9050967,9050947,9050940,9046670","id":476529,"singleSection":false});				  						galleries[482156] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"life paintings","link":"gallery_482156.html","maxRecords":0.0,"photoIDs":[9133476.0,9133502.0,9133529.0,9133533.0,9132279.0,9143533.0,9165781.0],"skipIndex":0,"section_code":"gallery","featured_images":"9165781,9143533,9133533,9133529,9133502,9133476,9132279","id":482156,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9165781,9143533,9133540,9133535,9133533,9133529,9133502,9133476,9133441,9133438,9132290,9132279,9100963,9100908,9100907,9050984,9050967,9050947,9050940,9046670,9042372,9031796,9031795,8957043,8957040,8957039,8943078,8942857,8942824,8942815,8942814,8942809';
imageSets[3] = '9165781,9143533,9133540,9133535,9133533,9133529,9133502,9133476,9133441,9133438,9132290,9132279,9100963,9100908,9100907,9050984,9050967,9050947,9050940,9046670,9042372,9031796,9031795,8957043,8957040,8957039,8943078,8942857,8942824,8942815,8942814,8942809';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/SidSledge/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/SidSledge/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 || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Sid Sledge : ' + 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.item_price !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

