window.thumbnails = new Object();
												thumbnails[772003] = new thumbnail(772003,'59664','Great Britain Team 2005','Great Britain Team Washburn 2005JPG1_thumb.jpg',130, 80,15,'photo_772003.html');
												thumbnails[772007] = new thumbnail(772007,'59664','Head Still Above Just','Head above water JustJPG_thumb.jpg',130, 86,15,'photo_772007.html');
												thumbnails[772017] = new thumbnail(772017,'59664','Rough Water','Rough WaterJPG_thumb.jpg',130, 83,15,'photo_772017.html');
												thumbnails[788084] = new thumbnail(788084,'61197','Gaillardia','GaillardiaJPG_thumb.jpg',130, 85,15,'photo_788084.html');
												thumbnails[788087] = new thumbnail(788087,'61197','Honey Mushrooms','Honey MushroomsJPG_thumb.jpg',130, 85,15,'photo_788087.html');
												thumbnails[834711] = new thumbnail(834711,'62098','Steam Engines','Img 4179a copyJPG_thumb.jpg',130, 93,15,'photo_834711.html');
												thumbnails[834766] = new thumbnail(834766,'64485','Whitby Harbour','IMG_2186aJPG_thumb.jpg',130, 87,15,'photo_834766.html');
												thumbnails[834780] = new thumbnail(834780,'64485','Helmsley Castle','IMG_4298JPG_thumb.jpg',130, 87,15,'photo_834780.html');
												thumbnails[834784] = new thumbnail(834784,'61196','Snow and Shadows','Img_5216JPG_thumb.jpg',130, 87,15,'photo_834784.html');
												thumbnails[834789] = new thumbnail(834789,'62098','Scarborough Lifeboat','IMG_5328JPG_thumb.jpg',130, 87,15,'photo_834789.html');
												thumbnails[834799] = new thumbnail(834799,'62098','Waiting to depart at Grosmont','IMG_7560aJPG_thumb.jpg',130, 84,15,'photo_834799.html');
												thumbnails[834804] = new thumbnail(834804,'64485','Staithes','IMG_7660JPG_thumb.jpg',130, 87,15,'photo_834804.html');
												thumbnails[834827] = new thumbnail(834827,'61196','The Red Door','Red DoorJPG_thumb.jpg',130, 92,15,'photo_834827.html');
												thumbnails[1899884] = new thumbnail(1899884,'129918','Grand Hotel in Mist','IMG 7707a_thumb.jpg',130, 78,15,'photo_1899884.html');
												thumbnails[1901314] = new thumbnail(1901314,'59664','Harness Racing 1','IMG 1013a_thumb.jpg',130, 86,15,'photo_1901314.html');
												thumbnails[1901322] = new thumbnail(1901322,'59664','Harness Racing 2','IMG 1023a_thumb.jpg',130, 86,15,'photo_1901322.html');
												thumbnails[1901326] = new thumbnail(1901326,'59664','Harness Racing 3','IMG 1091a_thumb.jpg',130, 71,15,'photo_1901326.html');
												thumbnails[1901370] = new thumbnail(1901370,'59664','Jet Ski','IMG 8822a_thumb.jpg',130, 77,15,'photo_1901370.html');
												thumbnails[1901446] = new thumbnail(1901446,'61196','Colours and Circles','IMG 1150a_thumb.jpg',130, 78,15,'photo_1901446.html');
												thumbnails[1901447] = new thumbnail(1901447,'61197','Hazel Nuts','IMG 1229a_thumb.jpg',130, 88,15,'photo_1901447.html');
												thumbnails[1904477] = new thumbnail(1904477,'59664','Road Racing','IMG 9842a_thumb.jpg',130, 86,15,'photo_1904477.html');
												thumbnails[1904484] = new thumbnail(1904484,'61196','Beach Hut Colours','IMG 0244b_thumb.jpg',130, 87,15,'photo_1904484.html');
												thumbnails[1916519] = new thumbnail(1916519,'64485','Ravenscar ','IMG_1528_thumb.jpg',130, 87,15,'photo_1916519.html');
												thumbnails[1916522] = new thumbnail(1916522,'127909','Cleaning Ladies','IMG_1314_thumb.jpg',130, 96,15,'photo_1916522.html');
												thumbnails[1916525] = new thumbnail(1916525,'62098','Sir Nigel Gresley','IMG_1273_thumb.jpg',130, 91,15,'photo_1916525.html');
												thumbnails[1916529] = new thumbnail(1916529,'127909','Onion Seller','IMG_1269_thumb.jpg',130, 87,15,'photo_1916529.html');
												thumbnails[1916535] = new thumbnail(1916535,'127909','Driver and Fireman','IMG_1276_thumb.jpg',130, 195,15,'photo_1916535.html');
												thumbnails[1916539] = new thumbnail(1916539,'127909','Waiting to go','IMG_1284_thumb.jpg',130, 195,15,'photo_1916539.html');
												thumbnails[1924330] = new thumbnail(1924330,'59898','St Mary the Virgin Holy Island','IMG_8610_thumb.jpg',130, 195,15,'photo_1924330.html');
												thumbnails[1924339] = new thumbnail(1924339,'129042','Cuthbert of Farne','IMG_8599_thumb.jpg',130, 195,15,'photo_1924339.html');
												thumbnails[1924343] = new thumbnail(1924343,'129042','Portrait of Cuthbert','IMG_8600_thumb.jpg',130, 195,15,'photo_1924343.html');
												thumbnails[1924345] = new thumbnail(1924345,'129042','The Long Journey','IMG_8637_thumb.jpg',130, 87,15,'photo_1924345.html');
												thumbnails[1925492] = new thumbnail(1925492,'129918','St Marys Church','IMG_1567 copy_thumb.jpg',130, 83,15,'photo_1925492.html');
												thumbnails[1925670] = new thumbnail(1925670,'62098','Steam Engine and Vintage Car','IMG_4162_thumb.jpg',130, 86,15,'photo_1925670.html');
												thumbnails[1925678] = new thumbnail(1925678,'61196','Wheel Detail Pattern','IMG_6411_thumb.jpg',130, 87,15,'photo_1925678.html');
												thumbnails[1925679] = new thumbnail(1925679,'127909','Steam Engine Driver','Img_4209_thumb.jpg',130, 191,15,'photo_1925679.html');
												thumbnails[1925685] = new thumbnail(1925685,'59898','Duncombe Park Hall','Img_4290_thumb.jpg',130, 87,15,'photo_1925685.html');
												thumbnails[1925690] = new thumbnail(1925690,'129042','Paint Job','IMG_6381_thumb.jpg',130, 195,15,'photo_1925690.html');
												thumbnails[1925692] = new thumbnail(1925692,'129042','Showground Truck Painting','IMG_6383_thumb.jpg',130, 195,15,'photo_1925692.html');
												thumbnails[1934643] = new thumbnail(1934643,'64485','Cliffords Tower York','Img_0062_thumb.jpg',130, 78,15,'photo_1934643.html');
												thumbnails[1934762] = new thumbnail(1934762,'129918','Anne Bronte Grave ','IMG_7955_thumb.jpg',130, 195,15,'photo_1934762.html');
												thumbnails[1934771] = new thumbnail(1934771,'129042','The Pregnant Bull','IMG_7728a_thumb.jpg',130, 83,15,'photo_1934771.html');
												thumbnails[787308] = new thumbnail(787308,'59889','Eilean Donan Castle','Eilean Donan CastleJPG_thumb.jpg',130, 56,15,'photo_787308.html');
												thumbnails[772107] = new thumbnail(772107,'129918','Scarborough South Bay','Scarborough South BayJPG_thumb.jpg',130, 82,15,'photo_772107.html');
												thumbnails[775435] = new thumbnail(775435,'59664','Carriage Driving','Carriage DrivingJPG_thumb.jpg',130, 89,15,'photo_775435.html');
												thumbnails[775467] = new thumbnail(775467,'60067','Grand Turk in Scarborough Harbour','Grand Turk in Scarborough HarbourJPG_thumb.jpg',130, 90,15,'photo_775467.html');
												thumbnails[788108] = new thumbnail(788108,'61196','Abstract No1','Abstract No1JPG_thumb.jpg',130, 82,15,'photo_788108.html');
												thumbnails[847341] = new thumbnail(847341,'59664','Carriage Driving','IMG_6623aJPG_thumb.jpg',130, 179,15,'photo_847341.html');
												thumbnails[772205] = new thumbnail(772205,'129918','Scarborough in Winter','Scarborough in WinterJPG_thumb.jpg',130, 82,15,'photo_772205.html');
												thumbnails[775485] = new thumbnail(775485,'60067','Grand Turk with Scarborough Lifeboat','Grand Turk with Scarborugh LifeboatJPG_thumb.jpg',130, 87,15,'photo_775485.html');
												thumbnails[775502] = new thumbnail(775502,'59889','Snowscene Yorkshire Moors','Snowscene Yorks MoorsJPG_thumb.jpg',130, 76,15,'photo_775502.html');
												thumbnails[788110] = new thumbnail(788110,'61196','Abstract No2','Abstract No2JPG_thumb.jpg',130, 79,15,'photo_788110.html');
												thumbnails[834725] = new thumbnail(834725,'59889','The Power and the Glory','Img 5175a copyJPG_thumb.jpg',130, 76,15,'photo_834725.html');
												thumbnails[834739] = new thumbnail(834739,'59889','Sandsend Groynes','IMG 6795a copyJPG_thumb.jpg',130, 73,15,'photo_834739.html');
												thumbnails[834754] = new thumbnail(834754,'59889','Winter Landscape','IMG_0204JPG_thumb.jpg',130, 87,15,'photo_834754.html');
												thumbnails[775492] = new thumbnail(775492,'60067','Grand Turk','Grand TurkJPG_thumb.jpg',130, 177,15,'photo_775492.html');
												thumbnails[788072] = new thumbnail(788072,'59889','Portree Bay Isle of Skye','Portree Bay Isle of SkyeJPG_thumb.jpg',130, 85,15,'photo_788072.html');
												thumbnails[801328] = new thumbnail(801328,'129918','Scarborough Harbour and Castle','Scarborborough Harbour and Castle_thumb.jpg',130, 76,15,'photo_801328.html');
												thumbnails[1907777] = new thumbnail(1907777,'127909','Protest','Img_0030_thumb.jpg',130, 98,15,'photo_1907777.html');
												thumbnails[1907786] = new thumbnail(1907786,'127909','Stop the War','IMG_0034_thumb.jpg',130, 98,15,'photo_1907786.html');
												thumbnails[771992] = new thumbnail(771992,'60067','Grand Turk in Sea Fret ','Sea FretJPG_thumb.jpg',130, 190,15,'photo_771992.html');
												thumbnails[787330] = new thumbnail(787330,'59889','Skye View','Skye ViewJPG_thumb.jpg',130, 87,15,'photo_787330.html');
												thumbnails[788089] = new thumbnail(788089,'61196','The Couple','The CoupleJPG_thumb.jpg',130, 92,15,'photo_788089.html');
												thumbnails[788130] = new thumbnail(788130,'61196','Statue','StatueJPG_thumb.jpg',130, 173,15,'photo_788130.html');
												thumbnails[787317] = new thumbnail(787317,'59889','Kyleakin Harbour Isle of Skye','Kyleakin Harbour  Isle of SkyeJPG_thumb.jpg',130, 87,15,'photo_787317.html');
												thumbnails[788094] = new thumbnail(788094,'61196','Shards of Colour','Patten1JPG_thumb.jpg',130, 192,15,'photo_788094.html');
												thumbnails[1901280] = new thumbnail(1901280,'61117','Atlantic Grey Seals','IMG 0188a_thumb.jpg',130, 74,15,'photo_1901280.html');
												thumbnails[1907761] = new thumbnail(1907761,'127909','Determination','Img_2855a copy_thumb.jpg',130, 104,15,'photo_1907761.html');
												thumbnails[1924302] = new thumbnail(1924302,'61117','Puffins','IMG_0070_thumb.jpg',130, 78,15,'photo_1924302.html');
												thumbnails[788101] = new thumbnail(788101,'61196','Corners, Curves and Colours','Pattern2JPG_thumb.jpg',130, 195,15,'photo_788101.html');
												thumbnails[1899467] = new thumbnail(1899467,'59889','Bamburgh Beach','Bamburgh Beach_thumb.jpg',130, 81,15,'photo_1899467.html');
												thumbnails[1899498] = new thumbnail(1899498,'59889','Bamburgh Castle','Bamburgh Castle_thumb.jpg',130, 80,15,'photo_1899498.html');
												thumbnails[1899502] = new thumbnail(1899502,'59889','Sandunes Northumberland Coast','Sandunes & Lifebouy_thumb.jpg',130, 88,15,'photo_1899502.html');
												thumbnails[1924335] = new thumbnail(1924335,'59889','Boat Houses on Holy Island','IMG_8573_thumb.jpg',130, 87,15,'photo_1924335.html');
												thumbnails[1907837] = new thumbnail(1907837,'127909','American Civil War','IMG_5691_thumb.jpg',130, 87,15,'photo_1907837.html');
												thumbnails[1907812] = new thumbnail(1907812,'127909','Resting','Img 5640a copy_thumb.jpg',130, 84,15,'photo_1907812.html');
												thumbnails[787324] = new thumbnail(787324,'59889','Malham Tarn','Malham TarnJPG_thumb.jpg',130, 87,15,'photo_787324.html');
												thumbnails[1907806] = new thumbnail(1907806,'127909','Drummer','IMG_5644_thumb.jpg',130, 191,15,'photo_1907806.html');
												thumbnails[1907795] = new thumbnail(1907795,'127909','Morris Man','Img_0058_thumb.jpg',130, 178,15,'photo_1907795.html');
												thumbnails[1924328] = new thumbnail(1924328,'127909','Donkey Man','IMG_7604_thumb.jpg',130, 87,15,'photo_1924328.html');
												thumbnails[775453] = new thumbnail(775453,'59664','Thundercats','ThundercatsJPG_thumb.jpg',130, 72,15,'photo_775453.html');
												thumbnails[800172] = new thumbnail(800172,'61196','Peeling Paint','Peeling Paint_thumb.jpg',130, 196,15,'photo_800172.html');
												thumbnails[800100] = new thumbnail(800100,'59664','Flying Thundercats','Flying Thundercats_thumb.jpg',130, 72,15,'photo_800100.html');
												thumbnails[800236] = new thumbnail(800236,'61196','Wall Painting','Wall Painting_thumb.jpg',130, 216,15,'photo_800236.html');
												thumbnails[787305] = new thumbnail(787305,'61117','Marabou Stork','Malibu StorkJPG_thumb.jpg',130, 193,15,'photo_787305.html');
												thumbnails[788085] = new thumbnail(788085,'61197','Water Lily','Water LilyJPG_thumb.jpg',130, 98,15,'photo_788085.html');
												thumbnails[834757] = new thumbnail(834757,'61117','Turnstone','IMG_0932aJPG_thumb.jpg',130, 92,15,'photo_834757.html');
												thumbnails[834792] = new thumbnail(834792,'61117','Crowned Plover','Img_6119JPG_thumb.jpg',130, 87,15,'photo_834792.html');
												thumbnails[1899882] = new thumbnail(1899882,'129918','Evening Light Scarborough Harbour','IMG_7638_thumb.jpg',130, 90,15,'photo_1899882.html');
												thumbnails[1901356] = new thumbnail(1901356,'59664','Thundercats 1','IMG 9016a_thumb.jpg',130, 73,15,'photo_1901356.html');
												thumbnails[1901462] = new thumbnail(1901462,'61117','Little Egrets','Img 6164a copy_thumb.jpg',130, 86,15,'photo_1901462.html');
												thumbnails[1901463] = new thumbnail(1901463,'59898','Bamburgh Castle','IMG 8512a_thumb.jpg',130, 63,15,'photo_1901463.html');
												thumbnails[1901493] = new thumbnail(1901493,'61117','Ground Hornbill','Img_6087_thumb.jpg',130, 90,15,'photo_1901493.html');
												thumbnails[1907736] = new thumbnail(1907736,'127909','Fireman North Yorks Railway','IMG 1282a_thumb.jpg',130, 181,15,'photo_1907736.html');
												thumbnails[1901289] = new thumbnail(1901289,'61117','Black Crowned Night Heron  ','IMG 0912a_thumb.jpg',130, 81,15,'photo_1901289.html');
												thumbnails[1901360] = new thumbnail(1901360,'59664','Thundercats 2','IMG 9777a_thumb.jpg',130, 66,15,'photo_1901360.html');
												thumbnails[1907745] = new thumbnail(1907745,'127909','Engine Driver North Yorks Railway','IMG 1289a_thumb.jpg',130, 189,15,'photo_1907745.html');
												thumbnails[787280] = new thumbnail(787280,'61117','Crowned Crane','Crowned CraneJPG_thumb.jpg',130, 180,15,'photo_787280.html');
												thumbnails[1899505] = new thumbnail(1899505,'61117','Farne Island Puffin','Puffin2a_thumb.jpg',130, 95,15,'photo_1899505.html');
												thumbnails[1901368] = new thumbnail(1901368,'59664','Thundercats 3','IMG_8980a_thumb.jpg',130, 62,15,'photo_1901368.html');
												thumbnails[1899508] = new thumbnail(1899508,'61117','Nesting Shag','IMG 8445a_thumb.jpg',130, 92,15,'photo_1899508.html');
												thumbnails[1924298] = new thumbnail(1924298,'61117','Shag with Young','IMG_0084_thumb.jpg',130, 93,15,'photo_1924298.html');
												thumbnails[1904450] = new thumbnail(1904450,'61117','Kittliwakes','IMG_8437a_thumb.jpg',130, 87,15,'photo_1904450.html');
												thumbnails[1904455] = new thumbnail(1904455,'61117','Guillemots','IMG 8425a_thumb.jpg',130, 87,15,'photo_1904455.html');
												thumbnails[1904464] = new thumbnail(1904464,'61117','Arctic Tern with Sand Eel','IMG 8475a_thumb.jpg',130, 87,15,'photo_1904464.html');
												thumbnails[1901487] = new thumbnail(1901487,'61117','Arctic Terns','IMG_0145a_thumb.jpg',130, 202,15,'photo_1901487.html');
												thumbnails[1924313] = new thumbnail(1924313,'61117','Gannets','Img_3849_thumb.jpg',130, 71,15,'photo_1924313.html');
												thumbnails[773121] = new thumbnail(773121,'59898','Dales Cottage','Dales CottageJPG_thumb.jpg',130, 85,15,'photo_773121.html');
												thumbnails[801318] = new thumbnail(801318,'59898','Scarborough Lighthouse','Scarborough Lighthouse_thumb.jpg',130, 195,15,'photo_801318.html');
												thumbnails[1904468] = new thumbnail(1904468,'61197','Hawkweed Ox-Tongue','Img_0120_thumb.jpg',130, 170,15,'photo_1904468.html');
												thumbnails[788081] = new thumbnail(788081,'61197','Snowdrops','SnowdropsJPG_thumb.jpg',130, 173,15,'photo_788081.html');
												thumbnails[800134] = new thumbnail(800134,'62098','Steam Engine','Steam Engine_thumb.jpg',130, 195,15,'photo_800134.html');
												thumbnails[800142] = new thumbnail(800142,'61117','Penguin','Penguin_thumb.jpg',130, 163,15,'photo_800142.html');
												thumbnails[800154] = new thumbnail(800154,'129918','Coming Home Scarborough Harbour','Coming Home Scarborough_thumb.jpg',130, 195,15,'photo_800154.html');
												thumbnails[847331] = new thumbnail(847331,'61117','Hippopotamus ','IMG_5548JPG_thumb.jpg',130, 163,15,'photo_847331.html');
												thumbnails[1907704] = new thumbnail(1907704,'64485','Thornton-le-Dale','IMG_8032_thumb.jpg',130, 87,15,'photo_1907704.html');
												thumbnails[1925694] = new thumbnail(1925694,'62098','Steam Engine at Duncombe Park','IMG_4202_thumb.jpg',130, 87,15,'photo_1925694.html');
												thumbnails[1934732] = new thumbnail(1934732,'61117','Rhinoceros','IMG_5536a_thumb.jpg',130, 91,15,'photo_1934732.html');
												thumbnails[1934652] = new thumbnail(1934652,'61117','Tiger','IMG_5271_thumb.jpg',130, 265,15,'photo_1934652.html');
												thumbnails[1916521] = new thumbnail(1916521,'64485','Flamborough Beach','IMG_3884_thumb.jpg',130, 195,15,'photo_1916521.html');
												thumbnails[773151] = new thumbnail(773151,'59898','Old Lifeboat House Runswick Bay','Old Lifeboat House Runswick BayJPG_thumb.jpg',130, 196,15,'photo_773151.html');
												thumbnails[788078] = new thumbnail(788078,'59889','River Sligachan Isle of Skye','Skye LandscapeJPG_thumb.jpg',130, 193,15,'photo_788078.html');
												thumbnails[800122] = new thumbnail(800122,'62098','6619 at Grosmont','6619 at Gos_thumb.jpg',130, 187,15,'photo_800122.html');
												thumbnails[847376] = new thumbnail(847376,'64485','Stoupe Brow near Ravenscar','IMG_7858aJPG_thumb.jpg',130, 195,15,'photo_847376.html');
												thumbnails[1901338] = new thumbnail(1901338,'59664','Power Drive','IMG_9252a_thumb.jpg',130, 152,15,'photo_1901338.html');
												thumbnails[1924318] = new thumbnail(1924318,'61117','Resting Cockerel','IMG_5883_thumb.jpg',130, 87,15,'photo_1924318.html');
												thumbnails[1934774] = new thumbnail(1934774,'59664','Polo 1','IMG_9281a1_thumb.jpg',130, 85,15,'photo_1934774.html');
												thumbnails[1934782] = new thumbnail(1934782,'59664','Polo 2','IMG_9289_thumb.jpg',130, 92,15,'photo_1934782.html');
												thumbnails[1934796] = new thumbnail(1934796,'59664','Polo 3','IMG_9324a_thumb.jpg',130, 159,15,'photo_1934796.html');
												thumbnails[1904481] = new thumbnail(1904481,'64485','Helmsley','IMG 8007a_thumb.jpg',130, 195,15,'photo_1904481.html');
												thumbnails[1901382] = new thumbnail(1901382,'59664','Polo','IMG 9286a_thumb.jpg',130, 168,15,'photo_1901382.html');
												thumbnails[1901505] = new thumbnail(1901505,'59898','St Mary the Virgin Holy Island','IMG_8624 copy_thumb.jpg',130, 192,15,'photo_1901505.html');
												thumbnails[787284] = new thumbnail(787284,'61117','Eagle Owl','Eagle OwlJPG_thumb.jpg',130, 195,15,'photo_787284.html');
												thumbnails[1901456] = new thumbnail(1901456,'59898','No 30 Castlegate','IMG 1587a copy_thumb.jpg',130, 214,15,'photo_1901456.html');
												thumbnails[1899917] = new thumbnail(1899917,'61117','Marabou Stork 2','IMG 0891a_thumb.jpg',130, 228,15,'photo_1899917.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[61117] = new gallery(61117,'787284','Animals/Birds','gallery',[1901280,1924302,787305,834757,834792,1901462,1901493,1901289,787280,1899505,1899508,1924298,1904450,1904455,1904464,1901487,1924313,800142,847331,1934732,1934652,1924318,787284,1899917],0, 0, '', 'gallery_61117.html',0,0);
				  					galleries[59898] = new gallery(59898,'1901456','Architecture','gallery',[1924330,1925685,1901463,773121,801318,773151,1901505,1901456],0, 0, '', 'gallery_59898.html',0,0);
				  					galleries[61196] = new gallery(61196,'788094','Art/Abstract','gallery',[834784,834827,1901446,1904484,1925678,788108,788110,788089,788130,788094,788101,800172,800236],0, 0, '', 'gallery_61196.html',0,0);
				  					galleries[61197] = new gallery(61197,'788081','Flora','gallery',[788084,788087,1901447,788085,1904468,788081],0, 0, '', 'gallery_61197.html',0,0);
				  					galleries[60067] = new gallery(60067,'771992','Grand Turk','gallery',[775467,775485,775492,771992],0, 0, '', 'gallery_60067.html',0,0);
				  					galleries[59889] = new gallery(59889,'788078','Landscapes','gallery',[787308,775502,834725,834739,834754,788072,787330,787317,1899467,1899498,1899502,1924335,787324,788078],0, 0, '', 'gallery_59889.html',0,0);
				  					galleries[129042] = new gallery(129042,'1924343','Miscellaneous','gallery',[1924339,1924343,1924345,1925690,1925692,1934771],0, 0, '', 'gallery_129042.html',0,0);
				  					galleries[64485] = new gallery(64485,'1904481','North Yorkshire','gallery',[834766,834780,834804,1916519,1934643,1907704,1916521,847376,1904481],0, 0, '', 'gallery_64485.html',0,0);
				  					galleries[127909] = new gallery(127909,'1907736','People','gallery',[1916522,1916529,1916535,1916539,1925679,1907777,1907786,1907761,1907837,1907812,1907806,1907795,1924328,1907736,1907745],0, 0, '', 'gallery_127909.html',0,0);
				  					galleries[129918] = new gallery(129918,'800154','Scarborough','gallery',[1899884,1925492,1934762,772107,772205,801328,1899882,800154],0, 0, '', 'gallery_129918.html',0,0);
				  					galleries[62098] = new gallery(62098,'800122','Transport','gallery',[834711,834789,834799,1916525,1925670,800134,1925694,800122],0, 0, '', 'gallery_62098.html',0,0);
				  					galleries[59664] = new gallery(59664,'847341','Sport','gallery',[772003,772007,772017,1901314,1901322,1901326,1901370,1904477,775435,847341,775453,800100,1901356,1901360,1901368,1901338,1934774,1934782,1934796,1901382],0, 0, '', 'gallery_59664.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '1934796,1924330,1916521,1901487,1901456,1901338,1899917,801318,788094,788081,788078,787305,787284,787280,775492,773151,771992';
imageSets[2] = '1924343,1907736,1904481,1901456,847341,800154,800122,788094,788081,788078,787284,771992';
imageSets[3] = '1934796,1934782,1934774,1934771,1934762,1934732,1934652,1934643,1925694,1925692,1925690,1925685,1925679,1925678,1925670,1925492,1924345,1924343,1924339,1924335,1924330,1924328,1924318,1924313,1924302,1924298,1916539,1916535,1916529,1916525,1916522,1916521,1916519,1907837,1907812,1907806,1907795,1907786,1907777,1907761,1907745,1907736,1907704,1904484,1904481,1904477,1904468,1904464,1904455,1904450';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Jarvo/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Jarvo/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 = 'David A Jarvis CPAGB: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {photoinfominwidth:200};	    		options.photoinfoadjacent = true;			      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object') {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
	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="jarvo35@hotmail.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="jarvo35@hotmail.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;
	}
}

			

