window.thumbnails = new Object();
												thumbnails[2512553] = new thumbnail(2512553,'180902','63395 No1','GNT 63395No1_thumb.jpg',130, 194,32,'photo_2512553.html');
												thumbnails[2512556] = new thumbnail(2512556,'180902','63395 No2','GNT63395No2_thumb.jpg',130, 87,32,'photo_2512556.html');
												thumbnails[2512560] = new thumbnail(2512560,'161068','Scottish Glen No1','GNT GLENNo1_thumb.jpg',130, 87,32,'photo_2512560.html');
												thumbnails[2512572] = new thumbnail(2512572,'161061','Pink Reflection','Pink-Reflection-(GNT)_thumb.jpg',130, 101,32,'photo_2512572.html');
												thumbnails[2512598] = new thumbnail(2512598,'161061','Autumn Berries','Autumn-Berries-(GNT)_thumb.jpg',130, 86,32,'photo_2512598.html');
												thumbnails[2512619] = new thumbnail(2512619,'161067','Arnside Sunset','GNT ArnsideSunset_thumb.jpg',130, 87,32,'photo_2512619.html');
												thumbnails[2512622] = new thumbnail(2512622,'161061','Autumn Glow','Autumn-Glow-(GNT)_thumb.jpg',130, 87,32,'photo_2512622.html');
												thumbnails[2512623] = new thumbnail(2512623,'161068',' Scottish Glen No2','GNT GLEN  No2_thumb.jpg',130, 87,32,'photo_2512623.html');
												thumbnails[2512631] = new thumbnail(2512631,'161061','Autumn Glow 2','Autumn-Glow-2-(GNT)_thumb.jpg',130, 87,32,'photo_2512631.html');
												thumbnails[2512634] = new thumbnail(2512634,'161069','Babes in the Wood','GNT--Beningbrough-Hall-124_thumb.jpg',130, 110,32,'photo_2512634.html');
												thumbnails[2512643] = new thumbnail(2512643,'161070','Male Blackcap','GNT-Blackcap_thumb.jpg',130, 217,32,'photo_2512643.html');
												thumbnails[2512644] = new thumbnail(2512644,'161061','Bearded Iris','Bearded-Iris-(GNT)_thumb.jpg',130, 100,32,'photo_2512644.html');
												thumbnails[2512649] = new thumbnail(2512649,'161970','Helmsley Castle','GNT Helmsley-Castle-_thumb.jpg',130, 87,32,'photo_2512649.html');
												thumbnails[2512650] = new thumbnail(2512650,'161061','Catkins','Catkins-(GNT)_thumb.jpg',130, 83,32,'photo_2512650.html');
												thumbnails[2512658] = new thumbnail(2512658,'161061','Christmas Cacti','Christmas-Cacti-(GNT)_thumb.jpg',130, 91,32,'photo_2512658.html');
												thumbnails[2512659] = new thumbnail(2512659,'161970','Knaresbrough','GNT-Knaresbrough-_thumb.jpg',130, 87,32,'photo_2512659.html');
												thumbnails[2512745] = new thumbnail(2512745,'180902','Coming Through','Coming-Through-(GNT)_thumb.jpg',130, 176,32,'photo_2512745.html');
												thumbnails[2512749] = new thumbnail(2512749,'180902','Sunrise','LNER-sunrise-_thumb.jpg',130, 97,32,'photo_2512749.html');
												thumbnails[2512772] = new thumbnail(2512772,'161070','Red Eye','GNT-RED-EYE_thumb.jpg',130, 87,32,'photo_2512772.html');
												thumbnails[2512781] = new thumbnail(2512781,'161070','Red Deer Stag','Deer-Stag-(GNT)_thumb.jpg',130, 195,32,'photo_2512781.html');
												thumbnails[2512795] = new thumbnail(2512795,'161060','Ribblehead Viaduct','GNT-ribblehead viaduct _thumb.jpg',130, 62,32,'photo_2512795.html');
												thumbnails[2512840] = new thumbnail(2512840,'161060','34067 Scarborough Spa Express','34067-Scarbough-Spa-Express-(GNT)_thumb.jpg',130, 87,32,'photo_2512840.html');
												thumbnails[2512842] = new thumbnail(2512842,'180902','Sir Nigel Gresley No1','GNT-Sir-Nigel-Greasley-No1-_thumb.jpg',130, 87,32,'photo_2512842.html');
												thumbnails[2512862] = new thumbnail(2512862,'180902','Sir Nigel Gresley No2','GNT-Sir-Nigel-Gresley-No2_thumb.jpg',130, 195,32,'photo_2512862.html');
												thumbnails[2517118] = new thumbnail(2517118,'180902','Union Of South Africa No2','-Union-of-South-Africa-2_thumb.jpg',130, 195,32,'photo_2517118.html');
												thumbnails[2517136] = new thumbnail(2517136,'180902','Union Of South Africa No1','UnionofSouthAfricaNo1 _thumb.jpg',130, 195,32,'photo_2517136.html');
												thumbnails[2517143] = new thumbnail(2517143,'161060','Rood Ashton Hall','RoodAshtonHall_thumb.jpg',130, 87,32,'photo_2517143.html');
												thumbnails[2517155] = new thumbnail(2517155,'161060','Tangmere late evening','Tangmere_thumb.jpg',130, 103,32,'photo_2517155.html');
												thumbnails[2517159] = new thumbnail(2517159,'161076','On the Sea Shore','GNT RUSTYTUBE_thumb.jpg',130, 93,32,'photo_2517159.html');
												thumbnails[2517162] = new thumbnail(2517162,'180907','We\'ll Meet Again','GNT We\'llMeetAgain_thumb.jpg',130, 173,32,'photo_2517162.html');
												thumbnails[2517168] = new thumbnail(2517168,'161060','The Duchess of Sutherland ','TheDuchessofSutherland_thumb.jpg',130, 87,32,'photo_2517168.html');
												thumbnails[2517187] = new thumbnail(2517187,'161067','Sunset from Brimham Rocks','GNT-Sunset-from-Brimham-Roc_thumb.jpg',130, 87,32,'photo_2517187.html');
												thumbnails[2517191] = new thumbnail(2517191,'161061','Woodland Walk','GNT-woodland-walk_thumb.jpg',130, 87,32,'photo_2517191.html');
												thumbnails[2517225] = new thumbnail(2517225,'174546','Autumn Reflection','GNT autumreflectio_thumb.jpg',130, 98,32,'photo_2517225.html');
												thumbnails[2518583] = new thumbnail(2518583,'161070','Puffin No2','gnt-Puffin-2_thumb.jpg',130, 130,32,'photo_2518583.html');
												thumbnails[2524650] = new thumbnail(2524650,'161060','34607 Tangmere at Kirk Hammerton','34607-Scarbough-Spa-Express--at-Night-(GNT)_thumb.jpg',130, 87,32,'photo_2524650.html');
												thumbnails[2524658] = new thumbnail(2524658,'180902','60009 On Shed at Grosmont 1','60009-on-Shed-Grosmont--1-(GNT)_thumb.jpg',130, 86,32,'photo_2524658.html');
												thumbnails[2524662] = new thumbnail(2524662,'180902','60009 On Shed at Grosmont 2','60009-on-Shed-Grostmont-2-(GNT)_thumb.jpg',130, 95,32,'photo_2524662.html');
												thumbnails[2524677] = new thumbnail(2524677,'161060','60019 The Bittern Heading to York','60019-The-Bittern-Heading-to-York-(GNT)_thumb.jpg',130, 87,32,'photo_2524677.html');
												thumbnails[2524695] = new thumbnail(2524695,'161060','71000 The Duke Heading to York','71000-The-Duke-Heading-to-York-1_thumb.jpg',130, 87,32,'photo_2524695.html');
												thumbnails[2524706] = new thumbnail(2524706,'161060','71000 The Duke Heading to York 2','71000-The-Duke-of-Gloucester--2-(GNT)_thumb.jpg',130, 87,32,'photo_2524706.html');
												thumbnails[2524743] = new thumbnail(2524743,'180902','A4\'s X 2','A4\'s-X-2-(GNT)_thumb.jpg',130, 130,32,'photo_2524743.html');
												thumbnails[2524774] = new thumbnail(2524774,'180902','A4\'s X 2 mono','A4\'s-X-2-Mono-(GNT)_thumb.jpg',130, 140,32,'photo_2524774.html');
												thumbnails[2524822] = new thumbnail(2524822,'180902','Last Run of 4771 Green Arrow','Last-run-of-Green-Arrow-(GNT)_thumb.jpg',130, 74,32,'photo_2524822.html');
												thumbnails[2524905] = new thumbnail(2524905,'161060','Steam Loco 48151 At Colton Junction','Steam-Loco-48151-at-Colton-Juntion-(GNT)_thumb.jpg',130, 76,32,'photo_2524905.html');
												thumbnails[2524916] = new thumbnail(2524916,'161061','Flower Close up','Flower-Close-Up-(GNT)_thumb.jpg',130, 87,32,'photo_2524916.html');
												thumbnails[2524924] = new thumbnail(2524924,'161061','Flower Portrait','Flower-Portrait-(GNT)_thumb.jpg',130, 175,32,'photo_2524924.html');
												thumbnails[2524939] = new thumbnail(2524939,'161061','Golden Trumpet','Golden-Trumpet-(GNT)_thumb.jpg',130, 87,32,'photo_2524939.html');
												thumbnails[2524946] = new thumbnail(2524946,'161061','Horse Chestnut in Spring','Horse-Chestnut-in-Spring-(GNT)_thumb.jpg',130, 100,32,'photo_2524946.html');
												thumbnails[2524981] = new thumbnail(2524981,'161061','Hover Fly on Flower','Hover-Fly-on-Flower-(GNT)_thumb.jpg',130, 98,32,'photo_2524981.html');
												thumbnails[2524998] = new thumbnail(2524998,'161061','Lilac Flower on Black','Lilac-Flower-on-Black-(GNT)_thumb.jpg',130, 87,32,'photo_2524998.html');
												thumbnails[2525031] = new thumbnail(2525031,'161061','New Growth','New-Growth-(GNT)_thumb.jpg',130, 189,32,'photo_2525031.html');
												thumbnails[2525043] = new thumbnail(2525043,'161061','Pink Macro Flower','Pink-Marco-Flower-(GNT)_thumb.jpg',130, 87,32,'photo_2525043.html');
												thumbnails[2525062] = new thumbnail(2525062,'161061','Purple Iris','Purple-Iris-(GNT)_thumb.jpg',130, 196,32,'photo_2525062.html');
												thumbnails[2525067] = new thumbnail(2525067,'161061','Red Flower Mirror Image','Red-Flower-Mirror-Image-(GNT)_thumb.jpg',130, 96,32,'photo_2525067.html');
												thumbnails[2525072] = new thumbnail(2525072,'161061','Red Flower on Black','Red-Flower-on-Black-(GNT)_thumb.jpg',130, 96,32,'photo_2525072.html');
												thumbnails[2525084] = new thumbnail(2525084,'161061','Water Droplets on Rose','Water-Droplets-on-Rose-(GNT)_thumb.jpg',130, 156,32,'photo_2525084.html');
												thumbnails[2525095] = new thumbnail(2525095,'161061','White Star Flower','White-Star-Flower-(GNT)_thumb.jpg',130, 188,32,'photo_2525095.html');
												thumbnails[2525099] = new thumbnail(2525099,'161061','Yellow Flag Iris','Yellow-Flag-Iris-(GNT)_thumb.jpg',130, 184,32,'photo_2525099.html');
												thumbnails[2525105] = new thumbnail(2525105,'161070','Mum in Waiting','Mum-in-Waiting-(GNT)_thumb.jpg',130, 87,32,'photo_2525105.html');
												thumbnails[2525111] = new thumbnail(2525111,'161070','Robin','Robin-(GNT)_thumb.jpg',130, 108,32,'photo_2525111.html');
												thumbnails[2525114] = new thumbnail(2525114,'161070','Wigeon Male','Wigeon-Male-(GNT)_thumb.jpg',130, 69,32,'photo_2525114.html');
												thumbnails[2525223] = new thumbnail(2525223,'161067','Sunset at Arnside 1','Sunset-at-Arnside-1_thumb.jpg',130, 67,32,'photo_2525223.html');
												thumbnails[2525230] = new thumbnail(2525230,'161067','Sunset at Arnside 2','Sunset-at-Arnside-2-(GNT)_thumb.jpg',130, 87,32,'photo_2525230.html');
												thumbnails[2525234] = new thumbnail(2525234,'161067','Sunset Firth of Forth','Sunset-Firth-of-Forth-(GNT)_thumb.jpg',130, 68,32,'photo_2525234.html');
												thumbnails[2526244] = new thumbnail(2526244,'161767','Red Button','Red-Button_thumb.jpg',130, 195,32,'photo_2526244.html');
												thumbnails[2528238] = new thumbnail(2528238,'180907','No2 40S Weekend NYMR','GNT40s-Weekend-2007-005_thumb.jpg',130, 85,32,'photo_2528238.html');
												thumbnails[2528245] = new thumbnail(2528245,'180907','No3 40s Weekend NYMR','GNT40s-Weekend-2007-332_edi_thumb.jpg',130, 134,32,'photo_2528245.html');
												thumbnails[2528591] = new thumbnail(2528591,'161070','Red Deer Stag No2','Red-deer-stag No-2--_thumb.jpg',130, 87,32,'photo_2528591.html');
												thumbnails[2528734] = new thumbnail(2528734,'161970','Double Image','Double-Image-(GNT)_thumb.jpg',130, 87,32,'photo_2528734.html');
												thumbnails[2528818] = new thumbnail(2528818,'161069','Fisherman','GNT-fishermanatwork_edited_thumb.jpg',130, 184,32,'photo_2528818.html');
												thumbnails[2528838] = new thumbnail(2528838,'161970','Forth Rail Bridge that spans the Firth of Forth taken at Night','Forth-rail-bridge-at-night-(GNT)_thumb.jpg',130, 82,32,'photo_2528838.html');
												thumbnails[2528910] = new thumbnail(2528910,'161991','Edinburgh at Night','Edinburgh-at-Night-(GNT)_thumb.jpg',130, 70,32,'photo_2528910.html');
												thumbnails[2528920] = new thumbnail(2528920,'161991','Edinburgh Ice Rink','Edinburgh-Ice-Rink-(GNT)_thumb.jpg',130, 87,32,'photo_2528920.html');
												thumbnails[2528983] = new thumbnail(2528983,'161068','Derwentwater & Cat Bells','Derwentwater-&-Cat-Bells-(GNT)_thumb.jpg',130, 76,32,'photo_2528983.html');
												thumbnails[2528995] = new thumbnail(2528995,'161068','Lake Windermere','Lake-Windermere-(GNT)_thumb.jpg',130, 78,32,'photo_2528995.html');
												thumbnails[2529051] = new thumbnail(2529051,'174546','Lake Reflection','Lake-Reflection-(GNT)_thumb.jpg',130, 80,32,'photo_2529051.html');
												thumbnails[2529058] = new thumbnail(2529058,'161068','Larger Than Life','Larger-Than-Life-(GNT)_thumb.jpg',130, 68,32,'photo_2529058.html');
												thumbnails[2529084] = new thumbnail(2529084,'161068','Red Phone Box','Red-Phone-Box-(GNT)_thumb.jpg',130, 74,32,'photo_2529084.html');
												thumbnails[2529143] = new thumbnail(2529143,'161068','Valley of the Seven Bridges','Valley-of-the-Seven-Bridges-(GNT)_thumb.jpg',130, 80,32,'photo_2529143.html');
												thumbnails[2529171] = new thumbnail(2529171,'161068','Woodland Glade','Wooded-Glade-(GNT)_thumb.jpg',130, 87,32,'photo_2529171.html');
												thumbnails[2529250] = new thumbnail(2529250,'161997','Lendal Bridge York at Night','Lendal-Bridge-York-at-Night-(GNT)_thumb.jpg',130, 85,32,'photo_2529250.html');
												thumbnails[2529273] = new thumbnail(2529273,'161991','Whitby at Night 1','Whitby-by-Night-1-(GNT)_thumb.jpg',130, 87,32,'photo_2529273.html');
												thumbnails[2529326] = new thumbnail(2529326,'161991','Whitby at Night 2','Whitby-by-Night-2-(GNT)_thumb.jpg',130, 86,32,'photo_2529326.html');
												thumbnails[2529344] = new thumbnail(2529344,'161991','Whitby Steps at Night 1','Whitby-Steps-at-Night-1-(GNT)_thumb.jpg',130, 195,32,'photo_2529344.html');
												thumbnails[2529355] = new thumbnail(2529355,'161991','Whitby Steps at Night 2','Whitby-steps at-Night-2-(GNT)2_thumb.jpg',130, 84,32,'photo_2529355.html');
												thumbnails[2531935] = new thumbnail(2531935,'161070','Portrait','Shag-119_thumb.jpg',130, 87,32,'photo_2531935.html');
												thumbnails[2580973] = new thumbnail(2580973,'165809','Floods','GNT Floods-26-06-20_thumb.jpg',130, 85,32,'photo_2580973.html');
												thumbnails[2582062] = new thumbnail(2582062,'161068','Lindisfarne Castle','Lindisfarne_Castle_thumb.jpg',130, 204,32,'photo_2582062.html');
												thumbnails[2582121] = new thumbnail(2582121,'161070','Puffin in Flight','puffin-in-flight_thumb.jpg',130, 80,32,'photo_2582121.html');
												thumbnails[2582125] = new thumbnail(2582125,'161061','Carnation','Carnation_thumb.jpg',130, 195,32,'photo_2582125.html');
												thumbnails[2582145] = new thumbnail(2582145,'180902','825 Southern','825_Southern_thumb.jpg',130, 195,32,'photo_2582145.html');
												thumbnails[2591029] = new thumbnail(2591029,'161767','Blue & Yellow','Blue-&-Yellow_thumb.jpg',130, 87,32,'photo_2591029.html');
												thumbnails[2591032] = new thumbnail(2591032,'161767','Flaky Thistle','Flakey-Thistle_thumb.jpg',130, 195,32,'photo_2591032.html');
												thumbnails[2591039] = new thumbnail(2591039,'161069','Engine Driver','Engine-Driver_thumb.jpg',130, 87,32,'photo_2591039.html');
												thumbnails[2591043] = new thumbnail(2591043,'161069','Carla Portrait 1','Portrait-of-Carla-1_thumb.jpg',130, 195,32,'photo_2591043.html');
												thumbnails[2591045] = new thumbnail(2591045,'161069','Carla Portrait 2','Portrait-of-Carla-2_thumb.jpg',130, 126,32,'photo_2591045.html');
												thumbnails[2591046] = new thumbnail(2591046,'161069','Carla Portrait 3','Portrait-of-Carla-3_thumb.jpg',130, 123,32,'photo_2591046.html');
												thumbnails[2591049] = new thumbnail(2591049,'161997','Shambles at Night ','Shambles-at-Night_thumb.jpg',130, 87,32,'photo_2591049.html');
												thumbnails[2596183] = new thumbnail(2596183,'180899','Out of the Steam','GNTsite40s-Weekend--eddited_thumb.jpg',130, 195,32,'photo_2596183.html');
												thumbnails[2596184] = new thumbnail(2596184,'161997','Lone Canonist','Loan-Canonist-jpg_thumb.jpg',130, 50,32,'photo_2596184.html');
												thumbnails[2596192] = new thumbnail(2596192,'161061','Carnation in Mono','Carnation_Mono_thumb.jpg',130, 185,32,'photo_2596192.html');
												thumbnails[2596196] = new thumbnail(2596196,'161061','Flower mono','Flower_Mono_1_thumb.jpg',130, 185,32,'photo_2596196.html');
												thumbnails[2597176] = new thumbnail(2597176,'161061','Sea of Blue Flowers','Sea_of_Blue_Flowers_thumb.jpg',130, 195,32,'photo_2597176.html');
												thumbnails[2597178] = new thumbnail(2597178,'161068','Lindisfarne Castle 2','Lindersfarne-Castle-2--079_thumb.jpg',130, 195,32,'photo_2597178.html');
												thumbnails[2597183] = new thumbnail(2597183,'161068','Lindisfarne Castle No 3','Lindersfarne-Castle-3-2008-_thumb.jpg',130, 87,32,'photo_2597183.html');
												thumbnails[2616499] = new thumbnail(2616499,'180899','Driver NYMR','Driver-NYMR_thumb.jpg',130, 195,32,'photo_2616499.html');
												thumbnails[2616535] = new thumbnail(2616535,'180899','Driver NYMR 2','Driver-NYMR-2_thumb.jpg',130, 195,32,'photo_2616535.html');
												thumbnails[2631908] = new thumbnail(2631908,'161060','Oliver Cromwell 1','70013-Oliver-Cromwell-1_thumb.jpg',130, 72,32,'photo_2631908.html');
												thumbnails[2631915] = new thumbnail(2631915,'161060','Oliver Cromwell 2','70013-Oliver-Cromwell-2_thumb.jpg',130, 74,32,'photo_2631915.html');
												thumbnails[2632777] = new thumbnail(2632777,'161061','Flower Mono 2 ','Flower-Mono_thumb.jpg',130, 185,32,'photo_2632777.html');
												thumbnails[2645950] = new thumbnail(2645950,'180902','In Dock','Sir-Nigel-Gresley-60007_thumb.jpg',130, 97,32,'photo_2645950.html');
												thumbnails[2699345] = new thumbnail(2699345,'161061','Window Light','Window-Light-gnt_thumb.jpg',130, 195,32,'photo_2699345.html');
												thumbnails[2699360] = new thumbnail(2699360,'161061','Window Light 2','Window-Light-2-gnt_thumb.jpg',130, 195,32,'photo_2699360.html');
												thumbnails[2708374] = new thumbnail(2708374,'161970','Church Window No1','GNT-Church-Window-No1_thumb.jpg',130, 217,32,'photo_2708374.html');
												thumbnails[2708375] = new thumbnail(2708375,'161970','Church Window No2','GNT-Church-window-No2_thumb.jpg',130, 161,32,'photo_2708375.html');
												thumbnails[2713284] = new thumbnail(2713284,'165809','Stanley Steam Car','GNT-Stanley-Steam-Car_thumb.jpg',130, 91,32,'photo_2713284.html');
												thumbnails[2730440] = new thumbnail(2730440,'161068','Whitby South Pier','GNT-Whitby-South-Pier_thumb.jpg',130, 85,32,'photo_2730440.html');
												thumbnails[2731887] = new thumbnail(2731887,'161061','Water Lily Refection','Water-Lily-Refelction_thumb.jpg',130, 73,32,'photo_2731887.html');
												thumbnails[2753849] = new thumbnail(2753849,'161997','Minster View','Minster-View-gnt_thumb.jpg',130, 102,32,'photo_2753849.html');
												thumbnails[2775801] = new thumbnail(2775801,'161061','Fallen Tree','GNT-Fallen-Tree_thumb.jpg',130, 87,32,'photo_2775801.html');
												thumbnails[2775802] = new thumbnail(2775802,'161061','Fungus on Log ','Fungus-on-Log_thumb.jpg',130, 79,32,'photo_2775802.html');
												thumbnails[2788049] = new thumbnail(2788049,'174546','Fountains Abbey Sunset','gnt-Fountains-Abbey-102_edi_thumb.jpg',130, 85,32,'photo_2788049.html');
												thumbnails[2788217] = new thumbnail(2788217,'174546','Fountains Abbey No2','gnt-Fountains-Abbey-0311_thumb.jpg',130, 87,32,'photo_2788217.html');
												thumbnails[2788225] = new thumbnail(2788225,'174546','Fountains Abbey No3','gnt-Fountains-Abbey-1601_thumb.jpg',130, 195,32,'photo_2788225.html');
												thumbnails[2788228] = new thumbnail(2788228,'174546','Cellarium Fountains Abbey','Cellarium-Foutains-Abbey-gnt1_thumb.jpg',130, 84,32,'photo_2788228.html');
												thumbnails[2788233] = new thumbnail(2788233,'174546','South Aisle of the Church','South-Aisle-of-the-Church-gnt1_thumb.jpg',130, 219,32,'photo_2788233.html');
												thumbnails[2838633] = new thumbnail(2838633,'176849','CCB001','CCB001W_thumb.jpg',130, 93,32,'photo_2838633.html');
												thumbnails[2841658] = new thumbnail(2841658,'176849','CCB002','CCBOO2W_thumb.jpg',130, 71,32,'photo_2841658.html');
												thumbnails[2841667] = new thumbnail(2841667,'176849','CCB003','CCB003W_thumb.jpg',130, 87,32,'photo_2841667.html');
												thumbnails[2841668] = new thumbnail(2841668,'176849','CCB004','CCB004W_thumb.jpg',130, 87,32,'photo_2841668.html');
												thumbnails[2841671] = new thumbnail(2841671,'176849','CCB005','CCB005W_thumb.jpg',130, 87,32,'photo_2841671.html');
												thumbnails[2841672] = new thumbnail(2841672,'176849','CCB006','CCB006W_thumb.jpg',130, 92,32,'photo_2841672.html');
												thumbnails[2841722] = new thumbnail(2841722,'176849','CCB007','CCB007W_thumb.jpg',130, 87,32,'photo_2841722.html');
												thumbnails[2841821] = new thumbnail(2841821,'176849','CCB008','CCB008W_thumb.jpg',130, 105,32,'photo_2841821.html');
												thumbnails[2841869] = new thumbnail(2841869,'176849','CCB009','CCB009W_thumb.jpg',130, 155,32,'photo_2841869.html');
												thumbnails[2841876] = new thumbnail(2841876,'176849','CCMC001','CCMC001W_thumb.jpg',130, 93,32,'photo_2841876.html');
												thumbnails[2841976] = new thumbnail(2841976,'176849','CCMC001','CCMCOO2W_thumb.jpg',130, 93,32,'photo_2841976.html');
												thumbnails[2841979] = new thumbnail(2841979,'176849','CCMC003','CCMC003W_thumb.jpg',130, 93,32,'photo_2841979.html');
												thumbnails[2841980] = new thumbnail(2841980,'176849','CCMC004','CCMC004W_thumb.jpg',130, 93,32,'photo_2841980.html');
												thumbnails[2841984] = new thumbnail(2841984,'176849','CCMC006','CCMC006W_thumb.jpg',130, 92,32,'photo_2841984.html');
												thumbnails[2841986] = new thumbnail(2841986,'176849','CCMC007','CCMC007W_thumb.jpg',130, 93,32,'photo_2841986.html');
												thumbnails[2841987] = new thumbnail(2841987,'176849','CCMC008','CCMC008W_thumb.jpg',130, 91,32,'photo_2841987.html');
												thumbnails[2842001] = new thumbnail(2842001,'176849','CCMC009','CCMC009W_thumb.jpg',130, 182,32,'photo_2842001.html');
												thumbnails[2937688] = new thumbnail(2937688,'181554','RAF','gntwar-weekend-NYMR-2008-08_thumb.jpg',130, 195,32,'photo_2937688.html');
												thumbnails[2937728] = new thumbnail(2937728,'181554','Look at That','gntwar-weekend-NYMR-2008-03_thumb.jpg',130, 88,32,'photo_2937728.html');
												thumbnails[2951571] = new thumbnail(2951571,'180902','9.30 to Pickering','9_thumb.30-To-Pickering-GNT.jpg',130, 184,32,'photo_2951571.html');
												thumbnails[3097108] = new thumbnail(3097108,'189861','Number 1','gnt-1-White-Water--Nov-2008_thumb.jpg',130, 87,32,'photo_3097108.html');
												thumbnails[3097116] = new thumbnail(3097116,'189861','Number 2','gnt-2-White-Water--Nov-2008_thumb.jpg',130, 87,32,'photo_3097116.html');
												thumbnails[3097151] = new thumbnail(3097151,'189861','Number 3','gnt-3-White-Water--Nov-2008_thumb.jpg',130, 87,32,'photo_3097151.html');
												thumbnails[3097155] = new thumbnail(3097155,'189861','Number 4','gnt-4-White-Water--Nov-2008_thumb.jpg',130, 87,32,'photo_3097155.html');
												thumbnails[3097162] = new thumbnail(3097162,'189861','Number 5','gnt-5-White-Water--Nov-2008_thumb.jpg',130, 87,32,'photo_3097162.html');
												thumbnails[3097165] = new thumbnail(3097165,'189861','Number 6','gnt-6-White-Water--Nov-2008_thumb.jpg',130, 87,32,'photo_3097165.html');
												thumbnails[3097166] = new thumbnail(3097166,'189861','Number 7','gnt-7-White-Water--Nov-2008_thumb.jpg',130, 87,32,'photo_3097166.html');
												thumbnails[3097258] = new thumbnail(3097258,'189861','Number 8','gnt-8-White-Water--Nov-2008_thumb.jpg',130, 87,32,'photo_3097258.html');
												thumbnails[3097262] = new thumbnail(3097262,'189861','Number 9','gnt-9-White-Water--Nov-2008_thumb.jpg',130, 87,32,'photo_3097262.html');
												thumbnails[3097265] = new thumbnail(3097265,'189861','Number 10','gnt-10-White-Water--Nov-200_thumb.jpg',130, 195,32,'photo_3097265.html');
												thumbnails[3097308] = new thumbnail(3097308,'189861','Number 11','gnt-11-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3097308.html');
												thumbnails[3097311] = new thumbnail(3097311,'189861','Number 12','gnt-12-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3097311.html');
												thumbnails[3097316] = new thumbnail(3097316,'189861','Number 13','gnt-13-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3097316.html');
												thumbnails[3097319] = new thumbnail(3097319,'189861','Number 14','gnt-14-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3097319.html');
												thumbnails[3114623] = new thumbnail(3114623,'189861','No 15','gnt-15-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3114623.html');
												thumbnails[3114625] = new thumbnail(3114625,'189861','No 16','gnt-16-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3114625.html');
												thumbnails[3114627] = new thumbnail(3114627,'189861','No 17','gnt-17-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3114627.html');
												thumbnails[3114632] = new thumbnail(3114632,'189861','No18','gnt-18-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3114632.html');
												thumbnails[3114633] = new thumbnail(3114633,'189861','No 19','gnt-19-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3114633.html');
												thumbnails[3114634] = new thumbnail(3114634,'189861','No 20','gnt-20-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3114634.html');
												thumbnails[3114637] = new thumbnail(3114637,'189861','No 21','gnt-21-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3114637.html');
												thumbnails[3126737] = new thumbnail(3126737,'189861','No 22','gnt-22-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3126737.html');
												thumbnails[3126739] = new thumbnail(3126739,'189861','No 23','gnt-23-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3126739.html');
												thumbnails[3126742] = new thumbnail(3126742,'189861','No 24','gnt-24-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3126742.html');
												thumbnails[3132284] = new thumbnail(3132284,'180902','Winter No 3','gnt-825-23-Nov-08-140_thumb.jpg',130, 87,32,'photo_3132284.html');
												thumbnails[3132285] = new thumbnail(3132285,'180902','Winter No1','gnt-825--23-Nov-08-101_thumb.jpg',130, 83,32,'photo_3132285.html');
												thumbnails[3132286] = new thumbnail(3132286,'180902','Winter No 2','gnt-825-Levisham-NYMR-23-No_thumb.jpg',130, 83,32,'photo_3132286.html');
												thumbnails[3134024] = new thumbnail(3134024,'180902','4771 Green Arrows Last Run','GNT-4771-Green-Arrows-Last-Run_thumb.jpg',130, 109,32,'photo_3134024.html');
												thumbnails[3148121] = new thumbnail(3148121,'189861','No 25','gnt-25-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3148121.html');
												thumbnails[3148122] = new thumbnail(3148122,'189861','No 26','gnt-26-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3148122.html');
												thumbnails[3148124] = new thumbnail(3148124,'189861','No 27','gnt-27-White-Water--Nov-200_thumb.jpg',130, 112,32,'photo_3148124.html');
												thumbnails[3148127] = new thumbnail(3148127,'189861','No 28','gnt-28-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3148127.html');
												thumbnails[3148128] = new thumbnail(3148128,'189861','No 29','gnt-29-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3148128.html');
												thumbnails[3148131] = new thumbnail(3148131,'189861','No 30','gnt 30 White-Water--Nov-2008-187_thumb.jpg',130, 87,32,'photo_3148131.html');
												thumbnails[3151084] = new thumbnail(3151084,'189861','No 31','gnt-31White-Water--Nov-2008_thumb.jpg',130, 87,32,'photo_3151084.html');
												thumbnails[3151085] = new thumbnail(3151085,'189861','No 32','gnt-32White-Water--Nov-2008_thumb.jpg',130, 87,32,'photo_3151085.html');
												thumbnails[3151086] = new thumbnail(3151086,'189861','No 33','gnt-33White-Water--Nov-2008_thumb.jpg',130, 85,32,'photo_3151086.html');
												thumbnails[3151087] = new thumbnail(3151087,'189861','No 34','gnt-34White-Water--Nov-2008_thumb.jpg',130, 99,32,'photo_3151087.html');
												thumbnails[3151088] = new thumbnail(3151088,'189861','No 35','gnt-35-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3151088.html');
												thumbnails[3154847] = new thumbnail(3154847,'189861','No 36','gnt-36-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3154847.html');
												thumbnails[3154849] = new thumbnail(3154849,'189861','No 37','gnt-37-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3154849.html');
												thumbnails[3154852] = new thumbnail(3154852,'189861','No 38','gnt-38-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3154852.html');
												thumbnails[3154857] = new thumbnail(3154857,'189861','No 39','gnt-39-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3154857.html');
												thumbnails[3154860] = new thumbnail(3154860,'189861','No 40','gnt-40-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3154860.html');
												thumbnails[3154863] = new thumbnail(3154863,'189861','No 41','gnt-41-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3154863.html');
												thumbnails[3154866] = new thumbnail(3154866,'189861','No 42','gnt-42-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3154866.html');
												thumbnails[3154871] = new thumbnail(3154871,'189861','No 43','gnt-43-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3154871.html');
												thumbnails[3154873] = new thumbnail(3154873,'189861','No 44','gnt-44-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3154873.html');
												thumbnails[3154875] = new thumbnail(3154875,'189861','No 45','gnt-45-White-Water--Nov-200_thumb.jpg',130, 87,32,'photo_3154875.html');
												thumbnails[3163220] = new thumbnail(3163220,'161767','Winters Abstract','Winters Abstract_thumb.jpg',130, 87,32,'photo_3163220.html');
												thumbnails[3163231] = new thumbnail(3163231,'161767','Heathland Abstract No1','Heathland Abstract No 1_thumb.jpg',130, 87,32,'photo_3163231.html');
												thumbnails[3220844] = new thumbnail(3220844,'161060','46115 Scots Guardsman','46115-Scots-Gardsman-GNT_thumb.jpg',130, 119,32,'photo_3220844.html');
												thumbnails[3400820] = new thumbnail(3400820,'161060','Green Tornado','GNT-edited-Tornado-31_thumb.jpg',130, 86,32,'photo_3400820.html');
												thumbnails[3852037] = new thumbnail(3852037,'180902','825 and the 6619','GNT-3-rd-Line-side-walk-077_thumb.jpg',130, 110,32,'photo_3852037.html');
												thumbnails[3852052] = new thumbnail(3852052,'180902','6619 Loco','GNT-web-6619-coaling-tower-_thumb.jpg',130, 89,32,'photo_3852052.html');
												thumbnails[3852424] = new thumbnail(3852424,'180902','The Duke of Gloucester','GNT-Duke-of-Gloucester-NYMR_thumb.jpg',130, 87,32,'photo_3852424.html');
												thumbnails[2516981] = new thumbnail(2516981,'161067','Sunrise at Grosmont ','-LNER-SUNRISE_thumb.jpg',130, 97,32,'photo_2516981.html');
												thumbnails[2920907] = new thumbnail(2920907,'180907','Set Up No 1','Set-Up-No 1_thumb.jpg',130, 141,32,'photo_2920907.html');
												thumbnails[2920916] = new thumbnail(2920916,'180907','Set Up No 2','Set-Up-No-2_thumb.jpg',130, 131,32,'photo_2920916.html');
												thumbnails[2920604] = new thumbnail(2920604,'180907','Set Up No3','Set-Up_thumb.jpg',130, 154,32,'photo_2920604.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[180902] = new gallery(180902,'3852424,3852052,3852037,3134024,3132286,3132285,3132284,2951571,2645950,2582145','Steam Locos  Of The NYMR','gallery',[2512553,2512556,2512745,2512749,2512842,2512862,2517118,2517136,2524658,2524662,2524743,2524774,2524822,2582145,2645950,2951571,3132284,3132285,3132286,3134024,3852037,3852052,3852424],0, 0, '180895', 'gallery_180902.html',0,0);
				  					galleries[180899] = new gallery(180899,'2616535,2616499,2596183','The People of the NYMR','gallery',[2596183,2616499,2616535],0, 0, '180895', 'gallery_180899.html',0,0);
				  					galleries[180907] = new gallery(180907,'2920916,2920907,2920604,2528245,2528238,2517162','Wartime Weekend NYMR 2007','gallery',[2517162,2528238,2528245,2920907,2920916,2920604],0, 0, '180895', 'gallery_180907.html',0,0);
				  					galleries[181554] = new gallery(181554,'2937728,2937688','Wartime Weekend NYMR 2008','gallery',[2937688,2937728],0, 0, '180895', 'gallery_181554.html',0,0);
				  					galleries[161060] = new gallery(161060,'3400820,3220844,2631915,2631908,2524905,2524706,2524695,2524677,2524650,2517168','Steam Trains','gallery',[2512795,2512840,2517143,2517155,2517168,2524650,2524677,2524695,2524706,2524905,2631908,2631915,3220844,3400820],0, 0, '', 'gallery_161060.html',0,0);
				  					galleries[180895] = new gallery(180895,'3852424,3852052,3852037,3134024,3132286,3132285,3132284,2951571,2937728,2937688','North Yorkshire Moors Railway','gallery',[],0, 0, '', 'gallery_180895.html',0,0);
				  					galleries[189861] = new gallery(189861,'3154875,3154873,3154871,3154866,3154863,3154860,3154857,3154852,3154849,3154847','White Water Canoing','gallery',[3097108,3097116,3097151,3097155,3097162,3097165,3097166,3097258,3097262,3097265,3097308,3097311,3097316,3097319,3114623,3114625,3114627,3114632,3114633,3114634,3114637,3126737,3126739,3126742,3148121,3148122,3148124,3148127,3148128,3148131,3151084,3151085,3151086,3151087,3151088,3154847,3154849,3154852,3154857,3154860,3154863,3154866,3154871,3154873,3154875],0, 0, '', 'gallery_189861.html',0,0);
				  					galleries[161997] = new gallery(161997,'2753849,2596184,2591049,2529250','Views Of York','gallery',[2529250,2591049,2596184,2753849],0, 0, '', 'gallery_161997.html',0,0);
				  					galleries[161067] = new gallery(161067,'2525234,2525230,2525223,2517187,2516981,2512619','Sunrise/Sunset','gallery',[2512619,2517187,2525223,2525230,2525234,2516981],0, 0, '', 'gallery_161067.html',0,0);
				  					galleries[161070] = new gallery(161070,'2582121,2531935,2528591,2525114,2525111,2525105,2518583,2512781,2512772,2512643','Birds/Wildlife','gallery',[2512643,2512772,2512781,2518583,2525105,2525111,2525114,2528591,2531935,2582121],0, 0, '', 'gallery_161070.html',0,0);
				  					galleries[161068] = new gallery(161068,'2730440,2597183,2597178,2582062,2529171,2529143,2529084,2529058,2528995,2528983','Landscape','gallery',[2512560,2512623,2528983,2528995,2529058,2529084,2529143,2529171,2582062,2597178,2597183,2730440],0, 0, '', 'gallery_161068.html',0,0);
				  					galleries[161069] = new gallery(161069,'2591046,2591045,2591043,2591039,2528818,2512634','People/Portraits','gallery',[2512634,2528818,2591039,2591043,2591045,2591046],0, 0, '', 'gallery_161069.html',0,0);
				  					galleries[161991] = new gallery(161991,'2529355,2529344,2529326,2529273,2528920,2528910','Urban Landscapes','gallery',[2528910,2528920,2529273,2529326,2529344,2529355],0, 0, '', 'gallery_161991.html',0,0);
				  					galleries[161970] = new gallery(161970,'2708375,2708374,2528838,2528734,2512659,2512649','Architecture /Buildings','gallery',[2512649,2512659,2528734,2528838,2708374,2708375],0, 0, '', 'gallery_161970.html',0,0);
				  					galleries[161076] = new gallery(161076,'2517159','Odds & Sods','gallery',[2517159],0, 0, '', 'gallery_161076.html',0,0);
				  					galleries[165809] = new gallery(165809,'2713284,2580973','Transport','gallery',[2580973,2713284],0, 0, '', 'gallery_165809.html',0,0);
				  					galleries[161767] = new gallery(161767,'3163231,3163220,2591032,2591029,2526244','Abstract','gallery',[2526244,2591029,2591032,3163220,3163231],0, 0, '', 'gallery_161767.html',0,0);
				  					galleries[174546] = new gallery(174546,'2788233,2788228,2788225,2788217,2788049,2529051,2517225','For viewing Only','gallery',[2517225,2529051,2788049,2788217,2788225,2788228,2788233],0, 0, '', 'gallery_174546.html',0,0);
				  					galleries[161061] = new gallery(161061,'2775802,2775801,2731887,2699360,2699345,2632777,2597176,2596196,2596192,2582125','Flowers/Fauna','gallery',[2512572,2512598,2512622,2512631,2512644,2512650,2512658,2517191,2524916,2524924,2524939,2524946,2524981,2524998,2525031,2525043,2525062,2525067,2525072,2525084,2525095,2525099,2582125,2596192,2596196,2597176,2632777,2699345,2699360,2731887,2775801,2775802],0, 0, '', 'gallery_161061.html',0,0);
				  					galleries[176849] = new gallery(176849,'2842001,2841987,2841986,2841984,2841980,2841979,2841976,2841876,2841869,2841821','Greetings Cards','gallery',[2838633,2841658,2841667,2841668,2841671,2841672,2841722,2841821,2841869,2841876,2841976,2841979,2841980,2841984,2841986,2841987,2842001],0, 0, '', 'gallery_176849.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '3134024,3132285,3132284,2951571,2582145,2524822,2524695,2524677,2524662,2524658,2517155,2517143,2517136,2517118,2516981,2512862,2512842,2512795,2512749,2512745,2512553';
imageSets[3] = '3852424,3852052,3852037,3400820,3220844,3163231,3163220,3154875,3154873,3154871,3154866,3154863,3154860,3154857,3154852,3154849,3154847,3151088,3151087,3151086,3151085,3151084,3148131,3148128,3148127,3148124,3148122,3148121,3134024,3132286,3132285,3132284,3126742,3126739,3126737,3114637,3114634,3114633,3114632,3114627,3114625,3114623,3097319,3097316,3097311,3097308,3097265,3097262,3097258,3097166';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/gntfrith/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/gntfrith/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 = 'GnT Images: ' + 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>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="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 + '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="item_name" value="'+item_name+'">';
								ref = '';
				if(this.photo_ref != ''){
					ref = this.photo_ref+' - '+this.caption;
				}
				else{
					ref = this.id+' - '+this.caption;
				}
				price = amount;					temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="gnt.images@sky.com">';
	temp = temp + '<input type="hidden" name="currency_code" value="GBP">';
	temp = temp + '<input type="hidden" name="add" value="1">';
					temp = temp + '<input type="hidden" name="amount" value="'+amount+'">';
	temp = temp + '<input type="hidden" name="item_number" value="'+ref+'">';
					temp = temp + '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
									temp = temp + '</form>';
								temp = temp + '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="gnt.images@sky.com">';
	temp = temp + '<input type="hidden" name="display" value="1">';
	temp = temp + '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
	temp = temp + '</form>';
							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;
	}
}

			

