window.thumbnails = {};
															thumbnails[2438951] = clik.newPhoto({"id":2438951,"src":"coatrack sealife adj_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"sealife coatrack","height":87});
															thumbnails[3987381] = clik.newPhoto({"id":3987381,"src":"me_at_work_thumb.jpg","galleries_id":236658,"server_id":1,"link":"photo_3987381.html","width":130,"caption":"Me at work","height":160});
															thumbnails[4043456] = clik.newPhoto({"id":4043456,"src":"lpink_bf_pframe_sideways_thumb.jpg","galleries_id":236763,"server_id":1,"link":"photo_4043456.html","width":130,"caption":"pink butterfly photo frame","height":111});
															thumbnails[4445701] = clik.newPhoto({"id":4445701,"src":"rocket_pframe_sideways_thumb.jpg","galleries_id":236763,"server_id":1,"link":"photo_4445701.html","width":130,"caption":"rocket photo frame","height":95});
															thumbnails[4876617] = clik.newPhoto({"id":4876617,"src":"gift_tags_thumb.jpg","galleries_id":278233,"server_id":1,"link":"photo_4876617.html","width":130,"caption":"wooden gift tag","height":130});
															thumbnails[4915345] = clik.newPhoto({"id":4915345,"src":"tractor_pframe_sideways_thumb.jpg","galleries_id":236763,"server_id":1,"link":"photo_4915345.html","width":130,"caption":"tractor on blue photo frame","height":111});
															thumbnails[6753728] = clik.newPhoto({"id":6753728,"src":"white_bf_pframe_sideways_thumb.jpg","galleries_id":236763,"server_id":1,"link":"photo_6753728.html","width":130,"caption":"white butterfly photo frame","height":111});
															thumbnails[6753735] = clik.newPhoto({"id":6753735,"src":"lilac_cake_frame_sideways_thumb.jpg","galleries_id":236763,"server_id":1,"link":"photo_6753735.html","width":130,"caption":"cupcake photo frame ","height":98});
															thumbnails[6753744] = clik.newPhoto({"id":6753744,"src":"lilac_flower_frame_upright_thumb.jpg","galleries_id":236763,"server_id":1,"link":"photo_6753744.html","width":130,"caption":"lilac flower photo frame","height":173});
															thumbnails[6766366] = clik.newPhoto({"id":6766366,"src":"stars_thumb.jpg","galleries_id":368371,"server_id":1,"link":"photo_6766366.html","width":130,"caption":"personalised stars, any colour","height":87});
															thumbnails[6967690] = clik.newPhoto({"id":6967690,"src":"small_country_heart_thumb.jpg","galleries_id":377629,"server_id":1,"link":"photo_6967690.html","width":130,"caption":"small country heart","height":130});
															thumbnails[7409852] = clik.newPhoto({"id":7409852,"src":"lion_plaque_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_7409852.html","width":130,"caption":"lion cub name plate","height":70});
															thumbnails[7409880] = clik.newPhoto({"id":7409880,"src":"bf_plaque_two_names_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_7409880.html","width":130,"caption":"","height":70});
															thumbnails[7602908] = clik.newPhoto({"id":7602908,"src":"dark_pink_heart_thumb.jpg","galleries_id":278225,"server_id":1,"link":"photo_7602908.html","width":130,"caption":"Dark pink personalised heart","height":130});
															thumbnails[7602912] = clik.newPhoto({"id":7602912,"src":"blue_heart__thumb.jpg","galleries_id":278225,"server_id":1,"link":"photo_7602912.html","width":130,"caption":"Light Blue personalised heart","height":130});
															thumbnails[7602915] = clik.newPhoto({"id":7602915,"src":"natural_heart_side_thumb.jpg","galleries_id":377629,"server_id":1,"link":"photo_7602915.html","width":130,"caption":"Natural personalised heart","height":130});
															thumbnails[7602921] = clik.newPhoto({"id":7602921,"src":"pink_wooden_heart_thumb.jpg","galleries_id":278225,"server_id":1,"link":"photo_7602921.html","width":130,"caption":"Light pink personalised heart","height":130});
															thumbnails[7647468] = clik.newPhoto({"id":7647468,"src":"light_blue_star_thumb.jpg","galleries_id":368371,"server_id":1,"link":"photo_7647468.html","width":130,"caption":"light blue star","height":130});
															thumbnails[7647473] = clik.newPhoto({"id":7647473,"src":"light_pink_star_thumb.jpg","galleries_id":368371,"server_id":1,"link":"photo_7647473.html","width":130,"caption":"light pink star","height":130});
															thumbnails[7647475] = clik.newPhoto({"id":7647475,"src":"red_star_thumb.jpg","galleries_id":368371,"server_id":1,"link":"photo_7647475.html","width":130,"caption":"red star","height":130});
															thumbnails[7647492] = clik.newPhoto({"id":7647492,"src":"purple_star_thumb.jpg","galleries_id":368371,"server_id":1,"link":"photo_7647492.html","width":130,"caption":"purple star","height":130});
															thumbnails[7647499] = clik.newPhoto({"id":7647499,"src":"dark_pink_star_thumb.jpg","galleries_id":368371,"server_id":1,"link":"photo_7647499.html","width":130,"caption":"dark pink star","height":130});
															thumbnails[7647505] = clik.newPhoto({"id":7647505,"src":"dark_blue_star_thumb.jpg","galleries_id":368371,"server_id":1,"link":"photo_7647505.html","width":130,"caption":"dark blue star","height":130});
															thumbnails[7853021] = clik.newPhoto({"id":7853021,"src":"lion_photo_frame1_thumb.jpg","galleries_id":236763,"server_id":1,"link":"photo_7853021.html","width":130,"caption":"lion photo frame","height":103});
															thumbnails[7945389] = clik.newPhoto({"id":7945389,"src":"natural_star_thumb.jpg","galleries_id":377629,"server_id":1,"link":"photo_7945389.html","width":130,"caption":"natural wooden star","height":141});
															thumbnails[8065041] = clik.newPhoto({"id":8065041,"src":"ivory_wooden_heart_thumb.jpg","galleries_id":278225,"server_id":1,"link":"photo_8065041.html","width":130,"caption":"Ivory wooden heart","height":130});
															thumbnails[8065107] = clik.newPhoto({"id":8065107,"src":"white_wedding_hearts_stars_thumb.jpg","galleries_id":432264,"server_id":1,"link":"photo_8065107.html","width":130,"caption":"Wedding favours: hearts and stars","height":130});
															thumbnails[8065184] = clik.newPhoto({"id":8065184,"src":"bride_and_groom_favour_thumb.jpg","galleries_id":432264,"server_id":1,"link":"photo_8065184.html","width":130,"caption":"\"Bride and Groom\" ","height":98});
															thumbnails[8168999] = clik.newPhoto({"id":8168999,"src":"teachers_plaque_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_8168999.html","width":130,"caption":"teacher's door plaque","height":67});
															thumbnails[8339234] = clik.newPhoto({"id":8339234,"src":"home_plaque_thumb.jpg","galleries_id":443182,"server_id":1,"link":"photo_8339234.html","width":130,"caption":"Word Sign with \"Home\"","height":98});
															thumbnails[8339238] = clik.newPhoto({"id":8339238,"src":"home_pegs_thumb.jpg","galleries_id":443182,"server_id":1,"link":"photo_8339238.html","width":130,"caption":"Peg Plaque \"Home\"","height":98});
															thumbnails[8339253] = clik.newPhoto({"id":8339253,"src":"welcome_pegs_thumb.jpg","galleries_id":443182,"server_id":1,"link":"photo_8339253.html","width":130,"caption":"Peg Plaque \"Welcome\"","height":98});
															thumbnails[8339258] = clik.newPhoto({"id":8339258,"src":"button_frame_thumb.jpg","galleries_id":443182,"server_id":1,"link":"photo_8339258.html","width":130,"caption":"Button Picture Frame","height":98});
															thumbnails[8481869] = clik.newPhoto({"id":8481869,"src":"rocket_pegs_thumb.jpg","galleries_id":423431,"server_id":1,"link":"photo_8481869.html","width":130,"caption":"Rocket Peg Plaque","height":75});
															thumbnails[8481889] = clik.newPhoto({"id":8481889,"src":"wooden_gift_tags_thumb.jpg","galleries_id":278233,"server_id":1,"link":"photo_8481889.html","width":130,"caption":"Wooden Gift Tags","height":112});
															thumbnails[8481890] = clik.newPhoto({"id":8481890,"src":"gift_tag_angel_thumb.jpg","galleries_id":278233,"server_id":1,"link":"photo_8481890.html","width":130,"caption":"Angel Gift Tag","height":98});
															thumbnails[8481892] = clik.newPhoto({"id":8481892,"src":"gift_tag_dove_thumb.jpg","galleries_id":278233,"server_id":1,"link":"photo_8481892.html","width":130,"caption":"Dove Gift Tag","height":98});
															thumbnails[8481894] = clik.newPhoto({"id":8481894,"src":"gift_tag_present_thumb.jpg","galleries_id":278233,"server_id":1,"link":"photo_8481894.html","width":130,"caption":"Present Gift Tag","height":98});
															thumbnails[8481901] = clik.newPhoto({"id":8481901,"src":"gift_tag_tree_thumb.jpg","galleries_id":278233,"server_id":1,"link":"photo_8481901.html","width":130,"caption":"Christmas Tree Gift tag","height":98});
															thumbnails[8503831] = clik.newPhoto({"id":8503831,"src":"love_plaque_thumb.jpg","galleries_id":443182,"server_id":1,"link":"photo_8503831.html","width":130,"caption":"Word Sign with \"Love\"","height":98});
															thumbnails[8618419] = clik.newPhoto({"id":8618419,"src":"lion_plaque_on_bright_blue_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_8618419.html","width":130,"caption":"","height":69});
															thumbnails[8729244] = clik.newPhoto({"id":8729244,"src":"3d_rocket_frame_front_thumb.jpg","galleries_id":449482,"server_id":1,"link":"photo_8729244.html","width":130,"caption":"Personalised 3D box frame: rocket","height":174});
															thumbnails[8729254] = clik.newPhoto({"id":8729254,"src":"3d_rocket_frame_side_thumb.jpg","galleries_id":449482,"server_id":1,"link":"photo_8729254.html","width":130,"caption":"Personalised 3D box frame; rocket side","height":165});
															thumbnails[8729260] = clik.newPhoto({"id":8729260,"src":"pink_bf_3d_frame_thumb.jpg","galleries_id":449482,"server_id":1,"link":"photo_8729260.html","width":130,"caption":"Personlised 3D box frame: pink butterfly","height":174});
															thumbnails[8729264] = clik.newPhoto({"id":8729264,"src":"flower_on_pink_3d_frame_thumb.jpg","galleries_id":449482,"server_id":1,"link":"photo_8729264.html","width":130,"caption":"Personalised 3D box frame: flower","height":174});
															thumbnails[8729269] = clik.newPhoto({"id":8729269,"src":"cupcake_3d_frame1_thumb.jpg","galleries_id":449482,"server_id":1,"link":"photo_8729269.html","width":130,"caption":"Personalised 3D box frame: cupcake","height":174});
															thumbnails[8729273] = clik.newPhoto({"id":8729273,"src":"purple_bf_pink_3d_frame_thumb.jpg","galleries_id":449482,"server_id":1,"link":"photo_8729273.html","width":130,"caption":"Personalised 3D box frame; purple butterfly","height":148});
															thumbnails[7867040] = clik.newPhoto({"id":7867040,"src":"bf_pegs_side_thumb.jpg","galleries_id":423431,"server_id":1,"link":"photo_7867040.html","width":130,"caption":"personalised butterfly pegs","height":90});
															thumbnails[7867050] = clik.newPhoto({"id":7867050,"src":"cupcake_pegs_side_thumb.jpg","galleries_id":423431,"server_id":1,"link":"photo_7867050.html","width":130,"caption":"personalised cupcake pegs","height":90});
															thumbnails[7867064] = clik.newPhoto({"id":7867064,"src":"tractor_pegs_side_thumb.jpg","galleries_id":423431,"server_id":1,"link":"photo_7867064.html","width":130,"caption":"personalised tractor pegs","height":89});
															thumbnails[7867059] = clik.newPhoto({"id":7867059,"src":"rocket_pegs_side_thumb.jpg","galleries_id":423431,"server_id":1,"link":"photo_7867059.html","width":130,"caption":"personalised rocket pegs","height":91});
															thumbnails[4915224] = clik.newPhoto({"id":4915224,"src":"dark_pink_bf_np_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_4915224.html","width":130,"caption":"butterfly name plate on dark pink","height":103});
															thumbnails[3896466] = clik.newPhoto({"id":3896466,"src":"scrollsaw_thumb.jpg","galleries_id":236658,"server_id":1,"link":"photo_3896466.html","width":130,"caption":"Cutting out shapes","height":98});
															thumbnails[4915506] = clik.newPhoto({"id":4915506,"src":"purple_bf_purple_nameplate_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_4915506.html","width":130,"caption":"butterfly name plate on purple","height":98});
															thumbnails[2437655] = clik.newPhoto({"id":2437655,"src":"pink_bf_pink_nameplate_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_2437655.html","width":130,"caption":"butterfly nameplate light pink","height":98});
															thumbnails[2437653] = clik.newPhoto({"id":2437653,"src":"red_yellow_bf_plaque_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_2437653.html","width":130,"caption":"yellow butterfly on red plaque ","height":93});
															thumbnails[3896475] = clik.newPhoto({"id":3896475,"src":"sanding_thumb.jpg","galleries_id":236658,"server_id":1,"link":"photo_3896475.html","width":130,"caption":" Sanding","height":106});
															thumbnails[5504702] = clik.newPhoto({"id":5504702,"src":"dark_pink_flower_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_5504702.html","width":130,"caption":"dark pink flower name plate","height":98});
															thumbnails[2437634] = clik.newPhoto({"id":2437634,"src":"purple_flower_nameplate_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_2437634.html","width":130,"caption":"purple flower name plate","height":98});
															thumbnails[3896535] = clik.newPhoto({"id":3896535,"src":"clamping_thumb.jpg","galleries_id":236658,"server_id":1,"link":"photo_3896535.html","width":130,"caption":"clamping","height":106});
															thumbnails[5752468] = clik.newPhoto({"id":5752468,"src":"dark_purple_flower_nameplate_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_5752468.html","width":130,"caption":"dark purple flower name plate","height":98});
															thumbnails[3896479] = clik.newPhoto({"id":3896479,"src":"painting_thumb.jpg","galleries_id":236658,"server_id":1,"link":"photo_3896479.html","width":130,"caption":"Painting","height":98});
															thumbnails[3975282] = clik.newPhoto({"id":3975282,"src":"shocking_pink_cup_cake_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_3975282.html","width":130,"caption":"cupcake nameplate on shocking pink","height":89});
															thumbnails[3896489] = clik.newPhoto({"id":3896489,"src":"decorating_thumb.jpg","galleries_id":236658,"server_id":1,"link":"photo_3896489.html","width":130,"caption":"Decorating","height":98});
															thumbnails[3975360] = clik.newPhoto({"id":3975360,"src":"elephant_nameplate_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_3975360.html","width":130,"caption":"elephant nameplate on bright blue","height":79});
															thumbnails[4915106] = clik.newPhoto({"id":4915106,"src":"d-blue_elephant_plaque_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_4915106.html","width":130,"caption":"elephant name plate on dark blue","height":98});
															thumbnails[3896572] = clik.newPhoto({"id":3896572,"src":"personalising_thumb.jpg","galleries_id":236658,"server_id":1,"link":"photo_3896572.html","width":130,"caption":"Personalising","height":79});
															thumbnails[5504605] = clik.newPhoto({"id":5504605,"src":"blue_football_nameplate_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_5504605.html","width":130,"caption":"football name plate on blue","height":98});
															thumbnails[5504625] = clik.newPhoto({"id":5504625,"src":"red_football_nameplate_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_5504625.html","width":130,"caption":"football name plate on red","height":98});
															thumbnails[2437612] = clik.newPhoto({"id":2437612,"src":"green_football_nameplate_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_2437612.html","width":130,"caption":"football nameplate on green","height":98});
															thumbnails[5504674] = clik.newPhoto({"id":5504674,"src":"bright_blue_tractor_np_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_5504674.html","width":130,"caption":"tractor name plate on bright blue","height":101});
															thumbnails[2437579] = clik.newPhoto({"id":2437579,"src":"nameplate_tractor_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_2437579.html","width":130,"caption":"tractor nameplate","height":80});
															thumbnails[2437604] = clik.newPhoto({"id":2437604,"src":"nameplate rocket_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_2437604.html","width":130,"caption":"rocket nameplate","height":80});
															thumbnails[2437597] = clik.newPhoto({"id":2437597,"src":"nameplate sheep_thumb.jpg","galleries_id":69198,"server_id":1,"link":"photo_2437597.html","width":130,"caption":"sheep nameplate","height":80});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[449482] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Personalised 3D Boxes","link":"gallery_449482.html","maxRecords":0.0,"photoIDs":[8729244.0,8729254.0,8729260.0,8729264.0,8729269.0,8729273.0],"skipIndex":0,"section_code":"gallery","featured_images":8729260.0,"id":449482,"singleSection":false});				  						galleries[443182] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Shabby Chic Gifts","link":"gallery_443182.html","maxRecords":0.0,"photoIDs":[8339234.0,8339238.0,8339253.0,8339258.0,8503831.0],"skipIndex":0,"section_code":"gallery","featured_images":"8503831,8339258,8339253,8339238,8339234","id":443182,"singleSection":false});				  						galleries[69198] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Door name plates","link":"gallery_69198.html","maxRecords":0.0,"photoIDs":[7409852.0,7409880.0,8168999.0,8618419.0,4915224.0,4915506.0,2437655.0,2437653.0,5504702.0,2437634.0,5752468.0,3975282.0,3975360.0,4915106.0,5504605.0,5504625.0,2437612.0,5504674.0,2437579.0,2437604.0,2437597.0],"skipIndex":0,"section_code":"gallery","featured_images":2437655.0,"id":69198,"singleSection":false});				  						galleries[423431] = clik.newGallery({"parentGallery":"","usePopups":false,"title":" Personalised Peg Plaques","link":"gallery_423431.html","maxRecords":0.0,"photoIDs":[8481869.0,7867040.0,7867050.0,7867064.0,7867059.0],"skipIndex":0,"section_code":"gallery","featured_images":7867050.0,"id":423431,"singleSection":false});				  						galleries[236763] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Photo frames","link":"gallery_236763.html","maxRecords":0.0,"photoIDs":[4043456.0,4445701.0,4915345.0,6753728.0,6753735.0,6753744.0,7853021.0],"skipIndex":0,"section_code":"gallery","featured_images":4445701.0,"id":236763,"singleSection":false});				  						galleries[278225] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Personalised Wooden Hearts","link":"gallery_278225.html","maxRecords":0.0,"photoIDs":[7602908.0,7602912.0,7602921.0,8065041.0],"skipIndex":0,"section_code":"gallery","featured_images":"7602921,7602908","id":278225,"singleSection":false});				  						galleries[368371] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Personalised Wooden Stars","link":"gallery_368371.html","maxRecords":0.0,"photoIDs":[6766366.0,7647468.0,7647473.0,7647475.0,7647492.0,7647499.0,7647505.0],"skipIndex":0,"section_code":"gallery","featured_images":6766366.0,"id":368371,"singleSection":false});				  						galleries[377629] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Natural Wooden Hearts and Stars","link":"gallery_377629.html","maxRecords":0.0,"photoIDs":[6967690.0,7602915.0,7945389.0],"skipIndex":0,"section_code":"gallery","featured_images":7602915.0,"id":377629,"singleSection":false});				  						galleries[432264] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wedding favours","link":"gallery_432264.html","maxRecords":0.0,"photoIDs":[8065107.0,8065184.0],"skipIndex":0,"section_code":"gallery","featured_images":8065107.0,"id":432264,"singleSection":false});				  						galleries[278233] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wooden Gift Tags","link":"gallery_278233.html","maxRecords":0.0,"photoIDs":[4876617.0,8481889.0,8481890.0,8481892.0,8481894.0,8481901.0],"skipIndex":0,"section_code":"gallery","featured_images":8481889.0,"id":278233,"singleSection":false});				  						galleries[236658] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Production process","link":"gallery_236658.html","maxRecords":0.0,"photoIDs":[3987381.0,3896466.0,3896475.0,3896535.0,3896479.0,3896489.0,3896572.0],"skipIndex":0,"section_code":"gallery","featured_images":3896479.0,"id":236658,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8481869';
imageSets[2] = '8729260,8481889,8065107,7602921,7602915,7602908,6766366,4445701,7867050,2437655,3896479';
imageSets[3] = '8729273,8729269,8729264,8729260,8729254,8729244,8618419,8503831,8481901,8481894,8481892,8481890,8481889,8481869,8339258,8339253,8339238,8339234,8168999,8065184,8065107,8065041,7945389,7867064,7867059,7867050,7867040,7853021,7647505,7647499,7647492,7647475,7647473,7647468,7602921,7602915,7602912,7602908,7409880,7409852,6967690,6766366,6753744,6753735,6753728,5752468,5504702,5504674,5504625,5504605';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/jevans/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/jevans/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/jevans/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/jevans/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/jevans/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/jevans/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/jevans/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/jevans/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Personalised Wooden Children\'s Gifts: ' + 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> &pound;' + (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="janneke-evans@hotmail.com">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					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=\"Click to add item 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="janneke-evans@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;
	}
}

			

