window.thumbnails = {};
															thumbnails[8826060] = clik.newPhoto({"id":8826060,"src":"karine_prouin_1915_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":120});
															thumbnails[8826062] = clik.newPhoto({"id":8826062,"src":"saigon_7661_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":120});
															thumbnails[8868958] = clik.newPhoto({"id":8868958,"src":"jodhpurL1020197_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":120,"caption":"","height":121});
															thumbnails[8895932] = clik.newPhoto({"id":8895932,"src":"prouin_karine_1609_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":120});
															thumbnails[8902664] = clik.newPhoto({"id":8902664,"src":"PHK2011111.045_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":120});
															thumbnails[8902666] = clik.newPhoto({"id":8902666,"src":"PHK200807.221_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":120});
															thumbnails[8902671] = clik.newPhoto({"id":8902671,"src":"PHK200904.064_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":120,"caption":"","height":121});
															thumbnails[8902673] = clik.newPhoto({"id":8902673,"src":"200812.038_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":120,"caption":"","height":121});
															thumbnails[8905224] = clik.newPhoto({"id":8905224,"src":"hongkong_1623_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":120});
															thumbnails[8905225] = clik.newPhoto({"id":8905225,"src":"prouin_karine_1658_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":120,"caption":"","height":121});
															thumbnails[8905228] = clik.newPhoto({"id":8905228,"src":"prouin_karine_0421_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":120});
															thumbnails[8905229] = clik.newPhoto({"id":8905229,"src":"prouin_karine_0404_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":120,"caption":"","height":121});
															thumbnails[9020640] = clik.newPhoto({"id":9020640,"src":"L1020987_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":121});
															thumbnails[9111611] = clik.newPhoto({"id":9111611,"src":"karineprouin_L1030040v_1.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":120});
															thumbnails[8822901] = clik.newPhoto({"id":8822901,"src":"hongkong_1630_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":120});
															thumbnails[8019779] = clik.newPhoto({"id":8019779,"src":"st_honorat_L1000150_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":120,"caption":"","height":121});
															thumbnails[8019780] = clik.newPhoto({"id":8019780,"src":"st_honorat_L1000151_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":120,"caption":"","height":121});
															thumbnails[8893942] = clik.newPhoto({"id":8893942,"src":"littoral_L10207381_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":121});
															thumbnails[8901661] = clik.newPhoto({"id":8901661,"src":"saint_honorat_L1000158_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":120,"caption":"","height":121});
															thumbnails[8019784] = clik.newPhoto({"id":8019784,"src":"ST.HONORAT.L1000169_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":120,"caption":"","height":121});
															thumbnails[8893943] = clik.newPhoto({"id":8893943,"src":"littoral_L1020783_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":121});
															thumbnails[8019785] = clik.newPhoto({"id":8019785,"src":"ST.HONORAT.L1000181_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":120,"caption":"","height":121});
															thumbnails[8893947] = clik.newPhoto({"id":8893947,"src":"littoral_L1020796_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":121});
															thumbnails[8019787] = clik.newPhoto({"id":8019787,"src":"st_honorat_L1000189_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":120,"caption":"","height":121});
															thumbnails[8893949] = clik.newPhoto({"id":8893949,"src":"littoral_L1020798_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":121});
															thumbnails[8862252] = clik.newPhoto({"id":8862252,"src":"floreL1020713_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":121});
															thumbnails[8019795] = clik.newPhoto({"id":8019795,"src":"ST.HONORAT.L1000196_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":120,"caption":"","height":121});
															thumbnails[8862256] = clik.newPhoto({"id":8862256,"src":"flore_L1020715_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":121});
															thumbnails[8863028] = clik.newPhoto({"id":8863028,"src":"st_honorat_L1000207_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":120,"caption":"","height":121});
															thumbnails[8893951] = clik.newPhoto({"id":8893951,"src":"littoral_L1020809_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":121});
															thumbnails[8862262] = clik.newPhoto({"id":8862262,"src":"flore_L1020714_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":121});
															thumbnails[8893946] = clik.newPhoto({"id":8893946,"src":"littoral_L1020774_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":121,"caption":"","height":121});
															thumbnails[8618429] = clik.newPhoto({"id":8618429,"src":"passagesPHK8888_thumb.jpg","galleries_id":405045,"server_id":1,"link":"photo_8618429.html","width":120,"caption":"","height":121});
															thumbnails[8618439] = clik.newPhoto({"id":8618439,"src":"passagesPHK06111_thumb.jpg","galleries_id":405045,"server_id":1,"link":"photo_8618439.html","width":120,"caption":"","height":121});
															thumbnails[8618441] = clik.newPhoto({"id":8618441,"src":"passagesPHK0670_thumb.jpg","galleries_id":405045,"server_id":1,"link":"photo_8618441.html","width":120,"caption":"","height":121});
															thumbnails[8618443] = clik.newPhoto({"id":8618443,"src":"passagesPHK9107_thumb.jpg","galleries_id":405045,"server_id":1,"link":"photo_8618443.html","width":120,"caption":"","height":121});
															thumbnails[8618446] = clik.newPhoto({"id":8618446,"src":"passagesPHK9052_thumb.jpg","galleries_id":405045,"server_id":1,"link":"photo_8618446.html","width":120,"caption":"","height":121});
															thumbnails[8618448] = clik.newPhoto({"id":8618448,"src":"passagesPHK9599_thumb.jpg","galleries_id":405045,"server_id":1,"link":"photo_8618448.html","width":120,"caption":"","height":121});
															thumbnails[8618449] = clik.newPhoto({"id":8618449,"src":"passagesPHK0696_thumb.jpg","galleries_id":405045,"server_id":1,"link":"photo_8618449.html","width":120,"caption":"","height":121});
															thumbnails[8618450] = clik.newPhoto({"id":8618450,"src":"passagesPHK9326_thumb.jpg","galleries_id":405045,"server_id":1,"link":"photo_8618450.html","width":120,"caption":"","height":121});
															thumbnails[8618452] = clik.newPhoto({"id":8618452,"src":"passagesPHK8811_thumb.jpg","galleries_id":405045,"server_id":1,"link":"photo_8618452.html","width":120,"caption":"","height":121});
															thumbnails[8627058] = clik.newPhoto({"id":8627058,"src":"passagesPHK9251_thumb.jpg","galleries_id":405045,"server_id":1,"link":"photo_8627058.html","width":120,"caption":"","height":121});
															thumbnails[5050813] = clik.newPhoto({"id":5050813,"src":"Couv_livret_passages_thumb.jpg","galleries_id":287572,"server_id":1,"link":"photo_5050813.html","width":76,"caption":"","height":125});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[287572] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Monographie","link":"section344975_287572.html","maxRecords":0.0,"photoIDs":[5050813.0],"skipIndex":0,"section_code":"section344975","featured_images":5050813.0,"id":287572,"singleSection":false});				  						galleries[441724] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Print","link":"section344975_441724.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section344975","featured_images":"","id":441724,"singleSection":false});				  						galleries[405045] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"....","link":"section484202.html","maxRecords":0.0,"photoIDs":[8618429.0,8618439.0,8618441.0,8618443.0,8618446.0,8618448.0,8618449.0,8618450.0,8618452.0,8627058.0],"skipIndex":0,"section_code":"section484202","featured_images":8618443.0,"id":405045,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9111611,9020640,8905229,8905228,8905225,8905224,8902673,8902671,8902666,8902664,8895932,8868958,8826062,8826060,8822901';
imageSets[2] = '8902664,8618443,8019780,8893942';
imageSets[3] = '9111611,9020640,8905229,8905228,8905225,8905224,8902673,8902671,8902666,8902664,8901661,8895932,8893951,8893949,8893947,8893946,8893943,8893942,8868958,8863028,8862262,8862256,8862252,8826062,8826060,8822901,8627058,8618452,8618450,8618449,8618448,8618446,8618443,8618441,8618439,8618429,8019795,8019787,8019785,8019784,8019780,8019779,5050813';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/KAPHOTO/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/KAPHOTO/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 += 'section484202.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 && 'section484202' != '') {
					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 = 'KARINE PROUIN: ' + 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>';
	}
				
	temp += this.fnGetPaymentInfo();
				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>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &euro;' + (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 += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="kprouin@hotmail.com">';
					temp += '<input type="hidden" name="currency_code" value="EUR">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="kprouin@hotmail.com">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						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;
	}
}

			

