window.thumbnails = new Object();
												thumbnails[6080809] = new thumbnail(6080809,'','Cycling among the poppies','amongthepoppies2a_thumb.jpg',130, 86,18,'#');
												thumbnails[5429894] = new thumbnail(5429894,'','Furrowed snow field','furrowedsnowfield1_thumb.jpg',130, 77,18,'#');
												thumbnails[4830409] = new thumbnail(4830409,'','King of the Valleys','kingofthevalleys_thumb.jpg',130, 86,18,'#');
												thumbnails[4830423] = new thumbnail(4830423,'','Llyn Clywdog reservoir','llynclywedogreservoir_thumb.jpg',130, 86,18,'#');
												thumbnails[4830425] = new thumbnail(4830425,'','Backwater, Llyn Clywedog','llynrsvrbackwater_thumb.jpg',130, 207,18,'#');
												thumbnails[3760658] = new thumbnail(3760658,'167204','Hamlet of Sessame','016_thumb.jpg',130, 86,18,'photo_3760658.html');
												thumbnails[3760670] = new thumbnail(3760670,'167204','Sessame Views','017_thumb.jpg',130, 86,18,'photo_3760670.html');
												thumbnails[3375470] = new thumbnail(3375470,'191946','Lakeside View','treesonthelake_thumb.jpg',130, 84,18,'photo_3375470.html');
												thumbnails[3696697] = new thumbnail(3696697,'218627','Chateau in Le Gers','hdr8c_thumb.jpg',130, 86,18,'photo_3696697.html');
												thumbnails[4911569] = new thumbnail(4911569,'275843','Sheep Country','sheepdrivellynreservoir024090911_1_thumb.jpg',130, 74,18,'photo_4911569.html');
												thumbnails[5266485] = new thumbnail(5266485,'275843','A bed with a view!','caerswslandscapecarnolandscape015091117_thumb.jpg',130, 86,18,'photo_5266485.html');
												thumbnails[1850328] = new thumbnail(1850328,'119786','Sunset, Fort Grey','Sunset_Fort_Grey_thumb.jpg',130, 86,18,'photo_1850328.html');
												thumbnails[2639734] = new thumbnail(2639734,'167204','Morning Mist, Moasco','Image009_thumb.jpg',130, 68,18,'photo_2639734.html');
												thumbnails[2640054] = new thumbnail(2640054,'167204','Serralunga','Image001A_thumb.jpg',130, 85,18,'photo_2640054.html');
												thumbnails[2972772] = new thumbnail(2972772,'183159','Avenue in colour, Bubbio, Piemonte','Image0014_thumb.jpg',130, 59,18,'photo_2972772.html');
												thumbnails[3129872] = new thumbnail(3129872,'196561','View of North bank river Arno','Image0062_thumb.jpg',130, 86,18,'photo_3129872.html');
												thumbnails[3375467] = new thumbnail(3375467,'191946','Winters Evening','treeline1_thumb.jpg',130, 86,18,'photo_3375467.html');
												thumbnails[3577840] = new thumbnail(3577840,'218627','Auch Cathedral','001_thumb.jpg',130, 86,18,'photo_3577840.html');
												thumbnails[4469160] = new thumbnail(4469160,'256533','Three on a scooter, a common sight in Italy!','002090711_thumb.jpg',130, 86,18,'photo_4469160.html');
												thumbnails[4829903] = new thumbnail(4829903,'275843','Early morning mist','mistysunrisellynreservoir040090912_thumb.jpg',130, 73,18,'photo_4829903.html');
												thumbnails[5375564] = new thumbnail(5375564,'303105','A modernised \'finca\' among the groves','olivegrove0059100101103813_thumb.jpg',130, 86,18,'photo_5375564.html');
												thumbnails[5429863] = new thumbnail(5429863,'306813','Church on the hill ','churchonthehill_thumb.jpg',130, 86,18,'photo_5429863.html');
												thumbnails[6080820] = new thumbnail(6080820,'341358','Shower imminent!','monasterohdr10_thumb.jpg',130, 183,18,'photo_6080820.html');
												thumbnails[4469165] = new thumbnail(4469165,'256533','Three on a scooter, this time a dog!','028090711_thumb.jpg',130, 86,18,'photo_4469165.html');
												thumbnails[5375567] = new thumbnail(5375567,'303105','Terraced Grove','terrace2_thumb.jpg',130, 86,18,'photo_5375567.html');
												thumbnails[6080825] = new thumbnail(6080825,'341358','Back Lit','pinkongold3_thumb.jpg',130, 86,18,'photo_6080825.html');
												thumbnails[1811456] = new thumbnail(1811456,'120301','','js_DAGNELpano0008A_thumb..jpg',130, 44,18,'photo_1811456.html');
												thumbnails[1834559] = new thumbnail(1834559,'196561','Neptunes Fountain','js_Neptunes Fountain Florence_thumb.jpg',130, 86,18,'photo_1834559.html');
												thumbnails[2639725] = new thumbnail(2639725,'167204','Dawn Moasco','Image0041_thumb.jpg',130, 53,18,'photo_2639725.html');
												thumbnails[3375463] = new thumbnail(3375463,'191946','Red Trees','redtrees_thumb.jpg',130, 65,18,'photo_3375463.html');
												thumbnails[3577844] = new thumbnail(3577844,'218627','Sunset Le Gers','002_thumb.jpg',130, 65,18,'photo_3577844.html');
												thumbnails[4469170] = new thumbnail(4469170,'256533','Three on a scooter - and wating for Mum to arrive!','123090719_thumb.jpg',130, 86,18,'photo_4469170.html');
												thumbnails[4829915] = new thumbnail(4829915,'275843','Llyn Du lake','boathouseonthelake_thumb.jpg',130, 86,18,'photo_4829915.html');
												thumbnails[5375570] = new thumbnail(5375570,'303105','Olive tree detail in early morning sunlight and stiff breeze','olivetreeinsunlightr_thumb.jpg',130, 86,18,'photo_5375570.html');
												thumbnails[5429869] = new thumbnail(5429869,'306813','Furrowed snow field','furrowedsnowfield_thumb.jpg',130, 77,18,'photo_5429869.html');
												thumbnails[6080829] = new thumbnail(6080829,'341358','Spring blossom','ploughedandgreen_thumb.jpg',130, 64,18,'photo_6080829.html');
												thumbnails[2181948] = new thumbnail(2181948,'167204','Calosso','js_PICT001605_thumb.jpg',130, 81,18,'photo_2181948.html');
												thumbnails[2972779] = new thumbnail(2972779,'167204','Misty Dawn','Image0042_thumb.jpg',130, 196,18,'photo_2972779.html');
												thumbnails[3129930] = new thumbnail(3129930,'196561','Ponte Vecchio','Image0072_thumb.jpg',130, 85,18,'photo_3129930.html');
												thumbnails[4469171] = new thumbnail(4469171,'256533','A pair in a hurry!','119090717_thumb.jpg',130, 86,18,'photo_4469171.html');
												thumbnails[4853124] = new thumbnail(4853124,'275843','King of the Valley\'s','kingofthevalleys3_thumb.jpg',130, 86,18,'photo_4853124.html');
												thumbnails[5375574] = new thumbnail(5375574,'303105','A selected scene of just a couple of olive trees','sunlitgrove_thumb.jpg',130, 86,18,'photo_5375574.html');
												thumbnails[6080831] = new thumbnail(6080831,'341358','Rape Field','rapefield_thumb.jpg',130, 73,18,'photo_6080831.html');
												thumbnails[1811454] = new thumbnail(1811454,'120301','','js_DAGNELpano0006_thumb..jpg',130, 40,18,'photo_1811454.html');
												thumbnails[2639731] = new thumbnail(2639731,'167204','Casinasco','Image0071_thumb.jpg',130, 84,18,'photo_2639731.html');
												thumbnails[3130950] = new thumbnail(3130950,'196561','Florence, south bank river Arno.','Image011_thumb.jpg',130, 86,18,'photo_3130950.html');
												thumbnails[3375461] = new thumbnail(3375461,'191946','In the spotlight','inthespotlight2mono_thumb.jpg',130, 75,18,'photo_3375461.html');
												thumbnails[3965920] = new thumbnail(3965920,'218627','Chateau ruin','stgemmechateau_thumb.jpg',130, 38,18,'photo_3965920.html');
												thumbnails[4469174] = new thumbnail(4469174,'256533','Flower powered scooter!','043090801_1_thumb.jpg',130, 196,18,'photo_4469174.html');
												thumbnails[4829916] = new thumbnail(4829916,'275843','We\'re watching you!','bovinecuriosity_thumb.jpg',130, 54,18,'photo_4829916.html');
												thumbnails[6080832] = new thumbnail(6080832,'341358','Meadow','themeadow_thumb.jpg',130, 86,18,'photo_6080832.html');
												thumbnails[3129667] = new thumbnail(3129667,'196561','Panorama view of Florence','Image0132_thumb.jpg',130, 43,18,'photo_3129667.html');
												thumbnails[2972776] = new thumbnail(2972776,'167204','Farmhouse','Image0032_thumb.jpg',130, 86,18,'photo_2972776.html');
												thumbnails[2972784] = new thumbnail(2972784,'183159','Torre Contantini','Image0131_thumb.jpg',130, 62,18,'photo_2972784.html');
												thumbnails[3131033] = new thumbnail(3131033,'196561','Rain in Florence','Image0092_thumb.jpg',130, 86,18,'photo_3131033.html');
												thumbnails[4469175] = new thumbnail(4469175,'256533','Fear not! Among the heavy traffic','124090717_thumb.jpg',130, 86,18,'photo_4469175.html');
												thumbnails[4829920] = new thumbnail(4829920,'275843','Fern and lichen','greenfern_thumb.jpg',130, 196,18,'photo_4829920.html');
												thumbnails[4853118] = new thumbnail(4853118,'275843','Back Water','llynrsvrbackwater1_thumb.jpg',130, 207,18,'photo_4853118.html');
												thumbnails[1811044] = new thumbnail(1811044,'120301','','js_DAGNELpano0001_thumb..jpg',130, 34,18,'photo_1811044.html');
												thumbnails[2639968] = new thumbnail(2639968,'167204','Misty morning','Image013_thumb.jpg',130, 218,18,'photo_2639968.html');
												thumbnails[2972786] = new thumbnail(2972786,'183159','Wood Cutter\'s Hut','Image0141_thumb.jpg',130, 85,18,'photo_2972786.html');
												thumbnails[3131045] = new thumbnail(3131045,'196561','Congested parking in Florence','Image0024_thumb.jpg',130, 86,18,'photo_3131045.html');
												thumbnails[3375452] = new thumbnail(3375452,'191946','House on the Lakeside','houseonthelake_thumb.jpg',130, 84,18,'photo_3375452.html');
												thumbnails[3965928] = new thumbnail(3965928,'218627','Rain Clouds over rape field','rainclouds_thumb.jpg',130, 86,18,'photo_3965928.html');
												thumbnails[4469177] = new thumbnail(4469177,'256533','Rush hour #1','167090723_thumb.jpg',130, 86,18,'photo_4469177.html');
												thumbnails[5375605] = new thumbnail(5375605,'303105','Unexpected snowfall given the B&W treatment','olivetreeinsnow2_thumb.jpg',130, 86,18,'photo_5375605.html');
												thumbnails[5429901] = new thumbnail(5429901,'306813','The village of Mango below the Alps','hillvillage3_thumb.jpg',130, 86,18,'photo_5429901.html');
												thumbnails[5567246] = new thumbnail(5567246,'315846','Abandoned','theoldhouse_thumb.jpg',130, 108,18,'photo_5567246.html');
												thumbnails[2972795] = new thumbnail(2972795,'183159','Aldo at Work','Image0016_thumb.jpg',130, 86,18,'photo_2972795.html');
												thumbnails[3131102] = new thumbnail(3131102,'196561','Scooter parking No.1','Image0082_thumb.jpg',130, 45,18,'photo_3131102.html');
												thumbnails[4469179] = new thumbnail(4469179,'256533','Rush hour #2 How do I get out of this?','168090723_thumb.jpg',130, 86,18,'photo_4469179.html');
												thumbnails[4853121] = new thumbnail(4853121,'275843','Lake Reflections','llynclywedogreservoir1_thumb.jpg',130, 86,18,'photo_4853121.html');
												thumbnails[5375606] = new thumbnail(5375606,'303105','Same grove, different trees','olivetreeinsnow_thumb.jpg',130, 86,18,'photo_5375606.html');
												thumbnails[3131129] = new thumbnail(3131129,'196561','Yellow scooter and friends','Image0121_thumb.jpg',130, 28,18,'photo_3131129.html');
												thumbnails[1811606] = new thumbnail(1811606,'120301','','PANO0024_thumb.jpg',130, 40,18,'photo_1811606.html');
												thumbnails[2639978] = new thumbnail(2639978,'167204','Mont Viso','Image0111_thumb.jpg',130, 196,18,'photo_2639978.html');
												thumbnails[2972798] = new thumbnail(2972798,'183159','Autumn colour in Lago d\'Orta','Image0023_thumb.jpg',130, 196,18,'photo_2972798.html');
												thumbnails[3375445] = new thumbnail(3375445,'191946','Tuscany Landscape','contours_thumb.jpg',130, 79,18,'photo_3375445.html');
												thumbnails[4469180] = new thumbnail(4469180,'256533','Elegance on a scooter','095090716_thumb.jpg',130, 196,18,'photo_4469180.html');
												thumbnails[4853120] = new thumbnail(4853120,'275843','Summer\'s End','summersend1_thumb.jpg',130, 64,18,'photo_4853120.html');
												thumbnails[5567300] = new thumbnail(5567300,'315846','The Rookery','rookery_thumb.jpg',130, 84,18,'photo_5567300.html');
												thumbnails[2972800] = new thumbnail(2972800,'183159','Autumn in Lago d\'Orta','Image0033_thumb.jpg',130, 84,18,'photo_2972800.html');
												thumbnails[3131141] = new thumbnail(3131141,'196561','Florence\'s ','Image0142_thumb.jpg',130, 240,18,'photo_3131141.html');
												thumbnails[4469182] = new thumbnail(4469182,'256533','Boxes on a scooter','153090717_thumb.jpg',130, 196,18,'photo_4469182.html');
												thumbnails[5375624] = new thumbnail(5375624,'303105','Entrance to a villa among the groves','olivegroveentrance_thumb.jpg',130, 196,18,'photo_5375624.html');
												thumbnails[1811596] = new thumbnail(1811596,'120301','','js_DAGNELpano0010_thumb.1.jpg',130, 33,18,'photo_1811596.html');
												thumbnails[1834613] = new thumbnail(1834613,'191946','Villa on the hill','js_Villa on the Hill2_thumb.jpg',130, 74,18,'photo_1834613.html');
												thumbnails[3129862] = new thumbnail(3129862,'196561','Archway at Ufizi Gallery','Image0015_thumb.jpg',130, 196,18,'photo_3129862.html');
												thumbnails[4469183] = new thumbnail(4469183,'256533','Shopping on a scooter','030090804_thumb.jpg',130, 86,18,'photo_4469183.html');
												thumbnails[4853127] = new thumbnail(4853127,'275843','Panorama Llyn Clywedog ','llynrsvrpano_thumb.jpg',130, 31,18,'photo_4853127.html');
												thumbnails[5567322] = new thumbnail(5567322,'315846','Waiting','reflectionsandshadowsmono2_thumb.jpg',130, 198,18,'photo_5567322.html');
												thumbnails[4469185] = new thumbnail(4469185,'256533','Divine parking','185090723_thumb.jpg',130, 196,18,'photo_4469185.html');
												thumbnails[1811585] = new thumbnail(1811585,'120301','','js_DAGNELpano0013_thumb..jpg',130, 39,18,'photo_1811585.html');
												thumbnails[1834643] = new thumbnail(1834643,'191946','Rolling Hills','js_Tuscan_Hills_thumb.jpg',130, 86,18,'photo_1834643.html');
												thumbnails[2002631] = new thumbnail(2002631,'119786','March Gales','js_Storm Defence_thumb.jpg',130, 84,18,'photo_2002631.html');
												thumbnails[4469188] = new thumbnail(4469188,'256533','Espresso parking!','148090723_thumb.jpg',130, 196,18,'photo_4469188.html');
												thumbnails[5567330] = new thumbnail(5567330,'315846','Rain clouds','fencedfield_150C194D-1D09-001F-99093B27048BB2FC_thumb.jpg',130, 86,18,'photo_5567330.html');
												thumbnails[1811452] = new thumbnail(1811452,'120301','','js_DAGNELpano0004_thumb..jpg',130, 45,18,'photo_1811452.html');
												thumbnails[4469189] = new thumbnail(4469189,'256533','Back Street parking','071090715_thumb.jpg',130, 196,18,'photo_4469189.html');
												thumbnails[1811448] = new thumbnail(1811448,'120301','','js_DAGNELpano0012_thumb..jpg',130, 54,18,'photo_1811448.html');
												thumbnails[1834628] = new thumbnail(1834628,'191946','Cypress Avenue','js_Cypress Avenue_thumb.jpg',130, 196,18,'photo_1834628.html');
												thumbnails[2002626] = new thumbnail(2002626,'119786','March Gales','js_Close One !_thumb.jpg',130, 75,18,'photo_2002626.html');
												thumbnails[2972774] = new thumbnail(2972774,'167204','Farmhouse above Loazolo','Image0022_thumb.jpg',130, 208,18,'photo_2972774.html');
												thumbnails[4469191] = new thumbnail(4469191,'256533','Fifi knows the way!','106090716_thumb.jpg',130, 86,18,'photo_4469191.html');
												thumbnails[5429924] = new thumbnail(5429924,'306813','Rocchetta  Palafea','rochettapalafeainsnow_thumb.jpg',130, 82,18,'photo_5429924.html');
												thumbnails[5567338] = new thumbnail(5567338,'315846','Wind Turbines','windturboandsheep3windfarm018091021_thumb.jpg',130, 86,18,'photo_5567338.html');
												thumbnails[1811052] = new thumbnail(1811052,'120301','','js_DAGNELpano0002_thumb..jpg',130, 32,18,'photo_1811052.html');
												thumbnails[1811451] = new thumbnail(1811451,'120301','','js_DAGNELpano0003_thumb..jpg',130, 39,18,'photo_1811451.html');
												thumbnails[2002627] = new thumbnail(2002627,'119786','March Gales','js_Gale_thumb.jpg',130, 86,18,'photo_2002627.html');
												thumbnails[3131157] = new thumbnail(3131157,'191946','Derelict building, Tuscany landscape','Image004_thumb.jpg',130, 86,18,'photo_3131157.html');
												thumbnails[4137117] = new thumbnail(4137117,'218627','Making battle plans.','warclouds_thumb.jpg',130, 196,18,'photo_4137117.html');
												thumbnails[1910844] = new thumbnail(1910844,'120301','','PANO0011_thumb.jpg',130, 32,18,'photo_1910844.html');
												thumbnails[2002629] = new thumbnail(2002629,'119786','March Gales','js_Gotch Ya!_thumb.jpg',130, 73,18,'photo_2002629.html');
												thumbnails[4996043] = new thumbnail(4996043,'275843','Dylife Gorge','0841_thumb.jpg',130, 196,18,'photo_4996043.html');
												thumbnails[1834677] = new thumbnail(1834677,'191946','San Gimignano.','js_0873_thumb.jpg',130, 86,18,'photo_1834677.html');
												thumbnails[2185404] = new thumbnail(2185404,'120301','Worms Head, Rhossili, Gower','js_Worms Head Rhossili_thumb.jpg',130, 56,18,'photo_2185404.html');
												thumbnails[4137126] = new thumbnail(4137126,'218627','Street fight.','streetfighters_thumb.jpg',130, 86,18,'photo_4137126.html');
												thumbnails[4996047] = new thumbnail(4996047,'275843','Hafron Forest','085_thumb.jpg',130, 196,18,'photo_4996047.html');
												thumbnails[5429932] = new thumbnail(5429932,'306813','Snow cap roof','snowroof2_thumb.jpg',130, 85,18,'photo_5429932.html');
												thumbnails[1926282] = new thumbnail(1926282,'191946','San Gimignano','js640_PICT4071-01_thumb.jpg',130, 196,18,'photo_1926282.html');
												thumbnails[4137137] = new thumbnail(4137137,'218627','Defending the palace.','flintlockpower_thumb.jpg',130, 77,18,'photo_4137137.html');
												thumbnails[4996055] = new thumbnail(4996055,'275843','Running Water','086_thumb.jpg',130, 86,18,'photo_4996055.html');
												thumbnails[5566904] = new thumbnail(5566904,'306813','Mont Viso at sunset','snowfieldsbelowthealps_thumb.jpg',130, 86,18,'photo_5566904.html');
												thumbnails[4996122] = new thumbnail(4996122,'275843','Lone Angler','087_thumb.jpg',130, 195,18,'photo_4996122.html');
												thumbnails[5566921] = new thumbnail(5566921,'306813','Mont Viso in daylight','montviso_thumb.jpg',130, 78,18,'photo_5566921.html');
												thumbnails[4933921] = new thumbnail(4933921,'275843','Cloud Scape','cloudscape_thumb.jpg',130, 82,18,'photo_4933921.html');
												thumbnails[5429908] = new thumbnail(5429908,'306813','Misty Sunset','mistysunset_thumb.jpg',130, 86,18,'photo_5429908.html');
												thumbnails[4996125] = new thumbnail(4996125,'275843','The Copse','088_thumb.jpg',130, 54,18,'photo_4996125.html');
												thumbnails[5566931] = new thumbnail(5566931,'306813','Early morning mist, Loazzolo','loazzoloearlymorning_thumb.jpg',130, 86,18,'photo_5566931.html');
												thumbnails[4996138] = new thumbnail(4996138,'275843','Bont Dolgadfan','089_thumb.jpg',130, 86,18,'photo_4996138.html');
												thumbnails[4996145] = new thumbnail(4996145,'275843','Waterfall Devils Bridge','090_thumb.jpg',130, 196,18,'photo_4996145.html');
												thumbnails[5266482] = new thumbnail(5266482,'275843','Caersws valley','caerswslandscapecaersws004091205_thumb.jpg',130, 86,18,'photo_5266482.html');
												thumbnails[5566939] = new thumbnail(5566939,'306813','Abandoned','thehut_thumb.jpg',130, 86,18,'photo_5566939.html');
												thumbnails[5266521] = new thumbnail(5266521,'275843','After the deluge','waterloggedtree_thumb.jpg',130, 196,18,'photo_5266521.html');
												thumbnails[5566946] = new thumbnail(5566946,'306813','Vineyard in February','vineyardinsnow_thumb.jpg',130, 79,18,'photo_5566946.html');
												thumbnails[5266517] = new thumbnail(5266517,'275843','Wind turbines, Carno','turbinetrio_thumb.jpg',130, 86,18,'photo_5266517.html');
												thumbnails[5266490] = new thumbnail(5266490,'275843','Wind for the turbines','carnoturbines_thumb.jpg',130, 70,18,'photo_5266490.html');
												thumbnails[5566972] = new thumbnail(5566972,'306813','Cultivated  copse','treeslope_thumb.jpg',130, 86,18,'photo_5566972.html');
												thumbnails[5266494] = new thumbnail(5266494,'275843','Stormy weather','fencedfield_thumb.jpg',130, 86,18,'photo_5266494.html');
												thumbnails[5567003] = new thumbnail(5567003,'306813','Alps Panorama','alpspanorama_thumb.jpg',130, 28,18,'photo_5567003.html');
												thumbnails[5266506] = new thumbnail(5266506,'275843','Rhaeder reservoir','rhaederrsvr053091017_thumb.jpg',130, 86,18,'photo_5266506.html');
												thumbnails[5266498] = new thumbnail(5266498,'275843','Caban Coch reservoir, Rhaeder, in full flow','pict0001_thumb.jpg',130, 86,18,'photo_5266498.html');
												thumbnails[5266505] = new thumbnail(5266505,'275843','Hanging by its roots','pict0026_thumb.jpg',130, 86,18,'photo_5266505.html');
												thumbnails[5266503] = new thumbnail(5266503,'275843','Feeding on the hillside','pict0010_thumb.jpg',130, 65,18,'photo_5266503.html');
												thumbnails[5266501] = new thumbnail(5266501,'275843','Autumn pastures','pict0008_thumb.jpg',130, 74,18,'photo_5266501.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[256533] = new gallery(256533,'4469160','Italian Scootermania','gallery',[4469160,4469165,4469170,4469171,4469174,4469175,4469177,4469179,4469180,4469182,4469183,4469185,4469188,4469189,4469191],0, 0, '', 'gallery_256533.html',0,0);
				  					galleries[218627] = new gallery(218627,'3696697','France','gallery',[3696697,3577840,3577844,3965920,3965928,4137117,4137126,4137137],0, 0, '', 'gallery_218627.html',0,0);
				  					galleries[120301] = new gallery(120301,'1811448','Seascape Panoramas','gallery',[1811456,1811454,1811044,1811606,1811596,1811585,1811452,1811448,1811052,1811451,1910844,2185404],0, 0, '', 'gallery_120301.html',0,0);
				  					galleries[306813] = new gallery(306813,'5567003','Italian Winter','gallery',[5429863,5429869,5429901,5429924,5429932,5566904,5566921,5429908,5566931,5566939,5566946,5566972,5567003],0, 0, '', 'gallery_306813.html',0,0);
				  					galleries[119786] = new gallery(119786,'2002626','Guernsey Scenes','gallery',[1850328,2002631,2002626,2002627,2002629],0, 0, '', 'gallery_119786.html',0,0);
				  					galleries[196561] = new gallery(196561,'3129667','Florence','gallery',[3129872,1834559,3129930,3130950,3129667,3131033,3131045,3131102,3131129,3131141,3129862],0, 0, '', 'gallery_196561.html',0,0);
				  					galleries[191946] = new gallery(191946,'3375445','Tuscany','gallery',[3375470,3375467,3375463,3375461,3375452,3375445,1834613,1834643,1834628,3131157,1834677,1926282],0, 0, '', 'gallery_191946.html',0,0);
				  					galleries[167204] = new gallery(167204,'2639978,2181948','Piedmonte ','gallery',[3760658,3760670,2639734,2640054,2639725,2181948,2972779,2639731,2972776,2639968,2639978,2972774],0, 0, '', 'gallery_167204.html',0,0);
				  					galleries[183159] = new gallery(183159,'2972786','Autumn Scenes','gallery',[2972772,2972784,2972786,2972795,2972798,2972800],0, 0, '', 'gallery_183159.html',0,0);
				  					galleries[275843] = new gallery(275843,'4996138','Wales','gallery',[4911569,5266485,4829903,4829915,4853124,4829916,4829920,4853118,4853121,4853120,4853127,4996043,4996047,4996055,4996122,4933921,4996125,4996138,4996145,5266482,5266521,5266517,5266490,5266494,5266506,5266498,5266505,5266503,5266501],0, 0, '', 'gallery_275843.html',0,0);
				  					galleries[303105] = new gallery(303105,'5375564','Spain','gallery',[5375564,5375567,5375570,5375574,5375605,5375606,5375624],0, 0, '', 'gallery_303105.html',0,0);
				  					galleries[315846] = new gallery(315846,'5567300','Mono','gallery',[5567246,5567300,5567322,5567330,5567338],0, 0, '', 'gallery_315846.html',0,0);
				  					galleries[341358] = new gallery(341358,'6080832,6080831,6080829,6080825,6080820','Spring 2010','gallery',[6080820,6080825,6080829,6080831,6080832],0, 0, '', 'gallery_341358.html',0,0);
				  					galleries[371451] = new gallery(371451,'','Latest Updates (June 2011)','gallery',[],0, 0, '', 'gallery_371451.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '6080832,6080831,6080829,6080825,6080820,6080809,5567338,5567330,5567322,5567300,5567246,5567003,5566972,5566946,5566939,5566931,5566921,5566904,5429932,5429924,5429908,5429901,5429869,5429863,5375624,5375606,5375605,5375574,5375570,5375567,5266521,5266517,5266506,5266505,5266503,5266501,5266498,5266494,5266490,5266482,4996145,4996138,4996125,4996122,4996055,4996047,4996043,4933921,4911569,4853124,4853121,4853120,4853118,4829920,4829916,4829915,4829903,4469182,4469180,4469175,4469170,4469165,4469160,4137137,4137126,4137117,3965928,3965920,3696697,3577844,3577840,3375467,3375461,3375452,3375445,3131102,3131045,3130950,3129930,3129872,3129667,2972800,2972798,2972795,2972786,2972784,2972776,2972772,2639968,2639734,2639731,2181948,2002631,2002629,2002627,2002626,1850328,1834628,1834613,1834559,1811456,1811452,1811448';
imageSets[2] = '5567300,5567003,5375564,4996138,4469160,3696697,3375445,3129667,2972786,2639978,2181948,2002626,1811448';
imageSets[3] = '6080832,4469191,4469189,4469188,4469185,4469183,4469182,4469180,4469179,4469177,4469175,4469174,4469171,4469170,4469165,4469160';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/dagnelli/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/dagnelli/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 = 'davide agnelli 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));      $('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="agnellid@guernsey.net">';
	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="agnellid@guernsey.net">';
	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;
	}
}

			

