window.thumbnails = new Object();
												thumbnails[6800420] = new thumbnail(6800420,'369696','Reindeer - 1','Reindeer_thumb.jpg',130, 188,18,'photo_6800420.html');
												thumbnails[6800397] = new thumbnail(6800397,'369696','Polar Bear sensing prey - PB4','Polar_Bear_4_thumb.jpg',130, 195,18,'photo_6800397.html');
												thumbnails[6800395] = new thumbnail(6800395,'369696','PACKED ICE - ICE1','ICE_1_thumb.jpg',130, 195,18,'photo_6800395.html');
												thumbnails[6800390] = new thumbnail(6800390,'369696','Arctic Glacier - Glacier3','Glacier_3_thumb.jpg',130, 195,18,'photo_6800390.html');
												thumbnails[5141616] = new thumbnail(5141616,'335803','Sea Otter - 5194','HWP_5194_thumb.jpg',130, 184,18,'photo_5141616.html');
												thumbnails[5183887] = new thumbnail(5183887,'290532','Polar Bear Yearling Cubs - 0177','HWP_01771_thumb.jpg',130, 184,18,'photo_5183887.html');
												thumbnails[5183892] = new thumbnail(5183892,'290532','Walrus - 0101','HWP_0201_thumb.jpg',130, 92,18,'photo_5183892.html');
												thumbnails[5183904] = new thumbnail(5183904,'290532','Humpback Whale - 0481','HWP_0481_thumb.jpg',130, 92,18,'photo_5183904.html');
												thumbnails[5780540] = new thumbnail(5780540,'327374','Arctic Horizon - 0064','DSC_0064_thumb.jpg',130, 86,18,'photo_5780540.html');
												thumbnails[5780546] = new thumbnail(5780546,'327374','Arctic Tern - 0121','DSC_0121_thumb.jpg',130, 86,18,'photo_5780546.html');
												thumbnails[5780563] = new thumbnail(5780563,'327374','Polar Bears - 0139','DSC_01391_thumb.jpg',130, 86,18,'photo_5780563.html');
												thumbnails[5780577] = new thumbnail(5780577,'327374','Polar Bear - 0185','DSC_01854_thumb.jpg',130, 74,18,'photo_5780577.html');
												thumbnails[5780582] = new thumbnail(5780582,'327374','Polar Bear - 0237','DSC_0237-21_thumb.jpg',130, 196,18,'photo_5780582.html');
												thumbnails[5780588] = new thumbnail(5780588,'290577','Castle Rocks - 1581','HWP_1581_thumb.jpg',130, 195,18,'photo_5780588.html');
												thumbnails[5780598] = new thumbnail(5780598,'290577','Sunrise at Lake Matheson - 2509','HWP_25091_thumb.jpg',130, 86,18,'photo_5780598.html');
												thumbnails[5780604] = new thumbnail(5780604,'290577','Pacific Spray - 8828 ','HWP_88281_thumb.jpg',130, 86,18,'photo_5780604.html');
												thumbnails[5780647] = new thumbnail(5780647,'327374','Waitekere Range - 9454','HWP_9454_thumb.jpg',130, 86,18,'photo_5780647.html');
												thumbnails[5780654] = new thumbnail(5780654,'290577','New Zealand Fern - 9488','HWP_94881_thumb.jpg',130, 89,18,'photo_5780654.html');
												thumbnails[5780663] = new thumbnail(5780663,'327374','Gannet - 9769','HWP_9769_thumb.jpg',130, 86,18,'photo_5780663.html');
												thumbnails[5398958] = new thumbnail(5398958,'290532','Grizzly bear - A4-4','Untitled-A4-4_52757A92-1D09-001F-99C6E2E942C52685_thumb.jpg',130, 92,18,'photo_5398958.html');
												thumbnails[5399097] = new thumbnail(5399097,'290532','Adult grizzly bear - A4-6','Untitled-A4-6_thumb.jpg',130, 92,18,'photo_5399097.html');
												thumbnails[5399132] = new thumbnail(5399132,'290532','Adult grizzly bear A4-8','Untitled-A4-8_thumb.jpg',130, 92,18,'photo_5399132.html');
												thumbnails[5399152] = new thumbnail(5399152,'290532','Adult grizzly bear A4-9','Untitled-A4-9_thumb.jpg',130, 92,18,'photo_5399152.html');
												thumbnails[5399262] = new thumbnail(5399262,'290532','Grizzly bears - A4-10','Untitled-A4-10_thumb.jpg',130, 92,18,'photo_5399262.html');
												thumbnails[5399324] = new thumbnail(5399324,'290532','Grizzly bears - A4-11','Untitled-A4-11_thumb.jpg',130, 92,18,'photo_5399324.html');
												thumbnails[5399421] = new thumbnail(5399421,'290532','Grizzly bears - A4-12','Untitled-A4-12_thumb.jpg',130, 92,18,'photo_5399421.html');
												thumbnails[5399662] = new thumbnail(5399662,'290532','Grizzly bear - A4-13','Untitled-A4-13_thumb.jpg',130, 93,18,'photo_5399662.html');
												thumbnails[5183792] = new thumbnail(5183792,'290532','Black Bear - Mother & her 3 cubs - 6756','HWP_6756A4_thumb.jpg',130, 92,18,'photo_5183792.html');
												thumbnails[5227902] = new thumbnail(5227902,'290577','Pyramid Lake - 8952','HWP_8952A4_thumb.jpg',130, 92,18,'photo_5227902.html');
												thumbnails[5227927] = new thumbnail(5227927,'290577','Pyramid Lake - 8962','HWP_8962A4_thumb.jpg',130, 184,18,'photo_5227927.html');
												thumbnails[5228687] = new thumbnail(5228687,'290532','Grizzly bear - adult female A4-2','Untitled-2_thumb.jpg',130, 92,18,'photo_5228687.html');
												thumbnails[5184065] = new thumbnail(5184065,'427828','Spirit Island - Maligne Lake - 8784','HWP_8784_thumb.jpg',130, 87,18,'photo_5184065.html');
												thumbnails[5223804] = new thumbnail(5223804,'335803','Meerkat - 7051','HWP_7051A4_thumb.jpg',130, 184,18,'photo_5223804.html');
												thumbnails[5223816] = new thumbnail(5223816,'335803','Meerkat - 7066','HWP_7066A4_thumb.jpg',130, 184,18,'photo_5223816.html');
												thumbnails[5223833] = new thumbnail(5223833,'335803','Meerkat - 7071','HWP_7071A4_thumb.jpg',130, 184,18,'photo_5223833.html');
												thumbnails[5223839] = new thumbnail(5223839,'335803','Meerkat family - 7079','HWP_7079A4_thumb.jpg',130, 92,18,'photo_5223839.html');
												thumbnails[5223853] = new thumbnail(5223853,'335803','Otter - 7614','HWP_7614A4_thumb.jpg',130, 92,18,'photo_5223853.html');
												thumbnails[5223863] = new thumbnail(5223863,'335803','Otters - 7645','HWP_7645A4_thumb.jpg',130, 92,18,'photo_5223863.html');
												thumbnails[5223898] = new thumbnail(5223898,'427828','Spirit Island, Maligne Lake - 8769','HWP_8769A4_thumb.jpg',130, 92,18,'photo_5223898.html');
												thumbnails[5223910] = new thumbnail(5223910,'427828','Spirit Island, Maligne Lake - 8779','HWP_8779A4_thumb.jpg',130, 184,18,'photo_5223910.html');
												thumbnails[5223917] = new thumbnail(5223917,'290577','Pyramid Lake - 8928','HWP_8928A4_thumb.jpg',130, 92,18,'photo_5223917.html');
												thumbnails[5223924] = new thumbnail(5223924,'290577','Pyramid Lake - 8944','HWP_8944A4_thumb.jpg',130, 92,18,'photo_5223924.html');
												thumbnails[5202685] = new thumbnail(5202685,'290532','Black bear - 6620','HWP_6620A4_thumb.jpg',130, 92,18,'photo_5202685.html');
												thumbnails[5202691] = new thumbnail(5202691,'290532','Black bear and cubs - 6660','HWP_6660A4_5B9F9DF0-2219-B5B5-4C8386CA93A76A13_thumb.jpg',130, 184,18,'photo_5202691.html');
												thumbnails[5202721] = new thumbnail(5202721,'290532','Black bear and cubs - 6661','HWP_6661A4_thumb.jpg',130, 184,18,'photo_5202721.html');
												thumbnails[5202726] = new thumbnail(5202726,'290532','Black bear and 3 cubs - 6662','HWP_6662A4_thumb.jpg',130, 184,18,'photo_5202726.html');
												thumbnails[5202745] = new thumbnail(5202745,'290532','Black bear and 3 cubs - 6727','HWP_6727A4_thumb.jpg',130, 92,18,'photo_5202745.html');
												thumbnails[5202751] = new thumbnail(5202751,'290532','Black bear and 3 cubs - 6757','HWP_6757A4_thumb.jpg',130, 92,18,'photo_5202751.html');
												thumbnails[5202795] = new thumbnail(5202795,'335803','Lion - 6844','HWP_6844A4_thumb.jpg',130, 92,18,'photo_5202795.html');
												thumbnails[5202799] = new thumbnail(5202799,'335803','Leopard - 6864','HWP_6864A4_thumb.jpg',130, 92,18,'photo_5202799.html');
												thumbnails[5194305] = new thumbnail(5194305,'290578','Orchid - 4368','HWP_4368A4_thumb.jpg',130, 92,18,'photo_5194305.html');
												thumbnails[5194310] = new thumbnail(5194310,'290578','Orchid - 4375','HWP_4375A4_thumb.jpg',130, 184,18,'photo_5194310.html');
												thumbnails[5194313] = new thumbnail(5194313,'290578','Botanical study - 4381','HWP_4381A4_thumb.jpg',130, 184,18,'photo_5194313.html');
												thumbnails[5194315] = new thumbnail(5194315,'427828','Columbia Icefields - 5102','HWP_5102A4_thumb.jpg',130, 92,18,'photo_5194315.html');
												thumbnails[5194319] = new thumbnail(5194319,'335803','Sea otter - 5124','HWP_5124A4_thumb.jpg',130, 92,18,'photo_5194319.html');
												thumbnails[5194321] = new thumbnail(5194321,'335803','Sea otter - 5128','HWP_5128A4_thumb.jpg',130, 92,18,'photo_5194321.html');
												thumbnails[5194322] = new thumbnail(5194322,'335803','Seal - 5250','HWP_5250A4_thumb.jpg',130, 92,18,'photo_5194322.html');
												thumbnails[5194323] = new thumbnail(5194323,'290577','Athabasca falls - 5650','HWP_5650A4_thumb.jpg',130, 184,18,'photo_5194323.html');
												thumbnails[5197242] = new thumbnail(5197242,'290577','Athabasca falls - 5652','HWP_5652A4_thumb.jpg',130, 86,18,'photo_5197242.html');
												thumbnails[5197244] = new thumbnail(5197244,'290577','Athabasca falls - 5652bw','HWP_5652A4BW_thumb.jpg',130, 92,18,'photo_5197244.html');
												thumbnails[5197254] = new thumbnail(5197254,'290577','Athabasca falls - 5673','HWP_5673A4_thumb.jpg',130, 92,18,'photo_5197254.html');
												thumbnails[5197264] = new thumbnail(5197264,'290577','Athabasca falls - 5698','HWP_5698A4_thumb.jpg',130, 92,18,'photo_5197264.html');
												thumbnails[5197268] = new thumbnail(5197268,'290577','Athabasca falls - 5723','HWP_5723A4_thumb.jpg',130, 184,18,'photo_5197268.html');
												thumbnails[5197272] = new thumbnail(5197272,'290577','Athabasca falls - 5839','HWP_5839A4_thumb.jpg',130, 92,18,'photo_5197272.html');
												thumbnails[5197280] = new thumbnail(5197280,'290577','Athabasca falls - 5849','HWP_5849A4_thumb.jpg',130, 184,18,'photo_5197280.html');
												thumbnails[5197296] = new thumbnail(5197296,'427828','Early morning - 6299','HWP_6299A4_thumb.jpg',130, 92,18,'photo_5197296.html');
												thumbnails[5197313] = new thumbnail(5197313,'290532','Bees - 6339','HWP_6339A4_thumb.jpg',130, 184,18,'photo_5197313.html');
												thumbnails[5197326] = new thumbnail(5197326,'290532','Adult black bear - 6612','HWP_6612A4_thumb.jpg',130, 92,18,'photo_5197326.html');
												thumbnails[5184007] = new thumbnail(5184007,'290577','Lake Matheson at Dawn - 2418','HWP_2418A4_thumb.jpg',130, 92,18,'photo_5184007.html');
												thumbnails[5184013] = new thumbnail(5184013,'290577','Akaroa Harbour - 8427','HWP_8427A4_thumb.jpg',130, 92,18,'photo_5184013.html');
												thumbnails[5191864] = new thumbnail(5191864,'290532','Grizzly bear resting - A4-15','Untitled-A4-15_thumb.jpg',130, 92,18,'photo_5191864.html');
												thumbnails[5191875] = new thumbnail(5191875,'290532','Grey wolf - 3717','HWP_3717A4_thumb.jpg',130, 92,18,'photo_5191875.html');
												thumbnails[5191881] = new thumbnail(5191881,'290532','Grey wolf resting - 3726','HWP_3726A4_thumb.jpg',130, 92,18,'photo_5191881.html');
												thumbnails[5191887] = new thumbnail(5191887,'290532','Grey wolf adult male - 3732','HWP_3732A4_thumb.jpg',130, 92,18,'photo_5191887.html');
												thumbnails[5191903] = new thumbnail(5191903,'290578','Arthurium - 4290','HWP_4290A4_thumb.jpg',130, 92,18,'photo_5191903.html');
												thumbnails[5191911] = new thumbnail(5191911,'290578','Botanical study - 4293','HWP_4293A4_thumb.jpg',130, 184,18,'photo_5191911.html');
												thumbnails[5191915] = new thumbnail(5191915,'290578','Orchid - 4296','HWP_4296A4_thumb.jpg',130, 92,18,'photo_5191915.html');
												thumbnails[5191921] = new thumbnail(5191921,'290578','Orchid - 4297','HWP_4297A4_thumb.jpg',130, 92,18,'photo_5191921.html');
												thumbnails[5191925] = new thumbnail(5191925,'290578','Orchid - 4310','HWP_4310A4_thumb.jpg',130, 92,18,'photo_5191925.html');
												thumbnails[5192028] = new thumbnail(5192028,'290578','Bromiliad - 4328','HWP_4328A4_thumb.jpg',130, 92,18,'photo_5192028.html');
												thumbnails[5192032] = new thumbnail(5192032,'290578','Orchid - 4339','HWP_4339A4_thumb.jpg',130, 92,18,'photo_5192032.html');
												thumbnails[5192039] = new thumbnail(5192039,'290578','Orchid - 4340','HWP_4340A4_thumb.jpg',130, 92,18,'photo_5192039.html');
												thumbnails[5192050] = new thumbnail(5192050,'290578','Orchid - 4344','HWP_4344A4_thumb.jpg',130, 184,18,'photo_5192050.html');
												thumbnails[5192114] = new thumbnail(5192114,'290578','Orchid - 4347','HWP_4347A4_thumb.jpg',130, 92,18,'photo_5192114.html');
												thumbnails[5190017] = new thumbnail(5190017,'290577','Tangle falls - 5184','HWP-5184A4_thumb.jpg',130, 92,18,'photo_5190017.html');
												thumbnails[5190148] = new thumbnail(5190148,'290577','Tangle falls - 5184bw','HWP-5184A4BW_thumb.jpg',130, 92,18,'photo_5190148.html');
												thumbnails[5190211] = new thumbnail(5190211,'290578','Orchid - 4299','HWP_4299A4_thumb.jpg',130, 92,18,'photo_5190211.html');
												thumbnails[5190220] = new thumbnail(5190220,'290532','Polar bear - 0237','HWP_0237A4_thumb.jpg',130, 184,18,'photo_5190220.html');
												thumbnails[5190224] = new thumbnail(5190224,'290532','Polar bears - 0129','DSC_0129A4_thumb.jpg',130, 92,18,'photo_5190224.html');
												thumbnails[5190234] = new thumbnail(5190234,'427828','Bow river valley - A4-3','A4-3_thumb.jpg',130, 92,18,'photo_5190234.html');
												thumbnails[5190269] = new thumbnail(5190269,'290577','Window bottles - 3549','HWP_3549A4_thumb.jpg',130, 184,18,'photo_5190269.html');
												thumbnails[5185116] = new thumbnail(5185116,'290577','Athabasca Falls - 5861','HEWP_5861A4_thumb.jpg',130, 184,18,'photo_5185116.html');
												thumbnails[5185239] = new thumbnail(5185239,'427828','Bow River Valley - 2658','HWP_2658_A4_thumb.jpg',130, 92,18,'photo_5185239.html');
												thumbnails[5185392] = new thumbnail(5185392,'427828','Burwood Island - 3451','HWP_3451A4_thumb.jpg',130, 92,18,'photo_5185392.html');
												thumbnails[5185421] = new thumbnail(5185421,'427828','Mt Athabasca - 4444','HWP_4444A4_thumb.jpg',130, 92,18,'photo_5185421.html');
												thumbnails[5185534] = new thumbnail(5185534,'290577','Sunwapta Falls - 5061','HWP_5061A4_thumb.jpg',130, 184,18,'photo_5185534.html');
												thumbnails[5179204] = new thumbnail(5179204,'290532','Grazing grizzly bear - A4-7','Untitled-A4-7_thumb.jpg',130, 184,18,'photo_5179204.html');
												thumbnails[5179366] = new thumbnail(5179366,'290577','Window bottles - 3548bw','HWP_3548A4BW_thumb.jpg',130, 184,18,'photo_5179366.html');
												thumbnails[6800473] = new thumbnail(6800473,'427828','Aerial View - Rarotanga - NE Coast','Untitled-1_thumb.jpg',130, 87,18,'photo_6800473.html');
												thumbnails[6800481] = new thumbnail(6800481,'427828','Haruru Falls - 4808','_D3X4808_thumb.jpg',130, 87,18,'photo_6800481.html');
												thumbnails[7611318] = new thumbnail(7611318,'290577','Costumed Mannequins - Venice Carnival 0743','D3X_0743_thumb.jpg',130, 80,18,'photo_7611318.html');
												thumbnails[7939487] = new thumbnail(7939487,'427689','Carnival Mannequin','Carnevale4_copy_thumb.jpg',130, 87,18,'photo_7939487.html');
												thumbnails[7939493] = new thumbnail(7939493,'427689','Carnival Mannequin','Carnivale2_thumb.jpg',130, 169,18,'photo_7939493.html');
												thumbnails[6800409] = new thumbnail(6800409,'369696','Enjoying the feast - PB14','Polar_Bear_14_thumb.jpg',130, 86,18,'photo_6800409.html');
												thumbnails[6800417] = new thumbnail(6800417,'369696','Searching - PB15','Polar_Bear_15_thumb.jpg',130, 86,18,'photo_6800417.html');
												thumbnails[6800402] = new thumbnail(6800402,'369696','Female hunting - PB12','Polar_Bear_12_thumb.jpg',130, 86,18,'photo_6800402.html');
												thumbnails[6800430] = new thumbnail(6800430,'369696','Walrus - W1','Walrus_1_thumb.jpg',130, 195,18,'photo_6800430.html');
												thumbnails[6800434] = new thumbnail(6800434,'369696','Humpback Breaching - Whale8','Whale_8_thumb.jpg',130, 157,18,'photo_6800434.html');
												thumbnails[6063674] = new thumbnail(6063674,'290577','Akaroa Harbour - New Zealand 8372','HWP_8372_thumb.jpg',130, 184,18,'photo_6063674.html');
												thumbnails[6063684] = new thumbnail(6063684,'427828','Bow Lake - Alberta 9355','HWP_9355_thumb.jpg',130, 92,18,'photo_6063684.html');
												thumbnails[6800468] = new thumbnail(6800468,'427828','View to the Lagoon - 2483','_D3X2483_thumb.jpg',130, 195,18,'photo_6800468.html');
												thumbnails[6800488] = new thumbnail(6800488,'427828','Sulphur Beds & Silica - 6433','_D3X6433_thumb.jpg',130, 87,18,'photo_6800488.html');
												thumbnails[7724920] = new thumbnail(7724920,'417466','Green Turtle','Turtle_thumb.jpg',130, 87,18,'photo_7724920.html');
												thumbnails[7941851] = new thumbnail(7941851,'412786','Taking a Nap!','HWP_0734_thumb.jpg',130, 92,18,'photo_7941851.html');
												thumbnails[7941864] = new thumbnail(7941864,'412786','Danger - Bears Crossing','HWP_6756_thumb.jpg',130, 77,18,'photo_7941864.html');
												thumbnails[7941881] = new thumbnail(7941881,'412786','Burwood Island','HWP_34291_thumb.jpg',130, 87,18,'photo_7941881.html');
												thumbnails[7941888] = new thumbnail(7941888,'412786','Learning to Swim!','_HWP2607_thumb.jpg',130, 68,18,'photo_7941888.html');
												thumbnails[7941899] = new thumbnail(7941899,'412786','Ah Breakfast!','HWP_3136_thumb.jpg',130, 98,18,'photo_7941899.html');
												thumbnails[7941978] = new thumbnail(7941978,'290577','Burrano  0394','D3X_0394w_thumb.jpg',130, 92,18,'photo_7941978.html');
												thumbnails[7942476] = new thumbnail(7942476,'427689','Burrano - 0371','D3X_0371w_thumb.jpg',130, 92,18,'photo_7942476.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[290577] = new gallery(290577,'7611318,6063674,5780654,5780604,5780598,5780588,5227927,5227902,5223924,5223917,5197280,5197272,5197268,5197264,5197254,5197244,5197242,5194323,5190269,5190148,5190017,5185534,5185116,5179366','FISH FRAMES GALLERY - CROYDON','gallery',[5780588,5780598,5780604,5780654,5227902,5227927,5223917,5223924,5194323,5197242,5197244,5197254,5197264,5197268,5197272,5197280,5184007,5184013,5190017,5190148,5190269,5185116,5185534,5179366,7611318,6063674,7941978],0, 0, '', 'gallery_290577.html',0,0);
				  					galleries[412786] = new gallery(412786,'7941899,7941888,7941851','Entries - 2011 Wildlife Photographer of The Year','gallery',[7941851,7941864,7941881,7941888,7941899],0, 0, '', 'gallery_412786.html',0,0);
				  					galleries[327374] = new gallery(327374,'5780663,5780647,5780582,5780577,5780563,5780546,5780540','Entries to Wildlife Photographer of The Year 2010','gallery',[5780540,5780546,5780563,5780577,5780582,5780647,5780663],0, 0, '', 'gallery_327374.html',0,0);
				  					galleries[427689] = new gallery(427689,'7942476,7939493,7939487','VENICE 2011','gallery',[7939487,7939493,7942476],0, 0, '', 'gallery_427689.html',0,0);
				  					galleries[369696] = new gallery(369696,'6800434,6800430,6800420,6800417,6800409,6800402,6800397,6800395,6800390','New ARCTIC','gallery',[6800420,6800397,6800395,6800390,6800409,6800417,6800402,6800430,6800434],0, 0, '', 'gallery_369696.html',0,0);
				  					galleries[427828] = new gallery(427828,'6063684,5223910,5223898,5197296,5194315,5190234,5185421,5185392,5185239','LANDSCAPES','gallery',[5184065,5223898,5223910,5194315,5197296,5190234,5185239,5185392,5185421,6800473,6800481,6063684,6800468,6800488],0, 0, '', 'gallery_427828.html',0,0);
				  					galleries[335803] = new gallery(335803,'5223863,5223853,5223839,5223833,5223816,5223804,5202799,5202795,5194322,5194321,5194319,5141616','ANIMALS','gallery',[5141616,5223804,5223816,5223833,5223839,5223853,5223863,5202795,5202799,5194319,5194321,5194322],0, 0, '', 'gallery_335803.html',0,0);
				  					galleries[417466] = new gallery(417466,'7724920','AURORA 2011','gallery',[7724920],0, 0, '', 'gallery_417466.html',0,0);
				  					galleries[290578] = new gallery(290578,'5194313,5194310,5194305,5192114,5192050,5192039,5192032,5192028,5191925,5191921,5191915,5191911,5191903,5190211','BOTANY','gallery',[5194305,5194310,5194313,5191903,5191911,5191915,5191921,5191925,5192028,5192032,5192039,5192050,5192114,5190211],0, 0, '', 'gallery_290578.html',0,0);
				  					galleries[290532] = new gallery(290532,'5399662,5399421,5399324,5399262,5399152,5399132,5399097,5398958,5228687,5202751,5202745,5202726,5202721,5202691,5202685,5197326,5197313,5191887,5191881,5191875,5191864,5190224,5190220,5179204','WILDLIFE','gallery',[5183887,5183892,5183904,5398958,5399097,5399132,5399152,5399262,5399324,5399421,5399662,5183792,5228687,5202685,5202691,5202721,5202726,5202745,5202751,5197313,5197326,5191864,5191875,5191881,5191887,5190220,5190224,5179204],0, 0, '', 'gallery_290532.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7942476,7941978,7941899,7941888,7941851,7939493,7939487,7724920,7611318,6063684,6063674,5780663,5780654,5780647,5780604,5780598,5780588,5780582,5780577,5780563,5780546,5780540,5399662,5399421,5399324,5399262,5399152,5399132,5399097,5398958,5228687,5227927,5227902,5223924,5223917,5223910,5223898,5223863,5223853,5223839,5223833,5223816,5223804,5202799,5202795,5202751,5202745,5202726,5202721,5202691,5202685,5197326,5197313,5197296,5197280,5197272,5197268,5197264,5197254,5197244,5197242,5194323,5194322,5194321,5194319,5194315,5194313,5194310,5194305,5192114,5192050,5192039,5192032,5192028,5191925,5191921,5191915,5191911,5191903,5191887,5191881,5191875,5191864,5190269,5190234,5190224,5190220,5190211,5190148,5190017,5185534,5185421,5185392,5185239,5185116,5179366,5179204,5141616';
imageSets[2] = '7942476,7941899,7941888,7941851,7939493,7939487,7724920,7611318,6063684,6063674,5780663,5780654,5780647,5780604,5780598,5780588,5780582,5780577,5780563,5780546,5780540,5399662,5399421,5399324,5399262,5399152,5399132,5399097,5398958,5228687,5227927,5227902,5223924,5223917,5223910,5223898,5223863,5223853,5223839,5223833,5223816,5223804,5202799,5202795,5202751,5202745,5202726,5202721,5202691,5202685,5197326,5197313,5197296,5197280,5197272,5197268,5197264,5197254,5197244,5197242,5194323,5194322,5194321,5194319,5194315,5194313,5194310,5194305,5192114,5192050,5192039,5192032,5192028,5191925,5191921,5191915,5191911,5191903,5191887,5191881,5191875,5191864,5190269,5190234,5190224,5190220,5190211,5190148,5190017,5185534,5185421,5185392,5185239,5185116,5179366,5179204,5141616';
imageSets[3] = '7942476,7941978,7941899,7941888,7941881,7941864,7941851,7939493,7939487,7724920,7611318,6800488,6800481,6800473,6800468,6800434,6800430,6800420,6800417,6800409,6800402,6800397,6800395,6800390,6063684,6063674,5780663,5780654,5780647,5780604,5780598,5780588,5780582,5780577,5780563,5780546,5780540,5399662,5399421,5399324,5399262,5399152,5399132,5399097,5398958,5228687,5227927,5227902,5223924,5223917';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/HPerry/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/HPerry/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/HPerry/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/HPerry/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/HPerry/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/HPerry/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 = 'Howard Perry - Photographer: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {photoinfominwidth:200};	    		options.photoinfoadjacent = true;			      		      options.centre = 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 == undefined) {
    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>Howard Perry </strong>' + this.photographer + '</p>';
	}
					
	temp = temp + this.fnGetPaymentInfo();
				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>Buy now using PayPal:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (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="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
				
		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 + '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
	temp = temp + '	<input type="hidden" name="item_option" value="' + item_option + '">';
	temp = temp + '	<input type="hidden" name="site" value="HPERRY">';
		temp = temp + '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp = temp + '	<input type="hidden" name="quantity" value="1">';
								temp = temp + '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
			temp = 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 = temp + '</form>';
		temp = temp + '<div class="clearing">&nbsp;</div>';
	temp = temp + '<div id="confirmContainer">';
	temp = temp + '<div id="paymentConfirm">Item added to cart</div>';
	temp = temp + '</div>';
			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;
	}
}

			

