window.thumbnails = new Object();
												thumbnails[6482670] = new thumbnail(6482670,'357101','Albi (1)','Albi21_thumb.jpg',130, 194,32,'photo_6482670.html');
												thumbnails[5352604] = new thumbnail(5352604,'301434','Gate','Baslow_thumb.jpg',130, 195,32,'photo_5352604.html');
												thumbnails[5085981] = new thumbnail(5085981,'287655','Above Juanar','Above-Juanar-Sierra-Blanca_thumb.jpg',130, 87,32,'photo_5085981.html');
												thumbnails[4826576] = new thumbnail(4826576,'137946','Glendurgan Garden','Glendurgan_thumb.jpg',130, 195,32,'photo_4826576.html');
												thumbnails[4783454] = new thumbnail(4783454,'271546','Canal de Garonne','Canal-de-Garonne_thumb.jpg',130, 87,32,'photo_4783454.html');
												thumbnails[2064767] = new thumbnail(2064767,'137945','Ashness Bridge','Ashness_Bridge1_thumb.jpg',130, 195,32,'photo_2064767.html');
												thumbnails[2178164] = new thumbnail(2178164,'144265','Via-delle-Trincee','Via_delle_Trincee_thumb.jpg',130, 195,32,'photo_2178164.html');
												thumbnails[4784385] = new thumbnail(4784385,'271547','Flinders Street Station','Flinders_Street_Station_thumb.jpg',130, 87,32,'photo_4784385.html');
												thumbnails[4841058] = new thumbnail(4841058,'271550','Birches','Birches_at_Colwick_thumb.jpg',130, 195,32,'photo_4841058.html');
												thumbnails[4840951] = new thumbnail(4840951,'135221','Limestone Country','Hawthorn_and_Pavement_thumb.jpg',130, 195,32,'photo_4840951.html');
												thumbnails[2017003] = new thumbnail(2017003,'135192','Old Town','Old-Town_thumb.jpg',130, 195,32,'photo_2017003.html');
												thumbnails[4778239] = new thumbnail(4778239,'216796','Five Fingers\' Bay','Five-Fingers-Bay_thumb.jpg',130, 130,32,'photo_4778239.html');
												thumbnails[5086165] = new thumbnail(5086165,'137948','Juanar Trees (1)','Juanar-1_thumb.jpg',130, 87,32,'photo_5086165.html');
												thumbnails[7234635] = new thumbnail(7234635,'390990','Cray','Cray_thumb.jpg',130, 87,32,'photo_7234635.html');
												thumbnails[6482662] = new thumbnail(6482662,'357101','Albi (2)','Albi-1_thumb.jpg',130, 78,32,'photo_6482662.html');
												thumbnails[5366325] = new thumbnail(5366325,'301434','Mallard','Mallard_thumb.jpg',130, 192,32,'photo_5366325.html');
												thumbnails[5085998] = new thumbnail(5085998,'287655','El Torcal (1)','El-Torcal-Natural-Park-1_thumb.jpg',130, 87,32,'photo_5085998.html');
												thumbnails[4783466] = new thumbnail(4783466,'271546','Lilly Lake (1)','French-lilly-lake_thumb.jpg',130, 87,32,'photo_4783466.html');
												thumbnails[4826638] = new thumbnail(4826638,'137946','Porthleven Blue','Portleven-Blue-21_thumb.jpg',130, 195,32,'photo_4826638.html');
												thumbnails[2178158] = new thumbnail(2178158,'144265','Sassongher','Sasshongher_thumb.jpg',130, 195,32,'photo_2178158.html');
												thumbnails[2016968] = new thumbnail(2016968,'135221','Muker Meadows','Muker_Meadows_thumb.jpg',130, 195,32,'photo_2016968.html');
												thumbnails[4778453] = new thumbnail(4778453,'271549','Calke Blue','_MG_1835_thumb.jpg',130, 195,32,'photo_4778453.html');
												thumbnails[4784401] = new thumbnail(4784401,'271547','Melbourne Skyline','Melbourne_skyline_thumb.jpg',130, 87,32,'photo_4784401.html');
												thumbnails[4840870] = new thumbnail(4840870,'137945','Old Landing Stages','Old_Landing_stages_Derwentwater1_thumb.jpg',130, 195,32,'photo_4840870.html');
												thumbnails[2016710] = new thumbnail(2016710,'135192','Crown Mine','Crown-Mine_thumb.jpg',130, 195,32,'photo_2016710.html');
												thumbnails[4778243] = new thumbnail(4778243,'216796','Godrevy','Godrevy_thumb.jpg',130, 130,32,'photo_4778243.html');
												thumbnails[4778699] = new thumbnail(4778699,'271550','Eurasian Eagle Owl','Eurasian_Eagle_Owl1_thumb.jpg',130, 195,32,'photo_4778699.html');
												thumbnails[5086168] = new thumbnail(5086168,'137948','Juanar Trees (2)','Juanar-2_thumb.jpg',130, 87,32,'photo_5086168.html');
												thumbnails[7234642] = new thumbnail(7234642,'390990','Dhalia','Dhalia_thumb.jpg',130, 87,32,'photo_7234642.html');
												thumbnails[6482681] = new thumbnail(6482681,'357101','Montgey Church','Montget_thumb.jpg',130, 77,32,'photo_6482681.html');
												thumbnails[5366324] = new thumbnail(5366324,'301434','Reeds','Reeds_thumb.jpg',130, 130,32,'photo_5366324.html');
												thumbnails[4826628] = new thumbnail(4826628,'137946','Porthmeor Wave','Porthmeor-Wave_thumb.jpg',130, 195,32,'photo_4826628.html');
												thumbnails[4783503] = new thumbnail(4783503,'271546','Window (1)','French-window-2_thumb.jpg',130, 87,32,'photo_4783503.html');
												thumbnails[4778030] = new thumbnail(4778030,'137948','East Stonesdale Falls','_MG_2404-BW_thumb.jpg',130, 87,32,'photo_4778030.html');
												thumbnails[4778456] = new thumbnail(4778456,'271549','Rape','_MG_3180_thumb.jpg',130, 195,32,'photo_4778456.html');
												thumbnails[4840863] = new thumbnail(4840863,'137945','Haverigg Beacon','Haverigg_thumb.jpg',130, 195,32,'photo_4840863.html');
												thumbnails[4783291] = new thumbnail(4783291,'144265','Dolomites cattle','Dolomite-cow_thumb.jpg',130, 195,32,'photo_4783291.html');
												thumbnails[4840953] = new thumbnail(4840953,'135221','West Stonesdale Falls','West-Stonesdale-Falls_thumb.jpg',130, 195,32,'photo_4840953.html');
												thumbnails[4784404] = new thumbnail(4784404,'271547','Princess Theatre','Princess_Theatre_thumb.jpg',130, 87,32,'photo_4784404.html');
												thumbnails[2022822] = new thumbnail(2022822,'135192','Old Gang Lead Mine','Old-Gang_thumb.jpg',130, 195,32,'photo_2022822.html');
												thumbnails[4778244] = new thumbnail(4778244,'216796','Lamorna Cove','Lamorna-Cove_thumb.jpg',130, 130,32,'photo_4778244.html');
												thumbnails[5086022] = new thumbnail(5086022,'287655','Juanar','Juanar_thumb.jpg',130, 87,32,'photo_5086022.html');
												thumbnails[5352625] = new thumbnail(5352625,'301434','Chatsworth Deer','Chatsworth_thumb.jpg',130, 87,32,'photo_5352625.html');
												thumbnails[5086025] = new thumbnail(5086025,'287655','Monda','Monda_thumb.jpg',130, 195,32,'photo_5086025.html');
												thumbnails[4841084] = new thumbnail(4841084,'271550','Steam','Gloucs-Railway_thumb.jpg',130, 195,32,'photo_4841084.html');
												thumbnails[4778488] = new thumbnail(4778488,'271549','Poppy','_MG_3193_thumb.jpg',130, 195,32,'photo_4778488.html');
												thumbnails[4826569] = new thumbnail(4826569,'137946','St Ives Christmas','Christmas_Eve_St_Ives_thumb.jpg',130, 195,32,'photo_4826569.html');
												thumbnails[2178119] = new thumbnail(2178119,'144265','Evening light on the Fanes Massif','Farnes_Evening_thumb.jpg',130, 87,32,'photo_2178119.html');
												thumbnails[4840938] = new thumbnail(4840938,'135221','Aysgarth Falls','Aysgarth-Falls_thumb.jpg',130, 87,32,'photo_4840938.html');
												thumbnails[2064783] = new thumbnail(2064783,'137948','Wain Wath Falls','_MG_2396_thumb.jpg',130, 195,32,'photo_2064783.html');
												thumbnails[4784389] = new thumbnail(4784389,'271547','MCG','MCG-2_thumb.jpg',130, 195,32,'photo_4784389.html');
												thumbnails[4840844] = new thumbnail(4840844,'137945','Castlerigg Stone Circle','Castlerigg_Stone_Circle_thumb.jpg',130, 87,32,'photo_4840844.html');
												thumbnails[2022849] = new thumbnail(2022849,'135192','Shooting Cabin','Swaledale_thumb.jpg',130, 195,32,'photo_2022849.html');
												thumbnails[4778247] = new thumbnail(4778247,'216796','Pedn Olva, St Ives','Pedn-Olva-St-Ives_thumb.jpg',130, 130,32,'photo_4778247.html');
												thumbnails[7234646] = new thumbnail(7234646,'390990','Kynance Cove','Kynance-Cove_thumb.jpg',130, 87,32,'photo_7234646.html');
												thumbnails[5366319] = new thumbnail(5366319,'301434','Ducks','Ducks_thumb.jpg',130, 87,32,'photo_5366319.html');
												thumbnails[5086163] = new thumbnail(5086163,'137948','Blue Door','Blue-Door_thumb.jpg',130, 195,32,'photo_5086163.html');
												thumbnails[5086028] = new thumbnail(5086028,'287655','Ojen ramp','Ojen-ramp_thumb.jpg',130, 195,32,'photo_5086028.html');
												thumbnails[4840850] = new thumbnail(4840850,'137945','Derwentwater','Derwentwater_thumb.jpg',130, 87,32,'photo_4840850.html');
												thumbnails[4783550] = new thumbnail(4783550,'271546','Window (2)','French-window-41_thumb.jpg',130, 195,32,'photo_4783550.html');
												thumbnails[2178151] = new thumbnail(2178151,'144265','Marmolada from Utia-de-Bioc','Marmolada-from-Rifugio-Bioc_thumb.jpg',130, 87,32,'photo_2178151.html');
												thumbnails[4784435] = new thumbnail(4784435,'271547','Botanical Gardens','Botanical-Gardens_thumb.jpg',130, 195,32,'photo_4784435.html');
												thumbnails[4826698] = new thumbnail(4826698,'137946','Storm at Sennen Cove','Storm-at-Sennen-Cove_thumb.jpg',130, 195,32,'photo_4826698.html');
												thumbnails[2022812] = new thumbnail(2022812,'135192','Levant Mine','Levant-Mine_thumb.jpg',130, 195,32,'photo_2022812.html');
												thumbnails[4778255] = new thumbnail(4778255,'216796','Harbour, St Ives','St-Ives-Harbour_thumb.jpg',130, 130,32,'photo_4778255.html');
												thumbnails[4841096] = new thumbnail(4841096,'271550','Grasmere Guides','Grasmer_Guides_Race_thumb.jpg',130, 195,32,'photo_4841096.html');
												thumbnails[7234651] = new thumbnail(7234651,'390990','Skiddaw','Skiddaw-from-Nr-Grange_thumb.jpg',130, 87,32,'photo_7234651.html');
												thumbnails[5366321] = new thumbnail(5366321,'301434','Attenborough Sunset','Sunset_thumb.jpg',130, 87,32,'photo_5366321.html');
												thumbnails[5086032] = new thumbnail(5086032,'287655','Ojen steps','Ojen-steps_thumb.jpg',130, 195,32,'photo_5086032.html');
												thumbnails[4778572] = new thumbnail(4778572,'271549','Orange','_MG_5087_thumb.jpg',130, 195,32,'photo_4778572.html');
												thumbnails[4841110] = new thumbnail(4841110,'271550','Needles','Needles_thumb.jpg',130, 195,32,'photo_4841110.html');
												thumbnails[4783620] = new thumbnail(4783620,'271546','Window (3)','French-window-1_thumb.jpg',130, 195,32,'photo_4783620.html');
												thumbnails[4826703] = new thumbnail(4826703,'137946','The Enys','The_Enys_thumb.jpg',130, 195,32,'photo_4826703.html');
												thumbnails[2178160] = new thumbnail(2178160,'144265','Trincee and Marmolada','Trincee-and-Marmolada_thumb.jpg',130, 87,32,'photo_2178160.html');
												thumbnails[4784436] = new thumbnail(4784436,'271547','Skyscraper','Skyscraper_thumb.jpg',130, 195,32,'photo_4784436.html');
												thumbnails[4840885] = new thumbnail(4840885,'137945','Morning Light','Strandshag_Bay_Morning_thumb.jpg',130, 87,32,'photo_4840885.html');
												thumbnails[2016743] = new thumbnail(2016743,'135192','Hodbarrow','Haverigg(1)_thumb.jpg',130, 195,32,'photo_2016743.html');
												thumbnails[4778264] = new thumbnail(4778264,'216796','White Rock (1)','White-Rock-3_thumb.jpg',130, 129,32,'photo_4778264.html');
												thumbnails[7234654] = new thumbnail(7234654,'390990','From Surprise View','Surprise-View_thumb.jpg',130, 87,32,'photo_7234654.html');
												thumbnails[6531853] = new thumbnail(6531853,'137948','Sand Ripples','Rippled-sand_thumb.jpg',130, 195,32,'photo_6531853.html');
												thumbnails[5086016] = new thumbnail(5086016,'287655','Garganta del Chorro','Garganta-del-Chorro_thumb.jpg',130, 195,32,'photo_5086016.html');
												thumbnails[4841118] = new thumbnail(4841118,'271550','Pershore Abbey','Pershore-Abbey_thumb.jpg',130, 195,32,'photo_4841118.html');
												thumbnails[4784408] = new thumbnail(4784408,'271547','Tram','Tram_thumb.jpg',130, 87,32,'photo_4784408.html');
												thumbnails[4778594] = new thumbnail(4778594,'271549','Twisted boughs','IMG_0866_thumb.jpg',130, 195,32,'photo_4778594.html');
												thumbnails[2017000] = new thumbnail(2017000,'135192','Wheal Coates','Wheal-Coates_thumb.jpg',130, 87,32,'photo_2017000.html');
												thumbnails[4778260] = new thumbnail(4778260,'216796','White Rock (2)','White-Rock-21_thumb.jpg',130, 195,32,'photo_4778260.html');
												thumbnails[4826604] = new thumbnail(4826604,'137946','Godrevy Lighthouse','Godrevy1_thumb.jpg',130, 87,32,'photo_4826604.html');
												thumbnails[7260382] = new thumbnail(7260382,'390990','Winter Rose','Winter-Rose_thumb.jpg',130, 87,32,'photo_7260382.html');
												thumbnails[7234656] = new thumbnail(7234656,'390990','Whitby Abbey','Whitby-Abbey_thumb.jpg',130, 87,32,'photo_7234656.html');
												thumbnails[5086020] = new thumbnail(5086020,'287655','Gibraltar','Gibraltar_thumb.jpg',130, 195,32,'photo_5086020.html');
												thumbnails[4826643] = new thumbnail(4826643,'137946','Porthmeor Beach','St-Ives-1_thumb.jpg',130, 87,32,'photo_4826643.html');
												thumbnails[4841125] = new thumbnail(4841125,'271550','Fireworks','Wilford_fireworks_thumb.jpg',130, 195,32,'photo_4841125.html');
												thumbnails[4778660] = new thumbnail(4778660,'271549','Autumn leaves','IMG_1569-2_thumb.jpg',130, 195,32,'photo_4778660.html');
												thumbnails[2016730] = new thumbnail(2016730,'135192','Haslingden Grane','Grane_thumb.jpg',130, 87,32,'photo_2016730.html');
												thumbnails[4778257] = new thumbnail(4778257,'216796','White Rock (3)','White-Rock_1_thumb.jpg',130, 195,32,'photo_4778257.html');
												thumbnails[7234644] = new thumbnail(7234644,'271549','Geranium and Fern','Geranium-and-Fern_thumb.jpg',130, 195,32,'photo_7234644.html');
												thumbnails[7234649] = new thumbnail(7234649,'390990','Sandsend Beach','Sandsend-Beach_thumb.jpg',130, 87,32,'photo_7234649.html');
												thumbnails[6531869] = new thumbnail(6531869,'271549','Lavender and Bee','Bee-and-Lavender_thumb.jpg',130, 87,32,'photo_6531869.html');
												thumbnails[6531868] = new thumbnail(6531868,'271550','A hot day in Soreze','Sereze-Dog_thumb.jpg',130, 195,32,'photo_6531868.html');
												thumbnails[6531858] = new thumbnail(6531858,'216796','Solva Harbour','Solva_thumb.jpg',130, 195,32,'photo_6531858.html');
												thumbnails[5086008] = new thumbnail(5086008,'287655','El Torcal (2)','El-Torcal-Natural-Park-2_thumb.jpg',130, 195,32,'photo_5086008.html');
												thumbnails[4826678] = new thumbnail(4826678,'137946','The Island, St Ives','St-Ives-Island_thumb.jpg',130, 87,32,'photo_4826678.html');
												thumbnails[4784248] = new thumbnail(4784248,'271546','Lilly Lake (2)','French-lilly-lake-2_thumb.jpg',130, 195,32,'photo_4784248.html');
												thumbnails[4841174] = new thumbnail(4841174,'271550','French Window','French-window_thumb.jpg',130, 195,32,'photo_4841174.html');
												thumbnails[2016982] = new thumbnail(2016982,'135192','Top Withins','Top-Withins_thumb.jpg',130, 87,32,'photo_2016982.html');
												thumbnails[4778553] = new thumbnail(4778553,'271549','Blue','_MG_5082_thumb.jpg',130, 87,32,'photo_4778553.html');
												thumbnails[7280143] = new thumbnail(7280143,'390990','Cyclo-Cross Racer','Cyclo-Cross-Racer_thumb.jpg',130, 87,32,'photo_7280143.html');
												thumbnails[7234632] = new thumbnail(7234632,'271550','Chipping Camden','Chipping-Camden-Church_thumb.jpg',130, 195,32,'photo_7234632.html');
												thumbnails[6531865] = new thumbnail(6531865,'271549','Poppies (1)','Poppies-1_thumb.jpg',130, 86,32,'photo_6531865.html');
												thumbnails[7579881] = new thumbnail(7579881,'390990','Rutland Cross Race','Rutland-Cyclo-Cross_thumb.jpg',130, 87,32,'photo_7579881.html');
												thumbnails[7280155] = new thumbnail(7280155,'271550','After the Race','After-the-race_thumb.jpg',130, 195,32,'photo_7280155.html');
												thumbnails[7579910] = new thumbnail(7579910,'390990','Padley Gorge','Padley-Gorge-Woods_thumb.jpg',130, 87,32,'photo_7579910.html');
												thumbnails[7579916] = new thumbnail(7579916,'390990','Wheel Wash','Wheel-wash_thumb.jpg',130, 87,32,'photo_7579916.html');
												thumbnails[6614797] = new thumbnail(6614797,'271550','Cyclist','Amsterdam-Cycle_thumb.jpg',130, 87,32,'photo_6614797.html');
												thumbnails[6531866] = new thumbnail(6531866,'271549','Poppies (2)','Poppies-2_thumb.jpg',130, 87,32,'photo_6531866.html');
												thumbnails[4841064] = new thumbnail(4841064,'390990','Cyclo-Cross','Cyclo-Cross_thumb.jpg',130, 195,32,'photo_4841064.html');
												thumbnails[4841074] = new thumbnail(4841074,'271550','Garburn Trail Race','Garburn_Trail_Race_thumb.jpg',130, 87,32,'photo_4841074.html');
												thumbnails[4841171] = new thumbnail(4841171,'271550','Calke Bluebells','Calke-bluebells_thumb.jpg',130, 87,32,'photo_4841171.html');
												thumbnails[4841060] = new thumbnail(4841060,'271550','Country Fair','Chatsworth_Country_Fair1_thumb.jpg',130, 87,32,'photo_4841060.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[287655] = new gallery(287655,'5086028','Around Monda, Spain','gallery',[5085981,5085998,5086022,5086025,5086028,5086032,5086016,5086020,5086008],0, 0, '137947', 'gallery_287655.html',0,0);
				  					galleries[144265] = new gallery(144265,'2178164','Dolomites','gallery',[2178164,2178158,4783291,2178119,2178151,2178160],0, 0, '137947', 'gallery_144265.html',0,0);
				  					galleries[271546] = new gallery(271546,'4783620','Lot et Garonne','gallery',[4783454,4783466,4783503,4783550,4783620,4784248],0, 0, '137947', 'gallery_271546.html',0,0);
				  					galleries[271547] = new gallery(271547,'4784389','Melbourne','gallery',[4784385,4784401,4784404,4784389,4784435,4784436,4784408],0, 0, '137947', 'gallery_271547.html',0,0);
				  					galleries[357101] = new gallery(357101,'6482670','Tarn, France','gallery',[6482670,6482662,6482681],0, 0, '137947', 'gallery_357101.html',0,0);
				  					galleries[390990] = new gallery(390990,'4841064','New Images','gallery',[7234635,7234642,7234646,7234651,7234654,7260382,7234656,7234649,7280143,7579881,7579910,7579916,4841064],0, 0, '', 'gallery_390990.html',0,0);
				  					galleries[135192] = new gallery(135192,'2017003','Abandonment','gallery',[2017003,2016710,2022822,2022849,2022812,2016743,2017000,2016730,2016982],0, 0, '', 'gallery_135192.html',0,0);
				  					galleries[137948] = new gallery(137948,'5086163,2064783','Abstract and Details','gallery',[5086165,5086168,4778030,2064783,5086163,6531853],0, 0, '', 'gallery_137948.html',0,0);
				  					galleries[137946] = new gallery(137946,'4826638','Cornwall','gallery',[4826576,4826638,4826628,4826569,4826698,4826703,4826604,4826643,4826678],0, 0, '', 'gallery_137946.html',0,0);
				  					galleries[271549] = new gallery(271549,'7234644,4778572','Flora and Fauna','gallery',[4778453,4778456,4778488,4778572,4778594,4778660,7234644,6531869,4778553,6531865,6531866],0, 0, '', 'gallery_271549.html',0,0);
				  					galleries[137945] = new gallery(137945,'2064767','Lake District','gallery',[2064767,4840870,4840863,4840844,4840850,4840885],0, 0, '', 'gallery_137945.html',0,0);
				  					galleries[301434] = new gallery(301434,'5352604','Local Images','gallery',[5352604,5366325,5366324,5352625,5366319,5366321],0, 0, '', 'gallery_301434.html',0,0);
				  					galleries[271550] = new gallery(271550,'7280155,7234632,6614797,6531868,4841174,4841171,4841125,4841118,4841110,4841096','Miscellaneous','gallery',[4841058,4778699,4841084,4841096,4841110,4841118,4841125,6531868,4841174,7234632,7280155,6614797,4841074,4841171,4841060],0, 0, '', 'gallery_271550.html',0,0);
				  					galleries[216796] = new gallery(216796,'4778260','Motion Studies','gallery',[4778239,4778243,4778244,4778247,4778255,4778264,4778260,4778257,6531858],0, 0, '', 'gallery_216796.html',0,0);
				  					galleries[137947] = new gallery(137947,'6482670,5086028,4784389,4783620,2178164','Travel','gallery',[],0, 0, '', 'gallery_137947.html',0,0);
				  					galleries[135221] = new gallery(135221,'4840951','Yorkshire Dales','gallery',[4840951,2016968,4840953,4840938],0, 0, '', 'gallery_135221.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7579910,7280143,7234635,6531866,5352625,5086165,4841060,4840938,4840885,4826604,4784401,4778553,4778030,2178119,2016982';
imageSets[2] = '7234644,6482670,5352604,5086163,5086028,4841064,4840951,4826638,4784389,4783620,4778572,4778260,2178164,2064783,2064767,2017003';
imageSets[3] = '7579916,7579910,7579881,7280155,7280143,7260382,7234656,7234654,7234651,7234649,7234646,7234644,7234642,7234635,7234632,6614797,6531869,6531868,6531866,6531865,6531858,6531853,6482681,6482670,6482662,5366325,5366324,5366321,5366319,5352625,5352604,5086168,5086165,5086163,5086032,5086028,5086025,5086022,5086020,5086016,5086008,5085998,5085981,4841174,4841171,4841125,4841118,4841110,4841096,4841084';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/stewartg/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/stewartg/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/stewartg/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/stewartg/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/stewartg/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/stewartg/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 = 'Stewart Gregory 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 = 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>';
	}
					
				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>Order this print:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (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 + '<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;
	}
}

			

