window.thumbnails = {};
															thumbnails[4504547] = clik.newPhoto({"id":4504547,"src":"guilt_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":97});
															thumbnails[4578042] = clik.newPhoto({"id":4578042,"src":"Work_2_Aug_09_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"24th August 2009","height":97});
															thumbnails[4590902] = clik.newPhoto({"id":4590902,"src":"Art_day_with_Alice_Aug_09_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"26th August 2009","height":92});
															thumbnails[4605174] = clik.newPhoto({"id":4605174,"src":"love_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":97});
															thumbnails[4614232] = clik.newPhoto({"id":4614232,"src":"exhausted_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":98});
															thumbnails[4711074] = clik.newPhoto({"id":4711074,"src":"Aeroplane_scene_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"13th September 2009","height":92});
															thumbnails[4810496] = clik.newPhoto({"id":4810496,"src":"frusstration_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":98});
															thumbnails[5269295] = clik.newPhoto({"id":5269295,"src":"ink_bird_dec_091_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"19th December 2009","height":179});
															thumbnails[5609302] = clik.newPhoto({"id":5609302,"src":"fear_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":100});
															thumbnails[4218530] = clik.newPhoto({"id":4218530,"src":"isolation_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":90});
															thumbnails[4569165] = clik.newPhoto({"id":4569165,"src":"10_Aug_09_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"10th August 2009","height":96});
															thumbnails[4448637] = clik.newPhoto({"id":4448637,"src":"protective_Aug_5_09_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":93});
															thumbnails[4569286] = clik.newPhoto({"id":4569286,"src":"11_Aug_09_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"11th August 2009","height":93});
															thumbnails[4569240] = clik.newPhoto({"id":4569240,"src":"23_Aug_09_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"23rd August 2009","height":92});
															thumbnails[3394265] = clik.newPhoto({"id":3394265,"src":"Create woman_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3394265.html","width":130,"caption":"Create ","height":80});
															thumbnails[3404100] = clik.newPhoto({"id":3404100,"src":"Katy Dove Workshop - Metropole1_thumb.jpg","galleries_id":207926,"server_id":15,"link":"photo_3404100.html","width":130,"caption":"Katy Dove Workshop","height":98});
															thumbnails[4809731] = clik.newPhoto({"id":4809731,"src":"woman_iin_red21_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_4809731.html","width":130,"caption":"Untitled","height":160});
															thumbnails[4903624] = clik.newPhoto({"id":4903624,"src":"red_book_back_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_4903624.html","width":130,"caption":"Untitled","height":101});
															thumbnails[4903637] = clik.newPhoto({"id":4903637,"src":"back_bodice_woman_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_4903637.html","width":130,"caption":"Untitled","height":106});
															thumbnails[4903702] = clik.newPhoto({"id":4903702,"src":"binoculars_woman_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_4903702.html","width":130,"caption":"Untitled","height":160});
															thumbnails[4903704] = clik.newPhoto({"id":4903704,"src":"crown_woman_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_4903704.html","width":130,"caption":"Untitled ","height":159});
															thumbnails[4903717] = clik.newPhoto({"id":4903717,"src":"leopard_bird_on_page_brown_paper_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_4903717.html","width":130,"caption":"Untitled","height":100});
															thumbnails[4903861] = clik.newPhoto({"id":4903861,"src":"lipstick_woman_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_4903861.html","width":130,"caption":"Untitled","height":159});
															thumbnails[4903862] = clik.newPhoto({"id":4903862,"src":"winters_tale_first_page_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_4903862.html","width":130,"caption":"Untitled","height":160});
															thumbnails[5292343] = clik.newPhoto({"id":5292343,"src":"I_dream_of_a_place_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_5292343.html","width":130,"caption":"I dream of a place . . . . ","height":121});
															thumbnails[5445742] = clik.newPhoto({"id":5445742,"src":"Voice_woman_thumb.jpg","galleries_id":307948,"server_id":15,"link":"photo_5445742.html","width":130,"caption":"Untitled ","height":130});
															thumbnails[5445750] = clik.newPhoto({"id":5445750,"src":"wedding_dress_thumb.jpg","galleries_id":307948,"server_id":15,"link":"photo_5445750.html","width":130,"caption":"Untitled","height":133});
															thumbnails[5445752] = clik.newPhoto({"id":5445752,"src":"Lonesome_thumb.jpg","galleries_id":307948,"server_id":15,"link":"photo_5445752.html","width":130,"caption":"Untitled","height":129});
															thumbnails[5445755] = clik.newPhoto({"id":5445755,"src":"black_bird_thumb.jpg","galleries_id":307948,"server_id":15,"link":"photo_5445755.html","width":130,"caption":"Untitled","height":129});
															thumbnails[5445837] = clik.newPhoto({"id":5445837,"src":"dare_to_be_yourself_thumb.jpg","galleries_id":307948,"server_id":15,"link":"photo_5445837.html","width":130,"caption":"Untitled","height":130});
															thumbnails[7352753] = clik.newPhoto({"id":7352753,"src":"Jan_2011_me_standing_up_thumb.jpg","galleries_id":207926,"server_id":15,"link":"photo_7352753.html","width":130,"caption":"Customised art workshop, January 2011","height":87});
															thumbnails[7352785] = clik.newPhoto({"id":7352785,"src":"queen_jan_art_workshop_20111_thumb.jpg","galleries_id":207926,"server_id":15,"link":"photo_7352785.html","width":130,"caption":"Final piece from Customised art Workshop, January 2011","height":96});
															thumbnails[8406165] = clik.newPhoto({"id":8406165,"src":"Grethel_clikpic_thumb.jpg","galleries_id":307948,"server_id":15,"link":"photo_8406165.html","width":130,"caption":"Grethel","height":97});
															thumbnails[8406171] = clik.newPhoto({"id":8406171,"src":"Grethel_Detail_clikpic1_thumb.jpg","galleries_id":307948,"server_id":15,"link":"photo_8406171.html","width":130,"caption":"Grethel Detail","height":98});
															thumbnails[9091750] = clik.newPhoto({"id":9091750,"src":"grey_rock_ladies_500-2_2_thumb.jpg","galleries_id":479603,"server_id":15,"link":"photo_9091750.html","width":130,"caption":"","height":190});
															thumbnails[9091757] = clik.newPhoto({"id":9091757,"src":"tree-and-white-woman-500_2_thumb.jpg","galleries_id":479603,"server_id":15,"link":"photo_9091757.html","width":130,"caption":"","height":88});
															thumbnails[9091772] = clik.newPhoto({"id":9091772,"src":"louise_502_thumb1_1.jpg","galleries_id":479610,"server_id":15,"link":"photo_9091772.html","width":200,"caption":"","height":133});
															thumbnails[9091794] = clik.newPhoto({"id":9091794,"src":"norway_502_thumb.jpg","galleries_id":479603,"server_id":15,"link":"photo_9091794.html","width":130,"caption":"","height":176});
															thumbnails[9091796] = clik.newPhoto({"id":9091796,"src":"desert_MA_show_502_thumb.jpg","galleries_id":479603,"server_id":15,"link":"photo_9091796.html","width":130,"caption":"","height":183});
															thumbnails[9091798] = clik.newPhoto({"id":9091798,"src":"cinema_502_thumb.jpg","galleries_id":479603,"server_id":15,"link":"photo_9091798.html","width":130,"caption":"","height":175});
															thumbnails[9091800] = clik.newPhoto({"id":9091800,"src":"red_queen_and_soldiers_502_thumb.jpg","galleries_id":479603,"server_id":15,"link":"photo_9091800.html","width":130,"caption":"","height":197});
															thumbnails[9091801] = clik.newPhoto({"id":9091801,"src":"astronaut_bug_501_thumb.jpg","galleries_id":479603,"server_id":15,"link":"photo_9091801.html","width":130,"caption":"","height":91});
															thumbnails[9091802] = clik.newPhoto({"id":9091802,"src":"spotlit_final_cinderella_image_502_thumb.jpg","galleries_id":479615,"server_id":15,"link":"photo_9091802.html","width":130,"caption":"","height":82});
															thumbnails[9091804] = clik.newPhoto({"id":9091804,"src":"Alice_house_502_thumb.jpg","galleries_id":479610,"server_id":15,"link":"photo_9091804.html","width":130,"caption":"","height":86});
															thumbnails[9091805] = clik.newPhoto({"id":9091805,"src":"amoria_502_thumb.jpg","galleries_id":479610,"server_id":15,"link":"photo_9091805.html","width":130,"caption":"","height":86});
															thumbnails[9091807] = clik.newPhoto({"id":9091807,"src":"Critchlow_Amelia_I2012_3_thumb.jpg","galleries_id":479610,"server_id":15,"link":"photo_9091807.html","width":130,"caption":"","height":85});
															thumbnails[9091809] = clik.newPhoto({"id":9091809,"src":"keziah_502_thumb.jpg","galleries_id":479610,"server_id":15,"link":"photo_9091809.html","width":130,"caption":"","height":86});
															thumbnails[9091812] = clik.newPhoto({"id":9091812,"src":"hyoka_502_thumb.jpg","galleries_id":479610,"server_id":15,"link":"photo_9091812.html","width":130,"caption":"","height":86});
															thumbnails[9091814] = clik.newPhoto({"id":9091814,"src":"Cinderella_good_grey_501_thumb.jpg","galleries_id":479610,"server_id":15,"link":"photo_9091814.html","width":130,"caption":"","height":85});
															thumbnails[3545296] = clik.newPhoto({"id":3545296,"src":"Ironing_woman_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_3545296.html","width":130,"caption":"Lovely Creatures Series: Untitled","height":179});
															thumbnails[3560636] = clik.newPhoto({"id":3560636,"src":"Young_Creatives_Youth_Inclusion_10_wk_Course_image_of_work_thumb.jpg","galleries_id":207926,"server_id":15,"link":"photo_3560636.html","width":130,"caption":"Young Creatives Competition","height":96});
															thumbnails[8335780] = clik.newPhoto({"id":8335780,"src":"littleredaug11_thumb.jpg","galleries_id":307948,"server_id":15,"link":"photo_8335780.html","width":130,"caption":"Little Red","height":98});
															thumbnails[3403788] = clik.newPhoto({"id":3403788,"src":"Avent bottle woman_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3403788.html","width":130,"caption":"Lovely Creatures Series: Avent ","height":82});
															thumbnails[3560629] = clik.newPhoto({"id":3560629,"src":"Mixed_Media_Adult_Horniman_thumb.jpg","galleries_id":207926,"server_id":15,"link":"photo_3560629.html","width":130,"caption":"Mixed Media Course","height":98});
															thumbnails[3403797] = clik.newPhoto({"id":3403797,"src":"Kill Bill_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3403797.html","width":130,"caption":"Kill Bill ","height":86});
															thumbnails[3560616] = clik.newPhoto({"id":3560616,"src":"Adult_Art_Course_at_Horniman_Musuem_thumb.jpg","galleries_id":207926,"server_id":15,"link":"photo_3560616.html","width":130,"caption":"Adult Mixed Media Course","height":98});
															thumbnails[3403870] = clik.newPhoto({"id":3403870,"src":"Motorbike Woman1_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3403870.html","width":130,"caption":"Lovely Creatures Series: Untitled","height":74});
															thumbnails[3545322] = clik.newPhoto({"id":3545322,"src":"Bird_scale_woman_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_3545322.html","width":130,"caption":"Lovely Creatures Series: Untitled","height":180});
															thumbnails[3403852] = clik.newPhoto({"id":3403852,"src":"Sound of music_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3403852.html","width":130,"caption":"Sound of Dusting ","height":91});
															thumbnails[3405034] = clik.newPhoto({"id":3405034,"src":"Art on a postcard project sample postcards1_thumb.jpg","galleries_id":207926,"server_id":15,"link":"photo_3405034.html","width":130,"caption":"Art on a Postcard: \"Ideas on How to Improve Your World\"","height":89});
															thumbnails[3560631] = clik.newPhoto({"id":3560631,"src":"Art_on_a_Postcard_Project_tent_thumb.jpg","galleries_id":207926,"server_id":15,"link":"photo_3560631.html","width":130,"caption":"Art on a Postcard: \"Ideas on How to Improve Your World\". Windmill Festival, Brixton, 2005","height":92});
															thumbnails[3562790] = clik.newPhoto({"id":3562790,"src":"Art_Woman_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_3562790.html","width":130,"caption":"Lovely Creatures Series: Untitled","height":179});
															thumbnails[3403885] = clik.newPhoto({"id":3403885,"src":"Rise_mini canvas_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3403885.html","width":130,"caption":"Rise","height":133});
															thumbnails[3560635] = clik.newPhoto({"id":3560635,"src":"Me_running_Refugee__Asylum_Seekers_Week_Workshop_thumb.jpg","galleries_id":207926,"server_id":15,"link":"photo_3560635.html","width":130,"caption":"Refugee & Asylum Seekers Week","height":98});
															thumbnails[3562898] = clik.newPhoto({"id":3562898,"src":"Bird_book_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_3562898.html","width":130,"caption":"Lovely Creatures Series: Bookworm","height":180});
															thumbnails[3562908] = clik.newPhoto({"id":3562908,"src":"Blackberrybag_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_3562908.html","width":130,"caption":"Lovely Creatures Series: Director","height":179});
															thumbnails[3405436] = clik.newPhoto({"id":3405436,"src":"Ambassadors of the world_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3405436.html","width":130,"caption":"Ambassadors of the World","height":179});
															thumbnails[3560645] = clik.newPhoto({"id":3560645,"src":"Garden_Course_0011_thumb.jpg","galleries_id":207926,"server_id":15,"link":"photo_3560645.html","width":130,"caption":"Eardley School Art Project","height":97});
															thumbnails[3562911] = clik.newPhoto({"id":3562911,"src":"Drink_it_woman_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_3562911.html","width":130,"caption":"Lovely Creatures Series: Tired","height":179});
															thumbnails[3560648] = clik.newPhoto({"id":3560648,"src":"Tooting_Exhib_2_thumb.jpg","galleries_id":207926,"server_id":15,"link":"photo_3560648.html","width":130,"caption":"Exhibition of Eardley School art Work - Tooting Leisure Centre","height":98});
															thumbnails[3562916] = clik.newPhoto({"id":3562916,"src":"Hoover_woman_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_3562916.html","width":130,"caption":"Lovely Creatures Series: Untitled","height":180});
															thumbnails[3543258] = clik.newPhoto({"id":3543258,"src":"Book_reader1_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3543258.html","width":130,"caption":"Lovely Creature Series: Untitled","height":160});
															thumbnails[3560658] = clik.newPhoto({"id":3560658,"src":"MiniMasters1_thumb.jpg","galleries_id":207926,"server_id":15,"link":"photo_3560658.html","width":130,"caption":"Mini Masters","height":98});
															thumbnails[3562921] = clik.newPhoto({"id":3562921,"src":"Lampshade_teddy_thumb.jpg","galleries_id":207240,"server_id":15,"link":"photo_3562921.html","width":130,"caption":"Lovely Creatures Series: Untitled","height":179});
															thumbnails[4810216] = clik.newPhoto({"id":4810216,"src":"whisk-woman-2_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_4810216.html","width":130,"caption":"Untitled","height":131});
															thumbnails[3543271] = clik.newPhoto({"id":3543271,"src":"drill_woman_2_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3543271.html","width":130,"caption":"Lovely Creatures Series","height":159});
															thumbnails[3562227] = clik.newPhoto({"id":3562227,"src":"gun_marriage_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3562227.html","width":130,"caption":"Lovely Creatures Series: Untitled","height":101});
															thumbnails[3562753] = clik.newPhoto({"id":3562753,"src":"Flyby_bag_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3562753.html","width":130,"caption":"Lovely Creatures Series: Untitled","height":99});
															thumbnails[3544256] = clik.newPhoto({"id":3544256,"src":"Tennis-player_thumb.gif","galleries_id":207239,"server_id":15,"link":"photo_3544256.html","width":130,"caption":"Lovely Creatures Series: Untitled","height":101});
															thumbnails[3544296] = clik.newPhoto({"id":3544296,"src":"glass-eye_thumb.gif","galleries_id":207239,"server_id":15,"link":"photo_3544296.html","width":130,"caption":"Lovely Creatures Series: Untitled","height":158});
															thumbnails[3546725] = clik.newPhoto({"id":3546725,"src":"bluebirdhat_detail2_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3546725.html","width":130,"caption":"Detail of: Lovely Creatures Series: Untitled","height":88});
															thumbnails[3550887] = clik.newPhoto({"id":3550887,"src":"Pregnant_camera3_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3550887.html","width":130,"caption":"Lovely Creatures Series: Artist","height":158});
															thumbnails[3551085] = clik.newPhoto({"id":3551085,"src":"Relic1_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3551085.html","width":130,"caption":"Relic 1","height":130});
															thumbnails[3605136] = clik.newPhoto({"id":3605136,"src":"Relic_2_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3605136.html","width":130,"caption":"Relic 2","height":130});
															thumbnails[3605230] = clik.newPhoto({"id":3605230,"src":"Relic_3_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3605230.html","width":130,"caption":"Relic 3","height":130});
															thumbnails[3605242] = clik.newPhoto({"id":3605242,"src":"Relic_4_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3605242.html","width":130,"caption":"Relic 4","height":130});
															thumbnails[3605266] = clik.newPhoto({"id":3605266,"src":"Walk_Yourself_Slim_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3605266.html","width":130,"caption":"Walk Yourself Slim ","height":99});
															thumbnails[3605273] = clik.newPhoto({"id":3605273,"src":"Look_Ten_Years_Younger_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3605273.html","width":130,"caption":"Look Ten Years Younger","height":103});
															thumbnails[3564355] = clik.newPhoto({"id":3564355,"src":"hope_writing1_thumb.jpg","galleries_id":207239,"server_id":15,"link":"photo_3564355.html","width":130,"caption":"Untitled","height":123});
															thumbnails[3561771] = clik.newPhoto({"id":3561771,"src":"textiles-fair-header1_thumb.JPG","galleries_id":217809,"server_id":15,"link":"photo_3561771.html","width":130,"caption":"","height":28});
															thumbnails[3564333] = clik.newPhoto({"id":3564333,"src":"bluebirdhat_detail_2_thumb.jpg","galleries_id":217809,"server_id":15,"link":"photo_3564333.html","width":130,"caption":"","height":88});
															thumbnails[3731721] = clik.newPhoto({"id":3731721,"src":"art_fair_a_09_copya_thumb.jpg","galleries_id":217809,"server_id":15,"link":"photo_3731721.html","width":130,"caption":"","height":184});
															thumbnails[5060284] = clik.newPhoto({"id":5060284,"src":"CANNIZARO_E-FLYER1_thumb.jpg","galleries_id":217809,"server_id":15,"link":"photo_5060284.html","width":130,"caption":"","height":156});
															thumbnails[5490319] = clik.newPhoto({"id":5490319,"src":"my_flower_mixed_collage_thumb.jpg","galleries_id":217809,"server_id":15,"link":"photo_5490319.html","width":130,"caption":"","height":135});
															thumbnails[5498685] = clik.newPhoto({"id":5498685,"src":"ecourse_black_border_with_AC12345_thumb.jpg","galleries_id":217809,"server_id":15,"link":"photo_5498685.html","width":130,"caption":"","height":116});
															thumbnails[9014329] = clik.newPhoto({"id":9014329,"src":"art_of_7_poster_thumb.jpg","galleries_id":217809,"server_id":15,"link":"photo_9014329.html","width":130,"caption":"","height":184});
															thumbnails[3561871] = clik.newPhoto({"id":3561871,"src":"textiles-fair-header11_thumb.JPG","galleries_id":217809,"server_id":15,"link":"photo_3561871.html","width":130,"caption":"","height":28});
															thumbnails[3561898] = clik.newPhoto({"id":3561898,"src":"twin_stars_thumb.jpg","galleries_id":217809,"server_id":15,"link":"photo_3561898.html","width":130,"caption":"twin stars","height":74});
															thumbnails[3569419] = clik.newPhoto({"id":3569419,"src":"Create_woman_2_thumb.jpg","galleries_id":217809,"server_id":15,"link":"photo_3569419.html","width":130,"caption":"","height":80});
															thumbnails[3561996] = clik.newPhoto({"id":3561996,"src":"Me_and_G_thumb.jpg","galleries_id":217809,"server_id":15,"link":"photo_3561996.html","width":130,"caption":"","height":131});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[479603] = clik.newGallery({"parentGallery":479602,"usePopups":false,"title":"collage works","link":"gallery_479603.html","maxRecords":0.0,"photoIDs":[9091750.0,9091757.0,9091794.0,9091796.0,9091798.0,9091800.0,9091801.0],"skipIndex":0,"section_code":"gallery","featured_images":"9091801,9091800,9091798,9091796,9091794,9091757,9091750","id":479603,"singleSection":false});				  						galleries[479615] = clik.newGallery({"parentGallery":479602,"usePopups":false,"title":"moving image","link":"gallery_479615.html","maxRecords":0.0,"photoIDs":[9091802.0],"skipIndex":0,"section_code":"gallery","featured_images":9091802.0,"id":479615,"singleSection":false});				  						galleries[479610] = clik.newGallery({"parentGallery":479602,"usePopups":false,"title":"photographic works","link":"gallery_479610.html","maxRecords":0.0,"photoIDs":[9091772.0,9091804.0,9091805.0,9091807.0,9091809.0,9091812.0,9091814.0],"skipIndex":0,"section_code":"gallery","featured_images":"9091814,9091812,9091809,9091807,9091805,9091804,9091772","id":479610,"singleSection":false});				  						galleries[217809] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Private Gallery","link":"section267245_217809.html","maxRecords":0.0,"photoIDs":[3561771.0,3564333.0,3731721.0,5060284.0,5490319.0,5498685.0,9014329.0,3561871.0,3561898.0,3569419.0,3561996.0],"skipIndex":0,"section_code":"section267245","featured_images":"9014329,5498685,5490319,5060284,3731721,3569419,3564333,3561996,3561898,3561871","id":217809,"singleSection":false});				  						galleries[479602] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"current works","link":"gallery_479602.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"9091814,9091812,9091809,9091807,9091805,9091804,9091802,9091801,9091800,9091798","id":479602,"singleSection":false});				  						galleries[207239] = clik.newGallery({"parentGallery":479591,"usePopups":false,"title":"Textile Works","link":"gallery_207239.html","maxRecords":0.0,"photoIDs":[3394265.0,5292343.0,3403788.0,3403797.0,3403870.0,3403852.0,3403885.0,3405436.0,3543258.0,4810216.0,3543271.0,3562227.0,3562753.0,3544256.0,3544296.0,3546725.0,3550887.0,3551085.0,3605136.0,3605230.0,3605242.0,3605266.0,3605273.0,3564355.0],"skipIndex":0,"section_code":"gallery","featured_images":"5292343,4810216,3605273,3605266,3605242,3605230,3605136,3564355,3562753,3562227","id":207239,"singleSection":false});				  						galleries[479591] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"archive works 2007-10","link":"gallery_479591.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"8406171,8406165,8335780,7352785,7352753,5445837,5445755,5445752,5445750,5445742","id":479591,"singleSection":false});				  						galleries[207240] = clik.newGallery({"parentGallery":479591,"usePopups":false,"title":"Paper Works","link":"gallery_207240.html","maxRecords":0.0,"photoIDs":[4809731.0,4903624.0,4903637.0,4903702.0,4903704.0,4903717.0,4903861.0,4903862.0,3545296.0,3545322.0,3562790.0,3562898.0,3562908.0,3562911.0,3562916.0,3562921.0],"skipIndex":0,"section_code":"gallery","featured_images":"4903862,4903861,4903717,4903704,4903702,4903637,4903624,4809731,3562921,3562916","id":207240,"singleSection":false});				  						galleries[307948] = clik.newGallery({"parentGallery":479591,"usePopups":false,"title":"Canvas Works","link":"gallery_307948.html","maxRecords":0.0,"photoIDs":[5445742.0,5445750.0,5445752.0,5445755.0,5445837.0,8406165.0,8406171.0,8335780.0],"skipIndex":0,"section_code":"gallery","featured_images":"8406171,8406165,8335780,5445837,5445755,5445752,5445750,5445742","id":307948,"singleSection":false});				  						galleries[479595] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"exhibitions","link":"section267245_479595.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section267245","featured_images":"","id":479595,"singleSection":false});				  						galleries[207926] = clik.newGallery({"parentGallery":479591,"usePopups":false,"title":"workshops","link":"gallery_207926.html","maxRecords":0.0,"photoIDs":[3404100.0,7352753.0,7352785.0,3560636.0,3560629.0,3560616.0,3405034.0,3560631.0,3560635.0,3560645.0,3560648.0,3560658.0],"skipIndex":0,"section_code":"gallery","featured_images":"7352785,7352753,3560658,3560648,3560645,3560636,3560635,3560631,3560629,3560616","id":207926,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9091807,9091801,9091772,9091757,9091750,8335780';
imageSets[3] = '9091814,9091812,9091809,9091807,9091805,9091804,9091802,9091801,9091800,9091798,9091796,9091794,9091772,9091757,9091750,9014329,8406171,8406165,8335780,7352785,7352753,5609302,5498685,5490319,5445837,5445755,5445752,5445750,5445742,5292343,5269295,5060284,4903862,4903861,4903717,4903704,4903702,4903637,4903624,4810496,4810216,4809731,4711074,4614232,4605174,4590902,4578042,4569286,4569240,4569165';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/acritchlow/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/acritchlow/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 = 'amelia critchlow: ' + 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.item_price !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="ameliacritchlow@hotmail.com">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="ameliacritchlow@hotmail.com">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						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;
	}
}

			

