window.thumbnails = new Object();
												thumbnails[5886358] = new thumbnail(5886358,'','Buzzard','Buzzard3_thumb.JPG',130, 87,1,'															#');
												thumbnails[378707] = new thumbnail(378707,'','','PIC0133_thumb.JPG',130, 174,1,'															#');
												thumbnails[383230] = new thumbnail(383230,'','','PIC0142_thumb.JPG',130, 92,1,'															#');
												thumbnails[6213236] = new thumbnail(6213236,'345667','Razorbill','Razorbill5_thumb.JPG',130, 184,1,'																			photo_6213236.html');
												thumbnails[6213237] = new thumbnail(6213237,'345667','','Skomer2_thumb.JPG',130, 92,1,'																			photo_6213237.html');
												thumbnails[6213238] = new thumbnail(6213238,'345667','','Skomer4_thumb.JPG',130, 92,1,'																			photo_6213238.html');
												thumbnails[6318166] = new thumbnail(6318166,'345667','','swift4_thumb.JPG',130, 184,1,'																			photo_6318166.html');
												thumbnails[6318168] = new thumbnail(6318168,'345667','','Swift5_thumb.JPG',130, 92,1,'																			photo_6318168.html');
												thumbnails[6191509] = new thumbnail(6191509,'345667','Heron feeding','20100617-_MG_0293_thumb.JPG',130, 92,1,'																			photo_6191509.html');
												thumbnails[6191511] = new thumbnail(6191511,'345667','Kingfisher','20100617-_MG_0315_thumb.JPG',130, 92,1,'																			photo_6191511.html');
												thumbnails[6191512] = new thumbnail(6191512,'345667','Sedge Warbler','20100617-_MG_0335_thumb.JPG',130, 92,1,'																			photo_6191512.html');
												thumbnails[6191513] = new thumbnail(6191513,'345667','Common Tern','20100617-_MG_0340_thumb.JPG',130, 92,1,'																			photo_6191513.html');
												thumbnails[6191514] = new thumbnail(6191514,'345667','Banded Demoiselle (Female)','20100617-_MG_0341_thumb.JPG',130, 92,1,'																			photo_6191514.html');
												thumbnails[6191507] = new thumbnail(6191507,'345667','Meadow Brown','20100616-_MG_0258_thumb.JPG',130, 92,1,'																			photo_6191507.html');
												thumbnails[6191503] = new thumbnail(6191503,'345667','Little Blue','Little_Blue_2_thumb.JPG',130, 92,1,'																			photo_6191503.html');
												thumbnails[6191506] = new thumbnail(6191506,'345667','Little Blue','Little_Blue_thumb.JPG',130, 92,1,'																			photo_6191506.html');
												thumbnails[6052305] = new thumbnail(6052305,'143643','Greenfinch','Greenfinch0008_thumb.JPG',130, 92,1,'																			photo_6052305.html');
												thumbnails[6052288] = new thumbnail(6052288,'143644','Common Blue Butterflies','Winchester0001_thumb.JPG',130, 184,1,'																			photo_6052288.html');
												thumbnails[6052289] = new thumbnail(6052289,'143644','Common Blue','Winchester0003_thumb.JPG',130, 92,1,'																			photo_6052289.html');
												thumbnails[6052291] = new thumbnail(6052291,'143644','Common Blue (Male)','Winchester0005_thumb.JPG',130, 92,1,'																			photo_6052291.html');
												thumbnails[6052293] = new thumbnail(6052293,'143644','Common Blue (Female)','Winchester0007_thumb.JPG',130, 92,1,'																			photo_6052293.html');
												thumbnails[6052294] = new thumbnail(6052294,'143644','Brown Argus','Winchester0004_thumb.JPG',130, 92,1,'																			photo_6052294.html');
												thumbnails[6052298] = new thumbnail(6052298,'143644','Grizzled Skipper','Winchester0002_thumb.JPG',130, 184,1,'																			photo_6052298.html');
												thumbnails[5884740] = new thumbnail(5884740,'185167','Golden Eagle in the rain','Golden_Eagle_in_Rain3_thumb.JPG',130, 92,1,'																			photo_5884740.html');
												thumbnails[5884836] = new thumbnail(5884836,'185167','Golden Eagle (Portrait)','Golden_Eagle_thumb.JPG',130, 87,1,'																			photo_5884836.html');
												thumbnails[5702350] = new thumbnail(5702350,'143643','Bullfinch','Bullfinch_thumb.JPG',130, 92,1,'																			photo_5702350.html');
												thumbnails[5698863] = new thumbnail(5698863,'143643','Dunnock','Dunnock2_thumb.JPG',130, 92,1,'																			photo_5698863.html');
												thumbnails[5698873] = new thumbnail(5698873,'143643','Reed Bunting','IMG_0149_thumb.JPG',130, 92,1,'																			photo_5698873.html');
												thumbnails[4803100] = new thumbnail(4803100,'29230','GNR N2','1744_thumb.JPG',130, 92,1,'																			photo_4803100.html');
												thumbnails[4803113] = new thumbnail(4803113,'29230','5643','5643_thumb.JPG',130, 92,1,'																			photo_4803113.html');
												thumbnails[4118635] = new thumbnail(4118635,'185167','Barn Owl','new49_thumb.JPG',130, 192,1,'																			photo_4118635.html');
												thumbnails[4754611] = new thumbnail(4754611,'143643','Nuthatch','Nuthatch1_thumb.JPG',130, 88,1,'																			photo_4754611.html');
												thumbnails[4754639] = new thumbnail(4754639,'143643','Great Tit','Great_tit_thumb.JPG',130, 200,1,'																			photo_4754639.html');
												thumbnails[4755993] = new thumbnail(4755993,'143643','Blue Tit','Blue_Tit2_thumb.JPG',130, 184,1,'																			photo_4755993.html');
												thumbnails[4756016] = new thumbnail(4756016,'29230','SDJR 88','SDJR88_thumb.JPG',130, 184,1,'																			photo_4756016.html');
												thumbnails[4803130] = new thumbnail(4803130,'143643','Coal Tit','Great_Tit11_thumb.JPG',130, 87,1,'																			photo_4803130.html');
												thumbnails[4803117] = new thumbnail(4803117,'185165','Azure Damselfly','Azure_Damselfly_thumb.JPG',130, 92,1,'																			photo_4803117.html');
												thumbnails[4754653] = new thumbnail(4754653,'143644','Speckled Wood','IMG_2994_thumb.JPG',130, 92,1,'																			photo_4754653.html');
												thumbnails[4754602] = new thumbnail(4754602,'143644','Comma Butterfly','Comma_Butterfly01_thumb.JPG',130, 184,1,'																			photo_4754602.html');
												thumbnails[4754605] = new thumbnail(4754605,'272456','Heron fishing','Heron_Fishing03_thumb.JPG',130, 92,1,'																			photo_4754605.html');
												thumbnails[4756000] = new thumbnail(4756000,'272456','Moorhen','Moorhen_thumb.JPG',130, 184,1,'																			photo_4756000.html');
												thumbnails[4543219] = new thumbnail(4543219,'143644','Painted Lady','new80_thumb.JPG',130, 96,1,'																			photo_4543219.html');
												thumbnails[4543226] = new thumbnail(4543226,'143644','Gatekeeper','new78_thumb.JPG',130, 92,1,'																			photo_4543226.html');
												thumbnails[4543243] = new thumbnail(4543243,'143644','Small Skipper','new75_thumb.JPG',130, 98,1,'																			photo_4543243.html');
												thumbnails[4607440] = new thumbnail(4607440,'143644','Six Spot Burnet Moth','new83_thumb.JPG',130, 97,1,'																			photo_4607440.html');
												thumbnails[4607443] = new thumbnail(4607443,'143644','Large White','new84_thumb.JPG',130, 98,1,'																			photo_4607443.html');
												thumbnails[4284743] = new thumbnail(4284743,'143644','Large Skipper','new67_thumb.JPG',130, 92,1,'																			photo_4284743.html');
												thumbnails[4170819] = new thumbnail(4170819,'143643','Chaffinch','new51_thumb.JPG',130, 90,1,'																			photo_4170819.html');
												thumbnails[4170858] = new thumbnail(4170858,'272456','Little Ringed Plover','new55_thumb.JPG',130, 97,1,'																			photo_4170858.html');
												thumbnails[4170877] = new thumbnail(4170877,'272456','Oystercatcher','new57_thumb.JPG',130, 92,1,'																			photo_4170877.html');
												thumbnails[4170891] = new thumbnail(4170891,'143643','Willow Warbler','new60_thumb.JPG',130, 96,1,'																			photo_4170891.html');
												thumbnails[4284750] = new thumbnail(4284750,'272456','Little Ringed Plover on nest','new62_thumb.JPG',130, 92,1,'																			photo_4284750.html');
												thumbnails[4285359] = new thumbnail(4285359,'272456','Black Headed Gull','new68_thumb.JPG',130, 92,1,'																			photo_4285359.html');
												thumbnails[4285366] = new thumbnail(4285366,'272456','Lapwing','new69_thumb.JPG',130, 92,1,'																			photo_4285366.html');
												thumbnails[4118627] = new thumbnail(4118627,'272456','Heron in Flight','new47_thumb.JPG',130, 90,1,'																			photo_4118627.html');
												thumbnails[4118629] = new thumbnail(4118629,'185167','Kestrel','new48_thumb.JPG',130, 97,1,'																			photo_4118629.html');
												thumbnails[3934984] = new thumbnail(3934984,'143643','Whitethroat','Whitethroat2_thumb.JPG',130, 92,1,'																			photo_3934984.html');
												thumbnails[3747123] = new thumbnail(3747123,'29230','71000 Duke of Gloucester','new40_thumb.JPG',130, 92,1,'																			photo_3747123.html');
												thumbnails[3609949] = new thumbnail(3609949,'272456','Formation Take Off','new33_thumb.JPG',130, 100,1,'																			photo_3609949.html');
												thumbnails[3609977] = new thumbnail(3609977,'143643','Treecreeper','new36_thumb.JPG',130, 98,1,'																			photo_3609977.html');
												thumbnails[3747131] = new thumbnail(3747131,'272456','Coot','new41_thumb.JPG',130, 92,1,'																			photo_3747131.html');
												thumbnails[3609993] = new thumbnail(3609993,'143643','Kingfisher','new37_thumb.JPG',130, 108,1,'																			photo_3609993.html');
												thumbnails[3609956] = new thumbnail(3609956,'272456','Great Crested Grebe','new34_thumb.JPG',130, 108,1,'																			photo_3609956.html');
												thumbnails[3609968] = new thumbnail(3609968,'272456','Shoveler','new35_thumb.JPG',130, 92,1,'																			photo_3609968.html');
												thumbnails[3610002] = new thumbnail(3610002,'185167','Red Kite','new38_thumb.JPG',130, 92,1,'																			photo_3610002.html');
												thumbnails[3747144] = new thumbnail(3747144,'248923','Tewkesbury Abbey','new43_thumb.JPG',130, 92,1,'																			photo_3747144.html');
												thumbnails[376724] = new thumbnail(376724,'30689','Canadian Pacific','PIC0101_thumb.JPG',130, 87,1,'																			photo_376724.html');
												thumbnails[365949] = new thumbnail(365949,'30689','The Cornishman','PIC0108_thumb.JPG',130, 92,1,'																			photo_365949.html');
												thumbnails[376728] = new thumbnail(376728,'30689','92212 leaving Winchcombe station','PIC0117_thumb.JPG',130, 87,1,'																			photo_376728.html');
												thumbnails[376730] = new thumbnail(376730,'30689','1450 \'running around\'at Winchcombe','PIC0118_thumb.JPG',130, 87,1,'																			photo_376730.html');
												thumbnails[365948] = new thumbnail(365948,'29192','The Irish Mail','PIC0107_thumb.JPG',130, 184,1,'																			photo_365948.html');
												thumbnails[384749] = new thumbnail(384749,'31206','\'Alan\' A fellow railway photographer pictured with his favourite engine.','PIC0129_thumb.JPG',130, 195,1,'																			photo_384749.html');
												thumbnails[376720] = new thumbnail(376720,'30689','Leaving Cheltenham Racecourse Station','PIC0047_thumb.JPG',130, 92,1,'																			photo_376720.html');
												thumbnails[376737] = new thumbnail(376737,'29192','4472 Flying Scotsman at Widney manor','PIC0120_thumb.JPG',130, 92,1,'																			photo_376737.html');
												thumbnails[384755] = new thumbnail(384755,'31206','\'Steve\'  On his first solo as a fireman','PIC0130_thumb.JPG',130, 92,1,'																			photo_384755.html');
												thumbnails[353878] = new thumbnail(353878,'29192','6024 King Edward I','PIC0011_thumb.JPG',130, 92,1,'																			photo_353878.html');
												thumbnails[353865] = new thumbnail(353865,'29230','1450 and Autotrain','PIC00021_thumb.JPG',130, 92,1,'																			photo_353865.html');
												thumbnails[353869] = new thumbnail(353869,'29230','1450 at Norchard','PIC0001_thumb.JPG',130, 92,1,'																			photo_353869.html');
												thumbnails[353871] = new thumbnail(353871,'29230','Norchard Low Level','PIC0003_thumb.JPG',130, 61,1,'																			photo_353871.html');
												thumbnails[353876] = new thumbnail(353876,'29230','Awaiting departure from Norchard High Level','PIC0004_thumb.JPG',130, 92,1,'																			photo_353876.html');
												thumbnails[376734] = new thumbnail(376734,'29192','5690 Leander at Wilmcote','PIC0112_thumb.JPG',130, 92,1,'																			photo_376734.html');
												thumbnails[376735] = new thumbnail(376735,'29192','71000 Duke of Gloucester at Hatton','PIC0113_thumb.JPG',130, 92,1,'																			photo_376735.html');
												thumbnails[355910] = new thumbnail(355910,'29192','45305  \'Black Five\'','PIC0008_thumb.JPG',130, 92,1,'																			photo_355910.html');
												thumbnails[355906] = new thumbnail(355906,'30689','Departing from Toddington','PIC0048_thumb.JPG',130, 92,1,'																			photo_355906.html');
												thumbnails[376722] = new thumbnail(376722,'30689','7903 Foremarke Hall','PIC0049_thumb.JPG',130, 92,1,'																			photo_376722.html');
												thumbnails[376726] = new thumbnail(376726,'30689','Evening shot 3205 returning to Toddington','PIC0115_thumb.JPG',130, 92,1,'																			photo_376726.html');
												thumbnails[355911] = new thumbnail(355911,'29192','6024 King Edward I','PIC0017_thumb.JPG',130, 92,1,'																			photo_355911.html');
												thumbnails[383298] = new thumbnail(383298,'29192','34067 \'Tangmere\' ','PIC0127_thumb.JPG',130, 92,1,'																			photo_383298.html');
												thumbnails[376731] = new thumbnail(376731,'30689','3822 at \'Chicken Curve\'','PIC0121_thumb.JPG',130, 92,1,'																			photo_376731.html');
												thumbnails[376732] = new thumbnail(376732,'30689','5224 \'in the cutting\' Winchcombe','PIC0122_thumb.JPG',130, 92,1,'																			photo_376732.html');
												thumbnails[355887] = new thumbnail(355887,'30689','Arriving at Cheltenham Race Course','PIC0018_thumb.JPG',130, 92,1,'																			photo_355887.html');
												thumbnails[355903] = new thumbnail(355903,'30689','Leaving Greet tunnel.','PIC0022_thumb.JPG',130, 92,1,'																			photo_355903.html');
												thumbnails[355904] = new thumbnail(355904,'30689','A Driver\'s eye view','PIC0023_thumb.JPG',130, 92,1,'																			photo_355904.html');
												thumbnails[355912] = new thumbnail(355912,'29192','5029 Nunney Castle','PIC0046_thumb.JPG',130, 92,1,'																			photo_355912.html');
												thumbnails[376727] = new thumbnail(376727,'30689','60103 Flying Scotsman at Hailes','PIC0116_thumb.JPG',130, 92,1,'																			photo_376727.html');
												thumbnails[384759] = new thumbnail(384759,'31206','\'Token Exchange\'  The fireman on 5029 Nunney Castle preparing to exchange tokens with the signalman','PIC0132_thumb.JPG',130, 93,1,'																			photo_384759.html');
												thumbnails[384763] = new thumbnail(384763,'31206','Footplate crew preparing for the days work ahead','PIC0134_thumb.JPG',130, 184,1,'																			photo_384763.html');
												thumbnails[384764] = new thumbnail(384764,'31206','\'Kevin\' Senior guard always with a smile','PIC0123_thumb.JPG',130, 92,1,'																			photo_384764.html');
												thumbnails[384765] = new thumbnail(384765,'31206','\'TLC\' \"Blue Peter\" obviously enjoying the attention of its driver','PIC0140_thumb.JPG',130, 85,1,'																			photo_384765.html');
												thumbnails[910855] = new thumbnail(910855,'29230','Approaching Oakworth Station','PIC0207_thumb.JPG',130, 97,1,'																			photo_910855.html');
												thumbnails[919789] = new thumbnail(919789,'30689','A rare visitor to the GWR \'8F\' leaving Cheltenham Race Course station','PIC0203_thumb.JPG',130, 92,1,'																			photo_919789.html');
												thumbnails[919792] = new thumbnail(919792,'29230','Dukedog \'Earl of Berkeley\' at Horsted Keynes','PIC0202_thumb.JPG',130, 92,1,'																			photo_919792.html');
												thumbnails[920110] = new thumbnail(920110,'185167','American Bald Eagle','CLK302_thumb.JPG',130, 87,1,'																			photo_920110.html');
												thumbnails[920111] = new thumbnail(920111,'185167','Long Eared Owl','CLK303_thumb.JPG',130, 92,1,'																			photo_920111.html');
												thumbnails[920112] = new thumbnail(920112,'272456','Little Egret','CLK304_thumb.JPG',130, 92,1,'																			photo_920112.html');
												thumbnails[920113] = new thumbnail(920113,'143643','Winter Robin','CLK305_thumb.JPG',130, 92,1,'																			photo_920113.html');
												thumbnails[920115] = new thumbnail(920115,'185168','','CLK307_thumb.JPG',130, 87,1,'																			photo_920115.html');
												thumbnails[920116] = new thumbnail(920116,'185168','','CLK308_thumb.JPG',130, 87,1,'																			photo_920116.html');
												thumbnails[920117] = new thumbnail(920117,'185168','','CLK309_thumb.JPG',130, 195,1,'																			photo_920117.html');
												thumbnails[920118] = new thumbnail(920118,'185168','','CLK310_thumb.JPG',130, 87,1,'																			photo_920118.html');
												thumbnails[920119] = new thumbnail(920119,'185168','','CLK311_thumb.JPG',130, 87,1,'																			photo_920119.html');
												thumbnails[945279] = new thumbnail(945279,'31206','Token exchange at Horsted Keynes','PIC0201_thumb.JPG',130, 92,1,'																			photo_945279.html');
												thumbnails[1878640] = new thumbnail(1878640,'30689','\'Green Arrow\' leaving Winchcombe. ','new0007_thumb.JPG',130, 92,1,'																			photo_1878640.html');
												thumbnails[1878649] = new thumbnail(1878649,'30689','','new0005_thumb.JPG',130, 92,1,'																			photo_1878649.html');
												thumbnails[1878714] = new thumbnail(1878714,'185167','Hobby','new0009_thumb.JPG',130, 92,1,'																			photo_1878714.html');
												thumbnails[1878715] = new thumbnail(1878715,'143644','Marbled White','new0010_thumb.JPG',130, 92,1,'																			photo_1878715.html');
												thumbnails[1878716] = new thumbnail(1878716,'143644','Peacock','new0011_thumb.JPG',130, 92,1,'																			photo_1878716.html');
												thumbnails[1878718] = new thumbnail(1878718,'143644','Small Skipper','new0012_thumb.JPG',130, 92,1,'																			photo_1878718.html');
												thumbnails[1878721] = new thumbnail(1878721,'143644','Small White 3','new0013_thumb.JPG',130, 92,1,'																			photo_1878721.html');
												thumbnails[2166876] = new thumbnail(2166876,'29230','Taking a short break at Llangollen','PIC0206_thumb.JPG',130, 92,1,'																			photo_2166876.html');
												thumbnails[2166879] = new thumbnail(2166879,'29192','Coronation Class at Hatton','new0014_thumb.JPG',130, 92,1,'																			photo_2166879.html');
												thumbnails[2166881] = new thumbnail(2166881,'185167','Barn Owl','new0015_thumb.JPG',130, 87,1,'																			photo_2166881.html');
												thumbnails[2166885] = new thumbnail(2166885,'143643','Chaffinch','sclic17_thumb.JPG',130, 92,1,'																			photo_2166885.html');
												thumbnails[2166887] = new thumbnail(2166887,'143643','Jackdaw','sclic19_thumb.JPG',130, 92,1,'																			photo_2166887.html');
												thumbnails[2166888] = new thumbnail(2166888,'143643','Greenfinch','sclic22_thumb.JPG',130, 92,1,'																			photo_2166888.html');
												thumbnails[2166890] = new thumbnail(2166890,'272456','Overflight','sclic29_thumb.JPG',130, 92,1,'																			photo_2166890.html');
												thumbnails[2166891] = new thumbnail(2166891,'272456','Pintail','sclic30_thumb.JPG',130, 92,1,'																			photo_2166891.html');
												thumbnails[2166892] = new thumbnail(2166892,'143643','Great Spotted Woodpecker','sclic38_thumb.JPG',130, 92,1,'																			photo_2166892.html');
												thumbnails[2166894] = new thumbnail(2166894,'272456','Splash 1','sclic32_thumb.JPG',130, 92,1,'																			photo_2166894.html');
												thumbnails[2166897] = new thumbnail(2166897,'272456','Goldeneye','sclic33_thumb.JPG',130, 92,1,'																			photo_2166897.html');
												thumbnails[2166898] = new thumbnail(2166898,'272456','Shelduck','sclic34_thumb.JPG',130, 92,1,'																			photo_2166898.html');
												thumbnails[2166900] = new thumbnail(2166900,'272456','\"The Conductor\"','sclic35_thumb.JPG',130, 92,1,'																			photo_2166900.html');
												thumbnails[2166924] = new thumbnail(2166924,'143643','Blackbird','sclic42_thumb.JPG',130, 92,1,'																			photo_2166924.html');
												thumbnails[2166925] = new thumbnail(2166925,'143643','Garden Robin','sclic43_thumb.JPG',130, 92,1,'																			photo_2166925.html');
												thumbnails[2278380] = new thumbnail(2278380,'185165','','sclic48_thumb.JPG',130, 92,1,'																			photo_2278380.html');
												thumbnails[2278381] = new thumbnail(2278381,'185165','','sclic49_thumb.JPG',130, 92,1,'																			photo_2278381.html');
												thumbnails[2278382] = new thumbnail(2278382,'272456','Cormorant','sclic50_thumb.JPG',130, 92,1,'																			photo_2278382.html');
												thumbnails[2278383] = new thumbnail(2278383,'272456','Family Outing','sclic51_thumb.JPG',130, 92,1,'																			photo_2278383.html');
												thumbnails[2278386] = new thumbnail(2278386,'272456','Canada Goose','sclic52_thumb.JPG',130, 92,1,'																			photo_2278386.html');
												thumbnails[2278388] = new thumbnail(2278388,'30689','4F 44422','sclic53_thumb.JPG',130, 92,1,'																			photo_2278388.html');
												thumbnails[2278392] = new thumbnail(2278392,'30689','5619','sclic54_thumb.JPG',130, 92,1,'																			photo_2278392.html');
												thumbnails[2336953] = new thumbnail(2336953,'185165','','sclic57_thumb.JPG',130, 92,1,'																			photo_2336953.html');
												thumbnails[2336965] = new thumbnail(2336965,'30689','850 Lord Nelson','sclic59_thumb.JPG',130, 92,1,'																			photo_2336965.html');
												thumbnails[2453404] = new thumbnail(2453404,'143644','Ringlet','sclic60_thumb.JPG',130, 92,1,'																			photo_2453404.html');
												thumbnails[2453414] = new thumbnail(2453414,'143643','Goldfinch (Imm)','sclic62_thumb.JPG',130, 92,1,'																			photo_2453414.html');
												thumbnails[2698997] = new thumbnail(2698997,'143643','Kingfisher','sclic64_thumb.JPG',130, 92,1,'																			photo_2698997.html');
												thumbnails[2756190] = new thumbnail(2756190,'185165','','sclic65_thumb.JPG',130, 92,1,'																			photo_2756190.html');
												thumbnails[2756194] = new thumbnail(2756194,'185165','','sclic66_thumb.JPG',130, 92,1,'																			photo_2756194.html');
												thumbnails[3007356] = new thumbnail(3007356,'185167','Merlin','mwf12_thumb.JPG',130, 92,1,'																			photo_3007356.html');
												thumbnails[3007358] = new thumbnail(3007358,'185167','Tawny Owl','mwf13_thumb.JPG',130, 184,1,'																			photo_3007358.html');
												thumbnails[3007359] = new thumbnail(3007359,'185167','Goshawk','mwf14_thumb.JPG',130, 92,1,'																			photo_3007359.html');
												thumbnails[3007362] = new thumbnail(3007362,'185167','Short Eared Owl','mwf15_thumb.JPG',130, 184,1,'																			photo_3007362.html');
												thumbnails[3007363] = new thumbnail(3007363,'185167','Little Owl','mwf16_thumb.JPG',130, 184,1,'																			photo_3007363.html');
												thumbnails[3007364] = new thumbnail(3007364,'185167','Red Kite','mwf17_thumb.JPG',130, 184,1,'																			photo_3007364.html');
												thumbnails[3019100] = new thumbnail(3019100,'185165','','sclic72_thumb.JPG',130, 92,1,'																			photo_3019100.html');
												thumbnails[3265174] = new thumbnail(3265174,'143643','Robin','rbins05_thumb.JPG',130, 91,1,'																			photo_3265174.html');
												thumbnails[3383483] = new thumbnail(3383483,'143643','Blackbird (Female)','rbins09_thumb.JPG',130, 92,1,'																			photo_3383483.html');
												thumbnails[3407217] = new thumbnail(3407217,'185165','','new10_thumb.JPG',130, 92,1,'																			photo_3407217.html');
												thumbnails[3407223] = new thumbnail(3407223,'143644','Small White','new11_thumb.JPG',130, 92,1,'																			photo_3407223.html');
												thumbnails[3407226] = new thumbnail(3407226,'143644','Small White 2','new12_thumb.JPG',130, 92,1,'																			photo_3407226.html');
												thumbnails[3407228] = new thumbnail(3407228,'143644','Monarch','new13_thumb.JPG',130, 93,1,'																			photo_3407228.html');
												thumbnails[3407234] = new thumbnail(3407234,'208139','','new14_thumb.JPG',130, 89,1,'																			photo_3407234.html');
												thumbnails[3407236] = new thumbnail(3407236,'208139','','new15_thumb.JPG',130, 92,1,'																			photo_3407236.html');
												thumbnails[3407237] = new thumbnail(3407237,'208139','','new16_thumb.JPG',130, 87,1,'																			photo_3407237.html');
												thumbnails[3407239] = new thumbnail(3407239,'208139','','new17_thumb.JPG',130, 87,1,'																			photo_3407239.html');
												thumbnails[3407244] = new thumbnail(3407244,'208139','','new18_thumb.JPG',130, 87,1,'																			photo_3407244.html');
												thumbnails[3407253] = new thumbnail(3407253,'208139','','new19_thumb.JPG',130, 87,1,'																			photo_3407253.html');
												thumbnails[3407256] = new thumbnail(3407256,'208139','','new20_thumb.JPG',130, 87,1,'																			photo_3407256.html');
												thumbnails[3407258] = new thumbnail(3407258,'208139','','new21_thumb.JPG',130, 87,1,'																			photo_3407258.html');
												thumbnails[3407261] = new thumbnail(3407261,'208139','','new22_thumb.JPG',130, 87,1,'																			photo_3407261.html');
												thumbnails[3407263] = new thumbnail(3407263,'208139','','new23_thumb.JPG',130, 87,1,'																			photo_3407263.html');
												thumbnails[3407265] = new thumbnail(3407265,'208139','','new24_thumb.JPG',130, 87,1,'																			photo_3407265.html');
												thumbnails[3407267] = new thumbnail(3407267,'208139','','new25_thumb.JPG',130, 166,1,'																			photo_3407267.html');
												thumbnails[5461765] = new thumbnail(5461765,'143643','Blackcap','Balckcap2_thumb.JPG',130, 184,1,'																			photo_5461765.html');
												thumbnails[5461767] = new thumbnail(5461767,'143643','Blackbird in the snow','Blackbird_in_the_Snow_thumb.JPG',130, 184,1,'																			photo_5461767.html');
												thumbnails[5461769] = new thumbnail(5461769,'143643','Hen Blackbird','Hen_Blackbird_thumb.JPG',130, 92,1,'																			photo_5461769.html');
												thumbnails[5461771] = new thumbnail(5461771,'143643','Song Thrush','Song_Thrush_thumb.JPG',130, 92,1,'																			photo_5461771.html');
												thumbnails[6213239] = new thumbnail(6213239,'346330','','Skomer1_thumb.JPG',130, 92,1,'																			photo_6213239.html');
												thumbnails[6213240] = new thumbnail(6213240,'346330','','Skomer5_thumb.JPG',130, 92,1,'																			photo_6213240.html');
												thumbnails[6213241] = new thumbnail(6213241,'346330','','Skomer7_thumb.JPG',130, 92,1,'																			photo_6213241.html');
												thumbnails[6213242] = new thumbnail(6213242,'346330','','Skomer8_thumb.JPG',130, 92,1,'																			photo_6213242.html');
												thumbnails[6213243] = new thumbnail(6213243,'346330','','Skomer13_thumb.JPG',130, 92,1,'																			photo_6213243.html');
												thumbnails[6213244] = new thumbnail(6213244,'346330','','Skomer14_thumb.JPG',130, 184,1,'																			photo_6213244.html');
												thumbnails[6213245] = new thumbnail(6213245,'346330','','Skomer16_thumb.JPG',130, 92,1,'																			photo_6213245.html');
												thumbnails[6213246] = new thumbnail(6213246,'346330','','Skomer17_thumb.JPG',130, 92,1,'																			photo_6213246.html');
												thumbnails[6213247] = new thumbnail(6213247,'346330','','Skomer19_thumb.JPG',130, 184,1,'																			photo_6213247.html');
												thumbnails[6213248] = new thumbnail(6213248,'346330','','Skomer23_thumb.JPG',130, 92,1,'																			photo_6213248.html');
												thumbnails[6213249] = new thumbnail(6213249,'346330','','Skomer24_thumb.JPG',130, 92,1,'																			photo_6213249.html');
												thumbnails[6213250] = new thumbnail(6213250,'346330','','Skomer26_thumb.JPG',130, 184,1,'																			photo_6213250.html');
												thumbnails[6213251] = new thumbnail(6213251,'346330','','Skomer27_thumb.JPG',130, 184,1,'																			photo_6213251.html');
												thumbnails[6213252] = new thumbnail(6213252,'346330','','Skomer30_thumb.JPG',130, 92,1,'																			photo_6213252.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[185720] = new gallery(185720,'919792,384763,355903,353865','Steam Railways','gallery',[],0, 0, '', '																																																																																																							gallery_185720.html',0,0);
				  					galleries[272456] = new gallery(272456,'4756000,4754605,4285366,4285359,4284750,4170877,4170858,4118627,3747131,3609968','Wildfowl and Waders','gallery',[4754605,4756000,4170858,4170877,4284750,4285359,4285366,4118627,3609949,3747131,3609956,3609968,920112,2166890,2166891,2166894,2166897,2166898,2166900,2278382,2278383,2278386],0, 0, '248913', '																																																																																																							gallery_272456.html',0,0);
				  					galleries[248913] = new gallery(248913,'6052305,6052298,6052294,6052293,6052291,6052289,6052288,5884836,5884740,5702350','Wildlife Photographs','gallery',[],0, 0, '', '																																																																																																							gallery_248913.html',0,0);
				  					galleries[345667] = new gallery(345667,'6318168,6318166,6213238,6213237,6213236,6191514,6191513,6191512,6191511,6191509','Recent Photographs','gallery',[6213236,6213237,6213238,6318166,6318168,6191509,6191511,6191512,6191513,6191514,6191507,6191503,6191506],0, 0, '', '																																																																																																							gallery_345667.html',0,0);
				  					galleries[31206] = new gallery(31206,'384763','People and Trains','gallery',[384749,384755,384759,384763,384764,384765,945279],0, 0, '185720', '																																																																																																							gallery_31206.html',0,0);
				  					galleries[30689] = new gallery(30689,'355903','Gloucestershire Warwickshire Railway','gallery',[376724,365949,376728,376730,376720,355906,376722,376726,376731,376732,355887,355903,355904,376727,919789,1878640,1878649,2278388,2278392,2336965],0, 0, '185720', '																																																																																																							gallery_30689.html',0,0);
				  					galleries[29192] = new gallery(29192,'2166879,383298,376737,376735,376734,365948,355912,355911,355910,353878','Main Line Workings and Named Trains','gallery',[365948,376737,353878,376734,376735,355910,355911,383298,355912,2166879],0, 0, '185720', '																																																																																																							gallery_29192.html',0,0);
				  					galleries[29230] = new gallery(29230,'919792,353865','Other Heritage Railways','gallery',[4803100,4803113,4756016,3747123,353865,353869,353871,353876,910855,919792,2166876],0, 0, '185720', '																																																																																																							gallery_29230.html',0,0);
				  					galleries[346330] = new gallery(346330,'6213252,6213251,6213250,6213249,6213248,6213247,6213246,6213245,6213244,6213243','Skomer Puffins','gallery',[6213239,6213240,6213241,6213242,6213243,6213244,6213245,6213246,6213247,6213248,6213249,6213250,6213251,6213252],0, 0, '', '																																																																																																							gallery_346330.html',0,0);
				  					galleries[143643] = new gallery(143643,'6052305,5702350,5698873,5698863,5461771,5461769,5461767,5461765,4803130,4755993','Woodland Birds','gallery',[6052305,5702350,5698863,5698873,4754611,4754639,4755993,4803130,4170819,4170891,3934984,3609977,3609993,920113,2166885,2166887,2166888,2166892,2166924,2166925,2453414,2698997,3265174,3383483,5461765,5461767,5461769,5461771],0, 0, '248913', '																																																																																																							gallery_143643.html',0,0);
				  					galleries[143644] = new gallery(143644,'6052298,6052294,6052293,6052291,6052289,6052288,4754653,4754602,4607443,4607440','Butterflies','gallery',[6052288,6052289,6052291,6052293,6052294,6052298,4754653,4754602,4543219,4543226,4543243,4607440,4607443,4284743,1878715,1878716,1878718,1878721,2453404,3407223,3407226,3407228],0, 0, '248913', '																																																																																																							gallery_143644.html',0,0);
				  					galleries[208139] = new gallery(208139,'3407267,3407265,3407263,3407261,3407258,3407256,3407253,3407244,3407239,3407237','Tropical Butterflies','gallery',[3407234,3407236,3407237,3407239,3407244,3407253,3407256,3407258,3407261,3407263,3407265,3407267],0, 0, '', '																																																																																																							gallery_208139.html',0,0);
				  					galleries[185165] = new gallery(185165,'4803117,3407217,3019100,2756194,2756190,2336953,2278381,2278380','Dragonflies and Damselflies','gallery',[4803117,2278380,2278381,2336953,2756190,2756194,3019100,3407217],0, 0, '248913', '																																																																																																							gallery_185165.html',0,0);
				  					galleries[185167] = new gallery(185167,'5884836,5884740,4118635,4118629,3610002,3007364,3007363,3007362,3007359,3007358','Birds of Prey','gallery',[5884740,5884836,4118635,4118629,3610002,920110,920111,1878714,2166881,3007356,3007358,3007359,3007362,3007363,3007364],0, 0, '248913', '																																																																																																							gallery_185167.html',0,0);
				  					galleries[185168] = new gallery(185168,'920119,920118,920117,920116,920115','Wild Flowers','gallery',[920115,920116,920117,920118,920119],0, 0, '', '																																																																																																							gallery_185168.html',0,0);
				  					galleries[248923] = new gallery(248923,'3747144','Buildings and Interiors','gallery',[3747144],0, 0, '', '																																																																																																							gallery_248923.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[232223] = '4118629,3747144,3019100,1878716,1878640';
imageSets[1] = '3407228,3265174,1878716,1878640,920116,920110,378707,376732';
imageSets[2] = '919792,384763,355903,353865';
imageSets[3] = '6318168,6318166,6213252,6213251,6213250,6213249,6213248,6213247,6213246,6213245,6213244,6213243,6213242,6213241,6213240,6213239,6213238,6213237,6213236,6191514,6191513,6191512,6191511,6191509,6191507,6191506,6191503,6052305,6052298,6052294,6052293,6052291,6052289,6052288,5886358,5884836,5884740,5702350,5698873,5698863,5461771,5461769,5461767,5461765,4803130,4803117,4803113,4803100,4756016,4756000';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/davewasdell/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/davewasdell/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 = 'Dave Wasdell 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>';
	}
					
	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="DAVEWASDELL">';
		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;
	}
}

		

