window.thumbnails = {};
															thumbnails[682117] = clik.newPhoto({"id":682117,"src":"kelly_CP_41_thumb_0BCE9377-24E8-5EC4-4F1A63E612610AAF.jpg","galleries_id":59064,"server_id":1,"link":"photo_682117.html","width":130,"caption":"","height":130});
															thumbnails[682122] = clik.newPhoto({"id":682122,"src":"Kelly-CP-62_thumb_0C51B768-24E8-5EC4-4F767284823993E4.jpg","galleries_id":50238,"server_id":1,"link":"photo_682122.html","width":130,"caption":"","height":130});
															thumbnails[686222] = clik.newPhoto({"id":686222,"src":"Bridie_CP_!_thumb_0C47C2B1-24E8-5EC4-4F1AE26E1330D95F.jpg","galleries_id":50238,"server_id":1,"link":"photo_686222.html","width":130,"caption":"","height":130});
															thumbnails[689095] = clik.newPhoto({"id":689095,"src":"Jana_CP_22_thumb_0BE7F747-24E8-5EC4-4F53FE0DE4C6623E.jpg","galleries_id":50238,"server_id":1,"link":"photo_689095.html","width":130,"caption":"","height":130});
															thumbnails[689114] = clik.newPhoto({"id":689114,"src":"kelly_CP_3A_thumb_0BF291D1-24E8-5EC4-4F806BA0319C6A17.jpg","galleries_id":50238,"server_id":1,"link":"photo_689114.html","width":130,"caption":"","height":130});
															thumbnails[721368] = clik.newPhoto({"id":721368,"src":"Tessa_CP_1_thumb_0CD97B2B-24E8-5EC4-4F3C2927A97F52EA.jpg","galleries_id":59064,"server_id":1,"link":"photo_721368.html","width":130,"caption":"","height":130});
															thumbnails[1029308] = clik.newPhoto({"id":1029308,"src":"Tess_20__2_modcp_1_thumb1_1.jpg","galleries_id":59064,"server_id":38,"link":"photo_1029308.html","width":130,"caption":"Tess_20_ (2) modcp","height":130});
															thumbnails[1235956] = clik.newPhoto({"id":1235956,"src":"Karen_3_-(84)-mod_thumb_0DE729F0-24E8-5EC4-4F34430BD70028A4.jpg","galleries_id":59064,"server_id":1,"link":"photo_1235956.html","width":130,"caption":"","height":130});
															thumbnails[1390893] = clik.newPhoto({"id":1390893,"src":"Abi-5016319.08.052_thumb_0BB5725F-24E8-5EC4-4F8E786A3853B3D0.jpg","galleries_id":59064,"server_id":1,"link":"photo_1390893.html","width":130,"caption":"","height":130});
															thumbnails[1390894] = clik.newPhoto({"id":1390894,"src":"KAREN_9-(1)mod-kp1_thumb_0DF099B2-24E8-5EC4-4F2B2A819A955723.jpg","galleries_id":59064,"server_id":1,"link":"photo_1390894.html","width":130,"caption":"","height":130});
															thumbnails[1486535] = clik.newPhoto({"id":1486535,"src":"Tess_32-(59)-MOD_thumb_0DF36B6F-24E8-5EC4-4F0A6BE249E3298D.jpg","galleries_id":59064,"server_id":1,"link":"photo_1486535.html","width":130,"caption":"","height":130});
															thumbnails[1806303] = clik.newPhoto({"id":1806303,"src":"Tess40-(58)mod-kp_thumb_0C01D50E-24E8-5EC4-4F94DF62F729404D.jpg","galleries_id":50238,"server_id":1,"link":"photo_1806303.html","width":130,"caption":"","height":130});
															thumbnails[2322889] = clik.newPhoto({"id":2322889,"src":"Donna-1 (3)_pp_thumb_0C04C73F-24E8-5EC4-4F378B35981104BA.jpg","galleries_id":50238,"server_id":1,"link":"photo_2322889.html","width":130,"caption":"","height":130});
															thumbnails[2354422] = clik.newPhoto({"id":2354422,"src":"Colin-1-(22)_thumb_0C09679E-24E8-5EC4-4F07115041796485.jpg","galleries_id":50238,"server_id":1,"link":"photo_2354422.html","width":130,"caption":"","height":130});
															thumbnails[2354424] = clik.newPhoto({"id":2354424,"src":"Colin-1-(86)_thumb_0C0C794C-24E8-5EC4-4F4D8340FDC29C92.jpg","galleries_id":50238,"server_id":1,"link":"photo_2354424.html","width":130,"caption":"","height":130});
															thumbnails[3203511] = clik.newPhoto({"id":3203511,"src":"Karen_6--(105)_ppsa_thumb_0C153410-24E8-5EC4-4FB075E5B836D5C8.jpg","galleries_id":50238,"server_id":1,"link":"photo_3203511.html","width":130,"caption":"","height":130});
															thumbnails[3203574] = clik.newPhoto({"id":3203574,"src":"Karen_13-(43)-MODs_thumb_0DF918D1-24E8-5EC4-4F9EC136A8F08820.jpg","galleries_id":59064,"server_id":1,"link":"photo_3203574.html","width":130,"caption":"","height":130});
															thumbnails[3410219] = clik.newPhoto({"id":3410219,"src":"Phe-263-20.01-web_thumb_0C1C82D0-24E8-5EC4-4F1C083AA06555DC.jpg","galleries_id":50238,"server_id":1,"link":"photo_3410219.html","width":130,"caption":"","height":130});
															thumbnails[3443004] = clik.newPhoto({"id":3443004,"src":"Phe-170-21.01_ppmon_thumb_0C1F967C-24E8-5EC4-4F60EBF79D29B39A.jpg","galleries_id":50238,"server_id":1,"link":"photo_3443004.html","width":130,"caption":"","height":130});
															thumbnails[3893229] = clik.newPhoto({"id":3893229,"src":"JEN_01-57_ppMOD2BW-small_thumb_0C2287BA-24E8-5EC4-4F1F464D92AA5434.jpg","galleries_id":50238,"server_id":1,"link":"photo_3893229.html","width":130,"caption":"","height":130});
															thumbnails[9068105] = clik.newPhoto({"id":9068105,"src":"Maria_Colour_82_m_ppWEB_thumb_0C25205F-24E8-5EC4-4F9D2AA1CB8415E7.jpg","galleries_id":50238,"server_id":1,"link":"photo_9068105.html","width":130,"caption":"","height":130});
															thumbnails[9082641] = clik.newPhoto({"id":9082641,"src":"he12ms_thumb_14B25A60-1EC9-DFB6-091D4BA7C8C0A1AA.jpg","galleries_id":59064,"server_id":1,"link":"photo_9082641.html","width":130,"caption":"","height":130});
															thumbnails[9082645] = clik.newPhoto({"id":9082645,"src":"he7ms1_thumb_14C02C52-1EC9-DFB6-09E0CF24F096CDDF.jpg","galleries_id":59064,"server_id":1,"link":"photo_9082645.html","width":130,"caption":"","height":130});
															thumbnails[9082655] = clik.newPhoto({"id":9082655,"src":"he14ms1_thumb_14EDB497-1EC9-DFB6-098C514BE8B6C307.jpg","galleries_id":59064,"server_id":1,"link":"photo_9082655.html","width":130,"caption":"","height":130});
															thumbnails[9091500] = clik.newPhoto({"id":9091500,"src":"Karen_5__167cp_1_thumb1_1.jpg","galleries_id":59064,"server_id":1,"link":"photo_9091500.html","width":130,"caption":"","height":130});
															thumbnails[9091506] = clik.newPhoto({"id":9091506,"src":"Tess__Karen_11_182cp_1_thumb1_1.jpg","galleries_id":59064,"server_id":1,"link":"photo_9091506.html","width":130,"caption":"","height":130});
															thumbnails[9091508] = clik.newPhoto({"id":9091508,"src":"Cleo_10039LJ-cp_1_thumb1_1.jpg","galleries_id":59064,"server_id":1,"link":"photo_9091508.html","width":130,"caption":"Cleo 10039LJ-cp","height":130});
															thumbnails[9091510] = clik.newPhoto({"id":9091510,"src":"Tess_39_25_MODCP_1_thumb1_1.jpg","galleries_id":59064,"server_id":1,"link":"photo_9091510.html","width":130,"caption":"","height":130});
															thumbnails[9091512] = clik.newPhoto({"id":9091512,"src":"TESS_41_87_thumb1_1.jpg","galleries_id":59064,"server_id":1,"link":"photo_9091512.html","width":130,"caption":"","height":130});
															thumbnails[9091519] = clik.newPhoto({"id":9091519,"src":"Tessa_9_53cp_1_thumb1_1.jpg","galleries_id":59064,"server_id":1,"link":"photo_9091519.html","width":130,"caption":"","height":130});
															thumbnails[9094258] = clik.newPhoto({"id":9094258,"src":"Abi0128threecp_1_thumb1_1.jpg","galleries_id":50238,"server_id":1,"link":"photo_9094258.html","width":130,"caption":"Abi0128threecp","height":130});
															thumbnails[9094265] = clik.newPhoto({"id":9094265,"src":"HANNAH_18mod_1_thumb_1.jpg","galleries_id":50238,"server_id":1,"link":"photo_9094265.html","width":87,"caption":"HANNAH (18)mod","height":130});
															thumbnails[9094259] = clik.newPhoto({"id":9094259,"src":"Cleo_10033LJr_2_thumb1_1.jpg","galleries_id":50238,"server_id":1,"link":"photo_9094259.html","width":130,"caption":"Cleo 10033LJr","height":130});
															thumbnails[9099363] = clik.newPhoto({"id":9099363,"src":"HANNAH_36_MOD_WEB_1_thumb.jpg","galleries_id":50238,"server_id":1,"link":"photo_9099363.html","width":86,"caption":"HANNAH (36) MOD WEB.jpg","height":130});
															thumbnails[9094260] = clik.newPhoto({"id":9094260,"src":"Cleo_10191LJ_2_thumb1_1.JPG","galleries_id":50238,"server_id":1,"link":"photo_9094260.html","width":130,"caption":"Cleo 10191LJ","height":130});
															thumbnails[9094262] = clik.newPhoto({"id":9094262,"src":"Ellen_1st_42ms_2_thumb1_1.jpg","galleries_id":50238,"server_id":1,"link":"photo_9094262.html","width":130,"caption":"Ellen 1st (42)ms","height":130});
															thumbnails[9094264] = clik.newPhoto({"id":9094264,"src":"Ellen_1st_60cphp_2_thumb.jpg","galleries_id":50238,"server_id":1,"link":"photo_9094264.html","width":126,"caption":"Ellen 1st (60)cphp","height":130});
															thumbnails[9094268] = clik.newPhoto({"id":9094268,"src":"HANNAH_52_thumb1_1.jpg","galleries_id":50238,"server_id":1,"link":"photo_9094268.html","width":130,"caption":"HANNAH (51)","height":130});
															thumbnails[9094269] = clik.newPhoto({"id":9094269,"src":"Jana_Two_45_DC00DD75-24E8-5EC4-4F577E1A8F100C25_1_thumb1_1.jpg","galleries_id":50238,"server_id":1,"link":"photo_9094269.html","width":130,"caption":"Jana Two (45)","height":130});
															thumbnails[9094271] = clik.newPhoto({"id":9094271,"src":"LJ54090606mono_1_thumb1_1.jpg","galleries_id":50238,"server_id":1,"link":"photo_9094271.html","width":130,"caption":"LJ54090606mono","height":130});
															thumbnails[9094272] = clik.newPhoto({"id":9094272,"src":"LJ103090606FINMONO_1_thumb1_1.jpg","galleries_id":50238,"server_id":1,"link":"photo_9094272.html","width":130,"caption":"LJ103090606FINMONO","height":130});
															thumbnails[9095188] = clik.newPhoto({"id":9095188,"src":"tessa_5-85cp_2_thumb1_1.jpg","galleries_id":59064,"server_id":1,"link":"photo_9095188.html","width":130,"caption":"tessa 5-85cp","height":130});
															thumbnails[9095194] = clik.newPhoto({"id":9095194,"src":"Abi0034Fourcp_1_thumb1_1.jpg","galleries_id":59064,"server_id":38,"link":"photo_9095194.html","width":130,"caption":"Abi0034Fourcp","height":130});
															thumbnails[9095198] = clik.newPhoto({"id":9095198,"src":"Tess_22__312cp_2_thumb1_1.jpg","galleries_id":59064,"server_id":1,"link":"photo_9095198.html","width":130,"caption":"Tess 22  (312)cp","height":130});
															thumbnails[9095201] = clik.newPhoto({"id":9095201,"src":"Tessa_9_23_MODcp_1_thumb1_1.jpg","galleries_id":59064,"server_id":35,"link":"photo_9095201.html","width":130,"caption":"Tessa_9_23 MODcp","height":130});
															thumbnails[9095203] = clik.newPhoto({"id":9095203,"src":"Karen_10_37mod_1_thumb1_1.jpg","galleries_id":59064,"server_id":1,"link":"photo_9095203.html","width":130,"caption":"Karen 10 (37)mod","height":130});
															thumbnails[9068060] = clik.newPhoto({"id":9068060,"src":"GEN_0258_2891cp_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9068060.html","width":130,"caption":"GEN_0258_2891cp.jpg","height":130});
															thumbnails[9068071] = clik.newPhoto({"id":9068071,"src":"CINDERELLA_ONE_330MOD_thumb_3.jpg","galleries_id":150486,"server_id":1,"link":"photo_9068071.html","width":130,"caption":"'Cinderella' English National Ballet","height":115});
															thumbnails[2297641] = clik.newPhoto({"id":2297641,"src":"ENB_Coppelia-(178)-MOD_thumb_0C88261A-24E8-5EC4-4FE9FD6F994735CB.jpg","galleries_id":150486,"server_id":1,"link":"photo_2297641.html","width":130,"caption":"'Coppelia' English National Ballet ","height":130});
															thumbnails[2297648] = clik.newPhoto({"id":2297648,"src":"ENB_Coppelia-(68)-MOD_thumb_0C8DA2E7-24E8-5EC4-4FDCF0F7F090811F.jpg","galleries_id":150486,"server_id":1,"link":"photo_2297648.html","width":130,"caption":"'Coppelia' English National Ballet","height":130});
															thumbnails[2297653] = clik.newPhoto({"id":2297653,"src":"ENB_Coppelia-(51)-MOD_thumb_0C92722F-24E8-5EC4-4FD53C5881BEBFA8.jpg","galleries_id":150486,"server_id":1,"link":"photo_2297653.html","width":130,"caption":"'Coppelia' English National Ballet","height":130});
															thumbnails[9097690] = clik.newPhoto({"id":9097690,"src":"HIPPO_a_14cp_1_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9097690.html","width":130,"caption":"HIPPO a (14)cp","height":130});
															thumbnails[9097907] = clik.newPhoto({"id":9097907,"src":"shoes3087cp_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9097907.html","width":130,"caption":"shoes3087cp.jpg","height":130});
															thumbnails[9095184] = clik.newPhoto({"id":9095184,"src":"Tessa_9_53cp_2_thumb1_1.jpg","galleries_id":59064,"server_id":1,"link":"photo_9095184.html","width":130,"caption":"Tessa 9 53cp","height":130});
															thumbnails[9097715] = clik.newPhoto({"id":9097715,"src":"Ballet_ENB_22_C_2_thumb.jpg","galleries_id":150486,"server_id":1,"link":"photo_9097715.html","width":130,"caption":"Ballet ENB (22) C","height":130});
															thumbnails[9097719] = clik.newPhoto({"id":9097719,"src":"Ballet_ENB_34R_1_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9097719.html","width":130,"caption":"Ballet ENB (34)R","height":130});
															thumbnails[9097739] = clik.newPhoto({"id":9097739,"src":"Ballet_ENB_89R_1_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9097739.html","width":130,"caption":"Ballet ENB (89)","height":130});
															thumbnails[9097792] = clik.newPhoto({"id":9097792,"src":"Ballet_ENB_62READY_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9097792.html","width":130,"caption":"Ballet ENB (62)READY","height":130});
															thumbnails[2299951] = clik.newPhoto({"id":2299951,"src":"Ballet_ENB_72cp_2_thumb.jpg","galleries_id":150486,"server_id":1,"link":"photo_2299951.html","width":130,"caption":"Ballet ENB (72)cp.jpg","height":130});
															thumbnails[2299954] = clik.newPhoto({"id":2299954,"src":"Ballet_ENB_41_Ccp_1_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_2299954.html","width":130,"caption":"Ballet ENB (41) Ccp.jpg","height":130});
															thumbnails[9098838] = clik.newPhoto({"id":9098838,"src":"ENB_Coppelia_97_MOD_2_thumb.jpg","galleries_id":150486,"server_id":1,"link":"photo_9098838.html","width":130,"caption":"B_Coppelia (97) MOD.jpg","height":130});
															thumbnails[9096496] = clik.newPhoto({"id":9096496,"src":"CINDERELLA_ONE_317r_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096496.html","width":130,"caption":"CINDERELLA ONE (317)r","height":130});
															thumbnails[9096497] = clik.newPhoto({"id":9096497,"src":"Cinderella_TWO_20r_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096497.html","width":130,"caption":"Cinderella TWO (20)r","height":130});
															thumbnails[9096498] = clik.newPhoto({"id":9096498,"src":"Cinderella_TWO_130r_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096498.html","width":130,"caption":"Cinderella TWO (130)r","height":130});
															thumbnails[9096499] = clik.newPhoto({"id":9096499,"src":"ENB_Coppelia_194r_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096499.html","width":130,"caption":"ENB Coppelia (194)r","height":130});
															thumbnails[9096500] = clik.newPhoto({"id":9096500,"src":"ENB_Coppelia_196r_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096500.html","width":130,"caption":"ENB Coppelia (196)r","height":130});
															thumbnails[9096501] = clik.newPhoto({"id":9096501,"src":"GEN_0182_2815r_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096501.html","width":130,"caption":"GEN 0182 2815r","height":130});
															thumbnails[9097682] = clik.newPhoto({"id":9097682,"src":"GEN_0359_2992r_1_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9097682.html","width":130,"caption":"","height":130});
															thumbnails[9096503] = clik.newPhoto({"id":9096503,"src":"HIPPO_a_29R_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096503.html","width":130,"caption":"HIPPO a (29)R","height":130});
															thumbnails[9096504] = clik.newPhoto({"id":9096504,"src":"HIPPO_a_36cp_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096504.html","width":130,"caption":"HIPPO a (36)cp","height":130});
															thumbnails[9096505] = clik.newPhoto({"id":9096505,"src":"HIPPO_a_206cp_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096505.html","width":130,"caption":"HIPPO a (206)cp","height":130});
															thumbnails[9096506] = clik.newPhoto({"id":9096506,"src":"HIPPO_a_267cp_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096506.html","width":130,"caption":"HIPPO a (267)cp","height":130});
															thumbnails[9096509] = clik.newPhoto({"id":9096509,"src":"HIPPO_b_73Modcp_4_thumb.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096509.html","width":130,"caption":"HIPPO b (73) Modcp","height":130});
															thumbnails[9096510] = clik.newPhoto({"id":9096510,"src":"Hippo_b_MODS_12_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096510.html","width":130,"caption":"Hippo b MODS (10)","height":130});
															thumbnails[9096511] = clik.newPhoto({"id":9096511,"src":"Hippo_b_MODS_13cp_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096511.html","width":130,"caption":"Hippo b MODS (13)cp","height":130});
															thumbnails[9096512] = clik.newPhoto({"id":9096512,"src":"Hippo_b_MODS_23cp_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096512.html","width":130,"caption":"Hippo b MODS (23)cp","height":130});
															thumbnails[9096513] = clik.newPhoto({"id":9096513,"src":"Hippo_b_MODS_31R_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096513.html","width":130,"caption":"Hippo b MODS (31)R","height":130});
															thumbnails[9096514] = clik.newPhoto({"id":9096514,"src":"Hippo_b_MODS_35cp_2_thumb1_1.jpg","galleries_id":150486,"server_id":1,"link":"photo_9096514.html","width":130,"caption":"Hippo b MODS (35)cp","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[150486] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dance","link":"gallery_150486.html","maxRecords":0.0,"photoIDs":[9068060.0,9068071.0,2297641.0,2297648.0,2297653.0,9097690.0,9097907.0,9097715.0,9097719.0,9097739.0,9097792.0,2299951.0,2299954.0,9098838.0,9096496.0,9096497.0,9096498.0,9096499.0,9096500.0,9096501.0,9097682.0,9096503.0,9096504.0,9096505.0,9096506.0,9096509.0,9096510.0,9096511.0,9096512.0,9096513.0,9096514.0],"skipIndex":0,"section_code":"gallery","featured_images":9096506.0,"id":150486,"singleSection":false});				  						galleries[50238] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery_50238.html","maxRecords":0.0,"photoIDs":[682122.0,686222.0,689095.0,689114.0,1806303.0,2322889.0,2354422.0,2354424.0,3203511.0,3410219.0,3443004.0,3893229.0,9068105.0,9094258.0,9094265.0,9094259.0,9099363.0,9094260.0,9094262.0,9094264.0,9094268.0,9094269.0,9094271.0,9094272.0],"skipIndex":0,"section_code":"gallery","featured_images":9068105.0,"id":50238,"singleSection":false});				  						galleries[59064] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Erotica","link":"gallery_59064.html","maxRecords":0.0,"photoIDs":[682117.0,721368.0,1029308.0,1235956.0,1390893.0,1390894.0,1486535.0,3203574.0,9082641.0,9082645.0,9082655.0,9091500.0,9091506.0,9091508.0,9091510.0,9091512.0,9091519.0,9095188.0,9095194.0,9095198.0,9095201.0,9095203.0,9095184.0],"skipIndex":0,"section_code":"gallery","featured_images":9091506.0,"id":59064,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9094262';
imageSets[2] = '9091506,9068105,9096506';
imageSets[3] = '9099363,9098838,9097907,9097792,9097739,9097719,9097715,9097690,9097682,9096514,9096513,9096512,9096511,9096510,9096509,9096506,9096505,9096504,9096503,9096501,9096500,9096499,9096498,9096497,9096496,9095203,9095201,9095198,9095194,9095188,9095184,9094272,9094271,9094269,9094268,9094265,9094264,9094262,9094260,9094259,9094258,9091519,9091512,9091510,9091508,9091506,9091500,9082655,9082645,9082641';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/mikekamei/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/mikekamei/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 = 'kamei PHOTOGRAPHY: ' + 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.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		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 += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="MIKEKAMEI">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

