window.thumbnails = {};
															thumbnails[5038619] = clik.newPhoto({"id":5038619,"src":"001_thumb.JPG","galleries_id":285463,"server_id":5,"link":"photo_5038619.html","width":130,"caption":"Orpheus entering San Francisco Harbour 1880","height":87});
															thumbnails[5038620] = clik.newPhoto({"id":5038620,"src":"045_thumb.JPG","galleries_id":285008,"server_id":5,"link":"photo_5038620.html","width":130,"caption":"Volunteer and Thistle New York Harbour 1887","height":74});
															thumbnails[5038621] = clik.newPhoto({"id":5038621,"src":"karons_wave_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_5038621.html","width":130,"caption":"Ventnor breaker seascape oil on panel","height":71});
															thumbnails[5049886] = clik.newPhoto({"id":5049886,"src":"057_thumb.JPG","galleries_id":285463,"server_id":5,"link":"photo_5049886.html","width":130,"caption":"Whaler entering Nantucket harbour oil on canvas 20x24inches","height":58});
															thumbnails[5049895] = clik.newPhoto({"id":5049895,"src":"Challenge_Goldern_Gate_Oct29_1851_thumb.jpg","galleries_id":285463,"server_id":5,"link":"photo_5049895.html","width":130,"caption":"Clipper Challenge entering the Goldern Gate 1851 Oil on canvas 20x24inch","height":107});
															thumbnails[5049900] = clik.newPhoto({"id":5049900,"src":"Constitution_Boston_002_thumb.jpg","galleries_id":285463,"server_id":5,"link":"photo_5049900.html","width":130,"caption":"The USS Constitution in Boston Harbour oil on canvas 20x24inch","height":59});
															thumbnails[5049906] = clik.newPhoto({"id":5049906,"src":"Emerald_breaker_12x24_thumb.JPG","galleries_id":285009,"server_id":5,"link":"photo_5049906.html","width":130,"caption":"Emerald Breaker. seascape oil on panel 12x24","height":63});
															thumbnails[5049918] = clik.newPhoto({"id":5049918,"src":"Spilling_Breaker_1_10x18_thumb.JPG","galleries_id":285009,"server_id":5,"link":"photo_5049918.html","width":130,"caption":"Spilling Breaker Seascape, Oil on Panel 10x18 inch ","height":70});
															thumbnails[5053986] = clik.newPhoto({"id":5053986,"src":"0571_thumb.JPG","galleries_id":285008,"server_id":5,"link":"photo_5053986.html","width":130,"caption":"Livonia and the 1871 Americas Cup oil on canvas 36x48","height":58});
															thumbnails[5053991] = clik.newPhoto({"id":5053991,"src":"Ashbury_Cup_1870_004_thumb.jpg","galleries_id":285008,"server_id":5,"link":"photo_5053991.html","width":130,"caption":"Cambria and the Ashbury Cup Newport 1870 Oil on canvas 40x60inch","height":86});
															thumbnails[5078634] = clik.newPhoto({"id":5078634,"src":"Plunging_Breaker_Porthmeor_8_edited-1_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_5078634.html","width":130,"caption":"Plunging Breaker Seascape Oil on Panel 8.5x15 inch","height":71});
															thumbnails[5078637] = clik.newPhoto({"id":5078637,"src":"Summer_Memories_Breaker_Porthmeor_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_5078637.html","width":130,"caption":"Summer Memories Breaker Porthmeor Seascape Oil on Panel 8.5x15","height":71});
															thumbnails[5078638] = clik.newPhoto({"id":5078638,"src":"Summer_Surf_Porthmeor_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_5078638.html","width":130,"caption":"Summer Surf Porthmeor St Ives, seascape  Oil on Board 8.5x15 inches","height":70});
															thumbnails[5171568] = clik.newPhoto({"id":5171568,"src":"admiralty_wave_12x28_edited-1_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_5171568.html","width":130,"caption":"Atlantic Breaker 12x28 inches , Seascapeoil on canvas","height":55});
															thumbnails[5186569] = clik.newPhoto({"id":5186569,"src":"fowey_batch1_12x24_full__72dpiedited-1_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_5186569.html","width":130,"caption":"Emerald Wave 2 ,Seascape 12x24inches oil on panel","height":65});
															thumbnails[5186571] = clik.newPhoto({"id":5186571,"src":"fowey_batch1_wave_1_full_72dpiedited-1_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_5186571.html","width":130,"caption":"Plunging Breaker, Seascape. 10x18inches oil on panel","height":70});
															thumbnails[5262865] = clik.newPhoto({"id":5262865,"src":"Praa_Sands_Breaker_12x24b_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_5262865.html","width":130,"caption":"Praa Sands Breaker, seascape 12x24 oil on panel","height":63});
															thumbnails[5262926] = clik.newPhoto({"id":5262926,"src":"Jade_glory_10x18_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_5262926.html","width":130,"caption":"Jade Glory ,seascape,10x18 oil on panel","height":71});
															thumbnails[5262929] = clik.newPhoto({"id":5262929,"src":"Summer_memories_10x18_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_5262929.html","width":130,"caption":"Summer Surf Porthmeor St Ives. Seascape10x18 oil on panel","height":70});
															thumbnails[5631183] = clik.newPhoto({"id":5631183,"src":"emerald_wave_no_4_edited-1_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_5631183.html","width":130,"caption":"Emerald wave no 5 ,Seascape 18x36","height":64});
															thumbnails[5631184] = clik.newPhoto({"id":5631184,"src":"Emerald_wave_no_5_edited-1_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_5631184.html","width":130,"caption":"Emerald Wave no 4. seascape","height":64});
															thumbnails[5631200] = clik.newPhoto({"id":5631200,"src":"queen_and_Elmoina_1907_edited-1_thumb.jpg","galleries_id":285464,"server_id":5,"link":"photo_5631200.html","width":130,"caption":"Elmina vs Queen 1907","height":86});
															thumbnails[6098692] = clik.newPhoto({"id":6098692,"src":"web_incomming_tide_Brook_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_6098692.html","width":130,"caption":"Incoming Tide Brook ,Seascape 10x18","height":71});
															thumbnails[6098700] = clik.newPhoto({"id":6098700,"src":"web_incomming_Tide_Sennan_10x18_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_6098700.html","width":130,"caption":"Incoming Tide Sennen , Seascape 10x18","height":70});
															thumbnails[6098703] = clik.newPhoto({"id":6098703,"src":"Web_Jade_glory_no2_12x16_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_6098703.html","width":130,"caption":"Jade Glory no 2 Seascape12x16","height":96});
															thumbnails[6098710] = clik.newPhoto({"id":6098710,"src":"web_spilling_breaker_8_edited-1_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_6098710.html","width":130,"caption":"Spilling Surf  Seascape .8.5x15","height":73});
															thumbnails[6297837] = clik.newPhoto({"id":6297837,"src":"Atlantic_Breaker_no2_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_6297837.html","width":130,"caption":"Atlantic Breaker No2 Oil on Canvas 20x42","height":59});
															thumbnails[6297844] = clik.newPhoto({"id":6297844,"src":"Atlantic_Reef_Breaker_no1_edited-1_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_6297844.html","width":130,"caption":"Atlantic Reef Break No1, Seascape Oil on Canvas 20x42inch","height":59});
															thumbnails[6297915] = clik.newPhoto({"id":6297915,"src":"high_tide_Cape_Cornwall_edited-1_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_6297915.html","width":130,"caption":"High Tide Cape Cornwall . seascape Oil on Canvas 24x36 inch","height":85});
															thumbnails[6297926] = clik.newPhoto({"id":6297926,"src":"Jade_Glory_no3_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_6297926.html","width":130,"caption":"Jade Glory no3 , Seascape Oil on panel 12x16inch","height":97});
															thumbnails[6934987] = clik.newPhoto({"id":6934987,"src":"Ariel_and_Wasp_beating_down_the_NY_Narrows_during_the_Annual_NYYC_Regatta_june_1894_edited-1web_thumb.jpg","galleries_id":285464,"server_id":5,"link":"photo_6934987.html","width":130,"caption":" The schooner Aerial beating down the New York Narrows 1894","height":87});
															thumbnails[6935008] = clik.newPhoto({"id":6935008,"src":"priory_bay_12x16_web_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_6935008.html","width":130,"caption":"Priory Bay Seaview. Seascape","height":95});
															thumbnails[6935013] = clik.newPhoto({"id":6935013,"src":"carlyon_bay_10x16_webedited-1_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_6935013.html","width":130,"caption":"Carlyon bay Breakers. seascape","height":78});
															thumbnails[6935088] = clik.newPhoto({"id":6935088,"src":"SV72lantic_Bay_breaker_12x16_edited-1web_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_6935088.html","width":130,"caption":"Lantic Bay Surf. Seascape","height":97});
															thumbnails[8179565] = clik.newPhoto({"id":8179565,"src":"colonia_1896_thumb.jpg","galleries_id":285464,"server_id":5,"link":"photo_8179565.html","width":130,"caption":"Colonia 1896","height":87});
															thumbnails[8861950] = clik.newPhoto({"id":8861950,"src":"Atlantic_Surf_21x42_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8861950.html","width":130,"caption":"Atlantic Surf , Seascape21x42 Available","height":64});
															thumbnails[8862384] = clik.newPhoto({"id":8862384,"src":"Lantic_Bay_surf_21x42_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8862384.html","width":130,"caption":"Lantic Bay Surf , Seascape 21x42","height":63});
															thumbnails[8862411] = clik.newPhoto({"id":8862411,"src":"Sennan_high_tide_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8862411.html","width":130,"caption":"Sennan High Tide. Seascape Available","height":63});
															thumbnails[8862431] = clik.newPhoto({"id":8862431,"src":"Symphony_in_Blue_21inchx42inch_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8862431.html","width":130,"caption":"Symphony in Blue, Porth Chapel, Seascape 21x42. Available","height":63});
															thumbnails[8862446] = clik.newPhoto({"id":8862446,"src":"Yankee_in_England_etc_220111_6859_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8862446.html","width":130,"caption":"Priory Bay , Seascape Oil on Panel12x16","height":106});
															thumbnails[8862473] = clik.newPhoto({"id":8862473,"src":"Fresh_Water_Bay_Summer_Surf_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8862473.html","width":130,"caption":"Freshwater rolling Surf . Seascape. Oil on Panel 10x16","height":77});
															thumbnails[8862496] = clik.newPhoto({"id":8862496,"src":"Freshwater_rolling_Surf_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8862496.html","width":130,"caption":"Freshwater Rolling Surf . Seascape12x16","height":96});
															thumbnails[8862509] = clik.newPhoto({"id":8862509,"src":"Jade_Glory_6_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8862509.html","width":130,"caption":"Jade Glory 6 12x16. Seascape, Available","height":96});
															thumbnails[8862529] = clik.newPhoto({"id":8862529,"src":"porthgwidden_beach_break_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8862529.html","width":130,"caption":"Portgwidden Beach Break , Seascape 8.5x15","height":71});
															thumbnails[8862745] = clik.newPhoto({"id":8862745,"src":"Freshwater_Bay_Incomming_Tide_10x16_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8862745.html","width":130,"caption":"Freshwater incomming tide . seascape 12x16. Available","height":80});
															thumbnails[8862753] = clik.newPhoto({"id":8862753,"src":"Porthmeor_crashing_surf_small_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8862753.html","width":130,"caption":"Crashing Surf Porthmeor St Ives, seascape 8.5x15 Available","height":64});
															thumbnails[8868350] = clik.newPhoto({"id":8868350,"src":"Mariette_off_the_Needles_thumb.jpg","galleries_id":466453,"server_id":5,"link":"photo_8868350.html","width":130,"caption":"Mariette off the Needles 4x6inch available","height":89});
															thumbnails[8868353] = clik.newPhoto({"id":8868353,"src":"Off_Bembridge_2_thumb.jpg","galleries_id":466453,"server_id":5,"link":"photo_8868353.html","width":130,"caption":"Schooner off Bembridge 4x6inch available","height":83});
															thumbnails[8868354] = clik.newPhoto({"id":8868354,"src":"off_Seaview_thumb.jpg","galleries_id":466453,"server_id":5,"link":"photo_8868354.html","width":130,"caption":"Schooner off Seaview 4x6inch available","height":89});
															thumbnails[8868357] = clik.newPhoto({"id":8868357,"src":"off_the_Nab_thumb.jpg","galleries_id":466453,"server_id":5,"link":"photo_8868357.html","width":130,"caption":"Racing off the Nab 4x6inch available","height":90});
															thumbnails[8868360] = clik.newPhoto({"id":8868360,"src":"Schooners_off_Ryde_4x8inch_thumb.jpg","galleries_id":466453,"server_id":5,"link":"photo_8868360.html","width":130,"caption":"schooners off Ryde 4x8inch available","height":65});
															thumbnails[8868375] = clik.newPhoto({"id":8868375,"src":"DSC_0002_thumb.JPG","galleries_id":466453,"server_id":5,"link":"photo_8868375.html","width":130,"caption":"Sunset off Ryde 4x6 inch available","height":86});
															thumbnails[8868377] = clik.newPhoto({"id":8868377,"src":"sunrise_Priory_Bay_thumb.jpg","galleries_id":466453,"server_id":5,"link":"photo_8868377.html","width":130,"caption":"Sunrise Priory Bay 4x6inch sold","height":87});
															thumbnails[8924023] = clik.newPhoto({"id":8924023,"src":"Sennen_reef_break_8x14_inch_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8924023.html","width":130,"caption":"Sennen Reef Break. seascape oil on panel 9x14 inch. Available","height":79});
															thumbnails[8924085] = clik.newPhoto({"id":8924085,"src":"Sennen_High_tide_9x14_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8924085.html","width":130,"caption":"Sennen High tide. Seascape Oil on panel 9x14inch. Available","height":80});
															thumbnails[5053990] = clik.newPhoto({"id":5053990,"src":"America_in_Boston_Harbour_1885_thumb.jpg","galleries_id":285008,"server_id":5,"link":"photo_5053990.html","width":130,"caption":"Yacht America in Boston Harbour oil on canvas 20x42","height":60});
															thumbnails[5053989] = clik.newPhoto({"id":5053989,"src":"america_thumb.jpg","galleries_id":285464,"server_id":5,"link":"photo_5053989.html","width":130,"caption":"Yacht America in New York Narrows 1886<br>\r\nOil on canvas 12x18inchs","height":87});
															thumbnails[8861988] = clik.newPhoto({"id":8861988,"src":"lantic_bay_28x48_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8861988.html","width":130,"caption":"Lantic Bay , Seascape, 28x48","height":73});
															thumbnails[8861971] = clik.newPhoto({"id":8861971,"src":"Incomming_tide_north_Cornwall_30x14_thumb.jpg","galleries_id":285009,"server_id":5,"link":"photo_8861971.html","width":130,"caption":"Incomming Tide North Cornwall 14x30","height":60});
															thumbnails[5053987] = clik.newPhoto({"id":5053987,"src":"1218s_feb08_043_thumb.jpg","galleries_id":285464,"server_id":5,"link":"photo_5053987.html","width":130,"caption":"Sappho off Sandy Hook 1870 Oil on Canvas 12x18inch","height":84});
															thumbnails[5054035] = clik.newPhoto({"id":5054035,"src":"Phantom_and_the_1867_NYYC_Regatta_thumb.jpg","galleries_id":285008,"server_id":5,"link":"photo_5054035.html","width":130,"caption":"Schooner Phantom winning the 1869 NYYC Regatta oil on canvas 28x42inches","height":85});
															thumbnails[5054028] = clik.newPhoto({"id":5054028,"src":"Idler_at_New_York_thumb.jpg","galleries_id":285008,"server_id":5,"link":"photo_5054028.html","width":130,"caption":"Idler in New Yok Harbour 1870 oil on canvas 12x24","height":63});
															thumbnails[5054034] = clik.newPhoto({"id":5054034,"src":"magic2842_038_thumb.jpg","galleries_id":285464,"server_id":5,"link":"photo_5054034.html","width":130,"caption":"Schooner Madeline 1876 oil on canvas 12x18","height":84});
															thumbnails[5054007] = clik.newPhoto({"id":5054007,"src":"Dauntless_East_River_017_thumb.jpg","galleries_id":285008,"server_id":5,"link":"photo_5054007.html","width":130,"caption":"Dauntless in the East River 1885 oil on canvas 40x60inch","height":87});
															thumbnails[5054003] = clik.newPhoto({"id":5054003,"src":"Dauntless_and_the_1888_NYYC_Autumn_Regatta_thumb.jpg","galleries_id":285464,"server_id":5,"link":"photo_5054003.html","width":130,"caption":"Dauntless and the 1888 Autumn Regatta of the NYYC oil on canvas 28x48inch","height":77});
															thumbnails[5053993] = clik.newPhoto({"id":5053993,"src":"Britannia_vs_Valkyrie_Cowes_1893_thumb.JPG","galleries_id":285008,"server_id":5,"link":"photo_5053993.html","width":130,"caption":"Britannia vs Valkyrie, Cowes 1893 Oil on canvas 24x36inch","height":86});
															thumbnails[5053995] = clik.newPhoto({"id":5053995,"src":"Colonia_thumb.jpg","galleries_id":285464,"server_id":5,"link":"photo_5053995.html","width":130,"caption":"Herreshoffs schooner Colonia 1896 Oil on Canvas 12x18inch","height":85});
															thumbnails[5054037] = clik.newPhoto({"id":5054037,"src":"Picture_022_thumb.jpg","galleries_id":285008,"server_id":5,"link":"photo_5054037.html","width":130,"caption":"Herreshoffs Vigilant and the Goelet Cup oil on canvas 28x42","height":85});
															thumbnails[5054040] = clik.newPhoto({"id":5054040,"src":"Picture_033_thumb.jpg","galleries_id":285008,"server_id":5,"link":"photo_5054040.html","width":130,"caption":"Fortuna leaving Newport 1889 oil on canvas 40x60 inches","height":86});
															thumbnails[5053992] = clik.newPhoto({"id":5053992,"src":"Atlantic_of_Shinnecock_Light_thumb.jpg","galleries_id":285464,"server_id":5,"link":"photo_5053992.html","width":130,"caption":"Atlantic and the Brenton Reef Cup 1904 Oil on Canvas 20x42 inch","height":61});
															thumbnails[5054045] = clik.newPhoto({"id":5054045,"src":"Sachem_12x18_thumb.jpg","galleries_id":285464,"server_id":5,"link":"photo_5054045.html","width":130,"caption":"Sachem off Newport oil on canvas 12x18inches","height":88});
															thumbnails[5053996] = clik.newPhoto({"id":5053996,"src":"Columbia_repaint_and_seascapes_002_thumb.jpg","galleries_id":285008,"server_id":5,"link":"photo_5053996.html","width":130,"caption":"Columbia and Defender Newport 1899 Oil on Canvas 40x60 inch","height":85});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[285463] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Historic Sailing Ships","link":"gallery_285463.html","maxRecords":0.0,"photoIDs":[5038619.0,5049886.0,5049895.0,5049900.0],"skipIndex":0,"section_code":"gallery","featured_images":"5049900,5049895,5049886,5038619","id":285463,"singleSection":false});				  						galleries[466453] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Marine Miniatures","link":"gallery_466453.html","maxRecords":0.0,"photoIDs":[8868350.0,8868353.0,8868354.0,8868357.0,8868360.0,8868375.0,8868377.0],"skipIndex":0,"section_code":"gallery","featured_images":"8868377,8868375,8868360,8868357,8868354,8868353,8868350","id":466453,"singleSection":false});				  						galleries[285009] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Seascapes","link":"gallery_285009.html","maxRecords":0.0,"photoIDs":[5038621.0,5049906.0,5049918.0,5078634.0,5078637.0,5078638.0,5171568.0,5186569.0,5186571.0,5262865.0,5262926.0,5262929.0,5631183.0,5631184.0,6098692.0,6098700.0,6098703.0,6098710.0,6297837.0,6297844.0,6297915.0,6297926.0,6935008.0,6935013.0,6935088.0,8861950.0,8862384.0,8862411.0,8862431.0,8862446.0,8862473.0,8862496.0,8862509.0,8862529.0,8862745.0,8862753.0,8924023.0,8924085.0,8861988.0,8861971.0],"skipIndex":0,"section_code":"gallery","featured_images":"8924085,8924023,8862753,8862745,8862529,8862509,8862496,8862473,8862446,8862431","id":285009,"singleSection":false});				  						galleries[285008] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Classic Racing Yachts","link":"gallery_285008.html","maxRecords":0.0,"photoIDs":[5038620.0,5053986.0,5053991.0,5053990.0,5054035.0,5054028.0,5054007.0,5053993.0,5054037.0,5054040.0,5053996.0],"skipIndex":0,"section_code":"gallery","featured_images":"5054040,5054037,5054035,5054028,5054007,5053996,5053993,5053991,5053990,5053986","id":285008,"singleSection":false});				  						galleries[285464] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Racing Schooners","link":"gallery_285464.html","maxRecords":0.0,"photoIDs":[5631200.0,6934987.0,8179565.0,5053989.0,5053987.0,5054034.0,5054003.0,5053995.0,5053992.0,5054045.0],"skipIndex":0,"section_code":"gallery","featured_images":"8179565,6934987,5631200,5054045,5054034,5054003,5053995,5053992,5053989,5053987","id":285464,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8924085,8924023,8868377,8868375,8868360,8868357,8868354,8868353,8868350,8862753,8862745,8862529,8862509,8862496,8862473,8862446,8862431,8862411,8862384,8861988,8861971,8861950,8179565,6935088,6935013,6935008,6934987,6297926,6297915,6297844,6297837,6098710,6098703,6098700,6098692,5631200,5631184,5631183,5262929,5262926,5262865,5186571,5186569,5171568,5078638,5078637,5078634,5054045,5054040,5054037';
imageSets[3] = '8924085,8924023,8868377,8868375,8868360,8868357,8868354,8868353,8868350,8862753,8862745,8862529,8862509,8862496,8862473,8862446,8862431,8862411,8862384,8861988,8861971,8861950,8179565,6935088,6935013,6935008,6934987,6297926,6297915,6297844,6297837,6098710,6098703,6098700,6098692,5631200,5631184,5631183,5262929,5262926,5262865,5186571,5186569,5171568,5078638,5078637,5078634,5054045,5054040,5054037';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/wavescapes/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/wavescapes/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 || photos || {})[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:'',$detailContainer:'',
                    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 (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Shane Couch  Classic Marine Art: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			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', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			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({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* 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 += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

