window.thumbnails = new Object();
												thumbnails[2147162] = new thumbnail(2147162,'','','2007 Nov 11 013_edited-2_thumb.jpg',130, 93,5,'							photo_2147162.html');
												thumbnails[2147163] = new thumbnail(2147163,'','','2007 Nov 11 094_edited-1_thumb.jpg',130, 93,5,'							photo_2147163.html');
												thumbnails[2147164] = new thumbnail(2147164,'','','2007 Nov 11 010_edited-1_thumb.jpg',130, 93,5,'							photo_2147164.html');
												thumbnails[2649117] = new thumbnail(2649117,'202930','','EastAnglianLimousines_04_wm_thumb.jpg',130, 73,5,'							photo_2649117.html');
												thumbnails[2649152] = new thumbnail(2649152,'202930','','EastAnglianLimousines3_thumb.jpg',130, 73,5,'							photo_2649152.html');
												thumbnails[2649161] = new thumbnail(2649161,'202930','','EastAnglianLimousinesadvert21_thumb.jpg',130, 73,5,'							photo_2649161.html');
												thumbnails[3892634] = new thumbnail(3892634,'202930','DSC 0002','DSC_0002_thumb.jpg',130, 44,5,'							photo_3892634.html');
												thumbnails[3892654] = new thumbnail(3892654,'202930','','DSC_00021_thumb.jpg',130, 44,5,'							photo_3892654.html');
												thumbnails[2147167] = new thumbnail(2147167,'151603','','2007 Nov 12 014_thumb.jpg',130, 86,5,'							photo_2147167.html');
												thumbnails[2148428] = new thumbnail(2148428,'151574','','Travel1_thumb.JPG',130, 98,5,'							photo_2148428.html');
												thumbnails[2148449] = new thumbnail(2148449,'151522','','image001_thumb.jpg',130, 99,5,'							photo_2148449.html');
												thumbnails[2148468] = new thumbnail(2148468,'203532','','2007 Feb 19 061_thumb.JPG',130, 104,5,'							photo_2148468.html');
												thumbnails[2318167] = new thumbnail(2318167,'151482','London','DSC_5787_thumb.JPG',130, 53,5,'							photo_2318167.html');
												thumbnails[2318261] = new thumbnail(2318261,'151482','','DSC_5785_thumb.JPG',130, 104,5,'							photo_2318261.html');
												thumbnails[2318262] = new thumbnail(2318262,'151482','','DSC_5789_thumb.JPG',130, 81,5,'							photo_2318262.html');
												thumbnails[2323382] = new thumbnail(2323382,'151574','','beach pic_thumb.gif',130, 141,5,'							photo_2323382.html');
												thumbnails[2323387] = new thumbnail(2323387,'151522','','newmarket race_thumb.gif',130, 50,5,'							photo_2323387.html');
												thumbnails[2354075] = new thumbnail(2354075,'151514','','2008 Jun 20 004_thumb.JPG',130, 45,5,'							photo_2354075.html');
												thumbnails[2585122] = new thumbnail(2585122,'151514','','DSC_7721_thumb.JPG',130, 93,5,'							photo_2585122.html');
												thumbnails[2585123] = new thumbnail(2585123,'151514','','DSC_7722_thumb.JPG',130, 71,5,'							photo_2585123.html');
												thumbnails[3328712] = new thumbnail(3328712,'203532','','wedding car_thumb.JPG',130, 93,5,'							photo_3328712.html');
												thumbnails[3328764] = new thumbnail(3328764,'203532','','1a_thumb.jpg',130, 104,5,'							photo_3328764.html');
												thumbnails[3337300] = new thumbnail(3337300,'151603','j0399268','j0399268_thumb.jpg',130, 163,5,'							photo_3337300.html');
												thumbnails[3337431] = new thumbnail(3337431,'151514','','j0309375_thumb.jpg',130, 82,5,'							photo_3337431.html');
												thumbnails[3337930] = new thumbnail(3337930,'151517','Childrens Party Norwich','j0309665_thumb.jpg',130, 93,5,'							photo_3337930.html');
												thumbnails[3339355] = new thumbnail(3339355,'203586','','j0216123_thumb.jpg',130, 87,5,'							photo_3339355.html');
												thumbnails[3341595] = new thumbnail(3341595,'203712','2008 Jun 20 006','2008 Jun 20 0061_thumb.jpg',130, 104,5,'							photo_3341595.html');
												thumbnails[4551856] = new thumbnail(4551856,'151514','','Caistor_Hall_limo_thumb.jpg',130, 93,5,'							photo_4551856.html');
												thumbnails[5432098] = new thumbnail(5432098,'151603','neonorwich','neonorwich_thumb.jpg',130, 98,5,'							photo_5432098.html');
												thumbnails[5432121] = new thumbnail(5432121,'203289','neonorwich','neonorwich_7A458883-2219-B5B5-4C735017A0ED726B_thumb.jpg',130, 98,5,'							photo_5432121.html');
												thumbnails[3337301] = new thumbnail(3337301,'203289','','j0399388_thumb.jpg',130, 87,5,'							photo_3337301.html');
												thumbnails[3337432] = new thumbnail(3337432,'203532','j0313820','j0313820_thumb.jpg',130, 87,5,'							photo_3337432.html');
												thumbnails[3337931] = new thumbnail(3337931,'151517','Ice-Skating','j0387240_thumb.jpg',130, 93,5,'							photo_3337931.html');
												thumbnails[3339356] = new thumbnail(3339356,'203586','','j0400107_thumb.jpg',130, 87,5,'							photo_3339356.html');
												thumbnails[3341405] = new thumbnail(3341405,'151482','','j0422576_thumb.jpg',130, 98,5,'							photo_3341405.html');
												thumbnails[3337302] = new thumbnail(3337302,'203532','Valentines Day','j0399586_thumb.jpg',130, 163,5,'							photo_3337302.html');
												thumbnails[3337433] = new thumbnail(3337433,'203532','j0341550','j0341550_thumb.jpg',130, 93,5,'							photo_3337433.html');
												thumbnails[3337932] = new thumbnail(3337932,'151517','Bowling','j0405096_thumb.jpg',130, 87,5,'							photo_3337932.html');
												thumbnails[3339357] = new thumbnail(3339357,'203586','','j04093721_thumb.jpg',130, 130,5,'							photo_3339357.html');
												thumbnails[3341406] = new thumbnail(3341406,'151603','j0433006','j0433006_thumb.jpg',130, 89,5,'							photo_3341406.html');
												thumbnails[3337303] = new thumbnail(3337303,'151603','j0400659','j0400659_thumb.jpg',130, 163,5,'							photo_3337303.html');
												thumbnails[3337434] = new thumbnail(3337434,'151574','j0399404','j0399404_thumb.jpg',130, 87,5,'							photo_3337434.html');
												thumbnails[3337933] = new thumbnail(3337933,'151517','Pizza','j0407468_thumb.jpg',130, 132,5,'							photo_3337933.html');
												thumbnails[3339358] = new thumbnail(3339358,'151574','','j0438376_thumb.jpg',130, 194,5,'							photo_3339358.html');
												thumbnails[3341407] = new thumbnail(3341407,'203540','j0436609','j0436609_thumb.jpg',130, 87,5,'							photo_3341407.html');
												thumbnails[3337304] = new thumbnail(3337304,'203289','','j0400749_thumb.jpg',130, 195,5,'							photo_3337304.html');
												thumbnails[3337934] = new thumbnail(3337934,'151517','Cinema','j0408863_thumb.jpg',130, 87,5,'							photo_3337934.html');
												thumbnails[3339359] = new thumbnail(3339359,'151574','','j0438386_thumb.jpg',130, 195,5,'							photo_3339359.html');
												thumbnails[3337305] = new thumbnail(3337305,'151482','j0406463','j0406463_thumb.jpg',130, 104,5,'							photo_3337305.html');
												thumbnails[3337436] = new thumbnail(3337436,'151603','j0407042','j0407042_thumb.jpg',130, 87,5,'							photo_3337436.html');
												thumbnails[3339360] = new thumbnail(3339360,'203587','j0439332','j0439332_thumb.jpg',130, 87,5,'							photo_3339360.html');
												thumbnails[3337306] = new thumbnail(3337306,'151482','j0422275','j0422275_thumb.jpg',130, 130,5,'							photo_3337306.html');
												thumbnails[3337437] = new thumbnail(3337437,'151603','j0409372','j0409372_thumb.jpg',130, 130,5,'							photo_3337437.html');
												thumbnails[3339361] = new thumbnail(3339361,'203712','j0439443','j0439443_thumb.jpg',130, 87,5,'							photo_3339361.html');
												thumbnails[3337307] = new thumbnail(3337307,'151482','j0422670','j0422670_thumb.jpg',130, 88,5,'							photo_3337307.html');
												thumbnails[3337438] = new thumbnail(3337438,'151514','','j04222751_thumb.jpg',130, 130,5,'							photo_3337438.html');
												thumbnails[3337308] = new thumbnail(3337308,'151482','','j0422871_thumb.jpg',130, 132,5,'							photo_3337308.html');
												thumbnails[3337439] = new thumbnail(3337439,'203532','j0422454','j0422454_thumb.jpg',130, 195,5,'							photo_3337439.html');
												thumbnails[3337309] = new thumbnail(3337309,'151522','','j0424435_thumb.jpg',130, 87,5,'							photo_3337309.html');
												thumbnails[3337440] = new thumbnail(3337440,'203540','j0422750','j0422750_thumb.jpg',130, 132,5,'							photo_3337440.html');
												thumbnails[3337310] = new thumbnail(3337310,'203289','','j0428639_thumb.jpg',130, 87,5,'							photo_3337310.html');
												thumbnails[3337441] = new thumbnail(3337441,'203289','j0423029','j0423029_thumb.jpg',130, 130,5,'							photo_3337441.html');
												thumbnails[3337311] = new thumbnail(3337311,'203532','j0436518','j0436518_thumb.jpg',130, 108,5,'							photo_3337311.html');
												thumbnails[3337442] = new thumbnail(3337442,'203289','j0430476','j0430476_thumb.jpg',130, 130,5,'							photo_3337442.html');
												thumbnails[3337312] = new thumbnail(3337312,'203289','','j0436535_thumb.jpg',130, 87,5,'							photo_3337312.html');
												thumbnails[3337443] = new thumbnail(3337443,'203289','j0430707','j0430707_thumb.jpg',130, 87,5,'							photo_3337443.html');
												thumbnails[3337313] = new thumbnail(3337313,'151603','j0436615','j0436615_thumb.jpg',130, 194,5,'							photo_3337313.html');
												thumbnails[3337444] = new thumbnail(3337444,'203540','j0432728','j0432728_thumb.jpg',130, 87,5,'							photo_3337444.html');
												thumbnails[3337314] = new thumbnail(3337314,'151603','j0438548','j0438548_thumb.jpg',130, 103,5,'							photo_3337314.html');
												thumbnails[3337446] = new thumbnail(3337446,'151603','j0438438','j0438438_thumb.jpg',130, 194,5,'							photo_3337446.html');
												thumbnails[3337447] = new thumbnail(3337447,'203540','','j0438736_thumb.jpg',130, 98,5,'							photo_3337447.html');
												thumbnails[3328699] = new thumbnail(3328699,'202955','','2007 Nov 12 020 PINK_thumb.jpg',130, 86,5,'							photo_3328699.html');
												thumbnails[3341408] = new thumbnail(3341408,'202955','j0438438','j04384381_thumb.jpg',130, 194,5,'							photo_3341408.html');
												thumbnails[4576438] = new thumbnail(4576438,'265227','64 Hollywood%20Cinema large','64_Hollywood20Cinema_large_thumb.jpg',130, 77,5,'							photo_4576438.html');
												thumbnails[4576589] = new thumbnail(4576589,'265233','africa alive','africa_alive_thumb.jpg',130, 18,5,'							photo_4576589.html');
												thumbnails[4581704] = new thumbnail(4581704,'265412','','gobananas_thumb.gif',130, 130,5,'							photo_4581704.html');
												thumbnails[4576439] = new thumbnail(4576439,'265228','','bewilderwood-logo_thumb.gif',130, 52,5,'							photo_4576439.html');
												thumbnails[4576590] = new thumbnail(4576590,'265232','','extreem_adventure_thumb.gif',130, 111,5,'							photo_4576590.html');
												thumbnails[4576440] = new thumbnail(4576440,'265229','','pleasurewood_hills_thumb.jpg',130, 42,5,'							photo_4576440.html');
												thumbnails[4576591] = new thumbnail(4576591,'265231','fakenham race course','fakenham_race_course_thumb.gif',130, 29,5,'							photo_4576591.html');
												thumbnails[4576441] = new thumbnail(4576441,'265226','tickred','tickred_thumb.jpg',130, 14,5,'							photo_4576441.html');
												thumbnails[4576592] = new thumbnail(4576592,'265234','','hilltop_thumb.jpg',130, 26,5,'							photo_4576592.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[202930] = new gallery(202930,'3892654,3892634,2649161,2649152,2649117','About Us','section183757',[2649117,2649152,2649161,3892634,3892654],0, 0, '', '																																																																																																																																	section183757.html',0,1);
				  					galleries[265233] = new gallery(265233,'4576589','Africa Alive!','section319496',[4576589],0, 0, '', '																																																																																																							section319496_265233.html',0,0);
				  					galleries[151574] = new gallery(151574,'3339359,3339358,3337434,2323382,2148428','Airport Transfers','section193619',[2148428,2323382,3337434,3339358,3339359],0, 0, '', '																																																																																																							section193619_151574.html',0,0);
				  					galleries[265228] = new gallery(265228,'4576439','BeWILDerwood','section319496',[4576439],0, 0, '', '																																																																																																							section319496_265228.html',0,0);
				  					galleries[203540] = new gallery(203540,'3337447','Corporate','section193619',[3341407,3337440,3337444,3337447],0, 0, '', '																																																																																																							section193619_203540.html',0,0);
				  					galleries[265232] = new gallery(265232,'4576590','Extreme adventure','section319496',[4576590],0, 0, '', '																																																																																																							section319496_265232.html',0,0);
				  					galleries[265231] = new gallery(265231,'4576591','Fakenham race course','section319496',[4576591],0, 0, '', '																																																																																																							section319496_265231.html',0,0);
				  					galleries[203587] = new gallery(203587,'3339360','Funeral','section193619',[3339360],0, 0, '', '																																																																																																							section193619_203587.html',0,0);
				  					galleries[265412] = new gallery(265412,'4581704','Go Bananas','section319496',[4581704],0, 0, '', '																																																																																																							section319496_265412.html',0,0);
				  					galleries[203586] = new gallery(203586,'3339357,3339356,3339355','Hen Nights','section193619',[3339355,3339356,3339357],0, 0, '', '																																																																																																							section193619_203586.html',0,0);
				  					galleries[265234] = new gallery(265234,'4576592','Hilltop Outdoor Centre','section319496',[4576592],0, 0, '', '																																																																																																							section319496_265234.html',0,0);
				  					galleries[265227] = new gallery(265227,'4576438','Hollywood Cinema','section319496',[4576438],0, 0, '', '																																																																																																							section319496_265227.html',0,0);
				  					galleries[151517] = new gallery(151517,'3337930','Kids Party Trips','section193619',[3337930,3337931,3337932,3337933,3337934],0, 0, '', '																																																																																																							section193619_151517.html',0,0);
				  					galleries[151482] = new gallery(151482,'3337308','London Trips','section193619',[2318167,2318261,2318262,3341405,3337305,3337306,3337307,3337308],0, 0, '', '																																																																																																							section193619_151482.html',0,0);
				  					galleries[151603] = new gallery(151603,'3337303','Night Life','section193619',[2147167,3337300,5432098,3341406,3337303,3337436,3337437,3337313,3337314,3337446],0, 0, '', '																																																																																																							section193619_151603.html',0,0);
				  					galleries[202955] = new gallery(202955,'3341408,3328699','Party girl limo','section236097',[3328699,3341408],0, 0, '', '																																																																																																																																	section236097.html',0,1);
				  					galleries[265229] = new gallery(265229,'4576440','Pleasurewood Hills','section319496',[4576440],0, 0, '', '																																																																																																							section319496_265229.html',0,0);
				  					galleries[203712] = new gallery(203712,'3341595,3339361','Prom','section193619',[3341595,3339361],0, 0, '', '																																																																																																							section193619_203712.html',0,0);
				  					galleries[151522] = new gallery(151522,'3337309','Race Meetings','section193619',[2148449,2323387,3337309],0, 0, '', '																																																																																																							section193619_151522.html',0,0);
				  					galleries[203532] = new gallery(203532,'3337302','Romance','section193619',[2148468,3328712,3328764,3337432,3337302,3337433,3337439,3337311],0, 0, '', '																																																																																																							section193619_203532.html',0,0);
				  					galleries[203289] = new gallery(203289,'3337301','Stag Nights','section193619',[5432121,3337301,3337304,3337310,3337441,3337442,3337312,3337443],0, 0, '', '																																																																																																							section193619_203289.html',0,0);
				  					galleries[265226] = new gallery(265226,'4576441','Tick Red','section319496',[4576441],0, 0, '', '																																																																																																							section319496_265226.html',0,0);
				  					galleries[151514] = new gallery(151514,'4551856,3337438,3337431,2585123,2585122,2354075','Weddings','section193619',[2354075,2585122,2585123,3337431,4551856,3337438],0, 0, '', '																																																																																																							section193619_151514.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '4551856,3892654,2649161,2649152,2649117,2147167,2147164,2147163,2147162';
imageSets[2] = '3337930,3337447,3337309,3337308,3337303,3337302,3337301';
imageSets[3] = '5432121,5432098,4581704,4576592,4576591,4576590,4576589,4576441,4576440,4576439,4576438,4551856,3892654,3892634,3341595,3341408,3341407,3341406,3341405,3339361,3339360,3339359,3339358,3339357,3339356,3339355,3337934,3337933,3337932,3337931,3337930,3337447,3337446,3337444,3337443,3337442,3337441,3337440,3337439,3337438,3337437,3337436,3337434,3337433,3337432,3337431,3337314,3337313,3337312,3337311';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/limousines/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/limousines/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/limousines/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/limousines/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/limousines/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/limousines/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 += 'section183757.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 && 'section183757' != '') {
					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));		}, 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 = 'East Anglia Limousines: ' + 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));    }        
    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;
	}
}

			

