window.thumbnails = new Object();
												thumbnails[7471134] = new thumbnail(7471134,'404405','','Papissa005_thumb.jpg',107, 160,15,'photo_7471134.html');
												thumbnails[7471136] = new thumbnail(7471136,'404405','','Anna_Frank_00122_thumb.jpg',160, 106,15,'photo_7471136.html');
												thumbnails[7471138] = new thumbnail(7471138,'404405','','Klyt0031_thumb.jpg',106, 160,15,'photo_7471138.html');
												thumbnails[7471139] = new thumbnail(7471139,'404405','','Mallia0012_thumb.jpg',160, 106,15,'photo_7471139.html');
												thumbnails[7471141] = new thumbnail(7471141,'404405','','Don0021_thumb.jpg',160, 106,15,'photo_7471141.html');
												thumbnails[7471142] = new thumbnail(7471142,'404405','','Papissa0061_thumb.jpg',160, 106,15,'photo_7471142.html');
												thumbnails[7471146] = new thumbnail(7471146,'404405','','Klyt0011_thumb.jpg',160, 106,15,'photo_7471146.html');
												thumbnails[7471150] = new thumbnail(7471150,'404405','','Medea004_thumb.jpg',106, 160,15,'photo_7471150.html');
												thumbnails[7471151] = new thumbnail(7471151,'404405','','Ypothesis00122_thumb.jpg',160, 106,15,'photo_7471151.html');
												thumbnails[7471153] = new thumbnail(7471153,'404405','','Don0011_thumb.jpg',160, 106,15,'photo_7471153.html');
												thumbnails[7471154] = new thumbnail(7471154,'404405','','Medea005_thumb.jpg',160, 106,15,'photo_7471154.html');
												thumbnails[7471155] = new thumbnail(7471155,'404405','','Mallia00622_thumb.jpg',160, 106,15,'photo_7471155.html');
												thumbnails[7471156] = new thumbnail(7471156,'404405','','Alba0011_thumb.jpg',160, 106,15,'photo_7471156.html');
												thumbnails[7471159] = new thumbnail(7471159,'404405','','Tavli0022_thumb.jpg',160, 106,15,'photo_7471159.html');
												thumbnails[7471165] = new thumbnail(7471165,'404405','','Klyt0041_thumb.jpg',106, 160,15,'photo_7471165.html');
												thumbnails[7471167] = new thumbnail(7471167,'404405','','Medea001_thumb.jpg',106, 160,15,'photo_7471167.html');
												thumbnails[7471168] = new thumbnail(7471168,'404405','','Opera001_thumb.jpg',106, 160,15,'photo_7471168.html');
												thumbnails[7471170] = new thumbnail(7471170,'404405','','Mallia004222_thumb.jpg',160, 106,15,'photo_7471170.html');
												thumbnails[7471177] = new thumbnail(7471177,'404405','','Agori0012_thumb.jpg',160, 106,15,'photo_7471177.html');
												thumbnails[7472504] = new thumbnail(7472504,'404405','','Mallia005_thumb.jpg',106, 160,15,'photo_7472504.html');
												thumbnails[7472508] = new thumbnail(7472508,'404405','','Klyt0021_thumb.jpg',106, 160,15,'photo_7472508.html');
												thumbnails[7472571] = new thumbnail(7472571,'404405','','Trylos001_thumb.jpg',160, 106,15,'photo_7472571.html');
												thumbnails[7472601] = new thumbnail(7472601,'404405','','Tavli001_thumb.jpg',106, 160,15,'photo_7472601.html');
												thumbnails[7472607] = new thumbnail(7472607,'404405','','Mallia002_thumb.jpg',106, 160,15,'photo_7472607.html');
												thumbnails[7472612] = new thumbnail(7472612,'404405','','Tavli003_thumb.jpg',160, 106,15,'photo_7472612.html');
												thumbnails[7472619] = new thumbnail(7472619,'404405','','Medea002_thumb.jpg',160, 106,15,'photo_7472619.html');
												thumbnails[7472624] = new thumbnail(7472624,'404405','','Ypothesis002_thumb.jpg',106, 160,15,'photo_7472624.html');
												thumbnails[7472639] = new thumbnail(7472639,'404405','','Medea003_thumb.jpg',160, 106,15,'photo_7472639.html');
												thumbnails[7472659] = new thumbnail(7472659,'404405','','Papissa002_thumb.jpg',160, 107,15,'photo_7472659.html');
												thumbnails[7472678] = new thumbnail(7472678,'404405','','Papissa001_thumb.jpg',107, 160,15,'photo_7472678.html');
												thumbnails[7472824] = new thumbnail(7472824,'404405','','VAS_3621_thumb.jpg',160, 106,15,'photo_7472824.html');
												thumbnails[7472965] = new thumbnail(7472965,'404405','','VAS_3414_thumb.jpg',106, 160,15,'photo_7472965.html');
												thumbnails[7472996] = new thumbnail(7472996,'404405','','adis_thumb.jpg',160, 106,15,'photo_7472996.html');
												thumbnails[7575296] = new thumbnail(7575296,'404405','','VAS_4553PS_thumb.jpg',160, 106,15,'photo_7575296.html');
												thumbnails[7575299] = new thumbnail(7575299,'404405','','VAS_4578PS_thumb.jpg',106, 160,15,'photo_7575299.html');
												thumbnails[7575300] = new thumbnail(7575300,'404405','','VAS_4761PS_thumb.jpg',160, 106,15,'photo_7575300.html');
												thumbnails[7470879] = new thumbnail(7470879,'405010','','0013_thumb.jpg',106, 160,15,'photo_7470879.html');
												thumbnails[7470901] = new thumbnail(7470901,'405010','','0022_thumb.jpg',160, 106,15,'photo_7470901.html');
												thumbnails[7470904] = new thumbnail(7470904,'405010','','0033_thumb.jpg',160, 106,15,'photo_7470904.html');
												thumbnails[7470911] = new thumbnail(7470911,'405010','','0043_thumb.jpg',160, 106,15,'photo_7470911.html');
												thumbnails[7470916] = new thumbnail(7470916,'405010','','0052_thumb.jpg',160, 106,15,'photo_7470916.html');
												thumbnails[7470963] = new thumbnail(7470963,'405010','','0061_thumb.jpg',106, 160,15,'photo_7470963.html');
												thumbnails[7470965] = new thumbnail(7470965,'405010','','25461_thumb.jpg',160, 106,15,'photo_7470965.html');
												thumbnails[7470967] = new thumbnail(7470967,'405010','','VAS_0191_thumb.jpg',106, 160,15,'photo_7470967.html');
												thumbnails[7470979] = new thumbnail(7470979,'405010','','VAS_03121_thumb.jpg',160, 106,15,'photo_7470979.html');
												thumbnails[7470980] = new thumbnail(7470980,'405010','','VAS_0425_thumb.jpg',160, 106,15,'photo_7470980.html');
												thumbnails[7470990] = new thumbnail(7470990,'405010','','Vassilis_Spyrou_0141_thumb.jpg',160, 106,15,'photo_7470990.html');
												thumbnails[7470992] = new thumbnail(7470992,'405010','','Vassilis_Spyrou_005_thumb.jpg',106, 160,15,'photo_7470992.html');
												thumbnails[7471010] = new thumbnail(7471010,'405010','','VAS_9583_thumb.jpg',160, 106,15,'photo_7471010.html');
												thumbnails[7471027] = new thumbnail(7471027,'405010','','Vassilis_Spyrou_030_thumb.jpg',160, 106,15,'photo_7471027.html');
												thumbnails[7471057] = new thumbnail(7471057,'405010','','953623_thumb.jpg',160, 106,15,'photo_7471057.html');
												thumbnails[7473525] = new thumbnail(7473525,'405010','','VAS_6402R_thumb.jpg',106, 160,15,'photo_7473525.html');
												thumbnails[7473528] = new thumbnail(7473528,'405010','','VAS_9529_thumb.jpg',106, 160,15,'photo_7473528.html');
												thumbnails[7473529] = new thumbnail(7473529,'405010','','VAS_6724R_thumb.jpg',160, 106,15,'photo_7473529.html');
												thumbnails[7473415] = new thumbnail(7473415,'405115','','VAS_3789_thumb.jpg',160, 106,15,'photo_7473415.html');
												thumbnails[7473417] = new thumbnail(7473417,'405115','','VAS_3560_thumb.jpg',106, 160,15,'photo_7473417.html');
												thumbnails[7473420] = new thumbnail(7473420,'405115','','VAS_2678_thumb.jpg',160, 106,15,'photo_7473420.html');
												thumbnails[7473421] = new thumbnail(7473421,'405115','','VAS_2174_thumb.jpg',106, 160,15,'photo_7473421.html');
												thumbnails[7473422] = new thumbnail(7473422,'405115','','VAS_1981_thumb.jpg',160, 106,15,'photo_7473422.html');
												thumbnails[7473423] = new thumbnail(7473423,'405115','','VAS_3526_thumb.jpg',106, 160,15,'photo_7473423.html');
												thumbnails[7473425] = new thumbnail(7473425,'405115','','VAS_3829_thumb.jpg',160, 106,15,'photo_7473425.html');
												thumbnails[7473427] = new thumbnail(7473427,'405115','','VAS_3637_thumb.jpg',106, 160,15,'photo_7473427.html');
												thumbnails[7473429] = new thumbnail(7473429,'405115','','VAS_3454_thumb.jpg',160, 106,15,'photo_7473429.html');
												thumbnails[7473065] = new thumbnail(7473065,'405103','','0014_thumb.jpg',160, 106,15,'photo_7473065.html');
												thumbnails[7473068] = new thumbnail(7473068,'405103','','0053_thumb.jpg',160, 106,15,'photo_7473068.html');
												thumbnails[7473075] = new thumbnail(7473075,'405103','','VAS_0588_thumb.jpg',160, 106,15,'photo_7473075.html');
												thumbnails[7473168] = new thumbnail(7473168,'405103','','0034_thumb.jpg',106, 160,15,'photo_7473168.html');
												thumbnails[7473170] = new thumbnail(7473170,'405103','','0044_thumb.jpg',106, 160,15,'photo_7473170.html');
												thumbnails[7473173] = new thumbnail(7473173,'405103','','0062_thumb.jpg',106, 160,15,'photo_7473173.html');
												thumbnails[7473179] = new thumbnail(7473179,'405103','','VAS_3176ps_thumb.jpg',160, 106,15,'photo_7473179.html');
												thumbnails[7473187] = new thumbnail(7473187,'405103','','VAS_00571_thumb.jpg',160, 106,15,'photo_7473187.html');
												thumbnails[7473245] = new thumbnail(7473245,'405103','','VAS_1343PS_thumb.jpg',106, 160,15,'photo_7473245.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[405115] = new gallery(405115,'7473429,7473427,7473425,7473423,7473422,7473421,7473420,7473417,7473415','DANCE','section482100',[7473415,7473417,7473420,7473421,7473422,7473423,7473425,7473427,7473429],0, 1, '', 'section482100.html',0,1);
				  					galleries[405103] = new gallery(405103,'7473245,7473187,7473179,7473173,7473170,7473168,7473075,7473068,7473065','MUSIC','section482101',[7473065,7473068,7473075,7473168,7473170,7473173,7473179,7473187,7473245],0, 1, '', 'section482101.html',0,1);
				  					galleries[404405] = new gallery(404405,'7575300,7575299,7575296,7472996,7472965,7472824,7472678,7472659,7472639,7472624','THEATRE','section482102',[7471134,7471136,7471138,7471139,7471141,7471142,7471146,7471150,7471151,7471153,7471154,7471155,7471156,7471159,7471165,7471167,7471168,7471170,7471177,7472504,7472508,7472571,7472601,7472607,7472612,7472619,7472624,7472639,7472659,7472678,7472824,7472965,7472996,7575296,7575299,7575300],0, 1, '', 'section482102.html',0,1);
				  					galleries[405010] = new gallery(405010,'7473529,7473528,7473525,7471057,7471027,7471010,7470992,7470990,7470980,7470979','TV/FILM STILLS','section482099',[7470879,7470901,7470904,7470911,7470916,7470963,7470965,7470967,7470979,7470980,7470990,7470992,7471010,7471027,7471057,7473525,7473528,7473529],0, 1, '', 'section482099.html',0,1);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7575300,7473420,7473415,7473075,7473068,7471155,7471154,7471151,7471146,7471142,7471139,7470990,7470965,7470916,7470911,7470904,7470901';
imageSets[3] = '7575300,7575299,7575296,7473529,7473528,7473525,7473429,7473427,7473425,7473423,7473422,7473421,7473420,7473417,7473415,7473245,7473187,7473179,7473173,7473170,7473168,7473075,7473068,7473065,7472996,7472965,7472824,7472678,7472659,7472639,7472624,7472619,7472612,7472607,7472601,7472571,7472508,7472504,7471177,7471170,7471168,7471167,7471165,7471159,7471156,7471155,7471154,7471153,7471151,7471150';
imageSets[240136] = '7575300,7473420,7473415,7473075,7473068,7471155,7471154,7471151,7471146,7471142,7471139,7470990,7470965,7470916,7470911,7470904,7470901';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/vassilis/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/vassilis/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/vassilis/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/vassilis/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/vassilis/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/vassilis/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 += 'section482102.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 && 'section482102' != '') {
					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 = 'vassilis spyrou photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {photoinfominwidth:220};	    	      	      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;
	}
}

			

