window.thumbnails = {};
															thumbnails[3685791] = clik.newPhoto({"id":3685791,"src":"Solitude1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Solitude - Tonle Sap Lake, Cambodia","height":67});
															thumbnails[3656137] = clik.newPhoto({"id":3656137,"src":"Claudia2_thumb.jpg","galleries_id":425088,"server_id":15,"link":"photo_3656137.html","width":111,"caption":"Claudia","height":130});
															thumbnails[3656139] = clik.newPhoto({"id":3656139,"src":"Indias-child1_thumb.jpg","galleries_id":222806,"server_id":15,"link":"photo_3656139.html","width":94,"caption":"India's child","height":130});
															thumbnails[3656308] = clik.newPhoto({"id":3656308,"src":"Solitude_thumb.jpg","galleries_id":222806,"server_id":15,"link":"photo_3656308.html","width":130,"caption":"Solitude - Tonle Sap Lake, Cambodia","height":67});
															thumbnails[3656322] = clik.newPhoto({"id":3656322,"src":"Boy-in-the-shadow1_thumb.jpg","galleries_id":222806,"server_id":15,"link":"photo_3656322.html","width":104,"caption":"Boy in the shadow - Laos","height":130});
															thumbnails[3656339] = clik.newPhoto({"id":3656339,"src":"Girl-by-campfire-Nepal_thumb.jpg","galleries_id":222806,"server_id":15,"link":"photo_3656339.html","width":112,"caption":"Girl by Campfire - Nepal","height":130});
															thumbnails[3664774] = clik.newPhoto({"id":3664774,"src":"Cow-parsley_thumb.jpg","galleries_id":223786,"server_id":15,"link":"photo_3664774.html","width":91,"caption":"Cow parsley","height":130});
															thumbnails[3664778] = clik.newPhoto({"id":3664778,"src":"Orange-blossom_thumb.jpg","galleries_id":223786,"server_id":15,"link":"photo_3664778.html","width":124,"caption":"Orange blossom","height":130});
															thumbnails[3664780] = clik.newPhoto({"id":3664780,"src":"Poppy-fields_thumb.jpg","galleries_id":223786,"server_id":15,"link":"photo_3664780.html","width":130,"caption":"Poppy fields","height":89});
															thumbnails[3664782] = clik.newPhoto({"id":3664782,"src":"Poppy-seed-heads_thumb.jpg","galleries_id":223786,"server_id":15,"link":"photo_3664782.html","width":62,"caption":"Poppy seed heads","height":130});
															thumbnails[3664785] = clik.newPhoto({"id":3664785,"src":"Tulip-yellow_thumb.jpg","galleries_id":223786,"server_id":15,"link":"photo_3664785.html","width":112,"caption":"Yellow tulip","height":130});
															thumbnails[3664945] = clik.newPhoto({"id":3664945,"src":"Burano-door-curtain-and-pegs_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_3664945.html","width":80,"caption":"Burano doorway","height":130});
															thumbnails[3664946] = clik.newPhoto({"id":3664946,"src":"Carnevale_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_3664946.html","width":74,"caption":"Carnival model in silver brocade","height":130});
															thumbnails[3664949] = clik.newPhoto({"id":3664949,"src":"Carnival---girl-in-red_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_3664949.html","width":130,"caption":"Carnival girl in red","height":127});
															thumbnails[3664950] = clik.newPhoto({"id":3664950,"src":"Celine_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_3664950.html","width":83,"caption":"Celine","height":130});
															thumbnails[3664955] = clik.newPhoto({"id":3664955,"src":"Piscina-St-Samuele_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_3664955.html","width":130,"caption":"Piscina S.Samuele","height":108});
															thumbnails[3664959] = clik.newPhoto({"id":3664959,"src":"St-Samuele-Venice_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_3664959.html","width":88,"caption":"St Samuele","height":130});
															thumbnails[3664960] = clik.newPhoto({"id":3664960,"src":"Venetian-Dawn_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_3664960.html","width":89,"caption":"Venetian Dawn","height":130});
															thumbnails[3664964] = clik.newPhoto({"id":3664964,"src":"Venice-Carnival1_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_3664964.html","width":130,"caption":"Venice Carnival","height":87});
															thumbnails[3665048] = clik.newPhoto({"id":3665048,"src":"Sophie_thumb.jpg","galleries_id":425095,"server_id":15,"link":"photo_3665048.html","width":116,"caption":"Sophie","height":130});
															thumbnails[3665051] = clik.newPhoto({"id":3665051,"src":"Gondola-in-the-mist_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_3665051.html","width":130,"caption":"Gondola in the mist","height":91});
															thumbnails[3665054] = clik.newPhoto({"id":3665054,"src":"Isle-of-Skye-bothy_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_3665054.html","width":130,"caption":"Isle of Skye Bothy","height":73});
															thumbnails[3665058] = clik.newPhoto({"id":3665058,"src":"Stormlight-over-tulip-fields_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_3665058.html","width":130,"caption":"Stormlight over tulip fields","height":70});
															thumbnails[3673669] = clik.newPhoto({"id":3673669,"src":"British-Museum-London_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_3673669.html","width":130,"caption":"British Museum, London","height":97});
															thumbnails[3673671] = clik.newPhoto({"id":3673671,"src":"Cambodia-Angkor-Wat_thumb.jpg","galleries_id":222806,"server_id":15,"link":"photo_3673671.html","width":130,"caption":"Angkor Wat, Cambodia","height":89});
															thumbnails[3676453] = clik.newPhoto({"id":3676453,"src":"2007-dog-and-blue-wall_thumb.jpg","galleries_id":224575,"server_id":15,"link":"photo_3676453.html","width":130,"caption":"Blue wall and poodle, Burano","height":112});
															thumbnails[3944174] = clik.newPhoto({"id":3944174,"src":"Luskentyre_thumb.jpg","galleries_id":239176,"server_id":15,"link":"photo_3944174.html","width":130,"caption":"Luskentyre beach","height":60});
															thumbnails[5356833] = clik.newPhoto({"id":5356833,"src":"Venice_mask_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_5356833.html","width":130,"caption":"Venice mask","height":94});
															thumbnails[5356857] = clik.newPhoto({"id":5356857,"src":"Girl-by-Gravestone_thumb.jpg","galleries_id":425095,"server_id":15,"link":"photo_5356857.html","width":101,"caption":"Girl by Gravestone","height":130});
															thumbnails[7368696] = clik.newPhoto({"id":7368696,"src":"Cromer-groins-and-beacon_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_7368696.html","width":109,"caption":"Cromer groins and beacon","height":130});
															thumbnails[7368699] = clik.newPhoto({"id":7368699,"src":"Cromer-pier-from-hillside_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_7368699.html","width":130,"caption":"Cromer pier taken from cliff side","height":51});
															thumbnails[7368709] = clik.newPhoto({"id":7368709,"src":"spurn-point_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_7368709.html","width":130,"caption":"Spurn Point","height":77});
															thumbnails[7368714] = clik.newPhoto({"id":7368714,"src":"The-Wolds-Lincolnshire_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_7368714.html","width":130,"caption":"Lincolnshire Wolds, early Autumn","height":61});
															thumbnails[7558484] = clik.newPhoto({"id":7558484,"src":"Heidi_thumb.jpg","galleries_id":409684,"server_id":15,"link":"photo_7558484.html","width":83,"caption":"Heidi","height":130});
															thumbnails[7558491] = clik.newPhoto({"id":7558491,"src":"Ballet-class_thumb.jpg","galleries_id":409684,"server_id":15,"link":"photo_7558491.html","width":102,"caption":"The ballet class","height":130});
															thumbnails[7558492] = clik.newPhoto({"id":7558492,"src":"Dance_thumb.jpg","galleries_id":409684,"server_id":15,"link":"photo_7558492.html","width":85,"caption":"Dance","height":130});
															thumbnails[7720600] = clik.newPhoto({"id":7720600,"src":"Boredom_thumb.jpg","galleries_id":222806,"server_id":15,"link":"photo_7720600.html","width":104,"caption":"Boredom","height":130});
															thumbnails[7908708] = clik.newPhoto({"id":7908708,"src":"Mae-Skidbrooke_thumb.jpg","galleries_id":409684,"server_id":15,"link":"photo_7908708.html","width":101,"caption":"Mae","height":130});
															thumbnails[8167113] = clik.newPhoto({"id":8167113,"src":"London-Skyline_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_8167113.html","width":130,"caption":"London Skyline","height":82});
															thumbnails[8187748] = clik.newPhoto({"id":8187748,"src":"The-Mask-British-Museum_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_8187748.html","width":105,"caption":"The Mask, British Museum","height":130});
															thumbnails[8187768] = clik.newPhoto({"id":8187768,"src":"Grand-Tetons-storm-brewing_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_8187768.html","width":130,"caption":"Grand Tetons, Storm Brewing","height":82});
															thumbnails[8205237] = clik.newPhoto({"id":8205237,"src":"Fernglow_thumb.jpg","galleries_id":223786,"server_id":15,"link":"photo_8205237.html","width":130,"caption":"Fernglow","height":89});
															thumbnails[8249832] = clik.newPhoto({"id":8249832,"src":"H.Edwardians_thumb.jpg","galleries_id":425095,"server_id":15,"link":"photo_8249832.html","width":130,"caption":"Heckington Show","height":108});
															thumbnails[8249840] = clik.newPhoto({"id":8249840,"src":"H.Knight_thumb.jpg","galleries_id":425095,"server_id":15,"link":"photo_8249840.html","width":130,"caption":"Heckington Show","height":99});
															thumbnails[8256846] = clik.newPhoto({"id":8256846,"src":"Sign-of-the-times_thumb.jpg","galleries_id":425088,"server_id":15,"link":"photo_8256846.html","width":130,"caption":"Sign of the times","height":95});
															thumbnails[8467787] = clik.newPhoto({"id":8467787,"src":"sp-Visitor-from-Florida_thumb.jpg","galleries_id":425095,"server_id":15,"link":"photo_8467787.html","width":130,"caption":"Steampunk Event, Lincoln.  A visitor from Florida, USA.","height":87});
															thumbnails[8467791] = clik.newPhoto({"id":8467791,"src":"sp-Visitor-from-Poland_thumb.jpg","galleries_id":425095,"server_id":15,"link":"photo_8467791.html","width":130,"caption":"Steampunk Event, Lincoln.  A visitor from Poland.","height":119});
															thumbnails[8480655] = clik.newPhoto({"id":8480655,"src":"mel-1_thumb.jpg","galleries_id":425095,"server_id":15,"link":"photo_8480655.html","width":114,"caption":"Steampunk Event, Lincoln. Mel","height":130});
															thumbnails[8480710] = clik.newPhoto({"id":8480710,"src":"Visitor-from--Russia_thumb.jpg","galleries_id":425095,"server_id":15,"link":"photo_8480710.html","width":86,"caption":"Steampunk event, Lincoln. Visitor from Russia","height":130});
															thumbnails[8514162] = clik.newPhoto({"id":8514162,"src":"hNative-American-Indian_thumb.jpg","galleries_id":425095,"server_id":15,"link":"photo_8514162.html","width":109,"caption":"Native American Indian. Heckington Show","height":130});
															thumbnails[8514164] = clik.newPhoto({"id":8514164,"src":"spEvita_thumb.jpg","galleries_id":425095,"server_id":15,"link":"photo_8514164.html","width":112,"caption":"Evita, a visitor to Lincoln from Poland. Steampunk Event","height":130});
															thumbnails[8514181] = clik.newPhoto({"id":8514181,"src":"spMan-in-a-check-suit_thumb.jpg","galleries_id":425095,"server_id":15,"link":"photo_8514181.html","width":85,"caption":"Man in a check suit. Steampunk Event, Lincoln.","height":130});
															thumbnails[9102121] = clik.newPhoto({"id":9102121,"src":"serves-you-right_1_thumb.jpg","galleries_id":425095,"server_id":37,"link":"photo_9102121.html","width":97,"caption":"Serves you right","height":130});
															thumbnails[4393976] = clik.newPhoto({"id":4393976,"src":"The-Veteran-4_thumb.jpg","galleries_id":425095,"server_id":15,"link":"photo_4393976.html","width":130,"caption":"The Veteran","height":113});
															thumbnails[3664942] = clik.newPhoto({"id":3664942,"src":"Burano-bicycle-and-shop_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_3664942.html","width":130,"caption":"Burano, shop and bicycle","height":128});
															thumbnails[7908695] = clik.newPhoto({"id":7908695,"src":"Michael_thumb.jpg","galleries_id":425088,"server_id":15,"link":"photo_7908695.html","width":110,"caption":"Michael","height":130});
															thumbnails[3664786] = clik.newPhoto({"id":3664786,"src":"Vinca_thumb.jpg","galleries_id":223786,"server_id":15,"link":"photo_3664786.html","width":96,"caption":"Vinca","height":130});
															thumbnails[3673673] = clik.newPhoto({"id":3673673,"src":"Courtyard-Majorca_thumb.jpg","galleries_id":222806,"server_id":15,"link":"photo_3673673.html","width":130,"caption":"Majorca Courtyard","height":93});
															thumbnails[3665045] = clik.newPhoto({"id":3665045,"src":"Base-player_thumb.jpg","galleries_id":222806,"server_id":15,"link":"photo_3665045.html","width":130,"caption":"Base player","height":87});
															thumbnails[3673665] = clik.newPhoto({"id":3673665,"src":"Venice-carnival-purple-net_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_3673665.html","width":130,"caption":"Purple net - Venice","height":111});
															thumbnails[3673678] = clik.newPhoto({"id":3673678,"src":"Thailand---Royal-Palace-statue_thumb.jpg","galleries_id":222806,"server_id":15,"link":"photo_3673678.html","width":95,"caption":"Royal Palace Statue, Thailand","height":130});
															thumbnails[3665050] = clik.newPhoto({"id":3665050,"src":"Clumber-park-Nottinghamshire_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_3665050.html","width":130,"caption":"Clumber Park, Nottinghamshire","height":86});
															thumbnails[3673681] = clik.newPhoto({"id":3673681,"src":"Tharu-village-Nepal_thumb.jpg","galleries_id":222806,"server_id":15,"link":"photo_3673681.html","width":130,"caption":"Tharu Village, Nepal","height":77});
															thumbnails[3676440] = clik.newPhoto({"id":3676440,"src":"Burano-door_thumb.jpg","galleries_id":224575,"server_id":15,"link":"photo_3676440.html","width":101,"caption":"Red and blue, Burano","height":130});
															thumbnails[3676441] = clik.newPhoto({"id":3676441,"src":"Burano-Pump_thumb.jpg","galleries_id":224575,"server_id":15,"link":"photo_3676441.html","width":130,"caption":"Old pump and courtyard, Burano","height":122});
															thumbnails[3665060] = clik.newPhoto({"id":3665060,"src":"Tree-and-grasses_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_3665060.html","width":130,"caption":"Tree and grasses","height":125});
															thumbnails[3676450] = clik.newPhoto({"id":3676450,"src":"Wash-day-Burano_thumb.jpg","galleries_id":224575,"server_id":15,"link":"photo_3676450.html","width":130,"caption":"Washday in Burano","height":88});
															thumbnails[3676449] = clik.newPhoto({"id":3676449,"src":"Sun-and-moon-Venice_thumb.jpg","galleries_id":224575,"server_id":15,"link":"photo_3676449.html","width":130,"caption":"Sun and Moon, Venice","height":126});
															thumbnails[3676451] = clik.newPhoto({"id":3676451,"src":"Venice-gondola_thumb.jpg","galleries_id":224575,"server_id":15,"link":"photo_3676451.html","width":130,"caption":"Gondola Venice","height":90});
															thumbnails[3665049] = clik.newPhoto({"id":3665049,"src":"Woodsman_thumb.jpg","galleries_id":425095,"server_id":15,"link":"photo_3665049.html","width":107,"caption":"Woodsman","height":130});
															thumbnails[3944270] = clik.newPhoto({"id":3944270,"src":"Colour-of-Luskentyre-and-Oyster-Catcher_thumb.jpg","galleries_id":239176,"server_id":15,"link":"photo_3944270.html","width":130,"caption":"Colours - Luskentyre ","height":59});
															thumbnails[3944294] = clik.newPhoto({"id":3944294,"src":"Seilebost-at-sunset_thumb.jpg","galleries_id":239176,"server_id":15,"link":"photo_3944294.html","width":130,"caption":"Seilebost at Sunset","height":100});
															thumbnails[3944314] = clik.newPhoto({"id":3944314,"src":"Towards-Glencoe_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_3944314.html","width":130,"caption":"Towards Glencoe, Scotland","height":62});
															thumbnails[3944322] = clik.newPhoto({"id":3944322,"src":"Eilean-Donan-Castle_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_3944322.html","width":130,"caption":"Eilean Donan Castle, Scotland","height":80});
															thumbnails[4051499] = clik.newPhoto({"id":4051499,"src":"windows-of-the-soul-_thumb.jpg","galleries_id":409684,"server_id":15,"link":"photo_4051499.html","width":130,"caption":"Windows of the Soul","height":109});
															thumbnails[4050459] = clik.newPhoto({"id":4050459,"src":"Deserted-cottage-Harris_thumb.jpg","galleries_id":239176,"server_id":15,"link":"photo_4050459.html","width":130,"caption":"Deserted cottage kitchen, Harris","height":94});
															thumbnails[4050453] = clik.newPhoto({"id":4050453,"src":"Girl-in-a-Red-Cloak_thumb.jpg","galleries_id":425095,"server_id":15,"link":"photo_4050453.html","width":101,"caption":"Girl in a Red Cloak","height":130});
															thumbnails[5356581] = clik.newPhoto({"id":5356581,"src":"girl-with-painted-face_thumb.jpg","galleries_id":222806,"server_id":15,"link":"photo_5356581.html","width":96,"caption":"Girl with painted face","height":130});
															thumbnails[4118202] = clik.newPhoto({"id":4118202,"src":"High-and-Dry_thumb.jpg","galleries_id":239176,"server_id":15,"link":"photo_4118202.html","width":130,"caption":"High and Dry","height":83});
															thumbnails[4118240] = clik.newPhoto({"id":4118240,"src":"Potted-Plant-No-1_thumb.jpg","galleries_id":223786,"server_id":15,"link":"photo_4118240.html","width":87,"caption":"Potted Plant No. 1","height":130});
															thumbnails[4118245] = clik.newPhoto({"id":4118245,"src":"Potted-Plant-No-2_thumb.jpg","galleries_id":223786,"server_id":15,"link":"photo_4118245.html","width":86,"caption":"Potted Plant No. 2","height":130});
															thumbnails[4393943] = clik.newPhoto({"id":4393943,"src":"hmong-child-laos-bw_thumb.jpg","galleries_id":222806,"server_id":15,"link":"photo_4393943.html","width":116,"caption":"Laos child","height":130});
															thumbnails[4393962] = clik.newPhoto({"id":4393962,"src":"Marilyn-M-and-model_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_4393962.html","width":117,"caption":"Pictures in the Gallery","height":130});
															thumbnails[4393949] = clik.newPhoto({"id":4393949,"src":"man-waiting-09_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_4393949.html","width":130,"caption":"People watching","height":119});
															thumbnails[5356593] = clik.newPhoto({"id":5356593,"src":"child-in-scarf_thumb.jpg","galleries_id":222806,"server_id":15,"link":"photo_5356593.html","width":130,"caption":"Child transport","height":112});
															thumbnails[6772384] = clik.newPhoto({"id":6772384,"src":"Taking-time-out_336F270E-1D09-001F-996E5CE93CDFE2A8_thumb.jpg","galleries_id":409684,"server_id":15,"link":"photo_6772384.html","width":130,"caption":"Charles","height":95});
															thumbnails[4546501] = clik.newPhoto({"id":4546501,"src":"In-the-spotlight_thumb.jpg","galleries_id":223802,"server_id":15,"link":"photo_4546501.html","width":92,"caption":"In the spotlight","height":130});
															thumbnails[4546507] = clik.newPhoto({"id":4546507,"src":"Venetian-sunset_thumb.jpg","galleries_id":223785,"server_id":15,"link":"photo_4546507.html","width":130,"caption":"Venetian Sunset","height":76});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[425095] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"EVENTS","link":"gallery_425095.html","maxRecords":0.0,"photoIDs":[3665048.0,5356857.0,8249832.0,8249840.0,8467787.0,8467791.0,8480655.0,8480710.0,8514162.0,8514164.0,8514181.0,9102121.0,4393976.0,3665049.0,4050453.0],"skipIndex":0,"section_code":"gallery","featured_images":"9102121,8514181,8514164,8514162,8480710,8480655,8467791,8467787,8249840,8249832","id":425095,"singleSection":false});				  						galleries[425088] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"STREET CANDIDS","link":"gallery_425088.html","maxRecords":0.0,"photoIDs":[3656137.0,8256846.0,7908695.0],"skipIndex":0,"section_code":"gallery","featured_images":"8256846,7908695,3656137","id":425088,"singleSection":false});				  						galleries[409684] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"STUDIO","link":"gallery_409684.html","maxRecords":0.0,"photoIDs":[7558484.0,7558491.0,7558492.0,7908708.0,4051499.0,6772384.0],"skipIndex":0,"section_code":"gallery","featured_images":"7908708,7558492,7558491,7558484,6772384,4051499","id":409684,"singleSection":false});				  						galleries[222806] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"TRAVEL","link":"gallery_222806.html","maxRecords":0.0,"photoIDs":[3656139.0,3656308.0,3656322.0,3656339.0,3673671.0,7720600.0,3673673.0,3665045.0,3673678.0,3673681.0,5356581.0,4393943.0,5356593.0],"skipIndex":0,"section_code":"gallery","featured_images":"3656339,3656322,3656308,3656139","id":222806,"singleSection":false});				  						galleries[223785] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"LANDSCAPE","link":"gallery_223785.html","maxRecords":0.0,"photoIDs":[3665054.0,3665058.0,3673669.0,7368696.0,7368699.0,7368709.0,7368714.0,8167113.0,8187748.0,8187768.0,3665050.0,3665060.0,3944314.0,3944322.0,4546507.0],"skipIndex":0,"section_code":"gallery","featured_images":"8187768,8187748,8167113,7368714,7368709,7368699,7368696,4546507,3944322,3944314","id":223785,"singleSection":false});				  						galleries[223786] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"FLOWERS","link":"gallery_223786.html","maxRecords":0.0,"photoIDs":[3664774.0,3664778.0,3664780.0,3664782.0,3664785.0,8205237.0,3664786.0,4118240.0,4118245.0],"skipIndex":0,"section_code":"gallery","featured_images":"8205237,4118245,4118240,3664786,3664785,3664782,3664780,3664778,3664774","id":223786,"singleSection":false});				  						galleries[223802] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"VENICE","link":"gallery_223802.html","maxRecords":0.0,"photoIDs":[3664945.0,3664946.0,3664949.0,3664950.0,3664955.0,3664959.0,3664960.0,3664964.0,3665051.0,5356833.0,3664942.0,3673665.0,4393962.0,4393949.0,4546501.0],"skipIndex":0,"section_code":"gallery","featured_images":"5356833,4546501,4393962,4393949,3673665,3665051,3664964,3664960,3664959,3664955","id":223802,"singleSection":false});				  						galleries[224575] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"VENICE 2","link":"gallery_224575.html","maxRecords":0.0,"photoIDs":[3676453.0,3676440.0,3676441.0,3676450.0,3676449.0,3676451.0],"skipIndex":0,"section_code":"gallery","featured_images":"3676453,3676451,3676450,3676449,3676441,3676440","id":224575,"singleSection":false});				  						galleries[239176] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"ISLE OF HARRIS, SCOTLAND","link":"gallery_239176.html","maxRecords":0.0,"photoIDs":[3944174.0,3944270.0,3944294.0,4050459.0,4118202.0],"skipIndex":0,"section_code":"gallery","featured_images":"4118202,4050459,3944294,3944270,3944174","id":239176,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '3685791,3656137,4051499,4050453,4118202,4118245';
imageSets[2] = '3656339,3656322,3656308,3656139';
imageSets[3] = '4546501,4546507';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/barbarahill/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/barbarahill/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 = 'ROWLAND & BARBARA HILL: ' + 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;
	}
}

			

