window.thumbnails = {};
															thumbnails[879821] = clik.newPhoto({"id":879821,"src":"A_Skyful_Of_Dreams_thumb.jpg","galleries_id":394880,"server_id":1,"link":"photo_879821.html","width":130,"caption":"A Skyful of Dreams","height":166});
															thumbnails[879831] = clik.newPhoto({"id":879831,"src":"Gothic_Theatre_thumb.jpg","galleries_id":394880,"server_id":1,"link":"photo_879831.html","width":130,"caption":"Gothic Theatre","height":194});
															thumbnails[879832] = clik.newPhoto({"id":879832,"src":"Harsh_Light_and_Soft_Shadows_thumb.jpg","galleries_id":67484,"server_id":1,"link":"photo_879832.html","width":130,"caption":"Harsh Light and Soft Shadows","height":147});
															thumbnails[879835] = clik.newPhoto({"id":879835,"src":"Magic_Glade_thumb.jpg","galleries_id":122791,"server_id":1,"link":"photo_879835.html","width":130,"caption":"Magic Glade","height":91});
															thumbnails[879839] = clik.newPhoto({"id":879839,"src":"Mist_Over_Lake_Lucerne_thumb.jpg","galleries_id":67485,"server_id":1,"link":"photo_879839.html","width":130,"caption":"Mist Over lake Lucerne","height":166});
															thumbnails[879851] = clik.newPhoto({"id":879851,"src":"The_Art_Lovers_thumb.jpg","galleries_id":67484,"server_id":1,"link":"photo_879851.html","width":130,"caption":"The Art Lovers","height":93});
															thumbnails[879855] = clik.newPhoto({"id":879855,"src":"The_History_Lesson_thumb.jpg","galleries_id":122791,"server_id":1,"link":"photo_879855.html","width":130,"caption":"The History Lesson","height":102});
															thumbnails[880194] = clik.newPhoto({"id":880194,"src":"An_Arrangement_in_Neon_and_Black_thumb.jpg","galleries_id":67484,"server_id":1,"link":"photo_880194.html","width":130,"caption":"An Arrangement in Neon and Black","height":72});
															thumbnails[880196] = clik.newPhoto({"id":880196,"src":"Dance_Impressions_thumb.jpg","galleries_id":67487,"server_id":1,"link":"photo_880196.html","width":130,"caption":"Dance Impressions","height":127});
															thumbnails[880201] = clik.newPhoto({"id":880201,"src":"Gender_Icons_thumb.jpg","galleries_id":67487,"server_id":1,"link":"photo_880201.html","width":130,"caption":"Gender Icons","height":57});
															thumbnails[880205] = clik.newPhoto({"id":880205,"src":"Memories_and_Regrets_thumb.jpg","galleries_id":67487,"server_id":1,"link":"photo_880205.html","width":130,"caption":"Memories and Regrets","height":79});
															thumbnails[880207] = clik.newPhoto({"id":880207,"src":"Only_Questions_thumb.jpg","galleries_id":67502,"server_id":1,"link":"photo_880207.html","width":130,"caption":"Only Questions","height":130});
															thumbnails[880213] = clik.newPhoto({"id":880213,"src":"The_Natural_Course_Of_Events_thumb.jpg","galleries_id":67519,"server_id":1,"link":"photo_880213.html","width":130,"caption":"The Natural Course of Events","height":350});
															thumbnails[892711] = clik.newPhoto({"id":892711,"src":"A_Silence_At_Midnight_thumb.jpg","galleries_id":67484,"server_id":1,"link":"photo_892711.html","width":130,"caption":"A Silence at Midnight","height":100});
															thumbnails[892714] = clik.newPhoto({"id":892714,"src":"Aspects_of_Age_thumb.jpg","galleries_id":67487,"server_id":1,"link":"photo_892714.html","width":130,"caption":"Aspects of Age","height":89});
															thumbnails[892715] = clik.newPhoto({"id":892715,"src":"Backstage_thumb.jpg","galleries_id":67502,"server_id":1,"link":"photo_892715.html","width":130,"caption":"Backstage","height":71});
															thumbnails[892718] = clik.newPhoto({"id":892718,"src":"Conversation_thumb.jpg","galleries_id":67519,"server_id":1,"link":"photo_892718.html","width":130,"caption":"The Conversation","height":100});
															thumbnails[892719] = clik.newPhoto({"id":892719,"src":"Dancing_in_Dream_thumb.jpg","galleries_id":67502,"server_id":1,"link":"photo_892719.html","width":130,"caption":"Dancing in Dream","height":85});
															thumbnails[892720] = clik.newPhoto({"id":892720,"src":"Dead_Eyes_thumb.jpg","galleries_id":67484,"server_id":1,"link":"photo_892720.html","width":130,"caption":"Dead Eyes","height":100});
															thumbnails[892721] = clik.newPhoto({"id":892721,"src":"Dividing_Lines_thumb.jpg","galleries_id":67486,"server_id":1,"link":"photo_892721.html","width":130,"caption":"Dividing Lines","height":102});
															thumbnails[892723] = clik.newPhoto({"id":892723,"src":"Elven_Queen_thumb.jpg","galleries_id":67486,"server_id":1,"link":"photo_892723.html","width":130,"caption":"Elven Queen","height":172});
															thumbnails[892724] = clik.newPhoto({"id":892724,"src":"Encounters_thumb.jpg","galleries_id":67502,"server_id":1,"link":"photo_892724.html","width":130,"caption":"Encounters","height":101});
															thumbnails[892726] = clik.newPhoto({"id":892726,"src":"Four_and_One_Passing_thumb.jpg","galleries_id":67487,"server_id":1,"link":"photo_892726.html","width":130,"caption":"Four And One Passing","height":86});
															thumbnails[892727] = clik.newPhoto({"id":892727,"src":"He_Could_Not_Remember_Her_Face_thumb.jpg","galleries_id":67519,"server_id":1,"link":"photo_892727.html","width":130,"caption":"He Could Not Remember Her Face","height":104});
															thumbnails[892729] = clik.newPhoto({"id":892729,"src":"Northern_December_Afternoon_thumb.jpg","galleries_id":67485,"server_id":1,"link":"photo_892729.html","width":130,"caption":"Northern December Afternoon","height":197});
															thumbnails[892732] = clik.newPhoto({"id":892732,"src":"Quickening_of_the_Pulse_thumb.jpg","galleries_id":67519,"server_id":1,"link":"photo_892732.html","width":130,"caption":"A Quickening Of The Pulse","height":50});
															thumbnails[892734] = clik.newPhoto({"id":892734,"src":"Remembrance_thumb.jpg","galleries_id":67487,"server_id":1,"link":"photo_892734.html","width":130,"caption":"Remembrance","height":90});
															thumbnails[892737] = clik.newPhoto({"id":892737,"src":"Swan_Beach_thumb.jpg","galleries_id":67485,"server_id":1,"link":"photo_892737.html","width":130,"caption":"Swan Beach","height":198});
															thumbnails[892738] = clik.newPhoto({"id":892738,"src":"Welcome_To _The_Party_thumb.jpg","galleries_id":67502,"server_id":1,"link":"photo_892738.html","width":130,"caption":"Welcome To The Party","height":99});
															thumbnails[892740] = clik.newPhoto({"id":892740,"src":"Wider_View_thumb.jpg","galleries_id":67485,"server_id":1,"link":"photo_892740.html","width":130,"caption":"A Wider View","height":68});
															thumbnails[907266] = clik.newPhoto({"id":907266,"src":"Mont St Michel_thumb.jpg","galleries_id":67485,"server_id":1,"link":"photo_907266.html","width":130,"caption":"Mont St Michel","height":107});
															thumbnails[1054834] = clik.newPhoto({"id":1054834,"src":"Mirror Mirror_thumb.jpg","galleries_id":67486,"server_id":1,"link":"photo_1054834.html","width":130,"caption":"Mirror Mirror","height":71});
															thumbnails[1054906] = clik.newPhoto({"id":1054906,"src":"Sunset in Mist_thumb.jpg","galleries_id":67485,"server_id":1,"link":"photo_1054906.html","width":130,"caption":"Sunset In Mist","height":62});
															thumbnails[1101297] = clik.newPhoto({"id":1101297,"src":"A Forgotten Field_thumb.jpg","galleries_id":122791,"server_id":1,"link":"photo_1101297.html","width":130,"caption":"A Forgotten Field","height":180});
															thumbnails[1101441] = clik.newPhoto({"id":1101441,"src":"Ammonite I1_thumb.jpg","galleries_id":67487,"server_id":1,"link":"photo_1101441.html","width":130,"caption":"Ammonite I","height":142});
															thumbnails[1443425] = clik.newPhoto({"id":1443425,"src":"Forde Abbey l_thumb.jpg","galleries_id":122791,"server_id":1,"link":"photo_1443425.html","width":130,"caption":"Forde Abbey I","height":98});
															thumbnails[1443432] = clik.newPhoto({"id":1443432,"src":"Shell I_thumb.jpg","galleries_id":67487,"server_id":1,"link":"photo_1443432.html","width":130,"caption":"Shell I","height":147});
															thumbnails[1503116] = clik.newPhoto({"id":1503116,"src":"Alison_thumb.jpg","galleries_id":67486,"server_id":1,"link":"photo_1503116.html","width":130,"caption":"Alison","height":92});
															thumbnails[1541815] = clik.newPhoto({"id":1541815,"src":"Nightmare Scenario_thumb.jpg","galleries_id":67484,"server_id":1,"link":"photo_1541815.html","width":130,"caption":"Nightmare Scenario","height":79});
															thumbnails[1541821] = clik.newPhoto({"id":1541821,"src":"Signs and Portents_thumb.jpg","galleries_id":122791,"server_id":1,"link":"photo_1541821.html","width":130,"caption":"Signs and Portents","height":98});
															thumbnails[1541823] = clik.newPhoto({"id":1541823,"src":"The Photographers Eye_thumb.jpg","galleries_id":67486,"server_id":1,"link":"photo_1541823.html","width":130,"caption":"The Photographer's Eye","height":107});
															thumbnails[1827014] = clik.newPhoto({"id":1827014,"src":"Caught in Dream_thumb.jpg","galleries_id":67502,"server_id":1,"link":"photo_1827014.html","width":130,"caption":"Caught in Dream","height":98});
															thumbnails[1827019] = clik.newPhoto({"id":1827019,"src":"Figures in a Frame_thumb.jpg","galleries_id":67502,"server_id":1,"link":"photo_1827019.html","width":130,"caption":"Figures in a Frame","height":88});
															thumbnails[1827020] = clik.newPhoto({"id":1827020,"src":"Flowers At Sunset_thumb.jpg","galleries_id":67487,"server_id":1,"link":"photo_1827020.html","width":130,"caption":"Flowers at Sunset","height":58});
															thumbnails[1827023] = clik.newPhoto({"id":1827023,"src":"Nocturne in Black Red and Gold_thumb.jpg","galleries_id":67484,"server_id":1,"link":"photo_1827023.html","width":130,"caption":"Nocturne in Black, Red and Gold","height":91});
															thumbnails[2180826] = clik.newPhoto({"id":2180826,"src":"The Door_thumb.jpg","galleries_id":67487,"server_id":1,"link":"photo_2180826.html","width":130,"caption":"The Door","height":99});
															thumbnails[2180839] = clik.newPhoto({"id":2180839,"src":"Someone To Watch Over Me_thumb.jpg","galleries_id":67484,"server_id":1,"link":"photo_2180839.html","width":130,"caption":"Someone to Watch Over Me","height":97});
															thumbnails[2857381] = clik.newPhoto({"id":2857381,"src":"Watching in Light_thumb.jpg","galleries_id":67486,"server_id":1,"link":"photo_2857381.html","width":130,"caption":"Watching in Light","height":111});
															thumbnails[3528206] = clik.newPhoto({"id":3528206,"src":"Composition in Steel and Mist_thumb.jpg","galleries_id":67485,"server_id":1,"link":"photo_3528206.html","width":130,"caption":"Composition in Steel and Mist","height":96});
															thumbnails[3528207] = clik.newPhoto({"id":3528207,"src":"The Prisoner_thumb.jpg","galleries_id":67487,"server_id":1,"link":"photo_3528207.html","width":130,"caption":"The Prisoner","height":73});
															thumbnails[4115182] = clik.newPhoto({"id":4115182,"src":"A_Corner_Of_My_Own1_thumb.jpg","galleries_id":67502,"server_id":1,"link":"photo_4115182.html","width":130,"caption":"A Corner Of My Own","height":91});
															thumbnails[4115190] = clik.newPhoto({"id":4115190,"src":"Great_Synagogue_Budapest_thumb.jpg","galleries_id":67487,"server_id":1,"link":"photo_4115190.html","width":130,"caption":"Great Synagogue, Budapest","height":100});
															thumbnails[4313612] = clik.newPhoto({"id":4313612,"src":"In_the_Midst_of_Life_thumb.jpg","galleries_id":122791,"server_id":1,"link":"photo_4313612.html","width":130,"caption":"In the Midst of Life","height":104});
															thumbnails[4313621] = clik.newPhoto({"id":4313621,"src":"The_Shadow_Players_thumb.jpg","galleries_id":67484,"server_id":1,"link":"photo_4313621.html","width":130,"caption":"The Shadow Players","height":106});
															thumbnails[4742317] = clik.newPhoto({"id":4742317,"src":"The_Watcher_thumb.jpg","galleries_id":394880,"server_id":1,"link":"photo_4742317.html","width":130,"caption":"The Watcher","height":196});
															thumbnails[4742336] = clik.newPhoto({"id":4742336,"src":"Shadow_Story1_thumb.jpg","galleries_id":67484,"server_id":1,"link":"photo_4742336.html","width":130,"caption":"Shadow Story","height":96});
															thumbnails[5340036] = clik.newPhoto({"id":5340036,"src":"At_the_Worlds_Edge_thumb.jpg","galleries_id":67485,"server_id":1,"link":"photo_5340036.html","width":130,"caption":"At the World's Edge","height":91});
															thumbnails[5340041] = clik.newPhoto({"id":5340041,"src":"London_Eye_Sunset_thumb.jpg","galleries_id":67485,"server_id":1,"link":"photo_5340041.html","width":130,"caption":"Sunset Eye","height":94});
															thumbnails[5340043] = clik.newPhoto({"id":5340043,"src":"The_Smile_thumb.jpg","galleries_id":67486,"server_id":1,"link":"photo_5340043.html","width":130,"caption":"The Smile","height":89});
															thumbnails[5933577] = clik.newPhoto({"id":5933577,"src":"A_Position_of_Safety_thumb.jpg","galleries_id":67486,"server_id":1,"link":"photo_5933577.html","width":130,"caption":"A Position of Safety","height":109});
															thumbnails[5933585] = clik.newPhoto({"id":5933585,"src":"Hiding_and_Seeking_thumb.jpg","galleries_id":67502,"server_id":1,"link":"photo_5933585.html","width":130,"caption":"Hiding and Seeking","height":99});
															thumbnails[5933590] = clik.newPhoto({"id":5933590,"src":"Royal_Academy_Reflection_thumb.jpg","galleries_id":394880,"server_id":1,"link":"photo_5933590.html","width":130,"caption":"Royal Academy Reflection","height":96});
															thumbnails[5933593] = clik.newPhoto({"id":5933593,"src":"The_Weight_of_Expectations_thumb.jpg","galleries_id":67502,"server_id":1,"link":"photo_5933593.html","width":130,"caption":"The Weight of Expectations","height":95});
															thumbnails[6634945] = clik.newPhoto({"id":6634945,"src":"An_Escape_in_Four_Acts_thumb.jpg","galleries_id":67519,"server_id":1,"link":"photo_6634945.html","width":130,"caption":"An Escape in Four Acts","height":163});
															thumbnails[6634952] = clik.newPhoto({"id":6634952,"src":"Reflection_Upon_The_Journey_thumb.jpg","galleries_id":67486,"server_id":1,"link":"photo_6634952.html","width":130,"caption":"A Reflection Upon the Journey","height":112});
															thumbnails[7299088] = clik.newPhoto({"id":7299088,"src":"Fellow_Travellers_thumb.jpg","galleries_id":67486,"server_id":1,"link":"photo_7299088.html","width":130,"caption":"Fellow Travellers","height":80});
															thumbnails[7299098] = clik.newPhoto({"id":7299098,"src":"Sailing_in_Sunlight_thumb.jpg","galleries_id":67485,"server_id":1,"link":"photo_7299098.html","width":130,"caption":"Sailing in Sunlight","height":165});
															thumbnails[7299104] = clik.newPhoto({"id":7299104,"src":"A_Dream_of_Summer_thumb.jpg","galleries_id":394880,"server_id":1,"link":"photo_7299104.html","width":130,"caption":"A Dream of Summer","height":76});
															thumbnails[9057250] = clik.newPhoto({"id":9057250,"src":"Balustrade_with_Arm_thumb.jpg","galleries_id":67487,"server_id":1,"link":"photo_9057250.html","width":130,"caption":"Balustrade with Arm","height":188});
															thumbnails[9057253] = clik.newPhoto({"id":9057253,"src":"Death_in_the_City_thumb.jpg","galleries_id":78376,"server_id":1,"link":"photo_9057253.html","width":130,"caption":"Death in the City","height":57});
															thumbnails[9057254] = clik.newPhoto({"id":9057254,"src":"Forde_Abbey_Fountain_thumb.jpg","galleries_id":122791,"server_id":1,"link":"photo_9057254.html","width":130,"caption":"","height":167});
															thumbnails[9057256] = clik.newPhoto({"id":9057256,"src":"Four_Pier_Portraits_thumb.jpg","galleries_id":78376,"server_id":1,"link":"photo_9057256.html","width":130,"caption":"Four Pier Portraits","height":97});
															thumbnails[9057258] = clik.newPhoto({"id":9057258,"src":"Gay_Pride_Marcher_thumb.jpg","galleries_id":67486,"server_id":1,"link":"photo_9057258.html","width":130,"caption":"Gay Pride Marcher","height":108});
															thumbnails[9057259] = clik.newPhoto({"id":9057259,"src":"Midnight_in_Red_and_Blue_thumb.jpg","galleries_id":67484,"server_id":1,"link":"photo_9057259.html","width":130,"caption":"Midnight in Red and Blue","height":101});
															thumbnails[9057260] = clik.newPhoto({"id":9057260,"src":"Parallel_Lives_thumb.jpg","galleries_id":67486,"server_id":1,"link":"photo_9057260.html","width":130,"caption":"Parallel Lives","height":71});
															thumbnails[9057262] = clik.newPhoto({"id":9057262,"src":"Seeing_Rita_thumb.jpg","galleries_id":78376,"server_id":1,"link":"photo_9057262.html","width":130,"caption":"Seeing Rita","height":89});
															thumbnails[9057264] = clik.newPhoto({"id":9057264,"src":"Sunset_to_Nowhere_thumb.jpg","galleries_id":78376,"server_id":1,"link":"photo_9057264.html","width":130,"caption":"Sunset to Nowhere","height":88});
															thumbnails[9057267] = clik.newPhoto({"id":9057267,"src":"The_Shadow_on_the_Stair_thumb.jpg","galleries_id":78376,"server_id":1,"link":"photo_9057267.html","width":130,"caption":"The Shadow on the Stair","height":100});
															thumbnails[9057269] = clik.newPhoto({"id":9057269,"src":"The_Ties_That_Bind_thumb.jpg","galleries_id":67486,"server_id":1,"link":"photo_9057269.html","width":130,"caption":"The Ties that Bind","height":105});
															thumbnails[9057274] = clik.newPhoto({"id":9057274,"src":"Woodland_Impression_thumb.jpg","galleries_id":122791,"server_id":1,"link":"photo_9057274.html","width":130,"caption":"Woodland Impression","height":98});
															thumbnails[907268] = clik.newPhoto({"id":907268,"src":"Sitting on the Edge_thumb.jpg","galleries_id":67483,"server_id":1,"link":"photo_907268.html","width":130,"caption":"Sitting on the Edge","height":73});
															thumbnails[892728] = clik.newPhoto({"id":892728,"src":"Memories_of_Her_thumb.jpg","galleries_id":67483,"server_id":1,"link":"photo_892728.html","width":130,"caption":"Memories Of Her","height":87});
															thumbnails[892725] = clik.newPhoto({"id":892725,"src":"Face_of_New_York_thumb.jpg","galleries_id":67483,"server_id":1,"link":"photo_892725.html","width":130,"caption":"The Face of New York","height":73});
															thumbnails[879843] = clik.newPhoto({"id":879843,"src":"Nightclub_Story_thumb.jpg","galleries_id":67483,"server_id":1,"link":"photo_879843.html","width":130,"caption":"Nightclub Story","height":78});
															thumbnails[880197] = clik.newPhoto({"id":880197,"src":"Figures_in_Space_thumb.jpg","galleries_id":67483,"server_id":1,"link":"photo_880197.html","width":130,"caption":"Figures in Space","height":96});
															thumbnails[879847] = clik.newPhoto({"id":879847,"src":"Shadow_Games_thumb.jpg","galleries_id":67483,"server_id":1,"link":"photo_879847.html","width":130,"caption":"Shadow Games","height":95});
															thumbnails[879828] = clik.newPhoto({"id":879828,"src":"A_Time_of_Silences_thumb.jpg","galleries_id":67483,"server_id":1,"link":"photo_879828.html","width":130,"caption":"A Time of Silences","height":98});
															thumbnails[2857379] = clik.newPhoto({"id":2857379,"src":"Made in America_thumb.jpg","galleries_id":67483,"server_id":1,"link":"photo_2857379.html","width":130,"caption":"Made in America","height":94});
															thumbnails[2857366] = clik.newPhoto({"id":2857366,"src":"Backstage Dreaming_thumb.jpg","galleries_id":67483,"server_id":1,"link":"photo_2857366.html","width":130,"caption":"Backstage Dreaming","height":73});
															thumbnails[5340046] = clik.newPhoto({"id":5340046,"src":"Windows_and_the_Soul_II_thumb.jpg","galleries_id":67483,"server_id":1,"link":"photo_5340046.html","width":130,"caption":"Windows and the Soul II","height":93});
															thumbnails[4742327] = clik.newPhoto({"id":4742327,"src":"Wind_Sculpture_2_thumb.jpg","galleries_id":67483,"server_id":1,"link":"photo_4742327.html","width":130,"caption":"Wind Sculpture","height":196});
															thumbnails[6634951] = clik.newPhoto({"id":6634951,"src":"Five_to_Midnight_thumb.jpg","galleries_id":67483,"server_id":1,"link":"photo_6634951.html","width":130,"caption":"At the Midnight Hour","height":86});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[67485] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_67485.html","maxRecords":0.0,"photoIDs":[879839.0,892729.0,892737.0,892740.0,907266.0,1054906.0,3528206.0,5340036.0,5340041.0,7299098.0],"skipIndex":0,"section_code":"gallery","featured_images":907266.0,"id":67485,"singleSection":false});				  						galleries[122791] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Infrared Landscapes","link":"gallery_122791.html","maxRecords":0.0,"photoIDs":[879835.0,879855.0,1101297.0,1443425.0,1541821.0,4313612.0,9057254.0,9057274.0],"skipIndex":0,"section_code":"gallery","featured_images":"1541821,1443425,879835","id":122791,"singleSection":false});				  						galleries[67486] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits and People","link":"gallery_67486.html","maxRecords":0.0,"photoIDs":[892721.0,892723.0,1054834.0,1503116.0,1541823.0,2857381.0,5340043.0,5933577.0,6634952.0,7299088.0,9057258.0,9057260.0,9057269.0],"skipIndex":0,"section_code":"gallery","featured_images":892721.0,"id":67486,"singleSection":false});				  						galleries[67484] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Film Noir","link":"gallery_67484.html","maxRecords":0.0,"photoIDs":[879832.0,879851.0,880194.0,892711.0,892720.0,1541815.0,1827023.0,2180839.0,4313621.0,4742336.0,9057259.0],"skipIndex":0,"section_code":"gallery","featured_images":892711.0,"id":67484,"singleSection":false});				  						galleries[394880] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Surreal","link":"gallery_394880.html","maxRecords":0.0,"photoIDs":[879821.0,879831.0,4742317.0,5933590.0,7299104.0],"skipIndex":0,"section_code":"gallery","featured_images":"7299104,5933590,4742317,879831,879821","id":394880,"singleSection":false});				  						galleries[67502] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Masks and Symbols","link":"gallery_67502.html","maxRecords":0.0,"photoIDs":[880207.0,892715.0,892719.0,892724.0,892738.0,1827014.0,1827019.0,4115182.0,5933585.0,5933593.0],"skipIndex":0,"section_code":"gallery","featured_images":"1827014,892738","id":67502,"singleSection":false});				  						galleries[67519] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Narrative","link":"gallery_67519.html","maxRecords":0.0,"photoIDs":[880213.0,892718.0,892727.0,892732.0,6634945.0],"skipIndex":0,"section_code":"gallery","featured_images":892727.0,"id":67519,"singleSection":false});				  						galleries[67487] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Miscellaneous","link":"gallery_67487.html","maxRecords":0.0,"photoIDs":[880196.0,880201.0,880205.0,892714.0,892726.0,892734.0,1101441.0,1443432.0,1827020.0,2180826.0,3528207.0,4115190.0,9057250.0],"skipIndex":0,"section_code":"gallery","featured_images":892726.0,"id":67487,"singleSection":false});				  						galleries[67483] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Awards","link":"gallery_67483.html","maxRecords":0.0,"photoIDs":[907268.0,892728.0,892725.0,879843.0,880197.0,879847.0,879828.0,2857379.0,2857366.0,5340046.0,4742327.0,6634951.0],"skipIndex":0,"section_code":"gallery","featured_images":880197.0,"id":67483,"singleSection":false});				  						galleries[78376] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"New Images 2012","link":"gallery_78376.html","maxRecords":0.0,"photoIDs":[9057253.0,9057256.0,9057262.0,9057264.0,9057267.0],"skipIndex":0,"section_code":"gallery","featured_images":"9057267,9057264,9057262,9057256,9057253","id":78376,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6634951';
imageSets[2] = '1827014,1541821,1443425,907266,892738,892727,892726,892721,892711,879835,880197';
imageSets[3] = '9057274,9057269,9057267,9057264,9057262,9057260,9057259,9057258,9057256,9057254,9057253,9057250,7299104,7299098,7299088,6634952,6634951,6634945,5933593,5933590,5933585,5933577,5340046,5340043,5340041,5340036,4742336,4742327,4742317,4313621,4313612,4115190,4115182,3528207,3528206,2857381,2857379,2857366,2180839,2180826,1827023,1827020,1827019,1827014,1541823,1541821,1541815,1503116,1443432,1443425';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/gwilcock/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/gwilcock/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 = 'Images by Graham Wilcock: ' + 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;
	}
}

			

