window.thumbnails = {};
															thumbnails[8313881] = clik.newPhoto({"id":8313881,"src":"2011_07_16_8543_thumb.jpg","galleries_id":406437,"server_id":37,"link":"photo_8313881.html","width":160,"caption":"Reindeer","height":107});
															thumbnails[8313869] = clik.newPhoto({"id":8313869,"src":"2011_07_15_9610_thumb.jpg","galleries_id":406437,"server_id":37,"link":"photo_8313869.html","width":160,"caption":"Sweeping Glacier","height":107});
															thumbnails[8313859] = clik.newPhoto({"id":8313859,"src":"2011_07_14_9632_thumb.jpg","galleries_id":406437,"server_id":37,"link":"photo_8313859.html","width":160,"caption":"Polar Bear","height":107});
															thumbnails[8313795] = clik.newPhoto({"id":8313795,"src":"2011_07_13_8379_thumb.jpg","galleries_id":406437,"server_id":37,"link":"photo_8313795.html","width":160,"caption":"Pack Ice","height":107});
															thumbnails[8313809] = clik.newPhoto({"id":8313809,"src":"2011_07_13_9320_thumb.jpg","galleries_id":406437,"server_id":37,"link":"photo_8313809.html","width":107,"caption":"Midnight Ice","height":160});
															thumbnails[8313791] = clik.newPhoto({"id":8313791,"src":"2011_07_11_8901_thumb.jpg","galleries_id":406437,"server_id":37,"link":"photo_8313791.html","width":160,"caption":"Blue Ice","height":107});
															thumbnails[8313784] = clik.newPhoto({"id":8313784,"src":"2011_07_10_8781_thumb.jpg","galleries_id":406437,"server_id":37,"link":"photo_8313784.html","width":160,"caption":"Arctic Mountains","height":107});
															thumbnails[8313780] = clik.newPhoto({"id":8313780,"src":"2011_07_09_8691_thumb.jpg","galleries_id":406437,"server_id":37,"link":"photo_8313780.html","width":160,"caption":"Sunbathing","height":107});
															thumbnails[7989011] = clik.newPhoto({"id":7989011,"src":"2011_06_08_7026_thumb.jpg","galleries_id":431434,"server_id":15,"link":"photo_7989011.html","width":160,"caption":"Taking charge","height":107});
															thumbnails[7988989] = clik.newPhoto({"id":7988989,"src":"2011_06_07_6798_thumb.jpg","galleries_id":406437,"server_id":15,"link":"photo_7988989.html","width":107,"caption":"Main Mast 1","height":160});
															thumbnails[7988996] = clik.newPhoto({"id":7988996,"src":"2011_06_07_6860_thumb.jpg","galleries_id":431434,"server_id":15,"link":"photo_7988996.html","width":160,"caption":"Tony climbing the main mast","height":107});
															thumbnails[7989004] = clik.newPhoto({"id":7989004,"src":"2011_06_07_6913_thumb.jpg","galleries_id":431434,"server_id":15,"link":"photo_7989004.html","width":160,"caption":"Tenacious making good speed","height":107});
															thumbnails[7988913] = clik.newPhoto({"id":7988913,"src":"2011_06_06_7397_thumb.jpg","galleries_id":406437,"server_id":15,"link":"photo_7988913.html","width":160,"caption":"Climbing the main mast","height":160});
															thumbnails[7988928] = clik.newPhoto({"id":7988928,"src":"2011_06_06_7454_thumb.jpg","galleries_id":406437,"server_id":15,"link":"photo_7988928.html","width":160,"caption":"Sense of achievement","height":107});
															thumbnails[7988942] = clik.newPhoto({"id":7988942,"src":"2011_06_06_7471_thumb.jpg","galleries_id":406437,"server_id":15,"link":"photo_7988942.html","width":160,"caption":"Andy being lowered from the forward mast","height":160});
															thumbnails[7988947] = clik.newPhoto({"id":7988947,"src":"2011_06_06_7563_thumb.jpg","galleries_id":406437,"server_id":15,"link":"photo_7988947.html","width":160,"caption":"Overlooking the City wall","height":160});
															thumbnails[7988984] = clik.newPhoto({"id":7988984,"src":"2011_06_06_7584_thumb.jpg","galleries_id":431434,"server_id":15,"link":"photo_7988984.html","width":160,"caption":"SV Tenacious","height":107});
															thumbnails[7988901] = clik.newPhoto({"id":7988901,"src":"2011_06_05_7168_thumb.jpg","galleries_id":431434,"server_id":15,"link":"photo_7988901.html","width":160,"caption":"Taking a bearing","height":160});
															thumbnails[7799758] = clik.newPhoto({"id":7799758,"src":"2011_05_11_6468_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7799758.html","width":160,"caption":"Early Morning in Chichester Harbour","height":107});
															thumbnails[7799769] = clik.newPhoto({"id":7799769,"src":"2011_05_09_6381-Edit_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_7799769.html","width":107,"caption":"Clare","height":160});
															thumbnails[7799774] = clik.newPhoto({"id":7799774,"src":"2011_05_09_6428-Edit_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_7799774.html","width":160,"caption":"Victoria","height":107});
															thumbnails[7799760] = clik.newPhoto({"id":7799760,"src":"2011_04_30_5798_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_7799760.html","width":160,"caption":"A quiet read","height":107});
															thumbnails[7799764] = clik.newPhoto({"id":7799764,"src":"2011_04_03_5206_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_7799764.html","width":160,"caption":"Looking up - Bird or Plane?","height":107});
															thumbnails[7799780] = clik.newPhoto({"id":7799780,"src":"2011_03_20_5061_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7799780.html","width":160,"caption":"","height":107});
															thumbnails[7236736] = clik.newPhoto({"id":7236736,"src":"2010_12_26_3328_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236736.html","width":130,"caption":"View towards the South Downs","height":65});
															thumbnails[7705417] = clik.newPhoto({"id":7705417,"src":"2010_11_23_3016_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_7705417.html","width":160,"caption":"Beautiful Beach","height":107});
															thumbnails[7236720] = clik.newPhoto({"id":7236720,"src":"2010_10_17_2167_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236720.html","width":130,"caption":"Yacht in Chichester Harbour entrance","height":87});
															thumbnails[7236722] = clik.newPhoto({"id":7236722,"src":"2010_10_17_2180_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236722.html","width":130,"caption":"Groynes","height":130});
															thumbnails[7236695] = clik.newPhoto({"id":7236695,"src":"2010_10_10_2143_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236695.html","width":130,"caption":"Inn on the Beach","height":65});
															thumbnails[7236486] = clik.newPhoto({"id":7236486,"src":"2010_09_27_1851-Edit-Edit-Edit_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_7236486.html","width":130,"caption":"Trio","height":87});
															thumbnails[7236488] = clik.newPhoto({"id":7236488,"src":"2010_09_27_1953_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_7236488.html","width":130,"caption":"Nicky","height":87});
															thumbnails[7236662] = clik.newPhoto({"id":7236662,"src":"2010_09_22_1604a_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236662.html","width":130,"caption":"Cold Dawn over Chichester Harbour","height":65});
															thumbnails[7236613] = clik.newPhoto({"id":7236613,"src":"2010_09_05_1521_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236613.html","width":130,"caption":"Freestyle Windsurfing","height":87});
															thumbnails[7236605] = clik.newPhoto({"id":7236605,"src":"2010_09_04_1348_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236605.html","width":130,"caption":"Racing at the annual Windsurf Festival","height":65});
															thumbnails[7236563] = clik.newPhoto({"id":7236563,"src":"2010_07_22_0707_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236563.html","width":130,"caption":"Sundial @ Eaststoke Corner","height":65});
															thumbnails[7236557] = clik.newPhoto({"id":7236557,"src":"2010_07_11_0446_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236557.html","width":130,"caption":"Skiff Racing ","height":65});
															thumbnails[7236483] = clik.newPhoto({"id":7236483,"src":"2010_07_07_0305-Edit_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_7236483.html","width":130,"caption":"Shannon","height":195});
															thumbnails[7236550] = clik.newPhoto({"id":7236550,"src":"2010_06_26_0082_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236550.html","width":130,"caption":"The Annual Langstone Charity Raft Race","height":87});
															thumbnails[7705386] = clik.newPhoto({"id":7705386,"src":"_MG_9698_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_7705386.html","width":160,"caption":"Gwithian's Surf Rescue","height":80});
															thumbnails[7236757] = clik.newPhoto({"id":7236757,"src":"100107-1607-164-Edit_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236757.html","width":130,"caption":"Sunset Huts","height":87});
															thumbnails[7236507] = clik.newPhoto({"id":7236507,"src":"Ready_MG_7828_filtered_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_7236507.html","width":130,"caption":"The Revivals","height":195});
															thumbnails[7236763] = clik.newPhoto({"id":7236763,"src":"20090410_003606_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236763.html","width":130,"caption":"Round the Island Race","height":87});
															thumbnails[7236479] = clik.newPhoto({"id":7236479,"src":"2009_06_24_1582b_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_7236479.html","width":130,"caption":"Tiff","height":87});
															thumbnails[7236537] = clik.newPhoto({"id":7236537,"src":"2009_06_21_1356_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236537.html","width":130,"caption":"On the Winner Bank","height":87});
															thumbnails[7236482] = clik.newPhoto({"id":7236482,"src":"2009_06_24_1589_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_7236482.html","width":130,"caption":"Shannon  & Myles","height":87});
															thumbnails[7236752] = clik.newPhoto({"id":7236752,"src":"081227_024_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236752.html","width":130,"caption":"Dalmation","height":98});
															thumbnails[2911053] = clik.newPhoto({"id":2911053,"src":"20071209_7244as1_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_2911053.html","width":130,"caption":"Storm 10","height":66});
															thumbnails[7236745] = clik.newPhoto({"id":7236745,"src":"061220_-TMF_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236745.html","width":130,"caption":"Vivid Sands","height":171});
															thumbnails[7236747] = clik.newPhoto({"id":7236747,"src":"061220_3532_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236747.html","width":130,"caption":"Orange","height":87});
															thumbnails[7236744] = clik.newPhoto({"id":7236744,"src":"061112_2502_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236744.html","width":130,"caption":"Hayling Farmhouse","height":87});
															thumbnails[7236743] = clik.newPhoto({"id":7236743,"src":"061103_2272-ready-for-crop-sq2_filteredreduced_highlights_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236743.html","width":130,"caption":"Curves","height":130});
															thumbnails[7501085] = clik.newPhoto({"id":7501085,"src":"061103_2260-Edit_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7501085.html","width":160,"caption":"Harbour Dawn","height":111});
															thumbnails[7236739] = clik.newPhoto({"id":7236739,"src":"061007_0720_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236739.html","width":130,"caption":"Royal Oak","height":65});
															thumbnails[240063] = clik.newPhoto({"id":240063,"src":"051004_041_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_240063.html","width":130,"caption":"Evening Stroll","height":87});
															thumbnails[5124826] = clik.newPhoto({"id":5124826,"src":"2009_09_14_1800_filtered_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_5124826.html","width":130,"caption":"Hair Advice Centre III","height":150});
															thumbnails[7236474] = clik.newPhoto({"id":7236474,"src":"_MG_8556_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_7236474.html","width":130,"caption":"About Time","height":113});
															thumbnails[7236508] = clik.newPhoto({"id":7236508,"src":"Rosalie__-_accepted_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_7236508.html","width":130,"caption":"Rosalie","height":195});
															thumbnails[7236512] = clik.newPhoto({"id":7236512,"src":"_MG_0008_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236512.html","width":130,"caption":"Royal Oak","height":65});
															thumbnails[7236516] = clik.newPhoto({"id":7236516,"src":"_MG_0045_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236516.html","width":130,"caption":"Yachts moored in Chichester Harbour","height":87});
															thumbnails[7236518] = clik.newPhoto({"id":7236518,"src":"_MG_5480_filtered_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236518.html","width":130,"caption":"Snowy Beach Huts","height":87});
															thumbnails[7236520] = clik.newPhoto({"id":7236520,"src":"_MG_7850_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236520.html","width":130,"caption":"Sparks Marina @ sunset","height":65});
															thumbnails[7236522] = clik.newPhoto({"id":7236522,"src":"_MG_8380_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236522.html","width":130,"caption":"Palmerston Folly over the Winner Bank","height":130});
															thumbnails[7236528] = clik.newPhoto({"id":7236528,"src":"_MG_8648_BW_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236528.html","width":130,"caption":"Graphic Sands","height":195});
															thumbnails[7236530] = clik.newPhoto({"id":7236530,"src":"_MG_9445_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236530.html","width":130,"caption":"Southsea Pier","height":65});
															thumbnails[7236541] = clik.newPhoto({"id":7236541,"src":"2009_11_14_2268_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236541.html","width":130,"caption":"Wild Day on Hayling Beach","height":60});
															thumbnails[7236765] = clik.newPhoto({"id":7236765,"src":"DSCF0098_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236765.html","width":130,"caption":"Yacht Passing Sunset","height":98});
															thumbnails[7236767] = clik.newPhoto({"id":7236767,"src":"IMG_7832_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236767.html","width":130,"caption":"Lone Wave","height":65});
															thumbnails[7236769] = clik.newPhoto({"id":7236769,"src":"IMG_7840_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236769.html","width":130,"caption":"Sandy Point","height":65});
															thumbnails[7236770] = clik.newPhoto({"id":7236770,"src":"Langstone-9492-2_1_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7236770.html","width":130,"caption":"View to Royal Oak from Hayling","height":44});
															thumbnails[1075653] = clik.newPhoto({"id":1075653,"src":"20070610_2930bw_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_1075653.html","width":130,"caption":"Image for Fathers Day","height":87});
															thumbnails[2558433] = clik.newPhoto({"id":2558433,"src":"20080719_9999_353a_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_2558433.html","width":130,"caption":"Subdued Lighting","height":195});
															thumbnails[1517779] = clik.newPhoto({"id":1517779,"src":"20071012_6377bs_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_1517779.html","width":130,"caption":"South Bank Motion","height":87});
															thumbnails[2558491] = clik.newPhoto({"id":2558491,"src":"20080719_9999_316a_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_2558491.html","width":130,"caption":"Dressing Up","height":195});
															thumbnails[1517665] = clik.newPhoto({"id":1517665,"src":"x20070907_4544bw_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_1517665.html","width":130,"caption":"Zebras","height":87});
															thumbnails[1033476] = clik.newPhoto({"id":1033476,"src":"20070408_1475bw_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_1033476.html","width":130,"caption":"Jersey Surfer @ St Oeuns","height":107});
															thumbnails[1033484] = clik.newPhoto({"id":1033484,"src":"20070421_1856_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_1033484.html","width":130,"caption":"Stanstead bluebells","height":87});
															thumbnails[1517780] = clik.newPhoto({"id":1517780,"src":"20071012_6442bs_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_1517780.html","width":130,"caption":"St Pauls","height":195});
															thumbnails[567864] = clik.newPhoto({"id":567864,"src":"061103_2261_filtered_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_567864.html","width":130,"caption":"Sunrise Harbour","height":87});
															thumbnails[1517804] = clik.newPhoto({"id":1517804,"src":"060902_1611_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_1517804.html","width":130,"caption":"Aaaargh !","height":87});
															thumbnails[1033475] = clik.newPhoto({"id":1033475,"src":"20070412_1669untouched_filtered_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_1033475.html","width":130,"caption":"Just William - J109","height":195});
															thumbnails[5133790] = clik.newPhoto({"id":5133790,"src":"2009_09_05_1645bs_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_5133790.html","width":130,"caption":"All done and dusted!","height":87});
															thumbnails[5133856] = clik.newPhoto({"id":5133856,"src":"2009_09_05_1381s_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_5133856.html","width":130,"caption":"Foreground","height":195});
															thumbnails[1033481] = clik.newPhoto({"id":1033481,"src":"070203_4758f_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_1033481.html","width":130,"caption":"Spinnaker Tower","height":195});
															thumbnails[5136162] = clik.newPhoto({"id":5136162,"src":"20080428_8726b_filtered_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_5136162.html","width":130,"caption":"Extreme High Key","height":161});
															thumbnails[1053152] = clik.newPhoto({"id":1053152,"src":"20070519_2677newfaceBWs_thumb.jpg","galleries_id":21711,"server_id":15,"link":"photo_1053152.html","width":130,"caption":"The Family","height":195});
															thumbnails[1517795] = clik.newPhoto({"id":1517795,"src":"060929_0593a1_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_1517795.html","width":130,"caption":"Lone Tree","height":87});
															thumbnails[1517778] = clik.newPhoto({"id":1517778,"src":"20070719_3543abws_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_1517778.html","width":130,"caption":"Mean Machine","height":87});
															thumbnails[567813] = clik.newPhoto({"id":567813,"src":"050923Beach-009_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_567813.html","width":130,"caption":"Location Location Location!","height":87});
															thumbnails[567822] = clik.newPhoto({"id":567822,"src":"061027_1661_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_567822.html","width":130,"caption":"Firework Tower","height":130});
															thumbnails[1033469] = clik.newPhoto({"id":1033469,"src":"20070412_1772_filtered-ns_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_1033469.html","width":130,"caption":"Cast adrift","height":130});
															thumbnails[567530] = clik.newPhoto({"id":567530,"src":"061101_2176_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_567530.html","width":130,"caption":"Art Work Shoppe","height":78});
															thumbnails[568089] = clik.newPhoto({"id":568089,"src":"wet feet_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_568089.html","width":130,"caption":"Wet Feet","height":87});
															thumbnails[7496571] = clik.newPhoto({"id":7496571,"src":"2011_01_08_3586_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7496571.html","width":160,"caption":"Groyne","height":107});
															thumbnails[7496589] = clik.newPhoto({"id":7496589,"src":"Langstone_Mill_by_Mike_Owens-Edit-Edit-Edit-2_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7496589.html","width":160,"caption":"Langstone Mill at Dawn","height":107});
															thumbnails[7496574] = clik.newPhoto({"id":7496574,"src":"2011_01_23_3676_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7496574.html","width":160,"caption":"Subdued Beach","height":80});
															thumbnails[7496577] = clik.newPhoto({"id":7496577,"src":"2011_02_08_4445_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_7496577.html","width":160,"caption":"Alpine Explorers","height":107});
															thumbnails[7496580] = clik.newPhoto({"id":7496580,"src":"2011_02_27_4943-Edit_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_7496580.html","width":160,"caption":"Wordsworth: One Too Many !","height":107});
															thumbnails[7496582] = clik.newPhoto({"id":7496582,"src":"20071012_6475_thumb.jpg","galleries_id":391089,"server_id":15,"link":"photo_7496582.html","width":160,"caption":"Biker","height":80});
															thumbnails[7496593] = clik.newPhoto({"id":7496593,"src":"Set_Mike_Owens_Tower_Distortion_thumb.jpg","galleries_id":391082,"server_id":15,"link":"photo_7496593.html","width":107,"caption":"Reflections of a tower","height":160});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[431434] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"JST - special project","link":"gallery_431434.html","maxRecords":0.0,"photoIDs":[7989011.0,7988996.0,7989004.0,7988984.0,7988901.0],"skipIndex":0,"section_code":"gallery","featured_images":"7989004,7988984","id":431434,"singleSection":false});				  						galleries[391082] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"HAYLING ISLAND","link":"gallery_391082.html","maxRecords":0.0,"photoIDs":[7799758.0,7799780.0,7236736.0,7236720.0,7236722.0,7236695.0,7236662.0,7236613.0,7236605.0,7236563.0,7236557.0,7236550.0,7236757.0,7236763.0,7236537.0,7236752.0,2911053.0,7236745.0,7236747.0,7236744.0,7236743.0,7501085.0,7236739.0,240063.0,7236512.0,7236516.0,7236518.0,7236520.0,7236522.0,7236528.0,7236530.0,7236541.0,7236765.0,7236767.0,7236769.0,7236770.0,567864.0,1033475.0,567813.0,568089.0,7496571.0,7496589.0,7496574.0,7496593.0],"skipIndex":0,"section_code":"gallery","featured_images":"7501085,7496593,7496589,7496574,7496571,7236757,7236745,7236512,567813","id":391082,"singleSection":false});				  						galleries[21711] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"PEOPLE","link":"gallery_21711.html","maxRecords":0.0,"photoIDs":[7799769.0,7799774.0,7799760.0,7799764.0,7236486.0,7236488.0,7236483.0,7236507.0,7236479.0,7236482.0,5124826.0,7236474.0,7236508.0,1075653.0,2558433.0,2558491.0,5133790.0,5133856.0,5136162.0,1053152.0],"skipIndex":0,"section_code":"gallery","featured_images":"7236488,5133790","id":21711,"singleSection":false});				  						galleries[391089] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"GENERAL","link":"gallery_391089.html","maxRecords":0.0,"photoIDs":[7705417.0,7705386.0,1517779.0,1517665.0,1033476.0,1033484.0,1517780.0,1517804.0,1033481.0,1517795.0,1517778.0,567822.0,1033469.0,567530.0,7496577.0,7496580.0,7496582.0],"skipIndex":0,"section_code":"gallery","featured_images":"7496582,7496580,7496577,1517795,1517665,1033476","id":391089,"singleSection":false});				  						galleries[406437] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"LATEST ADDITIONS","link":"gallery_406437.html","maxRecords":0.0,"photoIDs":[8313881.0,8313869.0,8313859.0,8313795.0,8313809.0,8313791.0,8313784.0,8313780.0,7988989.0,7988913.0,7988928.0,7988942.0,7988947.0],"skipIndex":0,"section_code":"gallery","featured_images":"8313869,8313859,8313795,8313791,8313784,8313780","id":406437,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7988984,7501085,7496589,7496577,7496571,7236757,7236745,7236488,5136162,5133790,1517795,1517778,1517665,567813';
imageSets[2] = '8313869,8313859,8313795,8313791,8313784,8313780,7989004,7988984,7501085,7496593,7496589,7496582,7496580,7496577,7496574,7496571,7236757,7236745,7236512,7236488,5133790,1517795,1517665,1033476,567813';
imageSets[3] = '8313881,8313869,8313859,8313809,8313795,8313791,8313784,8313780,7989011,7989004,7988996,7988989,7988984,7988947,7988942,7988928,7988913,7988901,7799780,7799774,7799769,7799764,7799760,7799758,7705417,7705386,7501085,7496593,7496589,7496582,7496580,7496577,7496574,7496571,7236770,7236769,7236767,7236765,7236763,7236757,7236752,7236747,7236745,7236744,7236743,7236739,7236736,7236722,7236720,7236695';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/mikeowens/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/mikeowens/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:'',$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 = ' MIKE     OWENS: ' + 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> &pound;' + (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.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		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 += '<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;
	}
}

			

