window.thumbnails = {};
															thumbnails[4413603] = clik.newPhoto({"id":4413603,"src":"Lowry__leanings_wm_thumb.jpg","galleries_id":258407,"server_id":15,"link":"photo_4413603.html","width":130,"caption":"Lowry interior","height":130});
															thumbnails[4413614] = clik.newPhoto({"id":4413614,"src":"A_glimpse_of_stair1_thumb.jpg","galleries_id":258407,"server_id":15,"link":"photo_4413614.html","width":99,"caption":"A glimpse of stair","height":130});
															thumbnails[4399820] = clik.newPhoto({"id":4399820,"src":"blades_and_shades_wm_thumb.jpg","galleries_id":258407,"server_id":15,"link":"photo_4399820.html","width":101,"caption":"Detail, Paradise Street car park, Liverpool, 2008","height":130});
															thumbnails[6537718] = clik.newPhoto({"id":6537718,"src":"Composition_in_blue_thumb.jpg","galleries_id":258407,"server_id":15,"link":"photo_6537718.html","width":130,"caption":"Composition in blue","height":82});
															thumbnails[4399829] = clik.newPhoto({"id":4399829,"src":"sharp_eyed_fly_wm_thumb.jpg","galleries_id":258407,"server_id":15,"link":"photo_4399829.html","width":97,"caption":"Sharp-eyed fly, 2008","height":130});
															thumbnails[4413437] = clik.newPhoto({"id":4413437,"src":"seventies_plays_noughties_wm_thumb.jpg","galleries_id":258407,"server_id":15,"link":"photo_4413437.html","width":98,"caption":"The 'seventies play the 'noughties","height":130});
															thumbnails[4417007] = clik.newPhoto({"id":4417007,"src":"brises_soleil_wm_thumb.jpg","galleries_id":258407,"server_id":15,"link":"photo_4417007.html","width":99,"caption":"Brises soleil","height":130});
															thumbnails[8531923] = clik.newPhoto({"id":8531923,"src":"enteringtheGreatCourt_thumb.jpg","galleries_id":258407,"server_id":19,"link":"photo_8531923.html","width":130,"caption":"Entering the Great Court","height":95});
															thumbnails[4418809] = clik.newPhoto({"id":4418809,"src":"rain_canopies_wm_thumb.jpg","galleries_id":258407,"server_id":15,"link":"photo_4418809.html","width":98,"caption":"After the rain","height":130});
															thumbnails[4417160] = clik.newPhoto({"id":4417160,"src":"Trajectory_wm_thumb.jpg","galleries_id":258407,"server_id":15,"link":"photo_4417160.html","width":130,"caption":"Trajectory","height":86});
															thumbnails[4418802] = clik.newPhoto({"id":4418802,"src":"French_frills_wm_thumb.jpg","galleries_id":258407,"server_id":15,"link":"photo_4418802.html","width":98,"caption":"French frills","height":130});
															thumbnails[4417104] = clik.newPhoto({"id":4417104,"src":"Glaswegian_reflections_wm_thumb.jpg","galleries_id":258407,"server_id":15,"link":"photo_4417104.html","width":98,"caption":"Glaswegian reflections","height":130});
															thumbnails[4418902] = clik.newPhoto({"id":4418902,"src":"three_tiers_wm_thumb.jpg","galleries_id":258842,"server_id":15,"link":"photo_4418902.html","width":98,"caption":"Three tiers","height":130});
															thumbnails[8531894] = clik.newPhoto({"id":8531894,"src":"behemoth_thumb.jpg","galleries_id":258842,"server_id":19,"link":"photo_8531894.html","width":130,"caption":"The behemoth ","height":96});
															thumbnails[8531973] = clik.newPhoto({"id":8531973,"src":"walktothe_future_thumb.jpg","galleries_id":258842,"server_id":19,"link":"photo_8531973.html","width":115,"caption":"Walking into the future","height":130});
															thumbnails[4567603] = clik.newPhoto({"id":4567603,"src":"40E5a_Cologne_airport_ceiling_wm_smaller_thumb.jpg","galleries_id":258842,"server_id":15,"link":"photo_4567603.html","width":130,"caption":"Cologne Airport ceiling, 1970's","height":88});
															thumbnails[4417097] = clik.newPhoto({"id":4417097,"src":"LIV_clad_quad_copy_wm_thumb.jpg","galleries_id":258842,"server_id":15,"link":"photo_4417097.html","width":130,"caption":"The former Royal Insurance building, 1977","height":85});
															thumbnails[4426610] = clik.newPhoto({"id":4426610,"src":"Secession_owl__frieze_wm1234_thumb.jpg","galleries_id":258842,"server_id":15,"link":"photo_4426610.html","width":130,"caption":"Frieze, Secession building, Vienna, 1977","height":87});
															thumbnails[4399755] = clik.newPhoto({"id":4399755,"src":"view_to_demolition_wm_thumb.jpg","galleries_id":258842,"server_id":15,"link":"photo_4399755.html","width":130,"caption":"Reconstruction, University of Huddersfield, c1977","height":93});
															thumbnails[4432622] = clik.newPhoto({"id":4432622,"src":"Kibble_1_wm_thumb.jpg","galleries_id":258842,"server_id":15,"link":"photo_4432622.html","width":124,"caption":"Kibble Palace - roofscape","height":130});
															thumbnails[4419630] = clik.newPhoto({"id":4419630,"src":"Kibble-interior_wm_thumb.jpg","galleries_id":258842,"server_id":15,"link":"photo_4419630.html","width":130,"caption":"The interior of the recently-refurbished Kibble Palace.","height":98});
															thumbnails[4455163] = clik.newPhoto({"id":4455163,"src":"scallop_shell_Ydes_wm_thumb.jpg","galleries_id":258842,"server_id":15,"link":"photo_4455163.html","width":115,"caption":"The pilgrim trail","height":130});
															thumbnails[4455111] = clik.newPhoto({"id":4455111,"src":"French_hues_wm_thumb.jpg","galleries_id":258842,"server_id":15,"link":"photo_4455111.html","width":103,"caption":"French hues","height":130});
															thumbnails[4863624] = clik.newPhoto({"id":4863624,"src":"Manchester_cathedral_choirstalls_thumb.jpg","galleries_id":258842,"server_id":15,"link":"photo_4863624.html","width":130,"caption":"Choirstalls, Manchester cathedral","height":98});
															thumbnails[4419415] = clik.newPhoto({"id":4419415,"src":"Cavalier_staircase_wm_thumb.jpg","galleries_id":258842,"server_id":15,"link":"photo_4419415.html","width":119,"caption":"Staircase, St James Cavalier","height":130});
															thumbnails[4419366] = clik.newPhoto({"id":4419366,"src":"Evening_Eary_Cushlin_sheep_wm_thumb.jpg","galleries_id":204389,"server_id":15,"link":"photo_4419366.html","width":130,"caption":"Twilight at Eary Cushlin","height":98});
															thumbnails[4420074] = clik.newPhoto({"id":4420074,"src":"Lanagore_Round_Table_wm_thumb.jpg","galleries_id":204389,"server_id":15,"link":"photo_4420074.html","width":130,"caption":"Lanagore","height":80});
															thumbnails[4425539] = clik.newPhoto({"id":4425539,"src":"long_shadows_thumb.jpg","galleries_id":204389,"server_id":15,"link":"photo_4425539.html","width":130,"caption":"Long shadows","height":73});
															thumbnails[4418869] = clik.newPhoto({"id":4418869,"src":"sky_Slieauwhallian_wm_thumb.jpg","galleries_id":204389,"server_id":15,"link":"photo_4418869.html","width":130,"caption":"The evening sky over Slieauwhallian's shoulder","height":98});
															thumbnails[4411716] = clik.newPhoto({"id":4411716,"src":"20060202_93_tracks_in_bracken_Dalby_Mountain_cp_sig12_thumb.jpg","galleries_id":204389,"server_id":15,"link":"photo_4411716.html","width":98,"caption":"Tracks in bracken, Dalby Mountain","height":130});
															thumbnails[4413502] = clik.newPhoto({"id":4413502,"src":"abandoned__farm_thumb.jpg","galleries_id":204389,"server_id":15,"link":"photo_4413502.html","width":103,"caption":"Abandoned farm","height":130});
															thumbnails[4411522] = clik.newPhoto({"id":4411522,"src":"Peel_Castle_wide_thumb.jpg","galleries_id":204389,"server_id":15,"link":"photo_4411522.html","width":130,"caption":"Peel Castle","height":98});
															thumbnails[4426937] = clik.newPhoto({"id":4426937,"src":"Peel_Castle_with_birds_wm_thumb.jpg","galleries_id":204389,"server_id":15,"link":"photo_4426937.html","width":130,"caption":"Peel Castle, winter morning","height":98});
															thumbnails[4410258] = clik.newPhoto({"id":4410258,"src":"kayaks_Peel_thumb.jpg","galleries_id":204389,"server_id":15,"link":"photo_4410258.html","width":130,"caption":"kayaks and curtain wall, 2008","height":98});
															thumbnails[4425538] = clik.newPhoto({"id":4425538,"src":"Port_Erin_black_sky_thumb.jpg","galleries_id":204389,"server_id":15,"link":"photo_4425538.html","width":98,"caption":"Port Erin under a black sky","height":130});
															thumbnails[6537902] = clik.newPhoto({"id":6537902,"src":"Lemon_Peel1_thumb.jpg","galleries_id":204389,"server_id":15,"link":"photo_6537902.html","width":115,"caption":"Lemon Peel","height":130});
															thumbnails[4446033] = clik.newPhoto({"id":4446033,"src":"Peel_sunset_quad_thumb.jpg","galleries_id":257957,"server_id":15,"link":"photo_4446033.html","width":130,"caption":"A quiet evening in Peel","height":81});
															thumbnails[4446043] = clik.newPhoto({"id":4446043,"src":"Sentinel_Port_Erin_thumb.jpg","galleries_id":257957,"server_id":15,"link":"photo_4446043.html","width":130,"caption":"The night watch, c1975","height":61});
															thumbnails[4455256] = clik.newPhoto({"id":4455256,"src":"Derby_Castle_mist__beach_wm_thumb.jpg","galleries_id":257957,"server_id":15,"link":"photo_4455256.html","width":102,"caption":"Misty morning, Douglas<br>\r\n<br>\r\n","height":130});
															thumbnails[4420076] = clik.newPhoto({"id":4420076,"src":"Old_Ballaugh_interior_detail_thumb.jpg","galleries_id":257957,"server_id":15,"link":"photo_4420076.html","width":98,"caption":"Interior detail, Old Ballaugh Church","height":130});
															thumbnails[4455700] = clik.newPhoto({"id":4455700,"src":"Knox_almsdish_wm_thumb.jpg","galleries_id":257957,"server_id":15,"link":"photo_4455700.html","width":130,"caption":"Archibald Knox alms dish","height":121});
															thumbnails[4410955] = clik.newPhoto({"id":4410955,"src":"Niarbyl_mask_tritone_thumb.jpg","galleries_id":257957,"server_id":15,"link":"photo_4410955.html","width":90,"caption":"The Mask, 1965","height":130});
															thumbnails[4418396] = clik.newPhoto({"id":4418396,"src":"silos_crucifix_wm_thumb.jpg","galleries_id":257954,"server_id":15,"link":"photo_4418396.html","width":80,"caption":"ADMARK maize silos, Kanengo","height":130});
															thumbnails[4418402] = clik.newPhoto({"id":4418402,"src":"silo_caps_birds_wm_thumb.jpg","galleries_id":257954,"server_id":15,"link":"photo_4418402.html","width":130,"caption":"Silo caps with ravens, ADMARK maize silos","height":106});
															thumbnails[4456238] = clik.newPhoto({"id":4456238,"src":"Gestetner_wm_thumb.jpg","galleries_id":257954,"server_id":15,"link":"photo_4456238.html","width":130,"caption":"Gestetner building, Limbe","height":94});
															thumbnails[4446156] = clik.newPhoto({"id":4446156,"src":"Kamuzu_Academ_refectory_from_walkway_thumb.jpg","galleries_id":257954,"server_id":15,"link":"photo_4446156.html","width":130,"caption":"Kamuzu Academy","height":85});
															thumbnails[4418387] = clik.newPhoto({"id":4418387,"src":"NICO_elevation_with_birds_thumb.jpg","galleries_id":257954,"server_id":15,"link":"photo_4418387.html","width":127,"caption":"National Insurance Company, with ravens","height":130});
															thumbnails[4446130] = clik.newPhoto({"id":4446130,"src":"Mlale_interior_Baptism_Day_v4_thumb.jpg","galleries_id":257954,"server_id":15,"link":"photo_4446130.html","width":122,"caption":"Baptism Day, Mlale","height":130});
															thumbnails[4418240] = clik.newPhoto({"id":4418240,"src":"civic_offices_LL3_thumb.jpg","galleries_id":257954,"server_id":15,"link":"photo_4418240.html","width":94,"caption":"Civic Offices, Capital City","height":130});
															thumbnails[4418228] = clik.newPhoto({"id":4418228,"src":"boys_on__the_greenwm_thumb.jpg","galleries_id":257954,"server_id":15,"link":"photo_4418228.html","width":130,"caption":"Boys on the green","height":85});
															thumbnails[4418433] = clik.newPhoto({"id":4418433,"src":"Reserve_Bank__lorryload_thumb.jpg","galleries_id":257954,"server_id":15,"link":"photo_4418433.html","width":107,"caption":"A lorry-load of workers","height":130});
															thumbnails[4418259] = clik.newPhoto({"id":4418259,"src":"tobacco_auction_floor_wm_thumb.jpg","galleries_id":257954,"server_id":15,"link":"photo_4418259.html","width":130,"caption":"Auction Holdings - tobacco auction floor, Lilongwe","height":85});
															thumbnails[4411168] = clik.newPhoto({"id":4411168,"src":"panel_224___34a_jazzy_shirt-2_smaller_thumb.jpg","galleries_id":258444,"server_id":15,"link":"photo_4411168.html","width":94,"caption":"Caddie in jazzy shirt","height":130});
															thumbnails[4413339] = clik.newPhoto({"id":4413339,"src":"caddie_star_shirt_thumb.jpg","galleries_id":258444,"server_id":15,"link":"photo_4413339.html","width":100,"caption":"Youth in star shirt","height":130});
															thumbnails[4418437] = clik.newPhoto({"id":4418437,"src":"187_with_fagweb_thumb.jpg","galleries_id":258444,"server_id":15,"link":"photo_4418437.html","width":91,"caption":"The smoker","height":130});
															thumbnails[4418447] = clik.newPhoto({"id":4418447,"src":"soft__hat_thumb.jpg","galleries_id":258444,"server_id":15,"link":"photo_4418447.html","width":94,"caption":"Youth in soft hat","height":130});
															thumbnails[4455213] = clik.newPhoto({"id":4455213,"src":"girls_going_fo__water_thumb.jpg","galleries_id":258444,"server_id":15,"link":"photo_4455213.html","width":113,"caption":"Girls going for water","height":130});
															thumbnails[4426545] = clik.newPhoto({"id":4426545,"src":"solitary_acacia_albida_wm_thumb.jpg","galleries_id":258370,"server_id":15,"link":"photo_4426545.html","width":130,"caption":"The winter thorn","height":102});
															thumbnails[4418379] = clik.newPhoto({"id":4418379,"src":"candelabra-euphorbia_wm_thumb.jpg","galleries_id":258370,"server_id":15,"link":"photo_4418379.html","width":86,"caption":"Candelabra euphorbia","height":130});
															thumbnails[4426534] = clik.newPhoto({"id":4426534,"src":"roadside_baobab_wm_thumb.jpg","galleries_id":258370,"server_id":15,"link":"photo_4426534.html","width":90,"caption":"Roadside baobab","height":130});
															thumbnails[4426380] = clik.newPhoto({"id":4426380,"src":"eucalyptus_silhouette_thumb.jpg","galleries_id":258370,"server_id":15,"link":"photo_4426380.html","width":87,"caption":"Eucalyptus silhouette","height":130});
															thumbnails[4410091] = clik.newPhoto({"id":4410091,"src":"blue-gums_reaching_thumb.jpg","galleries_id":258370,"server_id":15,"link":"photo_4410091.html","width":84,"caption":"Blue gums, Zomba Plateau, Malawi, 1980","height":130});
															thumbnails[4413326] = clik.newPhoto({"id":4413326,"src":"Lengwe_baobab_thicket_thumb.jpg","galleries_id":258370,"server_id":15,"link":"photo_4413326.html","width":103,"caption":"Baobab in thicket, Lengwe, 1984","height":130});
															thumbnails[4410660] = clik.newPhoto({"id":4410660,"src":"walking_past_the_winter_thorn_cp_sig_thumb.jpg","galleries_id":258370,"server_id":15,"link":"photo_4410660.html","width":130,"caption":"Walking past the winter thorn","height":85});
															thumbnails[4411622] = clik.newPhoto({"id":4411622,"src":"2003_August_5_25_three_finger_grip_Injebreck_cp_sig2123_thumb.jpg","galleries_id":258370,"server_id":15,"link":"photo_4411622.html","width":98,"caption":"Three-finger grip","height":130});
															thumbnails[4418382] = clik.newPhoto({"id":4418382,"src":"pawpaw_thumb.jpg","galleries_id":258370,"server_id":15,"link":"photo_4418382.html","width":89,"caption":"Pawpaw","height":130});
															thumbnails[4420127] = clik.newPhoto({"id":4420127,"src":"leaf_shadow_wm_thumb.jpg","galleries_id":258370,"server_id":15,"link":"photo_4420127.html","width":89,"caption":"Leaf shadow","height":130});
															thumbnails[4434659] = clik.newPhoto({"id":4434659,"src":"elegy_Luangwa_thumb.jpg","galleries_id":258370,"server_id":15,"link":"photo_4434659.html","width":84,"caption":"Elegy for Luangwa","height":130});
															thumbnails[6537881] = clik.newPhoto({"id":6537881,"src":"Windblasted_trees_thumb.jpg","galleries_id":258370,"server_id":15,"link":"photo_6537881.html","width":98,"caption":"Wind-blasted trees","height":130});
															thumbnails[4418055] = clik.newPhoto({"id":4418055,"src":"pink_anthurium_wm_thumb.jpg","galleries_id":258385,"server_id":15,"link":"photo_4418055.html","width":130,"caption":"Pink anthurium","height":98});
															thumbnails[4410513] = clik.newPhoto({"id":4410513,"src":"phalenopsis_wm_thumb.jpg","galleries_id":258385,"server_id":15,"link":"photo_4410513.html","width":130,"caption":"Phalenopsis orchid, 2007","height":91});
															thumbnails[4410356] = clik.newPhoto({"id":4410356,"src":"yellow_phalenopsis_thumb.jpg","galleries_id":258385,"server_id":15,"link":"photo_4410356.html","width":130,"caption":"Yellow phalenopsis orchid","height":130});
															thumbnails[4410241] = clik.newPhoto({"id":4410241,"src":"20060505_41_cherry_detail_sig_thumb.jpg","galleries_id":258385,"server_id":15,"link":"photo_4410241.html","width":130,"caption":"Cherry blossom, 2006","height":98});
															thumbnails[4432625] = clik.newPhoto({"id":4432625,"src":"pink_blue_mophead_thumb.jpg","galleries_id":258385,"server_id":15,"link":"photo_4432625.html","width":130,"caption":"Mophead hydrangea","height":98});
															thumbnails[4420147] = clik.newPhoto({"id":4420147,"src":"wild_garlic_thumb.jpg","galleries_id":258385,"server_id":15,"link":"photo_4420147.html","width":98,"caption":"Wild garlic","height":130});
															thumbnails[4413646] = clik.newPhoto({"id":4413646,"src":"green_anthurium_square1_thumb.jpg","galleries_id":258385,"server_id":15,"link":"photo_4413646.html","width":130,"caption":"Green anthurium, 1","height":130});
															thumbnails[4413625] = clik.newPhoto({"id":4413625,"src":"anthurium_mono_thumb.jpg","galleries_id":258385,"server_id":15,"link":"photo_4413625.html","width":130,"caption":"Anthurium, mono 1","height":130});
															thumbnails[4418471] = clik.newPhoto({"id":4418471,"src":"faded_tulip_wm_thumb.jpg","galleries_id":258385,"server_id":15,"link":"photo_4418471.html","width":130,"caption":"Faded tulip","height":93});
															thumbnails[4452083] = clik.newPhoto({"id":4452083,"src":"Unfolding_poppy_sig_thumb.jpg","galleries_id":258385,"server_id":15,"link":"photo_4452083.html","width":130,"caption":"Unfolding poppy","height":128});
															thumbnails[6537774] = clik.newPhoto({"id":6537774,"src":"Amaryllis1_thumb.jpg","galleries_id":258385,"server_id":15,"link":"photo_6537774.html","width":130,"caption":"Amaryllis","height":97});
															thumbnails[4413254] = clik.newPhoto({"id":4413254,"src":"az09_processional_sconces_thumb.jpg","galleries_id":257972,"server_id":15,"link":"photo_4413254.html","width":98,"caption":"Procssional sconces, Sao Sebastiao","height":130});
															thumbnails[4420065] = clik.newPhoto({"id":4420065,"src":"bike_bench_beret_wm_thumb.jpg","galleries_id":257972,"server_id":15,"link":"photo_4420065.html","width":130,"caption":"Bike, bench, beret","height":79});
															thumbnails[4418846] = clik.newPhoto({"id":4418846,"src":"keys_mono_blue_wm_thumb.jpg","galleries_id":257972,"server_id":15,"link":"photo_4418846.html","width":130,"caption":"Keys","height":96});
															thumbnails[4418141] = clik.newPhoto({"id":4418141,"src":"strange_fruit_thumb.jpg","galleries_id":257972,"server_id":15,"link":"photo_4418141.html","width":130,"caption":"The witch's knickers","height":96});
															thumbnails[4452137] = clik.newPhoto({"id":4452137,"src":"Grampian_grouse_moor_thumb.jpg","galleries_id":257972,"server_id":15,"link":"photo_4452137.html","width":130,"caption":"Grampian grouse moor","height":98});
															thumbnails[4420087] = clik.newPhoto({"id":4420087,"src":"frosty_start_thumb.jpg","galleries_id":257972,"server_id":15,"link":"photo_4420087.html","width":130,"caption":"A frosty start","height":122});
															thumbnails[4413440] = clik.newPhoto({"id":4413440,"src":"window_on_Buchanan_Street_thumb.jpg","galleries_id":257972,"server_id":15,"link":"photo_4413440.html","width":122,"caption":"Window on Buchanan Street","height":130});
															thumbnails[4410318] = clik.newPhoto({"id":4410318,"src":"moire_sand_thumb.jpg","galleries_id":257972,"server_id":15,"link":"photo_4410318.html","width":130,"caption":"Moiré sand, 2008","height":98});
															thumbnails[4426338] = clik.newPhoto({"id":4426338,"src":"cloudscape_1_thumb.jpg","galleries_id":257972,"server_id":15,"link":"photo_4426338.html","width":98,"caption":"Cloudscape No. 1","height":130});
															thumbnails[4410860] = clik.newPhoto({"id":4410860,"src":"E81_16a_A_quiet_fag_cp_sig_thumb.jpg","galleries_id":258396,"server_id":15,"link":"photo_4410860.html","width":99,"caption":"A quiet fag, 1977<br>\r\n","height":130});
															thumbnails[4410252] = clik.newPhoto({"id":4410252,"src":"zebrarama_thumb.jpg","galleries_id":258396,"server_id":15,"link":"photo_4410252.html","width":130,"caption":"Zebrarama","height":105});
															thumbnails[4410842] = clik.newPhoto({"id":4410842,"src":"preparing_for_the_rainS_thumb.jpg","galleries_id":258396,"server_id":15,"link":"photo_4410842.html","width":130,"caption":"Preparing for the rains","height":67});
															thumbnails[4419620] = clik.newPhoto({"id":4419620,"src":"Kipper_shed_queue_thumb.jpg","galleries_id":258396,"server_id":15,"link":"photo_4419620.html","width":130,"caption":"The kipper shed queue","height":77});
															thumbnails[4420139] = clik.newPhoto({"id":4420139,"src":"lights_by_the_lake_thumb.jpg","galleries_id":258396,"server_id":15,"link":"photo_4420139.html","width":130,"caption":"Lights by the lake","height":98});
															thumbnails[4452879] = clik.newPhoto({"id":4452879,"src":"The_Surveillance_Society_thumb.jpg","galleries_id":258396,"server_id":15,"link":"photo_4452879.html","width":130,"caption":"The Surveillance Society","height":98});
															thumbnails[4415658] = clik.newPhoto({"id":4415658,"src":"bauhinia_1_wm_thumb.jpg","galleries_id":258675,"server_id":15,"link":"photo_4415658.html","width":128,"caption":"Bauhinia, 1988","height":130});
															thumbnails[4415701] = clik.newPhoto({"id":4415701,"src":"Leibs_on_the_terrace_wm_thumb.jpg","galleries_id":258675,"server_id":15,"link":"photo_4415701.html","width":105,"caption":"Leibs on the terrace, c1982<br>\r\n<br>\r\nOnly available as a card.","height":130});
															thumbnails[4455513] = clik.newPhoto({"id":4455513,"src":"disa_wm_thumb.jpg","galleries_id":258675,"server_id":15,"link":"photo_4455513.html","width":101,"caption":"Disa orchid, Malawi","height":130});
															thumbnails[4566787] = clik.newPhoto({"id":4566787,"src":"burnt_wood_puppets_wm_thumb.jpg","galleries_id":258675,"server_id":15,"link":"photo_4566787.html","width":110,"caption":"Burn-wood puppets, Malawi<br>\r\nInk and airbrush","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[258407] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Architecture 1","link":"gallery_258407.html","maxRecords":0.0,"photoIDs":[4413603.0,4413614.0,4399820.0,6537718.0,4399829.0,4413437.0,4417007.0,8531923.0,4418809.0,4417160.0,4418802.0,4417104.0],"skipIndex":0,"section_code":"gallery","featured_images":"8531923,6537718,4413614,4413603,4399820","id":258407,"singleSection":false});				  						galleries[258842] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Architecture 2","link":"gallery_258842.html","maxRecords":0.0,"photoIDs":[4418902.0,8531894.0,8531973.0,4567603.0,4417097.0,4426610.0,4399755.0,4432622.0,4419630.0,4455163.0,4455111.0,4863624.0,4419415.0],"skipIndex":0,"section_code":"gallery","featured_images":"8531973,8531894,4863624,4455163,4455111,4418902,4417097","id":258842,"singleSection":false});				  						galleries[204388] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Isle of Man","link":"gallery_204388.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"6537902,4446043,4426937,4420076,4420074,4410258","id":204388,"singleSection":false});				  						galleries[204389] = clik.newGallery({"parentGallery":204388,"usePopups":false,"title":"Isle of Man - Colour","link":"gallery_204389.html","maxRecords":0.0,"photoIDs":[4419366.0,4420074.0,4425539.0,4418869.0,4411716.0,4413502.0,4411522.0,4426937.0,4410258.0,4425538.0,6537902.0],"skipIndex":0,"section_code":"gallery","featured_images":"6537902,4426937,4420074,4410258","id":204389,"singleSection":false});				  						galleries[257957] = clik.newGallery({"parentGallery":204388,"usePopups":false,"title":"Isle of Man - Mono","link":"gallery_257957.html","maxRecords":0.0,"photoIDs":[4446033.0,4446043.0,4455256.0,4420076.0,4455700.0,4410955.0],"skipIndex":0,"section_code":"gallery","featured_images":"4446043,4420076","id":257957,"singleSection":false});				  						galleries[257953] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Malawi","link":"gallery_257953.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"4446156,4418402,4418387,4413339","id":257953,"singleSection":false});				  						galleries[257954] = clik.newGallery({"parentGallery":257953,"usePopups":false,"title":"Malawi architecture","link":"gallery_257954.html","maxRecords":0.0,"photoIDs":[4418396.0,4418402.0,4456238.0,4446156.0,4418387.0,4446130.0,4418240.0,4418228.0,4418433.0,4418259.0],"skipIndex":0,"section_code":"gallery","featured_images":"4446156,4418402,4418387","id":257954,"singleSection":false});				  						galleries[258444] = clik.newGallery({"parentGallery":257953,"usePopups":false,"title":"The Malawians","link":"gallery_258444.html","maxRecords":0.0,"photoIDs":[4411168.0,4413339.0,4418437.0,4418447.0,4455213.0],"skipIndex":0,"section_code":"gallery","featured_images":4413339.0,"id":258444,"singleSection":false});				  						galleries[257968] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Flora","link":"gallery_257968.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"6537774,4426534,4418471,4418379,4410356,4410241","id":257968,"singleSection":false});				  						galleries[258370] = clik.newGallery({"parentGallery":257968,"usePopups":false,"title":"Trees and larger plants","link":"gallery_258370.html","maxRecords":0.0,"photoIDs":[4426545.0,4418379.0,4426534.0,4426380.0,4410091.0,4413326.0,4410660.0,4411622.0,4418382.0,4420127.0,4434659.0,6537881.0],"skipIndex":0,"section_code":"gallery","featured_images":"4426534,4418379","id":258370,"singleSection":false});				  						galleries[258385] = clik.newGallery({"parentGallery":257968,"usePopups":false,"title":"Flora 1","link":"gallery_258385.html","maxRecords":0.0,"photoIDs":[4418055.0,4410513.0,4410356.0,4410241.0,4432625.0,4420147.0,4413646.0,4413625.0,4418471.0,4452083.0,6537774.0],"skipIndex":0,"section_code":"gallery","featured_images":"6537774,4418471,4410356,4410241","id":258385,"singleSection":false});				  						galleries[257972] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Cornucopia","link":"gallery_257972.html","maxRecords":0.0,"photoIDs":[4413254.0,4420065.0,4418846.0,4418141.0,4452137.0,4420087.0,4413440.0,4410318.0,4426338.0],"skipIndex":0,"section_code":"gallery","featured_images":"4418846,4413440,4413254","id":257972,"singleSection":false});				  						galleries[258396] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"SFX","link":"gallery_258396.html","maxRecords":0.0,"photoIDs":[4410860.0,4410252.0,4410842.0,4419620.0,4420139.0,4452879.0],"skipIndex":0,"section_code":"gallery","featured_images":"4410860,4410252","id":258396,"singleSection":false});				  						galleries[258675] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"graphics","link":"gallery_258675.html","maxRecords":0.0,"photoIDs":[4415658.0,4415701.0,4455513.0,4566787.0],"skipIndex":0,"section_code":"gallery","featured_images":4415701.0,"id":258675,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6537902,6537718,4863624,4567603,4456238,4452879,4446156,4446033,4426610,4426545,4420065,4419630,4419366,4418869,4418846,4418402,4418055,4417097,4415658,4413603,4411168,4410513,4410252';
