window.thumbnails = {};
															thumbnails[3052923] = clik.newPhoto({"id":3052923,"src":"fraces Glenfinnan Monument_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":87});
															thumbnails[3052928] = clik.newPhoto({"id":3052928,"src":"Frances Geilston Bloomer_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":87});
															thumbnails[3052937] = clik.newPhoto({"id":3052937,"src":"r fleming Scramble up the Buachaille_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":87});
															thumbnails[3052940] = clik.newPhoto({"id":3052940,"src":"jim q Evening View_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":86});
															thumbnails[3119985] = clik.newPhoto({"id":3119985,"src":"Frances Glenfinnan Viaduct_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":55});
															thumbnails[3119989] = clik.newPhoto({"id":3119989,"src":"frances Alice al Fresco_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":66});
															thumbnails[3120288] = clik.newPhoto({"id":3120288,"src":"j quin Sunset_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":51});
															thumbnails[3120290] = clik.newPhoto({"id":3120290,"src":"jim q Skypark_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":86});
															thumbnails[3154146] = clik.newPhoto({"id":3154146,"src":"34  East to Rannoch rf_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":87});
															thumbnails[3154344] = clik.newPhoto({"id":3154344,"src":"41  not a litre fran_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":87});
															thumbnails[3154347] = clik.newPhoto({"id":3154347,"src":"40 reinassiance fra1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":87});
															thumbnails[3154348] = clik.newPhoto({"id":3154348,"src":"45  bucolic fra_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":87});
															thumbnails[3154350] = clik.newPhoto({"id":3154350,"src":"47  organ pipes fra_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":87});
															thumbnails[3579901] = clik.newPhoto({"id":3579901,"src":"stu_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":172});
															thumbnails[3579902] = clik.newPhoto({"id":3579902,"src":"stu_1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":60});
															thumbnails[3579903] = clik.newPhoto({"id":3579903,"src":"stu1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":163});
															thumbnails[3579904] = clik.newPhoto({"id":3579904,"src":"stu12_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":89});
															thumbnails[3784971] = clik.newPhoto({"id":3784971,"src":"stu_2_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":110});
															thumbnails[3784972] = clik.newPhoto({"id":3784972,"src":"stui_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":73});
															thumbnails[6231220] = clik.newPhoto({"id":6231220,"src":"charlie_miekle_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":159});
															thumbnails[6915362] = clik.newPhoto({"id":6915362,"src":"Folly_in_the_hills_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":100});
															thumbnails[6915445] = clik.newPhoto({"id":6915445,"src":"03_Blue_Ark_copy_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":85});
															thumbnails[6915454] = clik.newPhoto({"id":6915454,"src":"04_Golden_Harvest_copy_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":74});
															thumbnails[3052921] = clik.newPhoto({"id":3052921,"src":"el kemp Titan Crane_thumb.jpg","galleries_id":187787,"server_id":32,"link":"photo_3052921.html","width":130,"caption":"","height":98});
															thumbnails[3052930] = clik.newPhoto({"id":3052930,"src":"derek show off_thumb....jpg","galleries_id":186934,"server_id":32,"link":"photo_3052930.html","width":130,"caption":"","height":113});
															thumbnails[3052931] = clik.newPhoto({"id":3052931,"src":"derek strawberry splash_thumb.jpg","galleries_id":186934,"server_id":32,"link":"photo_3052931.html","width":130,"caption":"","height":208});
															thumbnails[3052932] = clik.newPhoto({"id":3052932,"src":"elaine road to somewhere_thumb.JPG","galleries_id":186935,"server_id":32,"link":"photo_3052932.html","width":130,"caption":"","height":82});
															thumbnails[3052934] = clik.newPhoto({"id":3052934,"src":"elaine who's looking at_thumb.jpg","galleries_id":186935,"server_id":32,"link":"photo_3052934.html","width":130,"caption":"","height":98});
															thumbnails[3052935] = clik.newPhoto({"id":3052935,"src":"r hamilton sunset_thumb.jpg","galleries_id":186937,"server_id":32,"link":"photo_3052935.html","width":130,"caption":"","height":195});
															thumbnails[3052936] = clik.newPhoto({"id":3052936,"src":"r hamilton Oystercatcher_thumb.jpg","galleries_id":186937,"server_id":32,"link":"photo_3052936.html","width":130,"caption":"","height":84});
															thumbnails[3052942] = clik.newPhoto({"id":3052942,"src":"sally Foxy_thumb.JPG","galleries_id":187788,"server_id":32,"link":"photo_3052942.html","width":130,"caption":"","height":102});
															thumbnails[3052943] = clik.newPhoto({"id":3052943,"src":"sally Glenfinnan_thumb.jpg","galleries_id":187788,"server_id":32,"link":"photo_3052943.html","width":130,"caption":"","height":98});
															thumbnails[3052945] = clik.newPhoto({"id":3052945,"src":"tom Red Hibiscus_thumb.jpg","galleries_id":187791,"server_id":32,"link":"photo_3052945.html","width":130,"caption":"","height":116});
															thumbnails[3052947] = clik.newPhoto({"id":3052947,"src":"tom Algarve Sunset_thumb.jpg","galleries_id":187791,"server_id":32,"link":"photo_3052947.html","width":130,"caption":"","height":87});
															thumbnails[3052948] = clik.newPhoto({"id":3052948,"src":"gerry Pelican High_thumb.jpg","galleries_id":187792,"server_id":32,"link":"photo_3052948.html","width":130,"caption":"","height":85});
															thumbnails[3052950] = clik.newPhoto({"id":3052950,"src":"gerry Longboat Pier_thumb.JPG","galleries_id":187792,"server_id":32,"link":"photo_3052950.html","width":130,"caption":"","height":87});
															thumbnails[3052951] = clik.newPhoto({"id":3052951,"src":"George Dickson08   Port Dundas_thumb.jpg","galleries_id":187796,"server_id":32,"link":"photo_3052951.html","width":130,"caption":"","height":75});
															thumbnails[3052952] = clik.newPhoto({"id":3052952,"src":"George Dickson   Heron_thumb.jpg","galleries_id":187796,"server_id":32,"link":"photo_3052952.html","width":130,"caption":"","height":98});
															thumbnails[3119937] = clik.newPhoto({"id":3119937,"src":"George Dickson 08   Model Train_thumb.jpg","galleries_id":187796,"server_id":32,"link":"photo_3119937.html","width":130,"caption":"","height":92});
															thumbnails[3119939] = clik.newPhoto({"id":3119939,"src":"George Dickson Nov 08   Dumbarston_thumb.jpg","galleries_id":187796,"server_id":32,"link":"photo_3119939.html","width":130,"caption":"","height":77});
															thumbnails[3120280] = clik.newPhoto({"id":3120280,"src":"derek clyde sun set_thumb.jpg","galleries_id":186934,"server_id":32,"link":"photo_3120280.html","width":130,"caption":"","height":194});
															thumbnails[3120282] = clik.newPhoto({"id":3120282,"src":"derek The Metro_thumb.JPG","galleries_id":186934,"server_id":32,"link":"photo_3120282.html","width":130,"caption":"","height":82});
															thumbnails[3120283] = clik.newPhoto({"id":3120283,"src":"elaine giraffe face_thumb.jpg","galleries_id":186935,"server_id":32,"link":"photo_3120283.html","width":130,"caption":"","height":195});
															thumbnails[3120285] = clik.newPhoto({"id":3120285,"src":"elaine windmill_thumb.jpg","galleries_id":186935,"server_id":32,"link":"photo_3120285.html","width":130,"caption":"","height":87});
															thumbnails[3120286] = clik.newPhoto({"id":3120286,"src":"gerry Ten to Two_thumb.JPG","galleries_id":187792,"server_id":32,"link":"photo_3120286.html","width":130,"caption":"","height":210});
															thumbnails[3120303] = clik.newPhoto({"id":3120303,"src":"tom Lonesome Tree_thumb.jpg","galleries_id":187791,"server_id":32,"link":"photo_3120303.html","width":130,"caption":"","height":86});
															thumbnails[3154128] = clik.newPhoto({"id":3154128,"src":"1 baled out j crawley_thumb.jpg","galleries_id":187795,"server_id":32,"link":"photo_3154128.html","width":130,"caption":"","height":46});
															thumbnails[3154129] = clik.newPhoto({"id":3154129,"src":"3 after the cut jc_thumb.jpg","galleries_id":187795,"server_id":32,"link":"photo_3154129.html","width":130,"caption":"","height":61});
															thumbnails[3154150] = clik.newPhoto({"id":3154150,"src":"4 Rockies Peak tb_thumb.jpg","galleries_id":187791,"server_id":32,"link":"photo_3154150.html","width":130,"caption":"","height":73});
															thumbnails[3154155] = clik.newPhoto({"id":3154155,"src":"11 Driftwoodtb_thumb.jpg","galleries_id":187791,"server_id":32,"link":"photo_3154155.html","width":130,"caption":"","height":87});
															thumbnails[3154158] = clik.newPhoto({"id":3154158,"src":"9  Bow River & Castle Mountain tb_thumb.jpg","galleries_id":187791,"server_id":32,"link":"photo_3154158.html","width":130,"caption":"","height":87});
															thumbnails[3154160] = clik.newPhoto({"id":3154160,"src":"5 glasgow skyline dw_thumb.jpg","galleries_id":186934,"server_id":32,"link":"photo_3154160.html","width":130,"caption":"","height":196});
															thumbnails[3154162] = clik.newPhoto({"id":3154162,"src":"26 glen etive dw_thumb.jpg","galleries_id":186934,"server_id":32,"link":"photo_3154162.html","width":130,"caption":"","height":77});
															thumbnails[3154163] = clik.newPhoto({"id":3154163,"src":"33 desert road dw_thumb.jpg","galleries_id":186934,"server_id":32,"link":"photo_3154163.html","width":130,"caption":"","height":86});
															thumbnails[3154166] = clik.newPhoto({"id":3154166,"src":"29 loch at stob ghabhar dw_thumb.jpg","galleries_id":186934,"server_id":32,"link":"photo_3154166.html","width":130,"caption":"","height":87});
															thumbnails[3154171] = clik.newPhoto({"id":3154171,"src":"7 EILEAN DONNAN g_thumb.JPG","galleries_id":187789,"server_id":32,"link":"photo_3154171.html","width":130,"caption":"","height":195});
															thumbnails[3154174] = clik.newPhoto({"id":3154174,"src":"8MOONLIGHT g_thumb.JPG","galleries_id":187789,"server_id":32,"link":"photo_3154174.html","width":130,"caption":"","height":104});
															thumbnails[3154186] = clik.newPhoto({"id":3154186,"src":"13 PHI PHI DON g_thumb.JPG","galleries_id":187789,"server_id":32,"link":"photo_3154186.html","width":130,"caption":"","height":87});
															thumbnails[3154188] = clik.newPhoto({"id":3154188,"src":"14 HONG KONGg_thumb.JPG","galleries_id":187789,"server_id":32,"link":"photo_3154188.html","width":130,"caption":"","height":87});
															thumbnails[3154189] = clik.newPhoto({"id":3154189,"src":"10 end of day rh_thumb.jpg","galleries_id":186937,"server_id":32,"link":"photo_3154189.html","width":130,"caption":"","height":87});
															thumbnails[3154191] = clik.newPhoto({"id":3154191,"src":"19 near tulla rh_thumb.jpg","galleries_id":186937,"server_id":32,"link":"photo_3154191.html","width":130,"caption":"","height":87});
															thumbnails[3154204] = clik.newPhoto({"id":3154204,"src":"44norwod park rh_thumb.jpg","galleries_id":186937,"server_id":32,"link":"photo_3154204.html","width":130,"caption":"","height":195});
															thumbnails[3154207] = clik.newPhoto({"id":3154207,"src":"12 Loch Tay ger_thumb.jpg","galleries_id":187792,"server_id":32,"link":"photo_3154207.html","width":130,"caption":"","height":87});
															thumbnails[3154210] = clik.newPhoto({"id":3154210,"src":"23 In Plane View ger_thumb.jpg","galleries_id":187792,"server_id":32,"link":"photo_3154210.html","width":130,"caption":"","height":83});
															thumbnails[3154213] = clik.newPhoto({"id":3154213,"src":"43 wales ger_thumb.JPG","galleries_id":187792,"server_id":32,"link":"photo_3154213.html","width":130,"caption":"","height":98});
															thumbnails[3154215] = clik.newPhoto({"id":3154215,"src":"16 loch lomondef_thumb.jpg","galleries_id":186935,"server_id":32,"link":"photo_3154215.html","width":130,"caption":"","height":71});
															thumbnails[3154219] = clik.newPhoto({"id":3154219,"src":"35 feurtuventura ef_thumb.jpg","galleries_id":186935,"server_id":32,"link":"photo_3154219.html","width":130,"caption":"","height":66});
															thumbnails[3154231] = clik.newPhoto({"id":3154231,"src":"17 sepia sepia gate anne_thumb.jpg","galleries_id":193303,"server_id":32,"link":"photo_3154231.html","width":130,"caption":"","height":92});
															thumbnails[3154235] = clik.newPhoto({"id":3154235,"src":"25 open gates ann_thumb.jpg","galleries_id":193303,"server_id":32,"link":"photo_3154235.html","width":130,"caption":"","height":97});
															thumbnails[3154236] = clik.newPhoto({"id":3154236,"src":"27 solo tree ann_thumb.jpg","galleries_id":193303,"server_id":32,"link":"photo_3154236.html","width":130,"caption":"","height":95});
															thumbnails[3154237] = clik.newPhoto({"id":3154237,"src":"28  sundown ann_thumb.jpg","galleries_id":193303,"server_id":32,"link":"photo_3154237.html","width":130,"caption":"","height":96});
															thumbnails[3154238] = clik.newPhoto({"id":3154238,"src":"22 beach gd_thumb.JPG","galleries_id":187796,"server_id":32,"link":"photo_3154238.html","width":130,"caption":"","height":87});
															thumbnails[3154239] = clik.newPhoto({"id":3154239,"src":"31 monastery gd_thumb.jpg","galleries_id":187796,"server_id":32,"link":"photo_3154239.html","width":130,"caption":"","height":98});
															thumbnails[3154240] = clik.newPhoto({"id":3154240,"src":"32  Granada View gd_thumb.jpg","galleries_id":187796,"server_id":32,"link":"photo_3154240.html","width":130,"caption":"","height":98});
															thumbnails[3154243] = clik.newPhoto({"id":3154243,"src":"30 loch sal_thumb.JPG","galleries_id":187788,"server_id":32,"link":"photo_3154243.html","width":130,"caption":"","height":98});
															thumbnails[3154244] = clik.newPhoto({"id":3154244,"src":"37 rough n smooth sal_thumb.JPG","galleries_id":187788,"server_id":32,"link":"photo_3154244.html","width":130,"caption":"","height":98});
															thumbnails[3154272] = clik.newPhoto({"id":3154272,"src":"39 gleffinan sal_thumb.JPG","galleries_id":187788,"server_id":32,"link":"photo_3154272.html","width":130,"caption":"","height":98});
															thumbnails[3154334] = clik.newPhoto({"id":3154334,"src":"36  roots jim b_thumb.JPG","galleries_id":187790,"server_id":32,"link":"photo_3154334.html","width":130,"caption":"","height":87});
															thumbnails[3154336] = clik.newPhoto({"id":3154336,"src":"42 university grounds jim b_thumb.JPG","galleries_id":187790,"server_id":32,"link":"photo_3154336.html","width":130,"caption":"","height":87});
															thumbnails[3579161] = clik.newPhoto({"id":3579161,"src":"ann1_thumb.jpg","galleries_id":193303,"server_id":32,"link":"photo_3579161.html","width":130,"caption":"","height":98});
															thumbnails[3579276] = clik.newPhoto({"id":3579276,"src":"efin1_thumb.jpg","galleries_id":186935,"server_id":32,"link":"photo_3579276.html","width":130,"caption":"","height":87});
															thumbnails[3579277] = clik.newPhoto({"id":3579277,"src":"elaine1_thumb.jpg","galleries_id":186935,"server_id":32,"link":"photo_3579277.html","width":130,"caption":"","height":87});
															thumbnails[3579278] = clik.newPhoto({"id":3579278,"src":"anne1_thumb.jpg","galleries_id":193303,"server_id":32,"link":"photo_3579278.html","width":130,"caption":"","height":98});
															thumbnails[3579281] = clik.newPhoto({"id":3579281,"src":"gd1_thumb.jpg","galleries_id":187796,"server_id":32,"link":"photo_3579281.html","width":130,"caption":"","height":87});
															thumbnails[3579282] = clik.newPhoto({"id":3579282,"src":"george_thumb.jpg","galleries_id":187796,"server_id":32,"link":"photo_3579282.html","width":130,"caption":"","height":87});
															thumbnails[3579283] = clik.newPhoto({"id":3579283,"src":"george_1_thumb.jpg","galleries_id":187796,"server_id":32,"link":"photo_3579283.html","width":130,"caption":"","height":98});
															thumbnails[3579285] = clik.newPhoto({"id":3579285,"src":"gill_thumb.JPG","galleries_id":187789,"server_id":32,"link":"photo_3579285.html","width":130,"caption":"","height":87});
															thumbnails[3579286] = clik.newPhoto({"id":3579286,"src":"gill1_thumb.jpg","galleries_id":187789,"server_id":32,"link":"photo_3579286.html","width":130,"caption":"","height":195});
															thumbnails[3579287] = clik.newPhoto({"id":3579287,"src":"gillian_thumb.jpg","galleries_id":187789,"server_id":32,"link":"photo_3579287.html","width":130,"caption":"","height":87});
															thumbnails[3579288] = clik.newPhoto({"id":3579288,"src":"gillian_1_thumb.JPG","galleries_id":187789,"server_id":32,"link":"photo_3579288.html","width":130,"caption":"","height":87});
															thumbnails[3579892] = clik.newPhoto({"id":3579892,"src":"jcra_thumb.jpg","galleries_id":187795,"server_id":32,"link":"photo_3579892.html","width":130,"caption":"","height":71});
															thumbnails[3579894] = clik.newPhoto({"id":3579894,"src":"john_c_thumb.jpg","galleries_id":187795,"server_id":32,"link":"photo_3579894.html","width":130,"caption":"","height":103});
															thumbnails[3579895] = clik.newPhoto({"id":3579895,"src":"john_c_1_thumb.jpg","galleries_id":187795,"server_id":32,"link":"photo_3579895.html","width":130,"caption":"","height":96});
															thumbnails[3579896] = clik.newPhoto({"id":3579896,"src":"john_c_2_thumb.jpg","galleries_id":187795,"server_id":32,"link":"photo_3579896.html","width":130,"caption":"","height":100});
															thumbnails[3579897] = clik.newPhoto({"id":3579897,"src":"robert_h1_thumb.jpg","galleries_id":186937,"server_id":32,"link":"photo_3579897.html","width":130,"caption":"","height":87});
															thumbnails[3579900] = clik.newPhoto({"id":3579900,"src":"robert_h_11_thumb.jpg","galleries_id":186937,"server_id":32,"link":"photo_3579900.html","width":130,"caption":"","height":195});
															thumbnails[3579905] = clik.newPhoto({"id":3579905,"src":"del_thumb.JPG","galleries_id":186934,"server_id":32,"link":"photo_3579905.html","width":130,"caption":"","height":87});
															thumbnails[3579906] = clik.newPhoto({"id":3579906,"src":"derek_thumb.jpg","galleries_id":186934,"server_id":32,"link":"photo_3579906.html","width":130,"caption":"","height":56});
															thumbnails[3579907] = clik.newPhoto({"id":3579907,"src":"derek_1_thumb.JPG","galleries_id":186934,"server_id":32,"link":"photo_3579907.html","width":130,"caption":"","height":104});
															thumbnails[3579908] = clik.newPhoto({"id":3579908,"src":"derekkk_thumb.JPG","galleries_id":186934,"server_id":32,"link":"photo_3579908.html","width":130,"caption":"","height":140});
															thumbnails[3579914] = clik.newPhoto({"id":3579914,"src":"tb_thumb.jpg","galleries_id":187791,"server_id":32,"link":"photo_3579914.html","width":130,"caption":"","height":87});
															thumbnails[3579915] = clik.newPhoto({"id":3579915,"src":"tom_b_thumb.jpg","galleries_id":187791,"server_id":32,"link":"photo_3579915.html","width":130,"caption":"","height":87});
															thumbnails[3579916] = clik.newPhoto({"id":3579916,"src":"tom_b_1_thumb.jpg","galleries_id":187791,"server_id":32,"link":"photo_3579916.html","width":130,"caption":"","height":87});
															thumbnails[3579917] = clik.newPhoto({"id":3579917,"src":"tom_b_2_thumb.jpg","galleries_id":187791,"server_id":32,"link":"photo_3579917.html","width":130,"caption":"","height":87});
															thumbnails[3579918] = clik.newPhoto({"id":3579918,"src":"tom_b_3_thumb.jpg","galleries_id":187791,"server_id":32,"link":"photo_3579918.html","width":130,"caption":"","height":90});
															thumbnails[3784953] = clik.newPhoto({"id":3784953,"src":"ann_2_thumb.jpg","galleries_id":193303,"server_id":32,"link":"photo_3784953.html","width":130,"caption":"","height":170});
															thumbnails[3784954] = clik.newPhoto({"id":3784954,"src":"ann_3_thumb.jpg","galleries_id":193303,"server_id":32,"link":"photo_3784954.html","width":130,"caption":"","height":184});
															thumbnails[3784956] = clik.newPhoto({"id":3784956,"src":"george1_thumb.jpg","galleries_id":187796,"server_id":32,"link":"photo_3784956.html","width":130,"caption":"","height":98});
															thumbnails[3784957] = clik.newPhoto({"id":3784957,"src":"george_11_thumb.jpg","galleries_id":187796,"server_id":32,"link":"photo_3784957.html","width":130,"caption":"","height":112});
															thumbnails[3784959] = clik.newPhoto({"id":3784959,"src":"robert_thumb.jpg","galleries_id":186937,"server_id":32,"link":"photo_3784959.html","width":130,"caption":"","height":87});
															thumbnails[3784961] = clik.newPhoto({"id":3784961,"src":"robert_1_thumb.jpg","galleries_id":186937,"server_id":32,"link":"photo_3784961.html","width":130,"caption":"","height":87});
															thumbnails[3784966] = clik.newPhoto({"id":3784966,"src":"steve_thumb.jpg","galleries_id":230786,"server_id":32,"link":"photo_3784966.html","width":130,"caption":"","height":98});
															thumbnails[3784968] = clik.newPhoto({"id":3784968,"src":"steve_1_thumb.jpg","galleries_id":230786,"server_id":32,"link":"photo_3784968.html","width":130,"caption":"","height":98});
															thumbnails[3784975] = clik.newPhoto({"id":3784975,"src":"tomm_thumb.jpg","galleries_id":187791,"server_id":32,"link":"photo_3784975.html","width":130,"caption":"","height":87});
															thumbnails[3784977] = clik.newPhoto({"id":3784977,"src":"tomm_1_thumb.jpg","galleries_id":187791,"server_id":32,"link":"photo_3784977.html","width":130,"caption":"","height":71});
															thumbnails[3784979] = clik.newPhoto({"id":3784979,"src":"derek1_thumb.jpg","galleries_id":186934,"server_id":32,"link":"photo_3784979.html","width":130,"caption":"","height":74});
															thumbnails[3784981] = clik.newPhoto({"id":3784981,"src":"derek_11_thumb.jpg","galleries_id":186934,"server_id":32,"link":"photo_3784981.html","width":130,"caption":"","height":184});
															thumbnails[6112463] = clik.newPhoto({"id":6112463,"src":"_some_of_the_prize_winners_thumb.jpg","galleries_id":342546,"server_id":32,"link":"photo_6112463.html","width":130,"caption":"","height":87});
															thumbnails[6112474] = clik.newPhoto({"id":6112474,"src":"Tom_Baker_thumb.jpg","galleries_id":342546,"server_id":32,"link":"photo_6112474.html","width":130,"caption":"","height":104});
															thumbnails[6112477] = clik.newPhoto({"id":6112477,"src":"Prize_night1_thumb.jpg","galleries_id":342546,"server_id":32,"link":"photo_6112477.html","width":130,"caption":"","height":91});
															thumbnails[6112480] = clik.newPhoto({"id":6112480,"src":"Joe_Scott_thumb.jpg","galleries_id":342546,"server_id":32,"link":"photo_6112480.html","width":130,"caption":"","height":124});
															thumbnails[6112481] = clik.newPhoto({"id":6112481,"src":"Iain_McDonald_thumb.jpg","galleries_id":342546,"server_id":32,"link":"photo_6112481.html","width":130,"caption":"","height":120});
															thumbnails[6112483] = clik.newPhoto({"id":6112483,"src":"Heather_McDonald_thumb.jpg","galleries_id":342546,"server_id":32,"link":"photo_6112483.html","width":130,"caption":"","height":115});
															thumbnails[6112484] = clik.newPhoto({"id":6112484,"src":"Elaine_Findlay_thumb.jpg","galleries_id":342546,"server_id":32,"link":"photo_6112484.html","width":130,"caption":"","height":128});
															thumbnails[6112486] = clik.newPhoto({"id":6112486,"src":"Derek_Wells_thumb.jpg","galleries_id":342546,"server_id":32,"link":"photo_6112486.html","width":130,"caption":"","height":111});
															thumbnails[6112489] = clik.newPhoto({"id":6112489,"src":"Andy_Magee_thumb.jpg","galleries_id":342546,"server_id":32,"link":"photo_6112489.html","width":130,"caption":"","height":104});
															thumbnails[6915336] = clik.newPhoto({"id":6915336,"src":"Clyde_Nightscape_copy_thumb.jpg","galleries_id":187796,"server_id":32,"link":"photo_6915336.html","width":130,"caption":"","height":98});
															thumbnails[6915338] = clik.newPhoto({"id":6915338,"src":"Clyde_Nightscape_copy1_thumb.jpg","galleries_id":335009,"server_id":32,"link":"photo_6915338.html","width":130,"caption":"","height":98});
															thumbnails[6915341] = clik.newPhoto({"id":6915341,"src":"Shamgate_copy_thumb.jpg","galleries_id":335009,"server_id":32,"link":"photo_6915341.html","width":130,"caption":"","height":83});
															thumbnails[6915343] = clik.newPhoto({"id":6915343,"src":"Titan_copy_thumb.jpg","galleries_id":335009,"server_id":32,"link":"photo_6915343.html","width":130,"caption":"","height":57});
															thumbnails[6915345] = clik.newPhoto({"id":6915345,"src":"Pine_Forest_copy_thumb.jpg","galleries_id":335009,"server_id":32,"link":"photo_6915345.html","width":130,"caption":"","height":173});
															thumbnails[6915351] = clik.newPhoto({"id":6915351,"src":"anglers_tackle_thumb.jpg","galleries_id":335010,"server_id":32,"link":"photo_6915351.html","width":130,"caption":"","height":94});
															thumbnails[6915391] = clik.newPhoto({"id":6915391,"src":"03_GuineaBaboon_copy_thumb.jpg","galleries_id":375136,"server_id":32,"link":"photo_6915391.html","width":130,"caption":"","height":92});
															thumbnails[6915399] = clik.newPhoto({"id":6915399,"src":"04_GlenOrchy_thumb.jpg","galleries_id":375136,"server_id":32,"link":"photo_6915399.html","width":130,"caption":"","height":76});
															thumbnails[7046501] = clik.newPhoto({"id":7046501,"src":"andy_m_39_Robin_on_Ice_copy_thumb.jpg","galleries_id":335009,"server_id":32,"link":"photo_7046501.html","width":130,"caption":"","height":96});
															thumbnails[7323028] = clik.newPhoto({"id":7323028,"src":"Balmaha1_thumb.jpg","galleries_id":335009,"server_id":32,"link":"photo_7323028.html","width":130,"caption":"","height":98});
															thumbnails[7323030] = clik.newPhoto({"id":7323030,"src":"Gordon_Lane_thumb.JPG","galleries_id":335009,"server_id":32,"link":"photo_7323030.html","width":130,"caption":"","height":98});
															thumbnails[7323031] = clik.newPhoto({"id":7323031,"src":"Ross_Priory1_thumb.jpg","galleries_id":187792,"server_id":32,"link":"photo_7323031.html","width":130,"caption":"","height":87});
															thumbnails[7323037] = clik.newPhoto({"id":7323037,"src":"ANCHOR_thumb.jpg","galleries_id":186934,"server_id":32,"link":"photo_7323037.html","width":130,"caption":"","height":60});
															thumbnails[7323038] = clik.newPhoto({"id":7323038,"src":"ETIVE_MOR__1_thumb.jpg","galleries_id":186934,"server_id":32,"link":"photo_7323038.html","width":130,"caption":"","height":86});
															thumbnails[7323039] = clik.newPhoto({"id":7323039,"src":"MORNING_HAY_thumb.jpg","galleries_id":186934,"server_id":32,"link":"photo_7323039.html","width":130,"caption":"","height":71});
															thumbnails[7323042] = clik.newPhoto({"id":7323042,"src":"bluebell_wood_thumb.jpg","galleries_id":187792,"server_id":32,"link":"photo_7323042.html","width":130,"caption":"","height":173});
															thumbnails[7323043] = clik.newPhoto({"id":7323043,"src":"the_bridge_thumb.jpg","galleries_id":187792,"server_id":32,"link":"photo_7323043.html","width":130,"caption":"","height":87});
															thumbnails[7323044] = clik.newPhoto({"id":7323044,"src":"BEN_LOMOND_thumb.jpg","galleries_id":187789,"server_id":32,"link":"photo_7323044.html","width":130,"caption":"","height":87});
															thumbnails[7323045] = clik.newPhoto({"id":7323045,"src":"CATHEDRAL_SKYLINE_thumb.jpg","galleries_id":187789,"server_id":32,"link":"photo_7323045.html","width":130,"caption":"","height":87});
															thumbnails[7323047] = clik.newPhoto({"id":7323047,"src":"DISTORTED_VIEW_thumb.jpg","galleries_id":187789,"server_id":32,"link":"photo_7323047.html","width":130,"caption":"","height":87});
															thumbnails[7323049] = clik.newPhoto({"id":7323049,"src":"LOCH_GARRY_thumb.jpg","galleries_id":187789,"server_id":32,"link":"photo_7323049.html","width":130,"caption":"","height":87});
															thumbnails[7323053] = clik.newPhoto({"id":7323053,"src":"from_gartocharn_thumb.jpg","galleries_id":187790,"server_id":32,"link":"photo_7323053.html","width":130,"caption":"","height":98});
															thumbnails[7323054] = clik.newPhoto({"id":7323054,"src":"dying_sun_thumb.jpg","galleries_id":187790,"server_id":32,"link":"photo_7323054.html","width":130,"caption":"","height":75});
															thumbnails[7323056] = clik.newPhoto({"id":7323056,"src":"GalleryofModernArt_thumb.jpg","galleries_id":375136,"server_id":32,"link":"photo_7323056.html","width":130,"caption":"","height":68});
															thumbnails[7323058] = clik.newPhoto({"id":7323058,"src":"Glasgow_STVCityscape_thumb.jpg","galleries_id":375136,"server_id":32,"link":"photo_7323058.html","width":130,"caption":"","height":68});
															thumbnails[8628568] = clik.newPhoto({"id":8628568,"src":"new_trophy_thumb.jpg","galleries_id":232734,"server_id":32,"link":"photo_8628568.html","width":130,"caption":"Presentation of our New Trophy from DPHA","height":210});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[386093] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2011 - 2012 Syllabus","link":"gallery_386093.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":386093,"singleSection":false});				  						galleries[471643] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Andrew Ferguson","link":"gallery_471643.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":471643,"singleSection":false});				  						galleries[335010] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Andy Causier","link":"gallery_335010.html","maxRecords":0.0,"photoIDs":[6915351.0],"skipIndex":0,"section_code":"gallery","featured_images":6915351.0,"id":335010,"singleSection":false});				  						galleries[335009] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Andy Magee","link":"gallery_335009.html","maxRecords":0.0,"photoIDs":[6915338.0,6915341.0,6915343.0,6915345.0,7046501.0,7323028.0,7323030.0],"skipIndex":0,"section_code":"gallery","featured_images":"7323030,7323028,7046501,6915345,6915343,6915341,6915338","id":335009,"singleSection":false});				  						galleries[193303] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"anne meikle ","link":"gallery_193303.html","maxRecords":0.0,"photoIDs":[3154231.0,3154235.0,3154236.0,3154237.0,3579161.0,3579278.0,3784953.0,3784954.0],"skipIndex":0,"section_code":"gallery","featured_images":"3784954,3784953,3579278,3579161,3154237,3154236,3154235,3154231","id":193303,"singleSection":false});				  						galleries[187787] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Elizabeth Kemp ","link":"gallery_187787.html","maxRecords":0.0,"photoIDs":[3052921.0],"skipIndex":0,"section_code":"gallery","featured_images":3052921.0,"id":187787,"singleSection":false});				  						galleries[187796] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"George Dickson","link":"gallery_187796.html","maxRecords":0.0,"photoIDs":[3052951.0,3052952.0,3119937.0,3119939.0,3154238.0,3154239.0,3154240.0,3579281.0,3579282.0,3579283.0,3784956.0,3784957.0,6915336.0],"skipIndex":0,"section_code":"gallery","featured_images":"6915336,3784957,3784956,3579283,3579282,3579281,3154240,3154239,3154238,3119939","id":187796,"singleSection":false});				  						galleries[187792] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gerry McGinty","link":"gallery_187792.html","maxRecords":0.0,"photoIDs":[3052948.0,3052950.0,3120286.0,3154207.0,3154210.0,3154213.0,7323031.0,7323042.0,7323043.0],"skipIndex":0,"section_code":"gallery","featured_images":"7323043,7323042,7323031,3154213,3154210,3154207,3120286,3052950,3052948","id":187792,"singleSection":false});				  						galleries[187789] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gillian Sweeney","link":"gallery_187789.html","maxRecords":0.0,"photoIDs":[3154171.0,3154174.0,3154186.0,3154188.0,3579285.0,3579286.0,3579287.0,3579288.0,7323044.0,7323045.0,7323047.0,7323049.0],"skipIndex":0,"section_code":"gallery","featured_images":"7323049,7323047,7323045,7323044,3579288,3579287,3579286,3579285,3154188,3154186","id":187789,"singleSection":false});				  						galleries[471642] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Hannah Gallacher","link":"gallery_471642.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":471642,"singleSection":false});				  						galleries[335005] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Heather McDonald","link":"gallery_335005.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":335005,"singleSection":false});				  						galleries[335004] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Iain McDonald","link":"gallery_335004.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":335004,"singleSection":false});				  						galleries[230789] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"info about the club","link":"gallery_230789.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":230789,"singleSection":false});				  						galleries[187790] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Jim Buist","link":"gallery_187790.html","maxRecords":0.0,"photoIDs":[3154334.0,3154336.0,7323053.0,7323054.0],"skipIndex":0,"section_code":"gallery","featured_images":"7323054,7323053,3154336,3154334","id":187790,"singleSection":false});				  						galleries[335007] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Joe Scott","link":"gallery_335007.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":335007,"singleSection":false});				  						galleries[187795] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"John Crowley","link":"gallery_187795.html","maxRecords":0.0,"photoIDs":[3154128.0,3154129.0,3579892.0,3579894.0,3579895.0,3579896.0],"skipIndex":0,"section_code":"gallery","featured_images":"3579896,3579895,3579894,3579892,3154129,3154128","id":187795,"singleSection":false});				  						galleries[300370] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"other photography links","link":"gallery_300370.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":300370,"singleSection":false});				  						galleries[342546] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"prize presentation night","link":"gallery_342546.html","maxRecords":0.0,"photoIDs":[6112463.0,6112474.0,6112477.0,6112480.0,6112481.0,6112483.0,6112484.0,6112486.0,6112489.0],"skipIndex":0,"section_code":"gallery","featured_images":"6112489,6112486,6112484,6112483,6112481,6112480,6112477,6112474,6112463","id":342546,"singleSection":false});				  						galleries[186937] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"robert hamilton","link":"gallery_186937.html","maxRecords":0.0,"photoIDs":[3052935.0,3052936.0,3154189.0,3154191.0,3154204.0,3579897.0,3579900.0,3784959.0,3784961.0],"skipIndex":0,"section_code":"gallery","featured_images":"3784961,3784959,3579900,3579897,3154204,3154191,3154189,3052936,3052935","id":186937,"singleSection":false});				  						galleries[375136] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"russell lee","link":"gallery_375136.html","maxRecords":0.0,"photoIDs":[6915391.0,6915399.0,7323056.0,7323058.0],"skipIndex":0,"section_code":"gallery","featured_images":"7323058,7323056,6915399,6915391","id":375136,"singleSection":false});				  						galleries[187788] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sally Smith","link":"gallery_187788.html","maxRecords":0.0,"photoIDs":[3052942.0,3052943.0,3154243.0,3154244.0,3154272.0],"skipIndex":0,"section_code":"gallery","featured_images":"3154272,3154244,3154243,3052943,3052942","id":187788,"singleSection":false});				  						galleries[230786] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"steve slack","link":"gallery_230786.html","maxRecords":0.0,"photoIDs":[3784966.0,3784968.0],"skipIndex":0,"section_code":"gallery","featured_images":"3784968,3784966","id":230786,"singleSection":false});				  						galleries[187791] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Tom Baker","link":"gallery_187791.html","maxRecords":0.0,"photoIDs":[3052945.0,3052947.0,3120303.0,3154150.0,3154155.0,3154158.0,3579914.0,3579915.0,3579916.0,3579917.0,3579918.0,3784975.0,3784977.0],"skipIndex":0,"section_code":"gallery","featured_images":"3784977,3784975,3579918,3579917,3579916,3579915,3579914,3154158,3154155,3154150","id":187791,"singleSection":false});				  						galleries[232734] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"weekly update","link":"gallery_232734.html","maxRecords":0.0,"photoIDs":[8628568.0],"skipIndex":0,"section_code":"gallery","featured_images":8628568.0,"id":232734,"singleSection":false});				  						galleries[186934] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"derek wells","link":"gallery_186934.html","maxRecords":0.0,"photoIDs":[3052930.0,3052931.0,3120280.0,3120282.0,3154160.0,3154162.0,3154163.0,3154166.0,3579905.0,3579906.0,3579907.0,3579908.0,3784979.0,3784981.0,7323037.0,7323038.0,7323039.0],"skipIndex":0,"section_code":"gallery","featured_images":"7323039,7323038,7323037,3784981,3784979,3579908,3579907,3579906,3579905,3154166","id":186934,"singleSection":false});				  						galleries[186935] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"elaine findlay","link":"gallery_186935.html","maxRecords":0.0,"photoIDs":[3052932.0,3052934.0,3120283.0,3120285.0,3154215.0,3154219.0,3579276.0,3579277.0],"skipIndex":0,"section_code":"gallery","featured_images":"3579277,3579276,3154219,3154215,3120285,3120283,3052934,3052932","id":186935,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8628568,7323058,7323056,7323054,7323053,7323049,7323047,7323045,7323044,7323043,7323042,7323039,7323038,7323037,7323031,7323030,7323028,7046501,6915454,6915445,6915399,6915391,6915362,6915351,6915345,6915343,6915341,6915338,6915336,6231220,6112489,6112486,6112484,6112483,6112481,6112480,6112477,6112474,6112463,3784981,3784979,3784977,3784975,3784972,3784971,3784968,3784966,3784961,3784959,3784957';
imageSets[3] = '8628568,7323058,7323056,7323054,7323053,7323049,7323047,7323045,7323044,7323043,7323042,7323039,7323038,7323037,7323031,7323030,7323028,7046501,6915454,6915445,6915399,6915391,6915362,6915351,6915345,6915343,6915341,6915338,6915336,6231220,6112489,6112486,6112484,6112483,6112481,6112480,6112477,6112474,6112463,3784981,3784979,3784977,3784975,3784972,3784971,3784968,3784966,3784961,3784959,3784957';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/clydebank/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/clydebank/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/clydebank/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/clydebank/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/clydebank/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/clydebank/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/clydebank/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/clydebank/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 = 'clydebank camera club: ' + 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;
	}
}

			

