window.thumbnails = new Object();
												thumbnails[3042073] = new thumbnail(3042073,'','BEAUTY PRODUCTS','essentialformula1_thumb.jpg',130, 98,32,'#');
												thumbnails[3077240] = new thumbnail(3077240,'','','vodkart2_thumb.jpg',130, 92,32,'#');
												thumbnails[3077239] = new thumbnail(3077239,'','BEFORE','vodkart1_thumb.jpg',130, 92,32,'#');
												thumbnails[3246688] = new thumbnail(3246688,'','DUCHAMP','1052_38A_thumb.jpg',130, 140,32,'#');
												thumbnails[7481658] = new thumbnail(7481658,'306752','Cable','Sync_lead_main2_thumb.jpg',130, 69,32,'photo_7481658.html');
												thumbnails[7470741] = new thumbnail(7470741,'306752','LEAVES','Leaf_01d_thumb.jpg',130, 92,32,'photo_7470741.html');
												thumbnails[7470758] = new thumbnail(7470758,'306752','LEAVES','Leaf_01b_thumb.jpg',130, 92,32,'photo_7470758.html');
												thumbnails[7470721] = new thumbnail(7470721,'306752','LEAF','Leaf_08d_thumb.jpg',130, 92,32,'photo_7470721.html');
												thumbnails[7470732] = new thumbnail(7470732,'306752','LEAVES','Leaf_06a_thumb.jpg',130, 92,32,'photo_7470732.html');
												thumbnails[7452646] = new thumbnail(7452646,'186990','Motorola Phones','Home_Smart_Phone_thumb.jpg',130, 92,32,'photo_7452646.html');
												thumbnails[6429500] = new thumbnail(6429500,'218343','ALISON BERTHELSEN','Necklace_with_flowers0018_thumb.jpg',130, 92,32,'photo_6429500.html');
												thumbnails[6431430] = new thumbnail(6431430,'187005','DEREK ROSE PYJAMAS','Dereck_rose_thumb.jpg',130, 92,32,'photo_6431430.html');
												thumbnails[6437115] = new thumbnail(6437115,'186990','SAFIELD DISTRIBUTION','Safield_1475_0001_thumb.jpg',130, 92,32,'photo_6437115.html');
												thumbnails[6437124] = new thumbnail(6437124,'186990','SAFIELD DISTRIBUTION','Safield_1475_0003_thumb.jpg',130, 92,32,'photo_6437124.html');
												thumbnails[5620361] = new thumbnail(5620361,'218343','ALISON BERTHELSEN JEWELLERY','Dress_On_Chain_main_thumb.jpg',130, 92,32,'photo_5620361.html');
												thumbnails[5620379] = new thumbnail(5620379,'218343','ALISON BERTHELSEN JEWELLERY','Necklace_Alison2_thumb.jpg',130, 92,32,'photo_5620379.html');
												thumbnails[5580374] = new thumbnail(5580374,'218343','ALISON BERTHELSEN','HN1_Book_01_RT_thumb.jpg',130, 92,32,'photo_5580374.html');
												thumbnails[3417233] = new thumbnail(3417233,'208848','TAG','carrerart21_thumb.jpg',130, 98,32,'photo_3417233.html');
												thumbnails[3420888] = new thumbnail(3420888,'208848','DIESEL','DieselWatch_thumb.jpg',130, 92,32,'photo_3420888.html');
												thumbnails[4370724] = new thumbnail(4370724,'186990','HSBC','1338_02_Lambretta_Master_thumb.jpg',130, 92,32,'photo_4370724.html');
												thumbnails[4445820] = new thumbnail(4445820,'186990','HSBC','1338_03_Lambretta_Main_thumb.jpg',130, 92,32,'photo_4445820.html');
												thumbnails[3042127] = new thumbnail(3042127,'186990','PAUL SMITH','PaulSmithAdrt21_thumb.jpg',130, 92,32,'photo_3042127.html');
												thumbnails[3420876] = new thumbnail(3420876,'186990','NOKIA','NokiaPhone6500_2_thumb.jpg',130, 92,32,'photo_3420876.html');
												thumbnails[5244691] = new thumbnail(5244691,'218343','CENTRALE SHOPPING CENTRE','Centrale_shopping_centre682x484px_thumb.jpg',130, 92,32,'photo_5244691.html');
												thumbnails[3246711] = new thumbnail(3246711,'186990','CLARINS PERFUME','ClarinRT-_thumb.jpg',130, 92,32,'photo_3246711.html');
												thumbnails[3571185] = new thumbnail(3571185,'218343','ARLINGTON AND CO','ArlingtonRing_main_thumb.jpg',130, 92,32,'photo_3571185.html');
												thumbnails[3041467] = new thumbnail(3041467,'187005','DUCHAMP','duchampevening_thumb.jpg',130, 173,32,'photo_3041467.html');
												thumbnails[3041032] = new thumbnail(3041032,'186990','FALLING LAMP','lamp_thumb.jpg',130, 92,32,'photo_3041032.html');
												thumbnails[3041048] = new thumbnail(3041048,'187005','DUCHAMP','tieshirtblackpurple_thumb.jpg',130, 173,32,'photo_3041048.html');
												thumbnails[3571184] = new thumbnail(3571184,'218343','ARLINGTON AND CO','ArlingtonNeckless_purple_thumb.jpg',130, 92,32,'photo_3571184.html');
												thumbnails[3041487] = new thumbnail(3041487,'187005','DUCHAMP','duchamprainbowstripe_thumb.jpg',130, 92,32,'photo_3041487.html');
												thumbnails[3041490] = new thumbnail(3041490,'187005','DUCHAMP','duchamptiechair_thumb.jpg',130, 173,32,'photo_3041490.html');
												thumbnails[3041020] = new thumbnail(3041020,'186990','DICE','craps2_thumb.jpg',130, 92,32,'photo_3041020.html');
												thumbnails[3571213] = new thumbnail(3571213,'218343','DURRANTS LONDON','DurrantBraclet_Main_thumb.jpg',130, 92,32,'photo_3571213.html');
												thumbnails[3040988] = new thumbnail(3040988,'187005','ADIDAS','adidasreflection_thumb.jpg',130, 171,32,'photo_3040988.html');
												thumbnails[3041043] = new thumbnail(3041043,'186990','TRIPP','redcasewheel_thumb.jpg',130, 172,32,'photo_3041043.html');
												thumbnails[3045243] = new thumbnail(3045243,'187005','DUNE','dunePeepToeLeather_thumb.jpg',130, 173,32,'photo_3045243.html');
												thumbnails[3041497] = new thumbnail(3041497,'186990','DUCHAMP','leatherbag_thumb.jpg',130, 173,32,'photo_3041497.html');
												thumbnails[3041646] = new thumbnail(3041646,'187005','DEBENHAMS','purpleshoes2_thumb.jpg',130, 92,32,'photo_3041646.html');
												thumbnails[3246673] = new thumbnail(3246673,'186990','DUCHAMP','1052_29_thumb.jpg',130, 173,32,'photo_3246673.html');
												thumbnails[3041029] = new thumbnail(3041029,'186990','GUCCI','gucci_thumb.jpg',130, 92,32,'photo_3041029.html');
												thumbnails[3571214] = new thumbnail(3571214,'218343','DURRENTS LONDON','DurrantRing_Main_thumb.jpg',130, 92,32,'photo_3571214.html');
												thumbnails[3042072] = new thumbnail(3042072,'186990','PER UNA','peruna22_thumb.jpg',130, 144,32,'photo_3042072.html');
												thumbnails[3571421] = new thumbnail(3571421,'218343','CLASSIC JEWELLERY LONDON','Classic_ring_3_thumb.jpg',130, 92,32,'photo_3571421.html');
												thumbnails[3041637] = new thumbnail(3041637,'187005','DEBENHAMS','pregnantblackdress_thumb.jpg',130, 92,32,'photo_3041637.html');
												thumbnails[3041041] = new thumbnail(3041041,'186990','RADOX','radox_thumb.jpg',130, 92,32,'photo_3041041.html');
												thumbnails[3571212] = new thumbnail(3571212,'218343','CLASSIC JEWELLERY LONDON','ClassicRing1_Main1_thumb.jpg',130, 92,32,'photo_3571212.html');
												thumbnails[3042077] = new thumbnail(3042077,'187005','HSBC','hsbcdenimjacket_thumb.jpg',130, 92,32,'photo_3042077.html');
												thumbnails[3041628] = new thumbnail(3041628,'187005','M&S','mspinkunderwear_thumb.jpg',130, 92,32,'photo_3041628.html');
												thumbnails[3042075] = new thumbnail(3042075,'187005','HSBC','asainblackheadress_thumb.jpg',130, 92,32,'photo_3042075.html');
												thumbnails[3040993] = new thumbnail(3040993,'186990','TRIPP','bluecasestripp_thumb.jpg',130, 92,32,'photo_3040993.html');
												thumbnails[3571186] = new thumbnail(3571186,'218343','CLASSIC JEWELLERY LONDON','Classic_Ring2_thumb.jpg',130, 92,32,'photo_3571186.html');
												thumbnails[3041631] = new thumbnail(3041631,'187005','M&S','mspinstripesuit_thumb.jpg',130, 92,32,'photo_3041631.html');
												thumbnails[3041622] = new thumbnail(3041622,'187005','OK-NI','Jeans_thumb.jpg',130, 92,32,'photo_3041622.html');
												thumbnails[3246656] = new thumbnail(3246656,'187005','DUCHAMP','0935_16-pochettes_thumb.jpg',130, 161,32,'photo_3246656.html');
												thumbnails[4370742] = new thumbnail(4370742,'187005','HSBC','1338_Kimono2_Master_thumb.jpg',130, 92,32,'photo_4370742.html');
												thumbnails[3246660] = new thumbnail(3246660,'187005','DUCHAMP','1052_26A_thumb.jpg',130, 92,32,'photo_3246660.html');
												thumbnails[3045240] = new thumbnail(3045240,'187005','DUCHAMP','duchampbelts_thumb.jpg',130, 173,32,'photo_3045240.html');
												thumbnails[4370741] = new thumbnail(4370741,'187005','HSBC','1338_Kimon1_Master_thumb.jpg',130, 183,32,'photo_4370741.html');
												thumbnails[3246667] = new thumbnail(3246667,'187005','DUCHAMP','1052_27_thumb.jpg',130, 173,32,'photo_3246667.html');
												thumbnails[3246683] = new thumbnail(3246683,'187005','DUCHAMP','1052_30B_thumb.jpg',130, 92,32,'photo_3246683.html');
												thumbnails[3246695] = new thumbnail(3246695,'186990','TRIPP','1096_05_thumb.jpg',130, 92,32,'photo_3246695.html');
												thumbnails[3246699] = new thumbnail(3246699,'186990','TRIPP','1106_02_thumb.jpg',130, 92,32,'photo_3246699.html');
												thumbnails[3246701] = new thumbnail(3246701,'186990','TRIPP','1163_01_Renown_thumb.jpg',130, 173,32,'photo_3246701.html');
												thumbnails[3246704] = new thumbnail(3246704,'186990','TRIPP','1218_08_Cabin_Pink_Croc_CU_thumb.jpg',130, 173,32,'photo_3246704.html');
												thumbnails[3042067] = new thumbnail(3042067,'218343','DEBENHAMS','debnecklace_thumb.jpg',130, 173,32,'photo_3042067.html');
												thumbnails[3041027] = new thumbnail(3041027,'218343','DUCHAMP','duchampcufflinks2_thumb.jpg',130, 92,32,'photo_3041027.html');
												thumbnails[3398923] = new thumbnail(3398923,'208848','DNYK','DKNYWatch6_thumb.jpg',130, 92,32,'photo_3398923.html');
												thumbnails[3246639] = new thumbnail(3246639,'208848','Jasper Conran watch','0089-06Watch_thumb.jpg',130, 173,32,'photo_3246639.html');
												thumbnails[3319033] = new thumbnail(3319033,'208848','DNYK','DKNY_BODYWORK retouch_thumb.jpg',130, 92,32,'photo_3319033.html');
												thumbnails[3246713] = new thumbnail(3246713,'208848','RED HERRING','Shoot4_DM_MW_SS_26_thumb.jpg',130, 92,32,'photo_3246713.html');
												thumbnails[3041031] = new thumbnail(3041031,'208848','JOHN ROCHA','johnrochawatch_thumb.jpg',130, 92,32,'photo_3041031.html');
												thumbnails[3246712] = new thumbnail(3246712,'208848','RED HERRING','RedHerring_thumb.jpg',130, 92,32,'photo_3246712.html');
												thumbnails[3319030] = new thumbnail(3319030,'208848','DNYK','DKNYWatchBack_MAIN72dpi_thumb.jpg',130, 92,32,'photo_3319030.html');
												thumbnails[3041074] = new thumbnail(3041074,'186990','ELEMENTS','Elements_thumb.jpg',130, 92,32,'photo_3041074.html');
												thumbnails[3246715] = new thumbnail(3246715,'186990','Sony Cameras','Sony-camerasRoy_thumb.jpg',130, 92,32,'photo_3246715.html');
												thumbnails[3041953] = new thumbnail(3041953,'186990','DEBENHAMS','sunglassesgrey1_thumb.jpg',130, 92,32,'photo_3041953.html');
												thumbnails[3246707] = new thumbnail(3246707,'186990','DEBENHAMS','039004cmyk2_thumb.jpg',130, 92,32,'photo_3246707.html');
												thumbnails[5428543] = new thumbnail(5428543,'306752','LIGHTS','Beeds_on_black_0009_thumb.jpg',130, 92,32,'photo_5428543.html');
												thumbnails[5428699] = new thumbnail(5428699,'306752','BEEDS','Beeds_on_black_0011_thumb.jpg',130, 92,32,'photo_5428699.html');
												thumbnails[5428711] = new thumbnail(5428711,'306752','ROPES','Rope_on_black_0008_thumb.jpg',130, 92,32,'photo_5428711.html');
												thumbnails[5428717] = new thumbnail(5428717,'306752','MALTESERS','Rope_on_black_0014_thumb.jpg',130, 92,32,'photo_5428717.html');
												thumbnails[5450579] = new thumbnail(5450579,'306752','BALLET SHOES','1338_Ballet0109_thumb.jpg',130, 92,32,'photo_5450579.html');
												thumbnails[3417473] = new thumbnail(3417473,'208877','','Debextrt2_thumb.jpg',130, 182,32,'photo_3417473.html');
												thumbnails[3417498] = new thumbnail(3417498,'208890','','Womanatstairs_thumb.jpg',130, 163,32,'photo_3417498.html');
												thumbnails[3417964] = new thumbnail(3417964,'187086','','PaulSmithAdrt22_thumb.jpg',130, 92,32,'photo_3417964.html');
												thumbnails[4445845] = new thumbnail(4445845,'259908','','ClarinRT_rt2_thumb.jpg',130, 92,32,'photo_4445845.html');
												thumbnails[4445852] = new thumbnail(4445852,'259909','','Classic_ring_3_rt2_thumb.jpg',130, 92,32,'photo_4445852.html');
												thumbnails[3417489] = new thumbnail(3417489,'208877','BEFORE','Debextrt1_thumb.jpg',130, 182,32,'photo_3417489.html');
												thumbnails[3417502] = new thumbnail(3417502,'208890','BEFORE','WomanatstairsOrg_thumb.jpg',130, 163,32,'photo_3417502.html');
												thumbnails[4445821] = new thumbnail(4445821,'259908','Before','ClarinRT_rt1_thumb.jpg',130, 92,32,'photo_4445821.html');
												thumbnails[4445849] = new thumbnail(4445849,'259909','Before','Classic_ring_3_rt1_thumb.jpg',130, 92,32,'photo_4445849.html');
												thumbnails[3077251] = new thumbnail(3077251,'188759','','lamprt21_thumb.jpg',130, 92,32,'photo_3077251.html');
												thumbnails[3077246] = new thumbnail(3077246,'188759','BEFORE','lamprt11_thumb.jpg',130, 92,32,'photo_3077246.html');
												thumbnails[3077409] = new thumbnail(3077409,'187089','','SHIPSPROFILErt11_thumb.jpg',130, 92,32,'photo_3077409.html');
												thumbnails[3077411] = new thumbnail(3077411,'187089','BEFORE','SHIPSPROFILErt21_thumb.jpg',130, 92,32,'photo_3077411.html');
												thumbnails[3077245] = new thumbnail(3077245,'188761','','BMrt2_thumb.jpg',130, 55,32,'photo_3077245.html');
												thumbnails[3077244] = new thumbnail(3077244,'188761','BEFORE','BMrt1_thumb.jpg',130, 55,32,'photo_3077244.html');
												thumbnails[3077236] = new thumbnail(3077236,'189016','','rjrwatchrt2_thumb.jpg',130, 92,32,'photo_3077236.html');
												thumbnails[3077234] = new thumbnail(3077234,'189016','BEFORE','rjrwatchrt1_thumb.jpg',130, 92,32,'photo_3077234.html');
												thumbnails[3042151] = new thumbnail(3042151,'187086',' BEFORE','PaulSmithAdrt1_thumb.jpg',130, 92,32,'photo_3042151.html');
												thumbnails[3077230] = new thumbnail(3077230,'188760','','carrerart2_thumb.jpg',130, 98,32,'photo_3077230.html');
												thumbnails[3077232] = new thumbnail(3077232,'188760','BEFORE','carrerart1_thumb.jpg',130, 98,32,'photo_3077232.html');
												thumbnails[5341955] = new thumbnail(5341955,'300731','DIANNA STEVENS JEWELLERY','ArlingtonNecklace_logo_thumb.jpg',130, 92,32,'photo_5341955.html');
												thumbnails[5342000] = new thumbnail(5342000,'300781','ARLINGTON & CO JEWELLERY','ArlingtonRing_logo16x12_thumb.jpg',130, 92,32,'photo_5342000.html');
												thumbnails[5340453] = new thumbnail(5340453,'300726','CENTRALE SHOPPING CENTRE','Centrale_website_thumb.jpg',130, 92,32,'photo_5340453.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[187086] = new gallery(187086,'3417964,3042151','RETOUCHING 1','section231545',[3417964,3042151],0, 0, '', 'section231545_187086.html',0,0);
				  					galleries[188759] = new gallery(188759,'3077251,3077246','RETOUCHING 2','section231545',[3077251,3077246],0, 0, '', 'section231545_188759.html',0,0);
				  					galleries[208848] = new gallery(208848,'3319030','PORTFOLIO 1','gallery',[3417233,3420888,3398923,3246639,3319033,3246713,3041031,3246712,3319030],0, 0, '', 'gallery_208848.html',0,0);
				  					galleries[188760] = new gallery(188760,'3077232,3077230','RETOUCHING 3','section231545',[3077230,3077232],0, 0, '', 'section231545_188760.html',0,0);
				  					galleries[218343] = new gallery(218343,'5620379,3571212','PORTFOLIO 2','gallery',[6429500,5620361,5620379,5580374,5244691,3571185,3571184,3571213,3571214,3571421,3571212,3571186,3042067,3041027],0, 0, '', 'gallery_218343.html',0,0);
				  					galleries[186990] = new gallery(186990,'6437115,3246711','PORTFOLIO 3','gallery',[7452646,6437115,6437124,4370724,4445820,3042127,3420876,3246711,3041032,3041020,3041043,3041497,3246673,3041029,3042072,3041041,3040993,3246695,3246699,3246701,3246704,3041074,3246715,3041953,3246707],0, 0, '', 'gallery_186990.html',0,0);
				  					galleries[187005] = new gallery(187005,'6431430,4370742,4370741,3246683,3246667,3246660,3246656,3045243,3045240,3042077','PORTFOLIO 4','gallery',[6431430,3041467,3041048,3041487,3041490,3040988,3045243,3041646,3041637,3042077,3041628,3042075,3041631,3041622,3246656,4370742,3246660,3045240,4370741,3246667,3246683],0, 0, '', 'gallery_187005.html',0,0);
				  					galleries[306752] = new gallery(306752,'7481658,7470758,7470741,7470732,7470721,5450579,5428717,5428711,5428699,5428543','PORTFOLIO 5','gallery',[7481658,7470741,7470758,7470721,7470732,5428543,5428699,5428711,5428717,5450579],0, 0, '', 'gallery_306752.html',0,0);
				  					galleries[189016] = new gallery(189016,'3077236,3077234','RETOUCHING 4','section231545',[3077236,3077234],0, 0, '', 'section231545_189016.html',0,0);
				  					galleries[188761] = new gallery(188761,'3077245,3077244','RETOUCHING 5','section231545',[3077245,3077244],0, 0, '', 'section231545_188761.html',0,0);
				  					galleries[187089] = new gallery(187089,'3077411,3077409','RETOUCHING 6','section231545',[3077409,3077411],0, 0, '', 'section231545_187089.html',0,0);
				  					galleries[208877] = new gallery(208877,'3417489,3417473','RETOUCHING 7','section231545',[3417473,3417489],0, 0, '', 'section231545_208877.html',0,0);
				  					galleries[208890] = new gallery(208890,'3417502,3417498','RETOUCHING 8','section231545',[3417498,3417502],0, 0, '', 'section231545_208890.html',0,0);
				  					galleries[259908] = new gallery(259908,'4445845,4445821','RETOUCHING 9','section231545',[4445845,4445821],0, 0, '', 'section231545_259908.html',0,0);
				  					galleries[259909] = new gallery(259909,'4445852,4445849','RETOUCHING 10','section231545',[4445852,4445849],0, 0, '', 'section231545_259909.html',0,0);
				  					galleries[300726] = new gallery(300726,'5340453','TEARS 1','section359629',[5340453],0, 0, '', 'section359629_300726.html',0,0);
				  					galleries[300731] = new gallery(300731,'5341955','TEARS 2','section359629',[5341955],0, 0, '', 'section359629_300731.html',0,0);
				  					galleries[300781] = new gallery(300781,'5342000','TEARS 3','section359629',[5342000],0, 0, '', 'section359629_300781.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7481658,7470741,7470732,7470721,7452646,6437124,5428699,4370724,3571421,3571212,3571185,3420888,3420876,3398923,3319033,3319030,3246715,3246712,3246711,3246707,3077230,3042127,3042077,3042075,3041953,3041631,3041487,3041074,3041031,3041029,3041027,3041020,3040993';
imageSets[2] = '6437115,5620379,3571212,3319030,3246711';
imageSets[234060] = '6431430,4370742,4370741,3246660,3246656,3045240,3042077,3041637,3041631,3041628,3041622,3041490,3041487,3041467,3041048';
imageSets[234059] = '4445852,4445849,4445845,4445821,3420876,3417964,3417502,3417498,3417489,3417473,3417233,3077411,3077409,3077251,3077246,3077245,3077244,3077240,3077239,3077236,3077234,3077232,3077230,3042151,3042127,3041467,3041032';
imageSets[178939] = '3417964,3417489,3417473,3077411,3077409,3077251,3077246,3077245,3077244,3077240,3077239,3077236,3077234,3077232,3077230,3042151';
imageSets[234412] = '7481658,7470758,7470741,7470732,7470721,5428717,5428711,5428699,5428543';
imageSets[3] = '7481658,6437124,6437115,5620361,5428699,5428543,4445820,4370724,3571421,3571214,3571213,3571212,3571186,3571185,3571184,3420888,3420876,3417964,3417233,3398923,3319033,3319030,3246715,3246713,3246712,3246711,3246707,3246704,3246699,3246695,3246660,3077251,3077236,3077230,3042127,3042075,3041953,3041646,3041631,3041628,3041622,3041497,3041074,3041032,3041031,3041029,3040993';
imageSets[234062] = '7452646,6437124,6437115,4445845,4445820,4370724,3420876,3417964,3246715,3246707,3246704,3246701,3246699,3246695,3246683,3246673,3246667,3077251,3077246,3045243,3042127,3042073,3042072,3041953,3041646,3041497,3041074,3041043,3041041,3041032,3041029,3041020,3040993,3040988';
imageSets[178923] = '7470758,7470721,7452646,6437124,6431430,6429500,5620379,5620361,5428543,4370742,4370741,4370724,3571421,3571214,3571213,3571212,3571186,3571185,3571184,3420888,3420876,3398923,3319033,3319030,3246715,3246713,3246712,3246711,3246707,3246704,3246701,3246699,3246695,3246688,3246683,3246673,3246667,3246660,3246656,3246639,3045243,3045240,3042077,3042075,3042073,3042072,3042067,3041953,3041646,3041637,3041631,3041628,3041622,3041497,3041490,3041487,3041467,3041074,3041048,3041043,3041041,3041032,3041031,3041029,3041027,3041020,3040993,3040988';
imageSets[234057] = '3420888,3417233,3398923,3319033,3319030,3246713,3246712,3246639,3041031';
imageSets[234058] = '6429500,5620379,5620361,5244691,4445852,3571421,3571214,3571213,3571212,3571186,3571185,3571184,3246688,3042067,3041027';
imageSets[234061] = '5342000,5341955,5340453';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/roya6088/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/roya6088/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/roya6088/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/roya6088/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/roya6088/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/roya6088/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 += '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:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
      op = $.extend({},defaults,options),
      html = '', temp = '',
      photoId = op.nextPhoto.id,
      photoCaption = op.nextPhoto.caption,
      photoSrc = op.nextPhoto.src;
		
		if (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    if (op.$photo.length > 0) {
      html = $('<img/>',{
        'class': 'mainphoto photo',
        src: photoSrc,
        id: 'mainPic',
        name: 'mainPic',
        width: op.nextPhoto.width,
        height: op.nextPhoto.height,
        alt: photoCaption,
        css: op.css || {}
      });
      if (op.href) {
      	if (op.href.match(/<a/)) {
      	  html = $(op.href).append(html);
      	} else {
		  html = $('<a/>', {
			href: op.href,
			title: photoCaption
		  }).append(html);
	    }
      } else {
      	html = $('<a/>', {
			title: photoCaption
		  }).append(html);
      }
      if (op.speed == 0) {        op.$photo.html(html);        if (op.onBefore) {          op.onBefore.apply(op.$photo);        }        if (op.onAfter) {          op.onAfter.apply(op.$photo);        }      } else {        op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){            if (op.onAfter) {		    op.onAfter.apply(this);          }		  clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));		  $('body').trigger('clikUpdate');		}, op.onBefore);
      }    }
    	if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'London Advertising Photographer, Roy Attfield: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {photoinfominwidth:200};	    		options.photoinfoadjacent = true;			      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object') {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp = temp + '<p>Order this print:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = temp + '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
				
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
			temp = temp + '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
		
	if(img){
	      if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
        imageID = imageID[1];
      } else {
			  imageID = randomListVal(galleries[gallery_id].featured_images);
      }
							
			if (imageID != 0) {
				img.src = thumbnails[imageID].src;
				img.width = thumbnails[imageID].width;
				img.height = thumbnails[imageID].height;
				img.alt = galleries[gallery_id].title;
        if (updateLink) {
          $(img).parent().attr({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