imageSets[2] = '8531973,8531923,8531894,6537902,6537774,6537718,4863624,4455163,4455111,4446156,4446043,4426937,4426534,4420076,4420074,4418902,4418846,4418471,4418402,4418387,4418379,4417097,4415701,4413614,4413603,4413440,4413339,4413254,4410860,4410356,4410258,4410252,4410241,4399820';
imageSets[3] = '8531973,8531923,6537881,4567603,4566787,4456238,4455700,4455513,4455256,4455213,4455163,4455111,4452879,4452137,4452083,4446156,4446130,4446043,4446033,4434659,4432625,4432622,4426937,4426610,4426545,4426534,4426380,4426338,4425539,4425538,4420147,4420139,4420127,4420087,4420076,4420074,4420065,4419630,4419620,4419415,4419366,4418902,4418869,4418846,4418809,4418802,4418471,4418447,4418437,4418433,4418402,4418396,4418387,4418382,4418379,4418259,4418240,4418228,4418141,4418055,4417160,4417104,4417097,4417007,4415701,4415658,4413646,4413625,4413614,4413502,4413440,4413437,4413339,4413326,4413254,4411716,4411622,4411522,4411168,4410955,4410860,4410842,4410660,4410513,4410356,4410318,4410258,4410252,4410241,4410091,4399829,4399820,4399755';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/tutt/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/tutt/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/tutt/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/tutt/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/tutt/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/tutt/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/tutt/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 = 'Patricia Tutt Photography +: ' + 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/artist: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				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>Buy now using PayPal:</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="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		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 += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="TUTT">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

