window.thumbnails = {};
															thumbnails[235387] = clik.newPhoto({"id":235387,"src":"_MG_groyne_no_thumb.1.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Groyne No.1 - Aberdeen beach.","height":81});
															thumbnails[235416] = clik.newPhoto({"id":235416,"src":"_MG_groyne_no_thumb.3.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Groyne No.3 - Aberdeen Beach.","height":91});
															thumbnails[198856] = clik.newPhoto({"id":198856,"src":"_MG_0924-01 ecopy_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":93});
															thumbnails[953167] = clik.newPhoto({"id":953167,"src":"_MG_3482-01colourwebcopy_thumb.jpg","galleries_id":71999,"server_id":15,"link":"photo_953167.html","width":130,"caption":"\"Mud cracks\" - Deadvlei","height":195});
															thumbnails[1714138] = clik.newPhoto({"id":1714138,"src":"_MG_Petrified_Deadvlei-copy_thumb.jpg","galleries_id":71999,"server_id":15,"link":"photo_1714138.html","width":130,"caption":"\"PETRIFIED\" - Deadvlei","height":80});
															thumbnails[3309275] = clik.newPhoto({"id":3309275,"src":"_MG_uprooted4-web_thumb.jpg","galleries_id":201674,"server_id":15,"link":"photo_3309275.html","width":130,"caption":"Uprooted #4","height":79});
															thumbnails[953112] = clik.newPhoto({"id":953112,"src":"_MG_4182-01bwwebcopy_thumb.jpg","galleries_id":71998,"server_id":15,"link":"photo_953112.html","width":130,"caption":"Vik study #1","height":193});
															thumbnails[717422] = clik.newPhoto({"id":717422,"src":"_MG_Ripcurl_thumb.jpg","galleries_id":55190,"server_id":15,"link":"photo_717422.html","width":130,"caption":"Ripcurl.","height":186});
															thumbnails[717340] = clik.newPhoto({"id":717340,"src":"Ardbeg_distillery_thumb.jpg.jpg","galleries_id":55177,"server_id":15,"link":"photo_717340.html","width":130,"caption":"Ardbeg Distillery - Islay","height":191});
															thumbnails[564780] = clik.newPhoto({"id":564780,"src":"_MG_Beacon_Pocra_Quay copy_thumb.jpg","galleries_id":43518,"server_id":15,"link":"photo_564780.html","width":130,"caption":"\"Beacon\" - Pocra Quay, Aberdeen Harbour","height":198});
															thumbnails[713134] = clik.newPhoto({"id":713134,"src":"_MG_1642-01 bwcopy copy_thumb.jpg","galleries_id":54824,"server_id":15,"link":"photo_713134.html","width":130,"caption":"\"Storm Clouds Over Carra\".","height":181});
															thumbnails[108222] = clik.newPhoto({"id":108222,"src":"Deserted_Beach_South_Uist_thumb.jpg","galleries_id":10153,"server_id":15,"link":"photo_108222.html","width":130,"caption":"Deserted beach - South Uist","height":195});
															thumbnails[108316] = clik.newPhoto({"id":108316,"src":"Waterfall_Talisker_bay_thumb.jpg","galleries_id":10167,"server_id":15,"link":"photo_108316.html","width":130,"caption":"Waterfall - Talisker Bay","height":195});
															thumbnails[108289] = clik.newPhoto({"id":108289,"src":"Cloud_reflections_beyond_the_surf_Dunnet Beach_thumb.jpg","galleries_id":54813,"server_id":15,"link":"photo_108289.html","width":130,"caption":"Cloud Reflections beyond the surf - Dunnet Beach","height":98});
															thumbnails[108255] = clik.newPhoto({"id":108255,"src":"Sun_breaks_through_the_clouds_Aviemore_thumb.jpg","galleries_id":10156,"server_id":15,"link":"photo_108255.html","width":130,"caption":"Sun Breaks Through The Clouds - Loch Nan Eilean ","height":195});
															thumbnails[719997] = clik.newPhoto({"id":719997,"src":"Old Man O Muchalls_thumb.jpg","galleries_id":55389,"server_id":15,"link":"photo_719997.html","width":130,"caption":"Old Man O Muchalls","height":206});
															thumbnails[1714137] = clik.newPhoto({"id":1714137,"src":"_MG_Tortured_Deadvlei-copy_thumb.jpg","galleries_id":71999,"server_id":15,"link":"photo_1714137.html","width":130,"caption":"\"TORTURED\" - Deadvlei.","height":211});
															thumbnails[1714182] = clik.newPhoto({"id":1714182,"src":"_MG_Whirlpool_BerriedaleXco_thumb.jpg","galleries_id":115217,"server_id":15,"link":"photo_1714182.html","width":130,"caption":"\"WHIRLPOOL\" - Berriedale","height":89});
															thumbnails[1714205] = clik.newPhoto({"id":1714205,"src":"_MG_dunnottar_castle_thumb.jpg","galleries_id":55389,"server_id":15,"link":"photo_1714205.html","width":130,"caption":"\"DUNNOTTAR CASTLE\" - Stonehaven","height":89});
															thumbnails[6781172] = clik.newPhoto({"id":6781172,"src":"_MG_blackflags_web_thumb.jpg","galleries_id":368978,"server_id":15,"link":"photo_6781172.html","width":130,"caption":"Black Flags","height":92});
															thumbnails[6781522] = clik.newPhoto({"id":6781522,"src":"_MG_6670-web_thumb.jpg","galleries_id":368985,"server_id":15,"link":"photo_6781522.html","width":130,"caption":"Bowfiddle Rock #2","height":173});
															thumbnails[6784081] = clik.newPhoto({"id":6784081,"src":"_MG_7779-web_thumb.jpg","galleries_id":369076,"server_id":15,"link":"photo_6784081.html","width":130,"caption":"Cliff Study #1","height":98});
															thumbnails[6784327] = clik.newPhoto({"id":6784327,"src":"_MG_7441bw-web_thumb.jpg","galleries_id":369087,"server_id":15,"link":"photo_6784327.html","width":130,"caption":"Clouds Over Dunnet Beach","height":87});
															thumbnails[6780421] = clik.newPhoto({"id":6780421,"src":"_MG_backflow1-web_thumb.jpg","galleries_id":201674,"server_id":15,"link":"photo_6780421.html","width":130,"caption":"Backflow","height":79});
															thumbnails[717427] = clik.newPhoto({"id":717427,"src":"_MG_Whitehorses_no1_thumb.jpg.jpg","galleries_id":55190,"server_id":15,"link":"photo_717427.html","width":130,"caption":"Whitehorses #1","height":198});
															thumbnails[717343] = clik.newPhoto({"id":717343,"src":"Ardbeg_pier_thumb.jpg.jpg","galleries_id":55177,"server_id":15,"link":"photo_717343.html","width":130,"caption":"Ardbeg Pier - Islay.","height":188});
															thumbnails[564787] = clik.newPhoto({"id":564787,"src":"_MG_Impact_Cruden_Bay copy_thumb.jpg","galleries_id":43518,"server_id":15,"link":"photo_564787.html","width":130,"caption":"\"Impact\" - Cruden Bay","height":202});
															thumbnails[713139] = clik.newPhoto({"id":713139,"src":"_MG_1658-01 bwcopy copy_thumb.jpg","galleries_id":54824,"server_id":15,"link":"photo_713139.html","width":130,"caption":"","height":192});
															thumbnails[108225] = clik.newPhoto({"id":108225,"src":"Through_the_Clouds_Benbecula_thumb.jpg","galleries_id":10153,"server_id":15,"link":"photo_108225.html","width":130,"caption":"Through The Clouds - Benbecula","height":195});
															thumbnails[108317] = clik.newPhoto({"id":108317,"src":"The_Quirang_pinnacles_thumb.jpg","galleries_id":10167,"server_id":15,"link":"photo_108317.html","width":130,"caption":"The Quirang Pinnacles - Trotternish","height":173});
															thumbnails[108298] = clik.newPhoto({"id":108298,"src":"Downpour_Dunnet_Beach_thumb.jpg","galleries_id":54813,"server_id":15,"link":"photo_108298.html","width":130,"caption":"Downpour - Dunnet Beach","height":98});
															thumbnails[108247] = clik.newPhoto({"id":108247,"src":"3_dead_trees_Loch_Garten_thumb.jpg","galleries_id":10156,"server_id":15,"link":"photo_108247.html","width":130,"caption":"3 Dead Trees - Loch Garten","height":168});
															thumbnails[1714192] = clik.newPhoto({"id":1714192,"src":"_MG_bigsea_thumb.jpg","galleries_id":115217,"server_id":15,"link":"photo_1714192.html","width":130,"caption":"\"BIG SEA\" - Berriedale","height":85});
															thumbnails[6781185] = clik.newPhoto({"id":6781185,"src":"_MG_6355-01-copy_thumb.jpg","galleries_id":368978,"server_id":15,"link":"photo_6781185.html","width":130,"caption":"Early Morning","height":77});
															thumbnails[6781546] = clik.newPhoto({"id":6781546,"src":"_MG_6666bw-web_thumb.jpg","galleries_id":368985,"server_id":15,"link":"photo_6781546.html","width":130,"caption":"Bowfiddle Rock #3","height":79});
															thumbnails[6784082] = clik.newPhoto({"id":6784082,"src":"_MG_the_black_pool_web_thumb.jpg","galleries_id":369076,"server_id":15,"link":"photo_6784082.html","width":130,"caption":"Black Pool #3","height":79});
															thumbnails[6780425] = clik.newPhoto({"id":6780425,"src":"uprooted3-web_thumb.jpg","galleries_id":201674,"server_id":15,"link":"photo_6780425.html","width":130,"caption":"Uprooted #3","height":79});
															thumbnails[953129] = clik.newPhoto({"id":953129,"src":"_MG_4183-01bwwebcopy_thumb.jpg","galleries_id":71998,"server_id":15,"link":"photo_953129.html","width":130,"caption":"Vik study #2","height":89});
															thumbnails[717431] = clik.newPhoto({"id":717431,"src":"_MG_Whitehorses_no2_thumb.jpg.jpg","galleries_id":55190,"server_id":15,"link":"photo_717431.html","width":130,"caption":"Whitehorses #2","height":188});
															thumbnails[719341] = clik.newPhoto({"id":719341,"src":"Craighouse_pier_no1_thumb.jpg.jpg","galleries_id":55177,"server_id":15,"link":"photo_719341.html","width":130,"caption":"Craighouse Pier #1.","height":90});
															thumbnails[564792] = clik.newPhoto({"id":564792,"src":"_MG_Squall copy_thumb.jpg","galleries_id":43518,"server_id":15,"link":"photo_564792.html","width":130,"caption":"\"Squall\" - Catterline Bay","height":198});
															thumbnails[108226] = clik.newPhoto({"id":108226,"src":"Seaweed_ North_Uist copy_thumb.jpg","galleries_id":10153,"server_id":15,"link":"photo_108226.html","width":130,"caption":"Seaweed - North Uist","height":195});
															thumbnails[108319] = clik.newPhoto({"id":108319,"src":"Skye_rocks_The_old_man_of_Storr_thumb.jpg","galleries_id":10167,"server_id":15,"link":"photo_108319.html","width":130,"caption":"Skye Rocks - Trotternish","height":195});
															thumbnails[108299] = clik.newPhoto({"id":108299,"src":"Flagstone_fences_Castletown_thumb.jpg","galleries_id":54813,"server_id":15,"link":"photo_108299.html","width":130,"caption":"Flagstone Fence - Castletown.","height":87});
															thumbnails[108309] = clik.newPhoto({"id":108309,"src":"Lone_tree_and_5_rocks _Glen_Loth_thumb.jpg","galleries_id":54813,"server_id":15,"link":"photo_108309.html","width":130,"caption":"Lone Tree and 5 Rocks - Glen Loth","height":98});
															thumbnails[108251] = clik.newPhoto({"id":108251,"src":"Ripple_in_Loch_Garten_thumb.jpg","galleries_id":10156,"server_id":15,"link":"photo_108251.html","width":130,"caption":"Ripples - Loch Garten","height":170});
															thumbnails[108267] = clik.newPhoto({"id":108267,"src":"Shifting_Sands_Newburgh_thumb.jpg","galleries_id":10155,"server_id":15,"link":"photo_108267.html","width":130,"caption":"Shifting Sands - Newburgh","height":168});
															thumbnails[1714142] = clik.newPhoto({"id":1714142,"src":"_MG_Mudcracks_Deadvlei-copy_thumb.jpg","galleries_id":71999,"server_id":15,"link":"photo_1714142.html","width":130,"caption":"","height":211});
															thumbnails[1714193] = clik.newPhoto({"id":1714193,"src":"_MG_cliffstudyw_thumb.jpg","galleries_id":115217,"server_id":15,"link":"photo_1714193.html","width":100,"caption":"\"CLIFF STUDY #1\" -  Berriedale","height":100});
															thumbnails[1714207] = clik.newPhoto({"id":1714207,"src":"_MG_potarch_bridge_thumb.jpg","galleries_id":55389,"server_id":15,"link":"photo_1714207.html","width":130,"caption":"\"Potarch Bridge\" - The River Dee","height":89});
															thumbnails[6781201] = clik.newPhoto({"id":6781201,"src":"_MG_6465-01-web_thumb.jpg","galleries_id":368978,"server_id":15,"link":"photo_6781201.html","width":130,"caption":"River Mouth","height":89});
															thumbnails[6781734] = clik.newPhoto({"id":6781734,"src":"_MG_6684_web_thumb.jpg","galleries_id":368985,"server_id":15,"link":"photo_6781734.html","width":130,"caption":"Bowfiddle Rock #1","height":83});
															thumbnails[6784085] = clik.newPhoto({"id":6784085,"src":"_MG_7793bw-web_thumb.jpg","galleries_id":369076,"server_id":15,"link":"photo_6784085.html","width":130,"caption":"High Tide","height":82});
															thumbnails[6784328] = clik.newPhoto({"id":6784328,"src":"_MG_7590-bwcopy-web_thumb.jpg","galleries_id":369087,"server_id":15,"link":"photo_6784328.html","width":130,"caption":"Peedie Sands","height":87});
															thumbnails[953132] = clik.newPhoto({"id":953132,"src":"_MG_4211-01bwwebcopy_thumb.jpg","galleries_id":71998,"server_id":15,"link":"photo_953132.html","width":130,"caption":"Vik study #3","height":86});
															thumbnails[719346] = clik.newPhoto({"id":719346,"src":"Craighouse_ Pier_no2_thumb.jpg.jpg","galleries_id":55177,"server_id":15,"link":"photo_719346.html","width":130,"caption":"Craighouse Pier #2","height":189});
															thumbnails[564791] = clik.newPhoto({"id":564791,"src":"_MG_Seapool copy_thumb.jpg","galleries_id":43518,"server_id":15,"link":"photo_564791.html","width":130,"caption":"\"Seapool\" - Aberdeen Beach","height":188});
															thumbnails[108237] = clik.newPhoto({"id":108237,"src":"Looking_Towards_Berneray_thumb.jpg","galleries_id":10153,"server_id":15,"link":"photo_108237.html","width":130,"caption":"Looking Towards Berneray - North Uist","height":87});
															thumbnails[108320] = clik.newPhoto({"id":108320,"src":"Rocky_shore_Talisker_bay_thumb.jpg","galleries_id":10167,"server_id":15,"link":"photo_108320.html","width":130,"caption":"Rocky shore - Talisker Bay","height":195});
															thumbnails[108300] = clik.newPhoto({"id":108300,"src":"The_Clett_rocks_Dunnet_Head_thumb.jpg","galleries_id":54813,"server_id":15,"link":"photo_108300.html","width":130,"caption":"The Clett Rocks - Brough","height":98});
															thumbnails[108312] = clik.newPhoto({"id":108312,"src":"Snow_fence_Kinbrace_thumb.jpg","galleries_id":54813,"server_id":15,"link":"photo_108312.html","width":130,"caption":"Snow Fence - Kinbrace","height":98});
															thumbnails[108246] = clik.newPhoto({"id":108246,"src":"The_lily_loch_after_the_rain_Aviemore_thumb.jpg","galleries_id":10156,"server_id":15,"link":"photo_108246.html","width":130,"caption":"The Lily Loch After The Rain - Loch Nan Eilean ","height":100});
															thumbnails[108269] = clik.newPhoto({"id":108269,"src":"Snow_on_Scolty_Hill1_thumb.jpg","galleries_id":10155,"server_id":15,"link":"photo_108269.html","width":130,"caption":"Towards Strachan In The Snow - Scolty Hill ","height":87});
															thumbnails[1714150] = clik.newPhoto({"id":1714150,"src":"_MG_3524-01bwcopy-copy_thumb.jpg","galleries_id":71999,"server_id":15,"link":"photo_1714150.html","width":130,"caption":"\"TREE SHADOW\" - Deadvlei","height":96});
															thumbnails[1714194] = clik.newPhoto({"id":1714194,"src":"_MG_whirlpool_no2_thumb.jpg","galleries_id":115217,"server_id":15,"link":"photo_1714194.html","width":130,"caption":"\"WHIRLPOOL #2\" - Berriedale","height":189});
															thumbnails[6780432] = clik.newPhoto({"id":6780432,"src":"_MG_uprooted2-web_thumb.jpg","galleries_id":201674,"server_id":15,"link":"photo_6780432.html","width":130,"caption":"Uprooted #2 ","height":79});
															thumbnails[6781210] = clik.newPhoto({"id":6781210,"src":"_MG_6553-01-web_thumb.jpg","galleries_id":368978,"server_id":15,"link":"photo_6781210.html","width":130,"caption":"Underworld","height":92});
															thumbnails[6781630] = clik.newPhoto({"id":6781630,"src":"_MG_6844-web_thumb.jpg","galleries_id":368985,"server_id":15,"link":"photo_6781630.html","width":130,"caption":"Portknockie Rocks #1","height":80});
															thumbnails[6784090] = clik.newPhoto({"id":6784090,"src":"_MG_shore_cottages_2-web_thumb.jpg","galleries_id":369076,"server_id":15,"link":"photo_6784090.html","width":130,"caption":"Shore Cottages #2","height":79});
															thumbnails[953143] = clik.newPhoto({"id":953143,"src":"_MG_4243-02bwwebcopy_thumb.jpg","galleries_id":71998,"server_id":15,"link":"photo_953143.html","width":130,"caption":"Dyrrhoaley study #1","height":84});
															thumbnails[565516] = clik.newPhoto({"id":565516,"src":"_MG_Jetsam_copy_thumb.jpg","galleries_id":43518,"server_id":15,"link":"photo_565516.html","width":130,"caption":"\"Jetsam\" - St Cyrus","height":211});
															thumbnails[719348] = clik.newPhoto({"id":719348,"src":"Craighouse_pier_no3_thumb.jpg.jpg","galleries_id":55177,"server_id":15,"link":"photo_719348.html","width":130,"caption":"Craighouse Pier #3","height":194});
															thumbnails[108238] = clik.newPhoto({"id":108238,"src":"In_The_Surf_Benbecula_thumb.jpg","galleries_id":10153,"server_id":15,"link":"photo_108238.html","width":130,"caption":"In The Surf - Benbecula","height":195});
															thumbnails[108321] = clik.newPhoto({"id":108321,"src":"Atlantic_swell-Talisker_bay_thumb.jpg","galleries_id":10167,"server_id":15,"link":"photo_108321.html","width":130,"caption":"Atlantic Swell - Talisker Bay","height":87});
															thumbnails[108302] = clik.newPhoto({"id":108302,"src":"Hawthorn_and_drystone_dyke_Caithness_thumb.jpg","galleries_id":10152,"server_id":15,"link":"photo_108302.html","width":130,"caption":"Hawthorn and Drystone Dyke - Hastigrow","height":195});
															thumbnails[108258] = clik.newPhoto({"id":108258,"src":"3_rocks_Loch_Garten_thumb.jpg","galleries_id":10156,"server_id":15,"link":"photo_108258.html","width":130,"caption":"3 Rocks - Loch Garten","height":100});
															thumbnails[108270] = clik.newPhoto({"id":108270,"src":"Between_a_rock_and_a_hard_place_no_thumb.2_Scolty_Hill.jpg","galleries_id":10155,"server_id":15,"link":"photo_108270.html","width":130,"caption":"Between a Rock and a Hard Place - Scolty Hill ","height":195});
															thumbnails[1714154] = clik.newPhoto({"id":1714154,"src":"_MG_3533-01bwcopy-copy_thumb.jpg","galleries_id":71999,"server_id":15,"link":"photo_1714154.html","width":130,"caption":"\"CANYON\" - Deadvlei","height":87});
															thumbnails[6780441] = clik.newPhoto({"id":6780441,"src":"_MG_uprooted1-web_thumb.jpg","galleries_id":201674,"server_id":15,"link":"photo_6780441.html","width":130,"caption":"Uprooted #1","height":79});
															thumbnails[6781642] = clik.newPhoto({"id":6781642,"src":"_MG_6843-web_thumb.jpg","galleries_id":368985,"server_id":15,"link":"photo_6781642.html","width":130,"caption":"Portknockie Rocks #2","height":173});
															thumbnails[6784097] = clik.newPhoto({"id":6784097,"src":"_MG_shore_cottages_3-web_thumb.jpg","galleries_id":369076,"server_id":15,"link":"photo_6784097.html","width":130,"caption":"Shore Cottages #3","height":82});
															thumbnails[6784335] = clik.newPhoto({"id":6784335,"src":"_MG_7516bw-web_thumb.jpg","galleries_id":369087,"server_id":15,"link":"photo_6784335.html","width":130,"caption":"Storm Over Dunnet Head","height":84});
															thumbnails[953145] = clik.newPhoto({"id":953145,"src":"_MG_4260-01bwwebcopy_thumb.jpg","galleries_id":71998,"server_id":15,"link":"photo_953145.html","width":130,"caption":"Dyrrhoaley study #2","height":78});
															thumbnails[564810] = clik.newPhoto({"id":564810,"src":"_MG_Stacks copy_thumb.jpg","galleries_id":43518,"server_id":15,"link":"photo_564810.html","width":130,"caption":"\"Stacks\" - Cruden Bay","height":199});
															thumbnails[111262] = clik.newPhoto({"id":111262,"src":"Blackhouse no_thumb.1 North Uist.jpg","galleries_id":10153,"server_id":15,"link":"photo_111262.html","width":130,"caption":"Blackhouse no.1 - North Uist","height":195});
															thumbnails[108271] = clik.newPhoto({"id":108271,"src":"Lone_pine_and_rushes_Scolty_Hill_thumb.jpg","galleries_id":10155,"server_id":15,"link":"photo_108271.html","width":130,"caption":"Lone Pine and Rushes - Scolty Hill","height":195});
															thumbnails[6780445] = clik.newPhoto({"id":6780445,"src":"_MG_submerged1-web_thumb.jpg","galleries_id":201674,"server_id":15,"link":"photo_6780445.html","width":130,"caption":"Submerged","height":93});
															thumbnails[6781654] = clik.newPhoto({"id":6781654,"src":"_MG_6911-web_thumb.jpg","galleries_id":368985,"server_id":15,"link":"photo_6781654.html","width":130,"caption":"Tarlair Rocks #1","height":173});
															thumbnails[6784528] = clik.newPhoto({"id":6784528,"src":"_MG_7542-bwcopy-web_thumb.jpg","galleries_id":369087,"server_id":15,"link":"photo_6784528.html","width":130,"caption":"Peedie Sands Rocks","height":87});
															thumbnails[564965] = clik.newPhoto({"id":564965,"src":"_MG_Todhead_lighthouse copy_thumb.jpg","galleries_id":43518,"server_id":15,"link":"photo_564965.html","width":130,"caption":"\"Lighthouse\" - Todhead, Kinneff","height":195});
															thumbnails[565001] = clik.newPhoto({"id":565001,"src":"_MG_Tidecatcher_thumb.jpg","galleries_id":43518,"server_id":15,"link":"photo_565001.html","width":130,"caption":"\"Tidecatcher\" - Catterline Bay","height":193});
															thumbnails[108306] = clik.newPhoto({"id":108306,"src":"Tide_ out_Dunnet_Beach_thumb.jpg","galleries_id":54813,"server_id":15,"link":"photo_108306.html","width":130,"caption":"Tides Out - Dunnet Beach","height":98});
															thumbnails[174225] = clik.newPhoto({"id":174225,"src":"_MG_0826-01 bwecopy_thumb.jpg","galleries_id":10156,"server_id":15,"link":"photo_174225.html","width":130,"caption":"Fallen Tree - Loch Garten.","height":193});
															thumbnails[6780448] = clik.newPhoto({"id":6780448,"src":"_MG_stranded-web_thumb.jpg","galleries_id":201674,"server_id":15,"link":"photo_6780448.html","width":130,"caption":"Stranded","height":90});
															thumbnails[6781661] = clik.newPhoto({"id":6781661,"src":"_MG_6883-web_thumb.jpg","galleries_id":368985,"server_id":15,"link":"photo_6781661.html","width":130,"caption":"Tarlair Rocks #2","height":173});
															thumbnails[112383] = clik.newPhoto({"id":112383,"src":"Wind_Blown_Hawthorn_Caithness_thumb.jpg","galleries_id":10152,"server_id":15,"link":"photo_112383.html","width":130,"caption":"Wind Blown Hawthorn - Hastigrow","height":87});
															thumbnails[108304] = clik.newPhoto({"id":108304,"src":"Cracked_but_the_rocks_remain_Dunnet Head_thumb.jpg","galleries_id":54813,"server_id":15,"link":"photo_108304.html","width":130,"caption":"Cracked, But The Rocks Remain","height":173});
															thumbnails[108307] = clik.newPhoto({"id":108307,"src":"2_stabs_and_a_dark_cloud_Kinbrace_thumb.jpg","galleries_id":54813,"server_id":15,"link":"photo_108307.html","width":130,"caption":"2 Stabs and a Dark Cloud - Kinbrace","height":173});
															thumbnails[108308] = clik.newPhoto({"id":108308,"src":"Breaking_the_surface_tension_Loch_Crocach_thumb.jpg","galleries_id":54813,"server_id":15,"link":"photo_108308.html","width":130,"caption":"Breaking The Surface Tension - Loch Crocach","height":173});
															thumbnails[108313] = clik.newPhoto({"id":108313,"src":"Dead_bracken_and_tree_Glen_Loth_thumb.jpg","galleries_id":54813,"server_id":15,"link":"photo_108313.html","width":130,"caption":"Lone Tree and Dead Bracken - Glen Loth","height":173});
															thumbnails[190904] = clik.newPhoto({"id":190904,"src":"_MG_0979-01 bwe2copy_thumb.jpg","galleries_id":10155,"server_id":15,"link":"photo_190904.html","width":130,"caption":"Between a Rock and a Cold Place","height":188});
															thumbnails[6780454] = clik.newPhoto({"id":6780454,"src":"_MG_mangrove-web_thumb.jpg","galleries_id":201674,"server_id":15,"link":"photo_6780454.html","width":130,"caption":"Mangrove","height":79});
															thumbnails[235412] = clik.newPhoto({"id":235412,"src":"_MG_groyne_no_thumb1.2.jpg","galleries_id":43518,"server_id":15,"link":"photo_235412.html","width":130,"caption":"Groyne No.2 - Aberdeen Beach.","height":187});
															thumbnails[6780459] = clik.newPhoto({"id":6780459,"src":"_MG_Last_man_standing-web_thumb.jpg","galleries_id":201674,"server_id":15,"link":"photo_6780459.html","width":130,"caption":"Last Man Standing","height":79});
															thumbnails[108260] = clik.newPhoto({"id":108260,"src":"The_perfect_dune_Newburgh_thumb.jpg","galleries_id":43518,"server_id":15,"link":"photo_108260.html","width":130,"caption":" Perfect Dune? - Newburgh","height":168});
															thumbnails[149518] = clik.newPhoto({"id":149518,"src":"_MG_0636-01 bw2ecopyx_thumb.jpg","galleries_id":43518,"server_id":15,"link":"photo_149518.html","width":130,"caption":"Flotsam on Balmedie Beach","height":192});
															thumbnails[565426] = clik.newPhoto({"id":565426,"src":"_MG_Windswept-Balmedie-copy_thumb.jpg","galleries_id":43518,"server_id":15,"link":"photo_565426.html","width":130,"caption":"\"Windswept\" - Balmedie","height":195});
															thumbnails[565513] = clik.newPhoto({"id":565513,"src":"Stranded-copy_thumb.jpg","galleries_id":43518,"server_id":15,"link":"photo_565513.html","width":130,"caption":"\"Stranded\" - St Cyrus","height":211});
															thumbnails[564790] = clik.newPhoto({"id":564790,"src":"_MG_Reef copy_thumb.jpg","galleries_id":43518,"server_id":15,"link":"photo_564790.html","width":130,"caption":"\"Reef\" - Cruden Bay","height":177});
															thumbnails[565528] = clik.newPhoto({"id":565528,"src":"_MG_Groyne_copy_thumb.jpg","galleries_id":43518,"server_id":15,"link":"photo_565528.html","width":130,"caption":"\"Groyne #4\" - Aberdeen beach","height":211});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[54813] = clik.newGallery({"parentGallery":54167,"usePopups":false,"title":"\"The Rocks Remain\" Exhibition","link":"gallery_54813.html","maxRecords":0.0,"photoIDs":[108289.0,108298.0,108299.0,108309.0,108300.0,108312.0,108306.0,108304.0,108307.0,108308.0,108313.0],"skipIndex":0,"section_code":"gallery","featured_images":108304.0,"id":54813,"singleSection":false});				  						galleries[54824] = clik.newGallery({"parentGallery":54223,"usePopups":false,"title":"Gigha","link":"gallery_54824.html","maxRecords":0.0,"photoIDs":[713134.0,713139.0],"skipIndex":0,"section_code":"gallery","featured_images":"713139,713134","id":54824,"singleSection":false});				  						galleries[55177] = clik.newGallery({"parentGallery":54223,"usePopups":false,"title":"Islay and Jura","link":"gallery_55177.html","maxRecords":0.0,"photoIDs":[717340.0,717343.0,719341.0,719346.0,719348.0],"skipIndex":0,"section_code":"gallery","featured_images":"719348,717340","id":55177,"singleSection":false});				  						galleries[43518] = clik.newGallery({"parentGallery":54223,"usePopups":false,"title":"\"Coast\" Exhibition.","link":"gallery_43518.html","maxRecords":0.0,"photoIDs":[564780.0,564787.0,564792.0,564791.0,565516.0,564810.0,564965.0,565001.0,235412.0,108260.0,149518.0,565426.0,565513.0,564790.0,565528.0],"skipIndex":0,"section_code":"gallery","featured_images":"565001,564792,149518","id":43518,"singleSection":false});				  						galleries[54167] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2005 Archive","link":"gallery_54167.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"190904,174225,108304,108302,108271,108267,108255,108247,108226,108222","id":54167,"singleSection":false});				  						galleries[55389] = clik.newGallery({"parentGallery":55387,"usePopups":false,"title":"Aberdeen coast and stream","link":"gallery_55389.html","maxRecords":0.0,"photoIDs":[719997.0,1714205.0,1714207.0],"skipIndex":0,"section_code":"gallery","featured_images":"1714207,1714205","id":55389,"singleSection":false});				  						galleries[115217] = clik.newGallery({"parentGallery":55387,"usePopups":false,"title":"Berriedale","link":"gallery_115217.html","maxRecords":0.0,"photoIDs":[1714182.0,1714192.0,1714193.0,1714194.0],"skipIndex":0,"section_code":"gallery","featured_images":"1714194,1714182","id":115217,"singleSection":false});				  						galleries[368986] = clik.newGallery({"parentGallery":368984,"usePopups":false,"title":"Mull and Staffa","link":"gallery_368986.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":368986,"singleSection":false});				  						galleries[10152] = clik.newGallery({"parentGallery":54167,"usePopups":false,"title":"Caithness","link":"gallery_10152.html","maxRecords":0.0,"photoIDs":[108302.0,112383.0],"skipIndex":0,"section_code":"gallery","featured_images":108302.0,"id":10152,"singleSection":false});				  						galleries[54223] = clik.newGallery({"parentGallery":"","usePopups":false,"title":" 2006 Archive","link":"gallery_54223.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"719348,717340,565001,564792,149518","id":54223,"singleSection":false});				  						galleries[369076] = clik.newGallery({"parentGallery":368983,"usePopups":false,"title":"Berriedale revisited","link":"gallery_369076.html","maxRecords":0.0,"photoIDs":[6784081.0,6784082.0,6784085.0,6784090.0,6784097.0],"skipIndex":0,"section_code":"gallery","featured_images":"6784097,6784090,6784085,6784082,6784081","id":369076,"singleSection":false});				  						galleries[71998] = clik.newGallery({"parentGallery":55387,"usePopups":false,"title":"Iceland","link":"gallery_71998.html","maxRecords":0.0,"photoIDs":[953112.0,953129.0,953132.0,953143.0,953145.0],"skipIndex":0,"section_code":"gallery","featured_images":"953145,953143,953132,953129","id":71998,"singleSection":false});				  						galleries[368978] = clik.newGallery({"parentGallery":201672,"usePopups":false,"title":"Southwold","link":"gallery_368978.html","maxRecords":0.0,"photoIDs":[6781172.0,6781185.0,6781201.0,6781210.0],"skipIndex":0,"section_code":"gallery","featured_images":"6781210,6781201,6781185,6781172","id":368978,"singleSection":false});				  						galleries[201674] = clik.newGallery({"parentGallery":201672,"usePopups":false,"title":"Tentsmuir Beach","link":"gallery_201674.html","maxRecords":0.0,"photoIDs":[3309275.0,6780421.0,6780425.0,6780432.0,6780441.0,6780445.0,6780448.0,6780454.0,6780459.0],"skipIndex":0,"section_code":"gallery","featured_images":"6780421,3309275","id":201674,"singleSection":false});				  						galleries[55387] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2007 Archive","link":"gallery_55387.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"1714207,1714205,1714194,1714182,1714138,953145,953143,953132,953129","id":55387,"singleSection":false});				  						galleries[368985] = clik.newGallery({"parentGallery":368983,"usePopups":false,"title":"Banff Coast","link":"gallery_368985.html","maxRecords":0.0,"photoIDs":[6781522.0,6781546.0,6781734.0,6781630.0,6781642.0,6781654.0,6781661.0],"skipIndex":0,"section_code":"gallery","featured_images":"6781661,6781654","id":368985,"singleSection":false});				  						galleries[369087] = clik.newGallery({"parentGallery":368983,"usePopups":false,"title":"Caithness 2009","link":"gallery_369087.html","maxRecords":0.0,"photoIDs":[6784327.0,6784328.0,6784335.0,6784528.0],"skipIndex":0,"section_code":"gallery","featured_images":"6784528,6784335,6784327","id":369087,"singleSection":false});				  						galleries[71999] = clik.newGallery({"parentGallery":55387,"usePopups":false,"title":"Namibia","link":"gallery_71999.html","maxRecords":0.0,"photoIDs":[953167.0,1714138.0,1714137.0,1714142.0,1714150.0,1714154.0],"skipIndex":0,"section_code":"gallery","featured_images":1714138.0,"id":71999,"singleSection":false});				  						galleries[10153] = clik.newGallery({"parentGallery":54167,"usePopups":false,"title":"Outer Hebrides","link":"gallery_10153.html","maxRecords":0.0,"photoIDs":[108222.0,108225.0,108226.0,108237.0,108238.0,111262.0],"skipIndex":0,"section_code":"gallery","featured_images":"108226,108222","id":10153,"singleSection":false});				  						galleries[201672] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2008 Archive","link":"gallery_201672.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"6781210,6781201,6781185,6781172,6780421,3309275","id":201672,"singleSection":false});				  						galleries[55190] = clik.newGallery({"parentGallery":54223,"usePopups":false,"title":"Aberdeen Beach","link":"gallery_55190.html","maxRecords":0.0,"photoIDs":[717422.0,717427.0,717431.0],"skipIndex":0,"section_code":"gallery","featured_images":"717431,717427,717422","id":55190,"singleSection":false});				  						galleries[10155] = clik.newGallery({"parentGallery":54167,"usePopups":false,"title":"Aberdeenshire","link":"gallery_10155.html","maxRecords":0.0,"photoIDs":[108267.0,108269.0,108270.0,108271.0,190904.0],"skipIndex":0,"section_code":"gallery","featured_images":"190904,108271,108267","id":10155,"singleSection":false});				  						galleries[368983] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2009 Archive","link":"gallery_368983.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"6784528,6784335,6784327,6781661,6781654","id":368983,"singleSection":false});				  						galleries[10156] = clik.newGallery({"parentGallery":54167,"usePopups":false,"title":"Speyside","link":"gallery_10156.html","maxRecords":0.0,"photoIDs":[108255.0,108247.0,108251.0,108246.0,108258.0,174225.0],"skipIndex":0,"section_code":"gallery","featured_images":"174225,108255,108247","id":10156,"singleSection":false});				  						galleries[368984] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2010 archive","link":"gallery_368984.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":368984,"singleSection":false});				  						galleries[10167] = clik.newGallery({"parentGallery":54167,"usePopups":false,"title":"Skye","link":"gallery_10167.html","maxRecords":0.0,"photoIDs":[108316.0,108317.0,108319.0,108320.0,108321.0],"skipIndex":0,"section_code":"gallery","featured_images":"108321,108320,108319,108317,108316","id":10167,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '1714138,6781522,6781172,3309275,1714205,1714182,564780,108316,108289,108255,108222,6781185,6780421,713139,564787,108298,108247,6781734,1714207,1714142,953129,564792,108309,108299,108267,108251,108226,6781210,1714194,953132,564791,108312,108269,108246,108237,953143,108302,108270,108258,108238,953145,564810,565001,564965,174225,190904,235412,108260,149518,565513,564790';
imageSets[2] = '1714138,6784327,6781172,3309275,1714205,1714182,717340,108255,108222,6781185,6780421,108247,6781201,1714207,953129,564792,108267,108226,6781210,1714194,953132,6784335,953143,719348,108302,6784528,6781654,953145,108271,6781661,565001,174225,190904,108304,149518';
imageSets[3] = '6781522,953112,719997,1714142';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/sandym/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/sandym/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/sandym/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/sandym/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/sandym/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/sandym/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/sandym/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Sandy Menzies Landscape Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </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.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
			temp += '<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;
	}
}

			

