window.thumbnails = new Object();
												thumbnails[7251639] = new thumbnail(7251639,'392113',' Artwork for feature (close up)','1_thumb.jpg',130, 129,32,'photo_7251639.html');
												thumbnails[7251706] = new thumbnail(7251706,'392114','Specials board for Fifteen Restaurant, London','11_thumb.jpg',130, 102,32,'photo_7251706.html');
												thumbnails[7251713] = new thumbnail(7251713,'392112','trompe l\'oeil bookcase for graduation production','12_thumb.jpg',88, 130,32,'photo_7251713.html');
												thumbnails[7251747] = new thumbnail(7251747,'392187','Website illustration','13_thumb.jpg',98, 130,32,'photo_7251747.html');
												thumbnails[7251651] = new thumbnail(7251651,'392113','Artwork for feature (close up)','2_thumb.jpg',130, 107,32,'photo_7251651.html');
												thumbnails[7251718] = new thumbnail(7251718,'392112','Scenic backdrop for short film','21_thumb.jpg',130, 98,32,'photo_7251718.html');
												thumbnails[7251750] = new thumbnail(7251750,'392187','Illustration for children\'s book concept','22_thumb.jpg',130, 91,32,'photo_7251750.html');
												thumbnails[7251657] = new thumbnail(7251657,'392113','Artwork for short (close up)','3_thumb.jpg',98, 130,32,'photo_7251657.html');
												thumbnails[7251721] = new thumbnail(7251721,'392112','Scenic backdrop for short film','31_thumb.jpg',130, 98,32,'photo_7251721.html');
												thumbnails[7251752] = new thumbnail(7251752,'392187','Illustration for children\'s book concept','32_thumb.JPG',130, 88,32,'photo_7251752.html');
												thumbnails[7251683] = new thumbnail(7251683,'392113','Artwork in art gallery set','4_thumb.jpg',130, 98,32,'photo_7251683.html');
												thumbnails[7251741] = new thumbnail(7251741,'392112','Scenic painting for graduation production','41_thumb.jpg',130, 98,32,'photo_7251741.html');
												thumbnails[7251754] = new thumbnail(7251754,'392187','Illustration for children\'s book concept','42_thumb.jpg',98, 130,32,'photo_7251754.html');
												thumbnails[7251690] = new thumbnail(7251690,'392113','Sketches for short film','5_thumb.jpg',130, 98,32,'photo_7251690.html');
												thumbnails[7251756] = new thumbnail(7251756,'392187','Illustration for children\'s book concept','51_thumb.jpg',98, 130,32,'photo_7251756.html');
												thumbnails[7251695] = new thumbnail(7251695,'392113',' Sketch for short ','6_thumb.jpg',98, 130,32,'photo_7251695.html');
												thumbnails[7251757] = new thumbnail(7251757,'392187','Illustration for children\'s book concept','61_thumb.jpg',98, 130,32,'photo_7251757.html');
												thumbnails[7251698] = new thumbnail(7251698,'392113','Sketch for short ','7_thumb.jpg',116, 130,32,'photo_7251698.html');
												thumbnails[7251803] = new thumbnail(7251803,'392113','Artwork for feature film','a_thumb.jpg',130, 98,32,'photo_7251803.html');
												thumbnails[2248423] = new thumbnail(2248423,'148085','daughter #1','72 daughter no1_thumb.jpg',130, 160,32,'photo_2248423.html');
												thumbnails[2248549] = new thumbnail(2248549,'148085','father #1','72 father no1_thumb.jpg',130, 169,32,'photo_2248549.html');
												thumbnails[2248564] = new thumbnail(2248564,'148085','mother #1','72 mother no1_thumb.jpg',130, 163,32,'photo_2248564.html');
												thumbnails[2248589] = new thumbnail(2248589,'148085','son #2','72 son no2_thumb.jpg',130, 159,32,'photo_2248589.html');
												thumbnails[2248546] = new thumbnail(2248546,'148085','aunt #1','72 aunt no1_thumb.jpg',130, 102,32,'photo_2248546.html');
												thumbnails[2248550] = new thumbnail(2248550,'148085','girlfriend #1','72 girlfriend no1_thumb.jpg',130, 164,32,'photo_2248550.html');
												thumbnails[2248547] = new thumbnail(2248547,'148085','boyfriend #1','72 boyfriend no1_thumb.jpg',130, 132,32,'photo_2248547.html');
												thumbnails[2248565] = new thumbnail(2248565,'148085','siblings','72 siblings_thumb.jpg',130, 188,32,'photo_2248565.html');
												thumbnails[2248566] = new thumbnail(2248566,'148085','son #1','72 son no1_thumb.jpg',130, 104,32,'photo_2248566.html');
												thumbnails[2248591] = new thumbnail(2248591,'148086','daughter (scrunch) #1','72 daughter (scrunch) no1_thumb.jpg',130, 166,32,'photo_2248591.html');
												thumbnails[2248590] = new thumbnail(2248590,'148086','aunt (scrunch) #1','72 aunt (scrunch) no1_thumb.jpg',130, 165,32,'photo_2248590.html');
												thumbnails[2248593] = new thumbnail(2248593,'148086','son (scrunch) #2','72 son (scrunch) no1_thumb.jpg',130, 166,32,'photo_2248593.html');
												thumbnails[2248560] = new thumbnail(2248560,'148087','interference','72 interference_thumb.jpg',130, 108,32,'photo_2248560.html');
												thumbnails[2248561] = new thumbnail(2248561,'148087','lads','72 lads_thumb.jpg',130, 82,32,'photo_2248561.html');
												thumbnails[2252740] = new thumbnail(2252740,'148087','the bisecting line','72 the bisecting line_thumb.jpg',130, 106,32,'photo_2252740.html');
												thumbnails[2252745] = new thumbnail(2252745,'148087','louka 3','72 louka 3_thumb.jpg',130, 98,32,'photo_2252745.html');
												thumbnails[2248562] = new thumbnail(2248562,'148087','louka 1','72 louka_thumb.jpg',130, 187,32,'photo_2248562.html');
												thumbnails[2252743] = new thumbnail(2252743,'148087','louka 2','72 Louka 2_thumb.jpg',97, 130,32,'photo_2252743.html');
												thumbnails[2248554] = new thumbnail(2248554,'148087','uncle #1','72 uncle no1_thumb.jpg',130, 195,32,'photo_2248554.html');
												thumbnails[2248552] = new thumbnail(2248552,'148087','great-aunt #1','72 great-aunt no11_thumb.jpg',130, 195,32,'photo_2248552.html');
												thumbnails[2250656] = new thumbnail(2250656,'148066','faces # 9','faces 2_thumb.jpg',130, 173,32,'photo_2250656.html');
												thumbnails[2250669] = new thumbnail(2250669,'148066','faces # 21','faces 6_thumb.jpg',130, 173,32,'photo_2250669.html');
												thumbnails[2250664] = new thumbnail(2250664,'148066','faces # 54','faces 4_thumb.jpg',130, 173,32,'photo_2250664.html');
												thumbnails[2250667] = new thumbnail(2250667,'148066','faces # 127','faces 5_thumb.jpg',130, 173,32,'photo_2250667.html');
												thumbnails[2250660] = new thumbnail(2250660,'148066','faces # 297','faces 3_thumb.jpg',130, 98,32,'photo_2250660.html');
												thumbnails[2250628] = new thumbnail(2250628,'148066','faces # 596','faces 1_thumb.jpg',130, 98,32,'photo_2250628.html');
												thumbnails[2250591] = new thumbnail(2250591,'148067','lily # 1','lily 72 2_thumb.jpg',130, 173,32,'photo_2250591.html');
												thumbnails[2250598] = new thumbnail(2250598,'148067','lily # 2','lily 72_thumb.jpg',130, 173,32,'photo_2250598.html');
												thumbnails[2250603] = new thumbnail(2250603,'148067','lily # 3','lily 72 3_thumb.jpg',130, 173,32,'photo_2250603.html');
												thumbnails[2250609] = new thumbnail(2250609,'148067','lily # 4','lily 72 4_thumb.jpg',130, 173,32,'photo_2250609.html');
												thumbnails[2250755] = new thumbnail(2250755,'148068','model scrunch # 21','model scrunch 1_thumb.jpg',130, 173,32,'photo_2250755.html');
												thumbnails[2250760] = new thumbnail(2250760,'148068','model scrunch # 22','model scrunch 2_thumb.jpg',130, 173,32,'photo_2250760.html');
												thumbnails[2250769] = new thumbnail(2250769,'148068','model scrunch # 23','model scrunch 3_thumb.jpg',130, 173,32,'photo_2250769.html');
												thumbnails[2250773] = new thumbnail(2250773,'148068','model scrunch # 24','model scrunch 4_thumb.jpg',130, 173,32,'photo_2250773.html');
												thumbnails[2250691] = new thumbnail(2250691,'148069','family scrunch # 1','scrunch 1_thumb.jpg',130, 98,32,'photo_2250691.html');
												thumbnails[2250694] = new thumbnail(2250694,'148069','family scrunch # 2','scrunch 2_thumb.jpg',130, 98,32,'photo_2250694.html');
												thumbnails[2250699] = new thumbnail(2250699,'148069','family scrunch # 4','scrunch 4_thumb.jpg',130, 98,32,'photo_2250699.html');
												thumbnails[2250697] = new thumbnail(2250697,'148069','family scrunch # 3','scrunch 3_thumb.jpg',130, 98,32,'photo_2250697.html');
												thumbnails[2250546] = new thumbnail(2250546,'148070','sofa','mum sofa_thumb.jpg',130, 84,32,'photo_2250546.html');
												thumbnails[2250550] = new thumbnail(2250550,'148070','dining room table # 1','table_thumb.jpg',130, 88,32,'photo_2250550.html');
												thumbnails[2250564] = new thumbnail(2250564,'148070','dining room table # 2','pam table_thumb.jpg',130, 84,32,'photo_2250564.html');
												thumbnails[2250569] = new thumbnail(2250569,'148070','stage # 1','yvonne_thumb.jpg',130, 207,32,'photo_2250569.html');
												thumbnails[2250068] = new thumbnail(2250068,'148075','living room # 1','Hackney 1_thumb.jpg',130, 199,32,'photo_2250068.html');
												thumbnails[2250073] = new thumbnail(2250073,'148075','living room #1 ','Hackney 2_thumb.jpg',130, 87,32,'photo_2250073.html');
												thumbnails[2250080] = new thumbnail(2250080,'148075','living room # 1 ','Hackney 3_thumb.jpg',130, 87,32,'photo_2250080.html');
												thumbnails[2250084] = new thumbnail(2250084,'148076','white noise ','Painting Projection_thumb.jpg',130, 98,32,'photo_2250084.html');
												thumbnails[2250086] = new thumbnail(2250086,'148077','man and woman (female view)','Projection in Gallery 1_thumb.jpg',130, 86,32,'photo_2250086.html');
												thumbnails[2250090] = new thumbnail(2250090,'148077','man and woman (male view)','Projection in Gallery 31_thumb.jpg',130, 86,32,'photo_2250090.html');
												thumbnails[2250091] = new thumbnail(2250091,'148076','billboards, 2008','bus stop 1_thumb.jpg',130, 98,32,'photo_2250091.html');
												thumbnails[2250092] = new thumbnail(2250092,'148076','bus stop','bus stop 2_thumb.jpg',130, 98,32,'photo_2250092.html');
												thumbnails[2250053] = new thumbnail(2250053,'148077','My Celebrity Family, 2008','Dot Cotton_thumb.jpg',130, 98,32,'photo_2250053.html');
												thumbnails[2250059] = new thumbnail(2250059,'148076','living room #2','Living room 2_thumb.jpg',130, 98,32,'photo_2250059.html');
												thumbnails[2250065] = new thumbnail(2250065,'148077','Loneliness and Technology','Loneliness and Technology_thumb.jpg',130, 98,32,'photo_2250065.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[392112] = new gallery(392112,'7251741,7251721,7251718,7251713','Scenic Painting','section465849',[7251713,7251718,7251721,7251741],0, 0, '', 'section465849_392112.html',0,0);
				  					galleries[392113] = new gallery(392113,'7251803,7251698,7251695,7251690,7251683,7251657,7251651,7251639','Artwork for Film','section465849',[7251639,7251651,7251657,7251683,7251690,7251695,7251698,7251803],0, 0, '', 'section465849_392113.html',0,0);
				  					galleries[392114] = new gallery(392114,'7251706','Restaurant Specials','section465849',[7251706],0, 0, '', 'section465849_392114.html',0,0);
				  					galleries[392187] = new gallery(392187,'7251757,7251756,7251754,7251752,7251750,7251747','Illustration','section465849',[7251747,7251750,7251752,7251754,7251756,7251757],0, 0, '', 'section465849_392187.html',0,0);
				  					galleries[148085] = new gallery(148085,'2248423','Family 2008','section189968',[2248423,2248549,2248564,2248589,2248546,2248550,2248547,2248565,2248566],0, 0, '', 'section189968_148085.html',0,0);
				  					galleries[148086] = new gallery(148086,'2248591','Scrunch 2008','section189968',[2248591,2248590,2248593],0, 0, '', 'section189968_148086.html',0,0);
				  					galleries[148087] = new gallery(148087,'2248552','2007/2006','section189968',[2248560,2248561,2252740,2252745,2248562,2252743,2248554,2248552],0, 0, '', 'section189968_148087.html',0,0);
				  					galleries[148075] = new gallery(148075,'2250080','Living Room #1','section189959',[2250068,2250073,2250080],0, 0, '', 'section189959_148075.html',0,0);
				  					galleries[148076] = new gallery(148076,'2250092,2250091,2250084,2250059','Siblings','section189959',[2250084,2250091,2250092,2250059],0, 0, '', 'section189959_148076.html',0,0);
				  					galleries[148077] = new gallery(148077,'2250090,2250086,2250065,2250053','Spaces','section189959',[2250086,2250090,2250053,2250065],0, 0, '', 'section189959_148077.html',0,0);
				  					galleries[148066] = new gallery(148066,'2250669,2250667,2250664,2250660,2250656,2250628','Faces','section189958',[2250656,2250669,2250664,2250667,2250660,2250628],0, 0, '', 'section189958_148066.html',0,0);
				  					galleries[148067] = new gallery(148067,'2250598','Lily','section189958',[2250591,2250598,2250603,2250609],0, 0, '', 'section189958_148067.html',0,0);
				  					galleries[148068] = new gallery(148068,'2250773,2250769,2250760,2250755','Model Scrunch','section189958',[2250755,2250760,2250769,2250773],0, 0, '', 'section189958_148068.html',0,0);
				  					galleries[148069] = new gallery(148069,'2250699,2250697,2250694,2250691','Family Scrunch','section189958',[2250691,2250694,2250699,2250697],0, 0, '', 'section189958_148069.html',0,0);
				  					galleries[148070] = new gallery(148070,'2250569,2250564,2250550,2250546','Domestics','section189958',[2250546,2250550,2250564,2250569],0, 0, '', 'section189958_148070.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '2248423';
imageSets[2] = '2250598,2250080,2248591,2248552,2248423';
imageSets[3] = '7251803,7251757,7251756,7251754,7251752,7251750,7251747,7251741,7251721,7251718,7251713,7251706,7251698,7251695,7251690,7251683,7251657,7251651,7251639,2252745,2252743,2252740,2250773,2250769,2250760,2250755,2250699,2250697,2250694,2250691,2250669,2250667,2250664,2250660,2250656,2250628,2250609,2250603,2250598,2250591,2250569,2250564,2250550,2250546,2250092,2250091,2250090,2250086,2250084,2250080';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/zoelee/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/zoelee/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/zoelee/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/zoelee/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/zoelee/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/zoelee/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 += 'section465849.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 && 'section465849' != '') {
					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 = 'Zoe Hurwitz: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {};	    	      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object') {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp = temp + '<p>Order this print:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = temp + '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
				
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
			temp = temp + '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
		
	if(img){
	      if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
        imageID = imageID[1];
      } else {
			  imageID = randomListVal(galleries[gallery_id].featured_images);
      }
							
			if (imageID != 0) {
				img.src = thumbnails[imageID].src;
				img.width = thumbnails[imageID].width;
				img.height = thumbnails[imageID].height;
				img.alt = galleries[gallery_id].title;
        if (updateLink) {
          $(img).parent().attr({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

