window.thumbnails = new Object();
												thumbnails[6362069] = new thumbnail(6362069,'394943','','BWSQpears_thumb.jpg',130, 130,32,'																			photo_6362069.html');
												thumbnails[6362073] = new thumbnail(6362073,'393341','','Crocus_thumb.jpg',130, 87,32,'																			photo_6362073.html');
												thumbnails[6362075] = new thumbnail(6362075,'393341','','Crocus2_thumb.jpg',130, 87,32,'																			photo_6362075.html');
												thumbnails[6362076] = new thumbnail(6362076,'394943','','Galic_thumb.jpg',130, 195,32,'																			photo_6362076.html');
												thumbnails[6450710] = new thumbnail(6450710,'392025','','Manonbench_thumb.jpg',130, 195,32,'																			photo_6450710.html');
												thumbnails[6450716] = new thumbnail(6450716,'393341','','tulip_thumb.jpg',130, 195,32,'																			photo_6450716.html');
												thumbnails[6450739] = new thumbnail(6450739,'393341','','Yellowwind_thumb.jpg',130, 195,32,'																			photo_6450739.html');
												thumbnails[6461167] = new thumbnail(6461167,'393340','','From-Wansfel_thumb.jpg',130, 84,32,'																			photo_6461167.html');
												thumbnails[6461170] = new thumbnail(6461170,'392025','','henley-bridge_thumb.jpg',130, 86,32,'																			photo_6461170.html');
												thumbnails[6461171] = new thumbnail(6461171,'392025','','Sunsrise100001_thumb.jpg',130, 73,32,'																			photo_6461171.html');
												thumbnails[6545886] = new thumbnail(6545886,'359448','','LR14_thumb.jpg',130, 195,32,'																			photo_6545886.html');
												thumbnails[6635103] = new thumbnail(6635103,'394943','','Nuts_thumb.jpg',130, 195,32,'																			photo_6635103.html');
												thumbnails[6362063] = new thumbnail(6362063,'393341','','blurredshoot_thumb.jpg',130, 195,32,'																			photo_6362063.html');
												thumbnails[7432784] = new thumbnail(7432784,'402942','','jJW5_thumb.jpg',130, 191,32,'																			photo_7432784.html');
												thumbnails[6461169] = new thumbnail(6461169,'393340','','Robin-Lane_thumb.jpg',130, 195,32,'																			photo_6461169.html');
												thumbnails[6545382] = new thumbnail(6545382,'359430','','SQ7_thumb.jpg',130, 195,32,'																			photo_6545382.html');
												thumbnails[6545873] = new thumbnail(6545873,'359448','','LR2_thumb.jpg',130, 195,32,'																			photo_6545873.html');
												thumbnails[6558795] = new thumbnail(6558795,'359986','','_J9C7548raw_thumb.jpg',130, 195,32,'																			photo_6558795.html');
												thumbnails[6568018] = new thumbnail(6568018,'360462','','_J9C6061PBlack_thumb.jpg',130, 195,32,'																			photo_6568018.html');
												thumbnails[6586664] = new thumbnail(6586664,'361216','','_J9C6793Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586664.html');
												thumbnails[6586844] = new thumbnail(6586844,'361225','','_J9C7770Excalibur_thumb.jpg',130, 87,32,'																			photo_6586844.html');
												thumbnails[6587030] = new thumbnail(6587030,'361234','','_J9C5359Dark-Horses_thumb.jpg',130, 195,32,'																			photo_6587030.html');
												thumbnails[6634736] = new thumbnail(6634736,'363306','','_J9C5794_thumb.jpg',130, 195,32,'																			photo_6634736.html');
												thumbnails[6635327] = new thumbnail(6635327,'363325','','_J9C64363DM_thumb.jpg',130, 195,32,'																			photo_6635327.html');
												thumbnails[7247729] = new thumbnail(7247729,'391918','','cloudy_thumb.jpg',130, 231,32,'																			photo_7247729.html');
												thumbnails[7247799] = new thumbnail(7247799,'391927','','chapel_thumb.jpg',130, 73,32,'																			photo_7247799.html');
												thumbnails[7247837] = new thumbnail(7247837,'391942','','_MG_0070ALNALN_thumb.jpg',130, 196,32,'																			photo_7247837.html');
												thumbnails[7249103] = new thumbnail(7249103,'391918','','Beachstream_thumb.jpg',130, 195,32,'																			photo_7249103.html');
												thumbnails[7278808] = new thumbnail(7278808,'393694','','albie_thumb.jpg',130, 58,32,'																			photo_7278808.html');
												thumbnails[7278902] = new thumbnail(7278902,'393340','','House_thumb.jpg',130, 87,32,'																			photo_7278902.html');
												thumbnails[7297572] = new thumbnail(7297572,'393340','','Brotherkeld_8EC646C3-24E8-5EC4-4F62FF40F901CE5C_thumb.jpg',130, 105,32,'																			photo_7297572.html');
												thumbnails[7297582] = new thumbnail(7297582,'392025','','Blackberry_thumb.jpg',130, 87,32,'																			photo_7297582.html');
												thumbnails[7297596] = new thumbnail(7297596,'394943','','GarlicUSM_thumb.jpg',130, 130,32,'																			photo_7297596.html');
												thumbnails[7297600] = new thumbnail(7297600,'391918','','Hutssoftlight_thumb.jpg',130, 73,32,'																			photo_7297600.html');
												thumbnails[7300392] = new thumbnail(7300392,'391918','','Burton-Bradstockclean_thumb.jpg',130, 195,32,'																			photo_7300392.html');
												thumbnails[7300425] = new thumbnail(7300425,'393340','','Fog1mono_thumb.jpg',130, 85,32,'																			photo_7300425.html');
												thumbnails[7300564] = new thumbnail(7300564,'394943','','Beads_thumb.jpg',130, 176,32,'																			photo_7300564.html');
												thumbnails[7300717] = new thumbnail(7300717,'392025','','Cloudymoon1_thumb.jpg',130, 195,32,'																			photo_7300717.html');
												thumbnails[7300749] = new thumbnail(7300749,'392025','Treesportrait','Treesportrait_thumb.jpg',130, 195,32,'																			photo_7300749.html');
												thumbnails[7432781] = new thumbnail(7432781,'402942','','Ben_thumb.jpg',130, 195,32,'																			photo_7432781.html');
												thumbnails[6460709] = new thumbnail(6460709,'393694','','window_thumb.jpg',130, 207,32,'																			photo_6460709.html');
												thumbnails[6545384] = new thumbnail(6545384,'359430','','SQ8_thumb.jpg',130, 195,32,'																			photo_6545384.html');
												thumbnails[6545878] = new thumbnail(6545878,'359448','','LR6_thumb.jpg',130, 195,32,'																			photo_6545878.html');
												thumbnails[6558796] = new thumbnail(6558796,'359986','','_J9C7556raw_thumb.jpg',130, 195,32,'																			photo_6558796.html');
												thumbnails[6568019] = new thumbnail(6568019,'360462','','_J9C6063PBlack_thumb.jpg',130, 195,32,'																			photo_6568019.html');
												thumbnails[6586665] = new thumbnail(6586665,'361216','','_J9C6804Bellowheadraw_thumb.jpg',130, 87,32,'																			photo_6586665.html');
												thumbnails[6586845] = new thumbnail(6586845,'361225','','_J9C7781Excalibur_thumb.jpg',130, 195,32,'																			photo_6586845.html');
												thumbnails[6587029] = new thumbnail(6587029,'361234','','_J9C5356Dark-Horses_thumb.jpg',130, 87,32,'																			photo_6587029.html');
												thumbnails[6634737] = new thumbnail(6634737,'363306','','_J9C5796_thumb.jpg',130, 195,32,'																			photo_6634737.html');
												thumbnails[6635328] = new thumbnail(6635328,'363325','','_J9C64443DM_thumb.jpg',130, 195,32,'																			photo_6635328.html');
												thumbnails[7247730] = new thumbnail(7247730,'391918','','lighthouseBW_thumb.jpg',130, 87,32,'																			photo_7247730.html');
												thumbnails[7247801] = new thumbnail(7247801,'391927','','ColduC_thumb.jpg',130, 173,32,'																			photo_7247801.html');
												thumbnails[7247838] = new thumbnail(7247838,'391942','','_MG_0071ALNALN_thumb.jpg',130, 198,32,'																			photo_7247838.html');
												thumbnails[7249104] = new thumbnail(7249104,'391918','','Stormysky_thumb.jpg',130, 87,32,'																			photo_7249104.html');
												thumbnails[7278903] = new thumbnail(7278903,'393340','','Softplatform_thumb.jpg',130, 105,32,'																			photo_7278903.html');
												thumbnails[7297583] = new thumbnail(7297583,'392025','','FrameAN_thumb.jpg',130, 195,32,'																			photo_7297583.html');
												thumbnails[7297593] = new thumbnail(7297593,'391927','','Original_thumb.jpg',130, 173,32,'																			photo_7297593.html');
												thumbnails[7300426] = new thumbnail(7300426,'393340','','Lakes0024a_thumb.jpg',130, 87,32,'																			photo_7300426.html');
												thumbnails[7300565] = new thumbnail(7300565,'394943','','Orchid-film_thumb.jpg',130, 87,32,'																			photo_7300565.html');
												thumbnails[7300718] = new thumbnail(7300718,'392025','','Wheat1sq_thumb.jpg',130, 130,32,'																			photo_7300718.html');
												thumbnails[7432782] = new thumbnail(7432782,'402942','','ben2_thumb.jpg',130, 195,32,'																			photo_7432782.html');
												thumbnails[6450744] = new thumbnail(6450744,'392025','','Windsorcan_thumb.jpg',130, 195,32,'																			photo_6450744.html');
												thumbnails[6545380] = new thumbnail(6545380,'359430','','SQ5_thumb.jpg',130, 195,32,'																			photo_6545380.html');
												thumbnails[6545882] = new thumbnail(6545882,'359448','','LR10_thumb.jpg',130, 195,32,'																			photo_6545882.html');
												thumbnails[6558797] = new thumbnail(6558797,'359986','','_J9C7559raw_thumb.jpg',130, 195,32,'																			photo_6558797.html');
												thumbnails[6568020] = new thumbnail(6568020,'360462','','_J9C6065PBlack_thumb.jpg',130, 195,32,'																			photo_6568020.html');
												thumbnails[6586667] = new thumbnail(6586667,'361216','','_J9C6812Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586667.html');
												thumbnails[6586846] = new thumbnail(6586846,'361225','','_J9C7795Excalibur_thumb.jpg',130, 87,32,'																			photo_6586846.html');
												thumbnails[6587031] = new thumbnail(6587031,'361234','','_J9C5361Dark-Horses_thumb.jpg',130, 195,32,'																			photo_6587031.html');
												thumbnails[6634738] = new thumbnail(6634738,'363306','','_J9C5804_thumb.jpg',130, 195,32,'																			photo_6634738.html');
												thumbnails[6635329] = new thumbnail(6635329,'363325','','_J9C64463DM_thumb.jpg',130, 195,32,'																			photo_6635329.html');
												thumbnails[7247731] = new thumbnail(7247731,'391918','','Lundy1_thumb.jpg',130, 195,32,'																			photo_7247731.html');
												thumbnails[7247803] = new thumbnail(7247803,'391927','','Sunset_thumb.jpg',130, 43,32,'																			photo_7247803.html');
												thumbnails[7247839] = new thumbnail(7247839,'391942','','_MG_0120ALNALN_thumb.jpg',130, 195,32,'																			photo_7247839.html');
												thumbnails[7249105] = new thumbnail(7249105,'391918','','Surfer_thumb.jpg',130, 195,32,'																			photo_7249105.html');
												thumbnails[7278821] = new thumbnail(7278821,'393694','','spalmondsir_thumb..jpg',130, 87,32,'																			photo_7278821.html');
												thumbnails[7278904] = new thumbnail(7278904,'393340','','Wastwater_thumb.jpg',130, 105,32,'																			photo_7278904.html');
												thumbnails[7300393] = new thumbnail(7300393,'393341','','Lakes0167a_thumb.jpg',130, 317,32,'																			photo_7300393.html');
												thumbnails[7300427] = new thumbnail(7300427,'393340','','Lakes0162_thumb.jpg',130, 87,32,'																			photo_7300427.html');
												thumbnails[7432785] = new thumbnail(7432785,'402942','','JW_thumb.jpg',130, 184,32,'																			photo_7432785.html');
												thumbnails[6545378] = new thumbnail(6545378,'359430','','SQ4_thumb.jpg',130, 195,32,'																			photo_6545378.html');
												thumbnails[6545883] = new thumbnail(6545883,'359448','','LR11_thumb.jpg',130, 195,32,'																			photo_6545883.html');
												thumbnails[6558798] = new thumbnail(6558798,'359986','','_J9C7563raw_thumb.jpg',130, 195,32,'																			photo_6558798.html');
												thumbnails[6568021] = new thumbnail(6568021,'360462','','_J9C6071PBlack_thumb.jpg',130, 195,32,'																			photo_6568021.html');
												thumbnails[6586669] = new thumbnail(6586669,'361216','','_J9C6819Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586669.html');
												thumbnails[6586847] = new thumbnail(6586847,'361225','','_J9C7813Excalibur_thumb.jpg',130, 195,32,'																			photo_6586847.html');
												thumbnails[6587032] = new thumbnail(6587032,'361234','','_J9C5362Dark-Horses_thumb.jpg',130, 195,32,'																			photo_6587032.html');
												thumbnails[6634739] = new thumbnail(6634739,'363306','','_J9C5805_thumb.jpg',130, 195,32,'																			photo_6634739.html');
												thumbnails[6635330] = new thumbnail(6635330,'363325','','_J9C64493DM_thumb.jpg',130, 195,32,'																			photo_6635330.html');
												thumbnails[7247732] = new thumbnail(7247732,'391918','','Lundy2_thumb.jpg',130, 195,32,'																			photo_7247732.html');
												thumbnails[7247806] = new thumbnail(7247806,'391927','','Weathercock10000K_thumb.jpg',130, 173,32,'																			photo_7247806.html');
												thumbnails[7247840] = new thumbnail(7247840,'391942','','_MG_0127ALNALN_thumb.jpg',130, 195,32,'																			photo_7247840.html');
												thumbnails[7249106] = new thumbnail(7249106,'391918','','_MG_1757_thumb.jpg',130, 195,32,'																			photo_7249106.html');
												thumbnails[7278822] = new thumbnail(7278822,'393694','','spbluedoor_thumb.jpg',130, 195,32,'																			photo_7278822.html');
												thumbnails[7300394] = new thumbnail(7300394,'391927','','Lakeside_thumb.jpg',130, 173,32,'																			photo_7300394.html');
												thumbnails[7300428] = new thumbnail(7300428,'393340','','Rydal-Park_thumb.jpg',130, 38,32,'																			photo_7300428.html');
												thumbnails[7432800] = new thumbnail(7432800,'402942','','Richard_thumb.jpg',130, 195,32,'																			photo_7432800.html');
												thumbnails[6450705] = new thumbnail(6450705,'392025','','LongExpbridge_thumb.jpg',130, 65,32,'																			photo_6450705.html');
												thumbnails[6450719] = new thumbnail(6450719,'393341','','woodsblur1_thumb.jpg',130, 87,32,'																			photo_6450719.html');
												thumbnails[6450723] = new thumbnail(6450723,'393341','','woodsblur2_thumb.jpg',130, 87,32,'																			photo_6450723.html');
												thumbnails[6545376] = new thumbnail(6545376,'359430','','SQ2_thumb.jpg',130, 195,32,'																			photo_6545376.html');
												thumbnails[6545885] = new thumbnail(6545885,'359448','','LR13_thumb.jpg',130, 195,32,'																			photo_6545885.html');
												thumbnails[6558799] = new thumbnail(6558799,'359986','','_J9C7572raw_thumb.jpg',130, 195,32,'																			photo_6558799.html');
												thumbnails[6568022] = new thumbnail(6568022,'360462','','_J9C6072PBlack_thumb.jpg',130, 195,32,'																			photo_6568022.html');
												thumbnails[6586671] = new thumbnail(6586671,'361216','','_J9C6823Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586671.html');
												thumbnails[6586848] = new thumbnail(6586848,'361225','','_J9C7897Excalibur_thumb.jpg',130, 87,32,'																			photo_6586848.html');
												thumbnails[6587033] = new thumbnail(6587033,'361234','','_J9C5370Dark-Horses_thumb.jpg',130, 195,32,'																			photo_6587033.html');
												thumbnails[6634740] = new thumbnail(6634740,'363306','','_J9C5816_thumb.jpg',130, 195,32,'																			photo_6634740.html');
												thumbnails[6635331] = new thumbnail(6635331,'363325','','_J9C64603DM_thumb.jpg',130, 195,32,'																			photo_6635331.html');
												thumbnails[7247733] = new thumbnail(7247733,'391918','','Sauntonbeach_thumb.jpg',130, 55,32,'																			photo_7247733.html');
												thumbnails[7247841] = new thumbnail(7247841,'391942','','_MG_0291ALNALN_thumb.jpg',130, 210,32,'																			photo_7247841.html');
												thumbnails[7249107] = new thumbnail(7249107,'391918','','_MG_1760_thumb.jpg',130, 87,32,'																			photo_7249107.html');
												thumbnails[7278823] = new thumbnail(7278823,'393694','','spChimneysrgb_thumb.jpg',130, 195,32,'																			photo_7278823.html');
												thumbnails[7300429] = new thumbnail(7300429,'393340','','Wansfel-Pike_thumb.jpg',130, 31,32,'																			photo_7300429.html');
												thumbnails[7432793] = new thumbnail(7432793,'402942','','Keith_thumb.jpg',130, 173,32,'																			photo_7432793.html');
												thumbnails[6545344] = new thumbnail(6545344,'359430','','SQ1_thumb.jpg',130, 195,32,'																			photo_6545344.html');
												thumbnails[6451536] = new thumbnail(6451536,'392025','','walker_thumb.jpg',130, 87,32,'																			photo_6451536.html');
												thumbnails[6545881] = new thumbnail(6545881,'359448','','LR9_thumb.jpg',130, 195,32,'																			photo_6545881.html');
												thumbnails[6558800] = new thumbnail(6558800,'359986','','_J9C7576raw_thumb.jpg',130, 195,32,'																			photo_6558800.html');
												thumbnails[6568023] = new thumbnail(6568023,'360462','','_J9C6078PBlack_thumb.jpg',130, 195,32,'																			photo_6568023.html');
												thumbnails[6586673] = new thumbnail(6586673,'361216','','_J9C6830Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586673.html');
												thumbnails[6587034] = new thumbnail(6587034,'361234','','_J9C5375Dark-Horses_thumb.jpg',130, 195,32,'																			photo_6587034.html');
												thumbnails[6634741] = new thumbnail(6634741,'363306','','_J9C5819_thumb.jpg',130, 195,32,'																			photo_6634741.html');
												thumbnails[6635332] = new thumbnail(6635332,'363325','','_J9C64813DM_thumb.jpg',130, 195,32,'																			photo_6635332.html');
												thumbnails[7247734] = new thumbnail(7247734,'391918','','Sky_thumb.jpg',130, 86,32,'																			photo_7247734.html');
												thumbnails[7247842] = new thumbnail(7247842,'391942','','_MG_0347ALNALN_thumb.jpg',130, 195,32,'																			photo_7247842.html');
												thumbnails[7278824] = new thumbnail(7278824,'393694','','spRugsrgb_thumb.jpg',130, 87,32,'																			photo_7278824.html');
												thumbnails[7432786] = new thumbnail(7432786,'402942','','JW2_thumb.jpg',130, 173,32,'																			photo_7432786.html');
												thumbnails[6545388] = new thumbnail(6545388,'359430','','SQ11_thumb.jpg',130, 195,32,'																			photo_6545388.html');
												thumbnails[6545879] = new thumbnail(6545879,'359448','','LR7_thumb.jpg',130, 195,32,'																			photo_6545879.html');
												thumbnails[6558801] = new thumbnail(6558801,'359986','','_J9C7579raw_thumb.jpg',130, 195,32,'																			photo_6558801.html');
												thumbnails[6568024] = new thumbnail(6568024,'360462','','_J9C6106PBlack_thumb.jpg',130, 87,32,'																			photo_6568024.html');
												thumbnails[6586675] = new thumbnail(6586675,'361216','','_J9C6841Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586675.html');
												thumbnails[6587035] = new thumbnail(6587035,'361234','','_J9C5380Dark-Horses_thumb.jpg',130, 195,32,'																			photo_6587035.html');
												thumbnails[6634742] = new thumbnail(6634742,'363306','','_J9C5836_thumb.jpg',130, 195,32,'																			photo_6634742.html');
												thumbnails[6635333] = new thumbnail(6635333,'363325','','_J9C64963DM_thumb.jpg',130, 87,32,'																			photo_6635333.html');
												thumbnails[7247735] = new thumbnail(7247735,'391918','','Surfing_thumb.jpg',130, 55,32,'																			photo_7247735.html');
												thumbnails[7247843] = new thumbnail(7247843,'391942','','_MG_0361ALNALN_thumb.jpg',130, 195,32,'																			photo_7247843.html');
												thumbnails[7432797] = new thumbnail(7432797,'402942','','Laurent_thumb.jpg',130, 195,32,'																			photo_7432797.html');
												thumbnails[6545386] = new thumbnail(6545386,'359430','','SQ10_thumb.jpg',130, 195,32,'																			photo_6545386.html');
												thumbnails[6545876] = new thumbnail(6545876,'359448','','LR4_thumb.jpg',130, 195,32,'																			photo_6545876.html');
												thumbnails[6558802] = new thumbnail(6558802,'359986','','_J9C7585raw_thumb.jpg',130, 195,32,'																			photo_6558802.html');
												thumbnails[6568025] = new thumbnail(6568025,'360462','','_J9C6125PBlack_thumb.jpg',130, 195,32,'																			photo_6568025.html');
												thumbnails[6586676] = new thumbnail(6586676,'361216','','_J9C6857Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586676.html');
												thumbnails[6587036] = new thumbnail(6587036,'361234','','_J9C5388Dark-Horses_thumb.jpg',130, 87,32,'																			photo_6587036.html');
												thumbnails[6634743] = new thumbnail(6634743,'363306','','_J9C5844_thumb.jpg',130, 195,32,'																			photo_6634743.html');
												thumbnails[6635334] = new thumbnail(6635334,'363325','','_J9C65023DM_thumb.jpg',130, 87,32,'																			photo_6635334.html');
												thumbnails[7247845] = new thumbnail(7247845,'391942','','_MG_0364ALNALN_thumb.jpg',130, 195,32,'																			photo_7247845.html');
												thumbnails[7432783] = new thumbnail(7432783,'402942','','Ben3_thumb.jpg',130, 196,32,'																			photo_7432783.html');
												thumbnails[6545381] = new thumbnail(6545381,'359430','','SQ6_thumb.jpg',130, 195,32,'																			photo_6545381.html');
												thumbnails[6545872] = new thumbnail(6545872,'359448','','LR1_thumb.jpg',130, 195,32,'																			photo_6545872.html');
												thumbnails[6558803] = new thumbnail(6558803,'359986','','_J9C7591raw_thumb.jpg',130, 86,32,'																			photo_6558803.html');
												thumbnails[6568026] = new thumbnail(6568026,'360462','','_J9C6158PBlack_thumb.jpg',130, 195,32,'																			photo_6568026.html');
												thumbnails[6586677] = new thumbnail(6586677,'361216','','_J9C6858Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586677.html');
												thumbnails[6587037] = new thumbnail(6587037,'361234','','_J9C5396Dark-Horses_thumb.jpg',130, 195,32,'																			photo_6587037.html');
												thumbnails[6634744] = new thumbnail(6634744,'363306','','_J9C5850_thumb.jpg',130, 195,32,'																			photo_6634744.html');
												thumbnails[6635335] = new thumbnail(6635335,'363325','','_J9C65073DM_thumb.jpg',130, 195,32,'																			photo_6635335.html');
												thumbnails[7247846] = new thumbnail(7247846,'391942','','_MG_0369ALNALN_thumb.jpg',130, 197,32,'																			photo_7247846.html');
												thumbnails[7432789] = new thumbnail(7432789,'402942','','JW4_thumb.jpg',130, 193,32,'																			photo_7432789.html');
												thumbnails[7432794] = new thumbnail(7432794,'402942','','Keith2_thumb.jpg',130, 196,32,'																			photo_7432794.html');
												thumbnails[6545385] = new thumbnail(6545385,'359430','','SQ9_thumb.jpg',130, 195,32,'																			photo_6545385.html');
												thumbnails[6545874] = new thumbnail(6545874,'359448','','LR3_thumb.jpg',130, 195,32,'																			photo_6545874.html');
												thumbnails[6558804] = new thumbnail(6558804,'359986','','_J9C7606raw_thumb.jpg',130, 195,32,'																			photo_6558804.html');
												thumbnails[6568027] = new thumbnail(6568027,'360462','','_J9C6192PBlack2_thumb.jpg',130, 195,32,'																			photo_6568027.html');
												thumbnails[6586678] = new thumbnail(6586678,'361216','','_J9C6859Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586678.html');
												thumbnails[6587038] = new thumbnail(6587038,'361234','','_J9C5400Dark-Horses_thumb.jpg',130, 195,32,'																			photo_6587038.html');
												thumbnails[6634745] = new thumbnail(6634745,'363306','','_J9C5857_thumb.jpg',130, 195,32,'																			photo_6634745.html');
												thumbnails[6635336] = new thumbnail(6635336,'363325','','_J9C65193DM_thumb.jpg',130, 195,32,'																			photo_6635336.html');
												thumbnails[6545377] = new thumbnail(6545377,'359430','','SQ3_thumb.jpg',130, 195,32,'																			photo_6545377.html');
												thumbnails[6545880] = new thumbnail(6545880,'359448','','LR8_thumb.jpg',130, 87,32,'																			photo_6545880.html');
												thumbnails[6558805] = new thumbnail(6558805,'359986','','_J9C7617raw_thumb.jpg',130, 195,32,'																			photo_6558805.html');
												thumbnails[6568028] = new thumbnail(6568028,'360462','','_J9C6194PBlack_thumb.jpg',130, 195,32,'																			photo_6568028.html');
												thumbnails[6586679] = new thumbnail(6586679,'361216','','_J9C6870Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586679.html');
												thumbnails[6587039] = new thumbnail(6587039,'361234','','_J9C5413Dark-Horses_thumb.jpg',130, 195,32,'																			photo_6587039.html');
												thumbnails[6634746] = new thumbnail(6634746,'363306','','_J9C5872_thumb.jpg',130, 195,32,'																			photo_6634746.html');
												thumbnails[6635337] = new thumbnail(6635337,'363325','','_J9C65303DM_thumb.jpg',130, 195,32,'																			photo_6635337.html');
												thumbnails[7432787] = new thumbnail(7432787,'402942','','JW21_thumb.jpg',130, 173,32,'																			photo_7432787.html');
												thumbnails[7432791] = new thumbnail(7432791,'402942','','JW6_thumb.jpg',130, 202,32,'																			photo_7432791.html');
												thumbnails[6545884] = new thumbnail(6545884,'359448','','LR12_thumb.jpg',130, 86,32,'																			photo_6545884.html');
												thumbnails[6558806] = new thumbnail(6558806,'359986','','_J9C7631raw_thumb.jpg',130, 195,32,'																			photo_6558806.html');
												thumbnails[6586680] = new thumbnail(6586680,'361216','','_J9C6891Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586680.html');
												thumbnails[6587040] = new thumbnail(6587040,'361234','','_J9C5439Dark-Horses_thumb.jpg',130, 86,32,'																			photo_6587040.html');
												thumbnails[6634747] = new thumbnail(6634747,'363306','','_J9C5879_thumb.jpg',130, 195,32,'																			photo_6634747.html');
												thumbnails[6635338] = new thumbnail(6635338,'363325','','_J9C65483DM_thumb.jpg',130, 195,32,'																			photo_6635338.html');
												thumbnails[7432792] = new thumbnail(7432792,'402942','','jwandkeith_thumb.jpg',130, 195,32,'																			photo_7432792.html');
												thumbnails[6558807] = new thumbnail(6558807,'359986','','_J9C7641raw_thumb.jpg',130, 195,32,'																			photo_6558807.html');
												thumbnails[6586681] = new thumbnail(6586681,'361216','','_J9C6893Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586681.html');
												thumbnails[6634748] = new thumbnail(6634748,'363306','','_J9C5932_thumb.jpg',130, 195,32,'																			photo_6634748.html');
												thumbnails[6558808] = new thumbnail(6558808,'359986','','_J9C7655raw_thumb.jpg',130, 86,32,'																			photo_6558808.html');
												thumbnails[6586682] = new thumbnail(6586682,'361216','','_J9C6907Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586682.html');
												thumbnails[6558809] = new thumbnail(6558809,'359986','','_J9C7657raw_thumb.jpg',130, 87,32,'																			photo_6558809.html');
												thumbnails[6586683] = new thumbnail(6586683,'361216','','_J9C6919Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586683.html');
												thumbnails[7432795] = new thumbnail(7432795,'402942','','Keith21_thumb.jpg',130, 196,32,'																			photo_7432795.html');
												thumbnails[6558810] = new thumbnail(6558810,'359986','','_J9C7681raw_thumb.jpg',130, 87,32,'																			photo_6558810.html');
												thumbnails[6586684] = new thumbnail(6586684,'361216','','_J9C6934Bellowheadraw_thumb.jpg',130, 195,32,'																			photo_6586684.html');
												thumbnails[7432801] = new thumbnail(7432801,'402942','','Richard2_thumb.jpg',130, 196,32,'																			photo_7432801.html');
												thumbnails[6558811] = new thumbnail(6558811,'359986','','_J9C7685raw_thumb.jpg',130, 87,32,'																			photo_6558811.html');
												thumbnails[6586685] = new thumbnail(6586685,'361216','','_J9C6953Bellowheadraw_thumb.jpg',130, 73,32,'																			photo_6586685.html');
												thumbnails[6558812] = new thumbnail(6558812,'359986','','_J9C7688raw_thumb.jpg',130, 87,32,'																			photo_6558812.html');
												thumbnails[7432798] = new thumbnail(7432798,'402942','','Laurent2_thumb.jpg',130, 196,32,'																			photo_7432798.html');
												thumbnails[6558813] = new thumbnail(6558813,'359986','','_J9C7735raw_thumb.jpg',130, 87,32,'																			photo_6558813.html');
												thumbnails[7432799] = new thumbnail(7432799,'402942','','Reheat_thumb.jpg',130, 87,32,'																			photo_7432799.html');
												thumbnails[6558814] = new thumbnail(6558814,'359986','','_J9C7741raw_thumb.jpg',130, 195,32,'																			photo_6558814.html');
												thumbnails[6558815] = new thumbnail(6558815,'359986','','_J9C7756raw_thumb.jpg',130, 195,32,'																			photo_6558815.html');
												thumbnails[7432796] = new thumbnail(7432796,'402942','','Keith3_thumb.jpg',130, 196,32,'																			photo_7432796.html');
												thumbnails[6558816] = new thumbnail(6558816,'359986','','_J9C7764raw_thumb.jpg',130, 195,32,'																			photo_6558816.html');
												thumbnails[7432802] = new thumbnail(7432802,'402942','','Richard3_thumb.jpg',130, 179,32,'																			photo_7432802.html');
												thumbnails[6558817] = new thumbnail(6558817,'359986','','_J9C7771raw_thumb.jpg',130, 195,32,'																			photo_6558817.html');
												thumbnails[6558818] = new thumbnail(6558818,'359986','','_J9C7775raw_thumb.jpg',130, 195,32,'																			photo_6558818.html');
												thumbnails[6558820] = new thumbnail(6558820,'359986','','_J9C7838raw_thumb.jpg',130, 195,32,'																			photo_6558820.html');
												thumbnails[7432790] = new thumbnail(7432790,'402942','','JW5_thumb.jpg',130, 203,32,'																			photo_7432790.html');
												thumbnails[6558821] = new thumbnail(6558821,'359986','','_J9C7842raw_thumb.jpg',130, 195,32,'																			photo_6558821.html');
												thumbnails[6558822] = new thumbnail(6558822,'359986','','_J9C7867raw_thumb.jpg',130, 195,32,'																			photo_6558822.html');
												thumbnails[6558823] = new thumbnail(6558823,'359986','','_J9C7888raw_thumb.jpg',130, 195,32,'																			photo_6558823.html');
												thumbnails[6558824] = new thumbnail(6558824,'359986','','_J9C7889raw_thumb.jpg',130, 87,32,'																			photo_6558824.html');
												thumbnails[6558825] = new thumbnail(6558825,'359986','','_J9C7904raw_thumb.jpg',130, 195,32,'																			photo_6558825.html');
												thumbnails[7432788] = new thumbnail(7432788,'402942','','JW3_thumb.jpg',130, 191,32,'																			photo_7432788.html');
												thumbnails[6558826] = new thumbnail(6558826,'359986','','_J9C7907raw_thumb.jpg',130, 195,32,'																			photo_6558826.html');
												thumbnails[6558827] = new thumbnail(6558827,'359986','','_J9C7945raw_thumb.jpg',130, 195,32,'																			photo_6558827.html');
												thumbnails[6558828] = new thumbnail(6558828,'359986','','_J9C7951raw_thumb.jpg',130, 195,32,'																			photo_6558828.html');
												thumbnails[6558829] = new thumbnail(6558829,'359986','','_J9C7961raw_thumb.jpg',130, 195,32,'																			photo_6558829.html');
												thumbnails[6558830] = new thumbnail(6558830,'359986','','_J9C7981raw_thumb.jpg',130, 87,32,'																			photo_6558830.html');
												thumbnails[6558831] = new thumbnail(6558831,'359986','','_J9C8003raw_thumb.jpg',130, 195,32,'																			photo_6558831.html');
												thumbnails[6558832] = new thumbnail(6558832,'359986','','_J9C8037raw_thumb.jpg',130, 86,32,'																			photo_6558832.html');
												thumbnails[6558833] = new thumbnail(6558833,'359986','','_J9C8038raw_thumb.jpg',130, 87,32,'																			photo_6558833.html');
												thumbnails[6558834] = new thumbnail(6558834,'359986','','_J9C8101raw_thumb.jpg',130, 87,32,'																			photo_6558834.html');
												thumbnails[6558835] = new thumbnail(6558835,'359986','','_J9C8138raw_thumb.jpg',130, 195,32,'																			photo_6558835.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[361216] = new gallery(361216,'6586667','Bellowhead','gallery',[6586664,6586665,6586667,6586669,6586671,6586673,6586675,6586676,6586677,6586678,6586679,6586680,6586681,6586682,6586683,6586684,6586685],0, 0, '359429', '																																																																																																							gallery_361216.html',0,0);
				  					galleries[361234] = new gallery(361234,'6587035','Dark Horses','gallery',[6587030,6587029,6587031,6587032,6587033,6587034,6587035,6587036,6587037,6587038,6587039,6587040],0, 0, '359429', '																																																																																																							gallery_361234.html',0,0);
				  					galleries[361225] = new gallery(361225,'6586845','Excalibur','gallery',[6586844,6586845,6586846,6586847,6586848],0, 0, '359429', '																																																																																																							gallery_361225.html',0,0);
				  					galleries[359986] = new gallery(359986,'6558835,6558802','Fairport Convention','gallery',[6558795,6558796,6558797,6558798,6558799,6558800,6558801,6558802,6558803,6558804,6558805,6558806,6558807,6558808,6558809,6558810,6558811,6558812,6558813,6558814,6558815,6558816,6558817,6558818,6558820,6558821,6558822,6558823,6558824,6558825,6558826,6558827,6558828,6558829,6558830,6558831,6558832,6558833,6558834,6558835],0, 0, '359429', '																																																																																																							gallery_359986.html',0,0);
				  					galleries[391942] = new gallery(391942,'7247843','Italy','gallery',[7247837,7247838,7247839,7247840,7247841,7247842,7247843,7247845,7247846],0, 0, '391919', '																																																																																																							gallery_391942.html',0,0);
				  					galleries[359448] = new gallery(359448,'6545874,6545873','Leatherat','gallery',[6545886,6545873,6545878,6545882,6545883,6545885,6545881,6545879,6545876,6545872,6545874,6545880,6545884],0, 0, '359429', '																																																																																																							gallery_359448.html',0,0);
				  					galleries[359429] = new gallery(359429,'6635338,6634744,6634740,6587035,6586845,6586667,6568025,6558835,6558802,6545874,6545873,6545376','Music','gallery',[],0, 0, '', '																																																																																																							gallery_359429.html',0,0);
				  					galleries[393341] = new gallery(393341,'6450723,6450719,6362073','Natural world','gallery',[6362073,6362075,6450716,6450739,6362063,7300393,6450719,6450723],0, 0, '', '																																																																																																							gallery_393341.html',0,0);
				  					galleries[393340] = new gallery(393340,'7278902,6461169','North West England','gallery',[6461167,6461169,7278902,7297572,7300425,7278903,7300426,7278904,7300427,7300428,7300429],0, 0, '391919', '																																																																																																							gallery_393340.html',0,0);
				  					galleries[360462] = new gallery(360462,'6568025','Pauline Black','gallery',[6568018,6568019,6568020,6568021,6568022,6568023,6568024,6568025,6568026,6568027,6568028],0, 0, '359429', '																																																																																																							gallery_360462.html',0,0);
				  					galleries[391919] = new gallery(391919,'7278902,7278823,7249103,7247843,7247801,6461170,6461169,6450710','Places','gallery',[],0, 0, '', '																																																																																																							gallery_391919.html',0,0);
				  					galleries[402942] = new gallery(402942,'7432802,7432801,7432800,7432799,7432798,7432797,7432796,7432795,7432794,7432793','Reheat','gallery',[7432784,7432781,7432782,7432785,7432800,7432793,7432786,7432797,7432783,7432789,7432794,7432787,7432791,7432792,7432795,7432801,7432798,7432799,7432796,7432802,7432790,7432788],0, 0, '359429', '																																																																																																							gallery_402942.html',0,0);
				  					galleries[392025] = new gallery(392025,'6461170,6450710','South East England','gallery',[6450710,6461170,6461171,7297582,7300717,7300749,7297583,7300718,6450744,6450705,6451536],0, 0, '391919', '																																																																																																							gallery_392025.html',0,0);
				  					galleries[391918] = new gallery(391918,'7249103','South West England','gallery',[7247729,7249103,7297600,7300392,7247730,7249104,7247731,7249105,7247732,7249106,7247733,7249107,7247734,7247735],0, 0, '391919', '																																																																																																							gallery_391918.html',0,0);
				  					galleries[393694] = new gallery(393694,'7278823','Spain','gallery',[7278808,6460709,7278821,7278822,7278823,7278824],0, 0, '391919', '																																																																																																							gallery_393694.html',0,0);
				  					galleries[359430] = new gallery(359430,'6545376','Status Quo','gallery',[6545382,6545384,6545380,6545378,6545376,6545344,6545388,6545386,6545381,6545385,6545377],0, 0, '359429', '																																																																																																							gallery_359430.html',0,0);
				  					galleries[394943] = new gallery(394943,'6362069','Studio','gallery',[6362069,6362076,6635103,7297596,7300564,7300565],0, 0, '', '																																																																																																							gallery_394943.html',0,0);
				  					galleries[391927] = new gallery(391927,'7247801','The Alps','gallery',[7247799,7247801,7297593,7247803,7247806,7300394],0, 0, '391919', '																																																																																																							gallery_391927.html',0,0);
				  					galleries[363306] = new gallery(363306,'6634744,6634740','Thea Gilmore','gallery',[6634736,6634737,6634738,6634739,6634740,6634741,6634742,6634743,6634744,6634745,6634746,6634747,6634748],0, 0, '359429', '																																																																																																							gallery_363306.html',0,0);
				  					galleries[363325] = new gallery(363325,'6635338','Three Daft Monkeys','gallery',[6635327,6635328,6635329,6635330,6635331,6635332,6635333,6635334,6635335,6635336,6635337,6635338],0, 0, '359429', '																																																																																																							gallery_363325.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[238554] = '7297600,7297593,7297583,7297582,7278904,7278903,7278902,7278824,7278823,7278822,7278821,7249107,7249106,7249105,7249104,7249103,7247846,7247845,7247843,7247842,7247841,7247840,7247839,7247838,7247837,7247806,7247803,7247801,7247799,7247735,7247734,7247733,7247732,7247731,7247730,7247729,6461171,6461169,6461167,6450744,6450710,6450705';
imageSets[238555] = '6586685,6586684,6586683,6586682,6586681,6586680,6586679,6586678,6586677,6586676,6586675,6586673,6586671,6586669,6586667,6586665,6586664';
imageSets[238556] = '6568028,6568027,6568026,6568025,6568024,6568023,6568022,6568021,6568020,6568019,6568018';
imageSets[1] = '7247803';
imageSets[2] = '7278902,7278823,7249103,7247843,7247801,6635338,6634744,6634740,6587035,6586845,6586667,6568025,6558835,6558802,6545874,6545873,6545376,6461170,6461169,6450723,6450719,6450710,6362073,6362069';
imageSets[238559] = '6635338,6635337,6635336,6635335,6635334,6635333,6635332,6635331,6635330,6635329,6635328,6634748,6634747,6634746,6634745,6634744,6634743,6634742,6634741,6634740,6634739,6634738,6634737,6634736,6587040,6587039,6587038,6587037,6587036,6587035,6587034,6587033,6587032,6587031,6587030,6587029,6586848,6586847,6586846,6586845,6586844,6586685,6586684,6586683,6586682,6586681,6586680,6586679,6586678,6586677,6586676,6586675,6586673,6586671,6586669,6586667,6586665,6586664,6568028,6568027,6568026,6568025,6568024,6568023,6568022,6568021,6568020,6568019,6568018,6558835,6558834,6558833,6558832,6558831,6558830,6558829,6558828,6558827,6558826,6558825,6558824,6558823,6558822,6558821,6558820,6558818,6558817,6558816,6558815,6558814,6558813,6558812,6558811,6558810,6558809,6545886,6545885,6545884,6545883,6545882,6545881,6545880,6545879,6545878,6545876,6545874,6545873,6545872';
imageSets[238562] = '6461170';
imageSets[238563] = '6635103';
imageSets[238567] = '6461171,6450744,6450705';
imageSets[3] = '6545388,6545386,6545385,6545384,6545382,6545381,6545380,6545378,6545377,6545344';
imageSets[238558] = '6586844,6558835,6558834,6558833,6558832,6558831,6558830,6558829,6558828,6558827,6558826,6558825,6558824,6558823,6558822,6558821,6558820,6558818,6558817,6558816,6558815,6558814,6558813,6558812,6558811,6558810,6558809';
imageSets[238566] = '7247843,7247842,7247841,7247840,7247839,7247838,7247837';
imageSets[238561] = '7300392,7297600,7249107,7249106,7249105,7249104,7249103,7247735,7247734,7247731,7247730,7247729,6450710';
imageSets[238557] = '6635338,6635337,6635336,6635335,6635334,6635332,6635331,6635330,6635327';
imageSets[238560] = '7300394,7297593,7247806,7247803,7247801,7247799,7247733,7247732';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/angelanicholson/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/angelanicholson/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));		}, 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 = 'Angela Nicholson Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {};	    	      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object') {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp = temp + '<p>Order this print:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> 							' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = temp + '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
				
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
			temp = temp + '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
		
	if(img){
	      if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
        imageID = imageID[1];
      } else {
			  imageID = randomListVal(galleries[gallery_id].featured_images);
      }
							
			if (imageID != 0) {
				img.src = thumbnails[imageID].src;
				img.width = thumbnails[imageID].width;
				img.height = thumbnails[imageID].height;
				img.alt = galleries[gallery_id].title;
        if (updateLink) {
          $(img).parent().attr({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

