window.thumbnails = {};
															thumbnails[1448026] = clik.newPhoto({"id":1448026,"src":"52_thumb.jpg","galleries_id":97139,"server_id":18,"link":"photo_1448026.html","width":130,"caption":"","height":87});
															thumbnails[1497769] = clik.newPhoto({"id":1497769,"src":"99_thumb.jpg","galleries_id":102936,"server_id":18,"link":"photo_1497769.html","width":130,"caption":"","height":194});
															thumbnails[1994842] = clik.newPhoto({"id":1994842,"src":"pana_thumb.jpg","galleries_id":133882,"server_id":18,"link":"photo_1994842.html","width":130,"caption":"","height":40});
															thumbnails[1994868] = clik.newPhoto({"id":1994868,"src":"panoramic1_thumb.jpg","galleries_id":133882,"server_id":18,"link":"photo_1994868.html","width":130,"caption":"","height":43});
															thumbnails[2257525] = clik.newPhoto({"id":2257525,"src":"trees1_thumb.jpg","galleries_id":102936,"server_id":18,"link":"photo_2257525.html","width":130,"caption":"","height":184});
															thumbnails[2257549] = clik.newPhoto({"id":2257549,"src":"DSC_0304 copy_thumb.jpg","galleries_id":97139,"server_id":18,"link":"photo_2257549.html","width":130,"caption":"","height":194});
															thumbnails[2257551] = clik.newPhoto({"id":2257551,"src":"DSC_0306 copy_thumb.jpg","galleries_id":97139,"server_id":18,"link":"photo_2257551.html","width":130,"caption":"","height":194});
															thumbnails[2257565] = clik.newPhoto({"id":2257565,"src":"DSC_0137 copy_thumb.jpg","galleries_id":97139,"server_id":18,"link":"photo_2257565.html","width":130,"caption":"","height":194});
															thumbnails[2260950] = clik.newPhoto({"id":2260950,"src":"DSC_0024_thumb.jpg","galleries_id":97138,"server_id":18,"link":"photo_2260950.html","width":130,"caption":"","height":194});
															thumbnails[2856711] = clik.newPhoto({"id":2856711,"src":"web2_thumb.jpg","galleries_id":97139,"server_id":18,"link":"photo_2856711.html","width":130,"caption":"","height":194});
															thumbnails[2868635] = clik.newPhoto({"id":2868635,"src":"lossiemod_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_2868635.html","width":130,"caption":"","height":87});
															thumbnails[2880736] = clik.newPhoto({"id":2880736,"src":"salou_thumb.jpg","galleries_id":97139,"server_id":18,"link":"photo_2880736.html","width":130,"caption":"","height":173});
															thumbnails[2895879] = clik.newPhoto({"id":2895879,"src":"black and white_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_2895879.html","width":130,"caption":"","height":87});
															thumbnails[2895885] = clik.newPhoto({"id":2895885,"src":"DSC_0070_thumb.jpg","galleries_id":102936,"server_id":18,"link":"photo_2895885.html","width":129,"caption":"","height":194});
															thumbnails[3026298] = clik.newPhoto({"id":3026298,"src":"DSC_0207_thumb.jpg","galleries_id":97138,"server_id":18,"link":"photo_3026298.html","width":130,"caption":"","height":194});
															thumbnails[3096507] = clik.newPhoto({"id":3096507,"src":"DSC_0099_thumb.jpg","galleries_id":189977,"server_id":18,"link":"photo_3096507.html","width":130,"caption":"","height":194});
															thumbnails[3096617] = clik.newPhoto({"id":3096617,"src":"DSC_0092_thumb.jpg","galleries_id":189977,"server_id":18,"link":"photo_3096617.html","width":130,"caption":"","height":194});
															thumbnails[3673809] = clik.newPhoto({"id":3673809,"src":"Graffiti_II_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_3673809.html","width":130,"caption":"Graffiti II","height":85});
															thumbnails[3673819] = clik.newPhoto({"id":3673819,"src":"graffiti_III_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_3673819.html","width":130,"caption":"graffiti III","height":85});
															thumbnails[3673892] = clik.newPhoto({"id":3673892,"src":"basketball_net1_thumb.jpg","galleries_id":97139,"server_id":18,"link":"photo_3673892.html","width":130,"caption":"Basketball net","height":194});
															thumbnails[3682385] = clik.newPhoto({"id":3682385,"src":"Untitled_HDR4copy_thumb.jpg","galleries_id":133882,"server_id":18,"link":"photo_3682385.html","width":130,"caption":"Road from Skye","height":42});
															thumbnails[3682863] = clik.newPhoto({"id":3682863,"src":"skye_III_thumb.jpg","galleries_id":133882,"server_id":18,"link":"photo_3682863.html","width":130,"caption":"skye III","height":50});
															thumbnails[3683217] = clik.newPhoto({"id":3683217,"src":"isle_of_skye_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_3683217.html","width":130,"caption":"Isle of skye","height":87});
															thumbnails[3846902] = clik.newPhoto({"id":3846902,"src":"castle8_thumb.jpg","galleries_id":97139,"server_id":18,"link":"photo_3846902.html","width":130,"caption":"","height":182});
															thumbnails[3846951] = clik.newPhoto({"id":3846951,"src":"castle5_thumb.jpg","galleries_id":97139,"server_id":18,"link":"photo_3846951.html","width":130,"caption":"","height":94});
															thumbnails[3846955] = clik.newPhoto({"id":3846955,"src":"edinburgh_castle_thumb.jpg","galleries_id":97139,"server_id":18,"link":"photo_3846955.html","width":130,"caption":"","height":87});
															thumbnails[4361112] = clik.newPhoto({"id":4361112,"src":"A2_Aluminium_image_4_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_4361112.html","width":130,"caption":"","height":87});
															thumbnails[4361125] = clik.newPhoto({"id":4361125,"src":"A2_Aluminium_image_3_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_4361125.html","width":130,"caption":"","height":82});
															thumbnails[4361199] = clik.newPhoto({"id":4361199,"src":"A2_Aluminium_image_2_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_4361199.html","width":130,"caption":"","height":87});
															thumbnails[4361201] = clik.newPhoto({"id":4361201,"src":"A2_Aluminium_image_1_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_4361201.html","width":130,"caption":"","height":87});
															thumbnails[4361211] = clik.newPhoto({"id":4361211,"src":"A2_Aluminium_image_5_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_4361211.html","width":130,"caption":"","height":87});
															thumbnails[5729238] = clik.newPhoto({"id":5729238,"src":"DSC_0557_-_Copy_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_5729238.html","width":130,"caption":"","height":87});
															thumbnails[5729255] = clik.newPhoto({"id":5729255,"src":"DSC_0458_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_5729255.html","width":130,"caption":"","height":87});
															thumbnails[6413029] = clik.newPhoto({"id":6413029,"src":"findhorn11DSC_01132_copy_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_6413029.html","width":130,"caption":"","height":88});
															thumbnails[6420303] = clik.newPhoto({"id":6420303,"src":"findhorn4DSC_0102_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_6420303.html","width":130,"caption":"","height":86});
															thumbnails[6420355] = clik.newPhoto({"id":6420355,"src":"findhornDSC_0098_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_6420355.html","width":130,"caption":"","height":80});
															thumbnails[6420455] = clik.newPhoto({"id":6420455,"src":"findhorn6DSC_0104_copy_2_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_6420455.html","width":130,"caption":"","height":85});
															thumbnails[6420639] = clik.newPhoto({"id":6420639,"src":"findhorn9DSC_0108_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_6420639.html","width":130,"caption":"","height":87});
															thumbnails[6420643] = clik.newPhoto({"id":6420643,"src":"findhorn5DSC_0103_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_6420643.html","width":130,"caption":"","height":77});
															thumbnails[6420681] = clik.newPhoto({"id":6420681,"src":"findhorn26DSC_0133_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_6420681.html","width":130,"caption":"","height":85});
															thumbnails[6858778] = clik.newPhoto({"id":6858778,"src":"DSC_00735_thumb.jpg","galleries_id":223176,"server_id":18,"link":"photo_6858778.html","width":130,"caption":"","height":86});
															thumbnails[6858839] = clik.newPhoto({"id":6858839,"src":"DSC_1189-46_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_6858839.html","width":130,"caption":"","height":86});
															thumbnails[6858871] = clik.newPhoto({"id":6858871,"src":"DSC_00468_thumb.jpg","galleries_id":223176,"server_id":18,"link":"photo_6858871.html","width":130,"caption":"","height":86});
															thumbnails[6858972] = clik.newPhoto({"id":6858972,"src":"moray_college_former_grads_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_6858972.html","width":130,"caption":"","height":87});
															thumbnails[6858975] = clik.newPhoto({"id":6858975,"src":"moray_college_former_grads1_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_6858975.html","width":130,"caption":"","height":87});
															thumbnails[6862895] = clik.newPhoto({"id":6862895,"src":"moray_college_former_grads4_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_6862895.html","width":130,"caption":"","height":91});
															thumbnails[6862899] = clik.newPhoto({"id":6862899,"src":"moray_college_former_grads3_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_6862899.html","width":130,"caption":"","height":91});
															thumbnails[6863047] = clik.newPhoto({"id":6863047,"src":"DSC_1618_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_6863047.html","width":130,"caption":"","height":86});
															thumbnails[3651838] = clik.newPhoto({"id":3651838,"src":"Burghead_2_thumb.jpg","galleries_id":223176,"server_id":18,"link":"photo_3651838.html","width":130,"caption":"Burghead 2","height":194});
															thumbnails[1851113] = clik.newPhoto({"id":1851113,"src":"8 copy_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_1851113.html","width":130,"caption":"","height":92});
															thumbnails[1417242] = clik.newPhoto({"id":1417242,"src":"DSC_0119 copy1_thumb.jpg","galleries_id":97138,"server_id":18,"link":"photo_1417242.html","width":130,"caption":"","height":87});
															thumbnails[1849909] = clik.newPhoto({"id":1849909,"src":"DSC_0098 copy_thumb.jpg","galleries_id":223176,"server_id":18,"link":"photo_1849909.html","width":130,"caption":"","height":87});
															thumbnails[5473377] = clik.newPhoto({"id":5473377,"src":"ran_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473377.html","width":130,"caption":"","height":87});
															thumbnails[1417249] = clik.newPhoto({"id":1417249,"src":"img1 copy_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_1417249.html","width":130,"caption":"","height":87});
															thumbnails[1812112] = clik.newPhoto({"id":1812112,"src":"84_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_1812112.html","width":130,"caption":"","height":87});
															thumbnails[1535049] = clik.newPhoto({"id":1535049,"src":"beach3_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_1535049.html","width":130,"caption":"","height":99});
															thumbnails[1812129] = clik.newPhoto({"id":1812129,"src":"86_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_1812129.html","width":130,"caption":"","height":87});
															thumbnails[2252513] = clik.newPhoto({"id":2252513,"src":"61_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_2252513.html","width":130,"caption":"","height":194});
															thumbnails[5473400] = clik.newPhoto({"id":5473400,"src":"randolf_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473400.html","width":130,"caption":"","height":87});
															thumbnails[2252520] = clik.newPhoto({"id":2252520,"src":"CNV00144_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_2252520.html","width":130,"caption":"","height":194});
															thumbnails[2252526] = clik.newPhoto({"id":2252526,"src":"DSC_0281 copy_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_2252526.html","width":130,"caption":"","height":194});
															thumbnails[2260827] = clik.newPhoto({"id":2260827,"src":"DSC_0001_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_2260827.html","width":130,"caption":"A hint of Spain","height":194});
															thumbnails[5473490] = clik.newPhoto({"id":5473490,"src":"rl_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473490.html","width":130,"caption":"","height":87});
															thumbnails[5473394] = clik.newPhoto({"id":5473394,"src":"rand_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473394.html","width":130,"caption":"","height":87});
															thumbnails[1848646] = clik.newPhoto({"id":1848646,"src":"lossie1_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_1848646.html","width":130,"caption":"","height":194});
															thumbnails[1849869] = clik.newPhoto({"id":1849869,"src":"CNV00015_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_1849869.html","width":130,"caption":"","height":87});
															thumbnails[5473481] = clik.newPhoto({"id":5473481,"src":"rleaps3_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473481.html","width":130,"caption":"","height":87});
															thumbnails[1849423] = clik.newPhoto({"id":1849423,"src":"lossie17_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_1849423.html","width":130,"caption":"","height":194});
															thumbnails[1419199] = clik.newPhoto({"id":1419199,"src":"DSC_0189 copy_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_1419199.html","width":130,"caption":"","height":194});
															thumbnails[5473455] = clik.newPhoto({"id":5473455,"src":"randolphs_leap8_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473455.html","width":130,"caption":"","height":87});
															thumbnails[2252335] = clik.newPhoto({"id":2252335,"src":"test3_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_2252335.html","width":130,"caption":"","height":184});
															thumbnails[6862910] = clik.newPhoto({"id":6862910,"src":"DSC_003743_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_6862910.html","width":130,"caption":"","height":194});
															thumbnails[1849751] = clik.newPhoto({"id":1849751,"src":"69_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_1849751.html","width":130,"caption":"","height":87});
															thumbnails[2257683] = clik.newPhoto({"id":2257683,"src":"beach copy_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_2257683.html","width":130,"caption":"","height":194});
															thumbnails[5473429] = clik.newPhoto({"id":5473429,"src":"randolphs_leap1_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473429.html","width":130,"caption":"","height":87});
															thumbnails[6862913] = clik.newPhoto({"id":6862913,"src":"DSC_0275g_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_6862913.html","width":130,"caption":"","height":194});
															thumbnails[2257632] = clik.newPhoto({"id":2257632,"src":"findhorn8 copy3_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_2257632.html","width":130,"caption":"","height":194});
															thumbnails[2257645] = clik.newPhoto({"id":2257645,"src":"findhorn5 copy1_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_2257645.html","width":130,"caption":"","height":194});
															thumbnails[6862900] = clik.newPhoto({"id":6862900,"src":"DSC_0038_412_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_6862900.html","width":130,"caption":"","height":195});
															thumbnails[5473397] = clik.newPhoto({"id":5473397,"src":"randol_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473397.html","width":130,"caption":"","height":87});
															thumbnails[6862897] = clik.newPhoto({"id":6862897,"src":"moray_college_former_grads_71_thumb.jpg","galleries_id":97135,"server_id":18,"link":"photo_6862897.html","width":130,"caption":"","height":194});
															thumbnails[2257702] = clik.newPhoto({"id":2257702,"src":"findhorn1_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_2257702.html","width":130,"caption":"","height":194});
															thumbnails[5473410] = clik.newPhoto({"id":5473410,"src":"randolph_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473410.html","width":130,"caption":"","height":87});
															thumbnails[1419203] = clik.newPhoto({"id":1419203,"src":"DSC_0222 copy_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_1419203.html","width":130,"caption":"","height":87});
															thumbnails[2257704] = clik.newPhoto({"id":2257704,"src":"findhorn2_thumb.jpg","galleries_id":97137,"server_id":18,"link":"photo_2257704.html","width":130,"caption":"","height":194});
															thumbnails[5473432] = clik.newPhoto({"id":5473432,"src":"randolphs_leap2_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473432.html","width":130,"caption":"","height":87});
															thumbnails[5473405] = clik.newPhoto({"id":5473405,"src":"randolp_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473405.html","width":130,"caption":"","height":87});
															thumbnails[5473425] = clik.newPhoto({"id":5473425,"src":"randolphs_leap0_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473425.html","width":130,"caption":"","height":87});
															thumbnails[5473414] = clik.newPhoto({"id":5473414,"src":"randolphs_lea_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473414.html","width":130,"caption":"","height":87});
															thumbnails[5473446] = clik.newPhoto({"id":5473446,"src":"randolphs_leap3_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473446.html","width":130,"caption":"","height":87});
															thumbnails[5473418] = clik.newPhoto({"id":5473418,"src":"randolphs_leap_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473418.html","width":130,"caption":"","height":87});
															thumbnails[1447681] = clik.newPhoto({"id":1447681,"src":"CNV00172_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_1447681.html","width":130,"caption":"","height":87});
															thumbnails[5473462] = clik.newPhoto({"id":5473462,"src":"randolphs_leap9_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473462.html","width":130,"caption":"","height":194});
															thumbnails[5473476] = clik.newPhoto({"id":5473476,"src":"rleap_thumb.jpg","galleries_id":309756,"server_id":18,"link":"photo_5473476.html","width":130,"caption":"","height":194});
															thumbnails[1424424] = clik.newPhoto({"id":1424424,"src":"DSC_0267_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_1424424.html","width":130,"caption":"","height":87});
															thumbnails[1706352] = clik.newPhoto({"id":1706352,"src":"wint4_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_1706352.html","width":130,"caption":"","height":87});
															thumbnails[2880553] = clik.newPhoto({"id":2880553,"src":"modtrees_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_2880553.html","width":130,"caption":"","height":91});
															thumbnails[1849871] = clik.newPhoto({"id":1849871,"src":"DSC_0020 copy_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_1849871.html","width":130,"caption":"","height":87});
															thumbnails[2868540] = clik.newPhoto({"id":2868540,"src":"modified_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_2868540.html","width":130,"caption":"","height":194});
															thumbnails[2260967] = clik.newPhoto({"id":2260967,"src":"DSC_0042_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_2260967.html","width":130,"caption":"","height":194});
															thumbnails[1706353] = clik.newPhoto({"id":1706353,"src":"wint5_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_1706353.html","width":130,"caption":"","height":194});
															thumbnails[1497861] = clik.newPhoto({"id":1497861,"src":"DSC_0148 copy_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_1497861.html","width":130,"caption":"","height":194});
															thumbnails[1397245] = clik.newPhoto({"id":1397245,"src":"Aultbea copy_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_1397245.html","width":130,"caption":"","height":194});
															thumbnails[1849923] = clik.newPhoto({"id":1849923,"src":"DSC_0103 copy_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_1849923.html","width":130,"caption":"","height":207});
															thumbnails[1849867] = clik.newPhoto({"id":1849867,"src":"bw10 copy_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_1849867.html","width":130,"caption":"","height":173});
															thumbnails[2251842] = clik.newPhoto({"id":2251842,"src":"test11_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_2251842.html","width":130,"caption":"","height":194});
															thumbnails[2880672] = clik.newPhoto({"id":2880672,"src":"k_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_2880672.html","width":129,"caption":"","height":194});
															thumbnails[2880740] = clik.newPhoto({"id":2880740,"src":"mod14_thumb.jpg","galleries_id":97136,"server_id":18,"link":"photo_2880740.html","width":129,"caption":"","height":194});
															thumbnails[4521480] = clik.newPhoto({"id":4521480,"src":"Photo0059_thumb.jpg","galleries_id":262897,"server_id":18,"link":"photo_4521480.html","width":130,"caption":"","height":98});
															thumbnails[4521644] = clik.newPhoto({"id":4521644,"src":"Photo0058_thumb.jpg","galleries_id":262897,"server_id":18,"link":"photo_4521644.html","width":130,"caption":"","height":173});
															thumbnails[4521820] = clik.newPhoto({"id":4521820,"src":"Photo0057_thumb.jpg","galleries_id":262897,"server_id":18,"link":"photo_4521820.html","width":130,"caption":"","height":98});
															thumbnails[4366216] = clik.newPhoto({"id":4366216,"src":"112_thumb.jpg","galleries_id":229900,"server_id":18,"link":"photo_4366216.html","width":130,"caption":"","height":195});
															thumbnails[4366235] = clik.newPhoto({"id":4366235,"src":"11ways3_thumb.jpg","galleries_id":229900,"server_id":18,"link":"photo_4366235.html","width":130,"caption":"","height":87});
															thumbnails[4407792] = clik.newPhoto({"id":4407792,"src":"diverse_thumb.gif","galleries_id":256566,"server_id":18,"link":"photo_4407792.html","width":130,"caption":"","height":98});
															thumbnails[4407860] = clik.newPhoto({"id":4407860,"src":"photography-show-poster-with-window-jpeg_thumb.jpg","galleries_id":256563,"server_id":18,"link":"photo_4407860.html","width":130,"caption":"","height":184});
															thumbnails[4407895] = clik.newPhoto({"id":4407895,"src":"photography-show-leafletp2-jpeg_thumb.jpg","galleries_id":256563,"server_id":18,"link":"photo_4407895.html","width":130,"caption":"","height":144});
															thumbnails[4408138] = clik.newPhoto({"id":4408138,"src":"CNV00154_thumb.jpg","galleries_id":256563,"server_id":18,"link":"photo_4408138.html","width":130,"caption":"","height":87});
															thumbnails[4408210] = clik.newPhoto({"id":4408210,"src":"gallery1_thumb.jpg","galleries_id":256563,"server_id":18,"link":"photo_4408210.html","width":130,"caption":"","height":191});
															thumbnails[4408252] = clik.newPhoto({"id":4408252,"src":"findhornex_thumb.jpg","galleries_id":256566,"server_id":18,"link":"photo_4408252.html","width":130,"caption":"","height":194});
															thumbnails[4521955] = clik.newPhoto({"id":4521955,"src":"Aluminium_Series_V_thumb.jpg","galleries_id":238712,"server_id":18,"link":"photo_4521955.html","width":130,"caption":"","height":98});
															thumbnails[4522020] = clik.newPhoto({"id":4522020,"src":"canvas_III_thumb.jpg","galleries_id":238712,"server_id":18,"link":"photo_4522020.html","width":130,"caption":"","height":98});
															thumbnails[4522023] = clik.newPhoto({"id":4522023,"src":"Existence_thumb.jpg","galleries_id":238712,"server_id":18,"link":"photo_4522023.html","width":130,"caption":"","height":98});
															thumbnails[4522024] = clik.newPhoto({"id":4522024,"src":"Portfolio_2009_book_thumb.jpg","galleries_id":238712,"server_id":18,"link":"photo_4522024.html","width":130,"caption":"","height":98});
															thumbnails[5088373] = clik.newPhoto({"id":5088373,"src":"Poster_Eilidh_Thomson_Poster_Eilidh_Thomson112_thumb.jpg","galleries_id":287743,"server_id":18,"link":"photo_5088373.html","width":130,"caption":"","height":183});
															thumbnails[5088385] = clik.newPhoto({"id":5088385,"src":"Invite_for_EThomson131_thumb.jpg","galleries_id":287743,"server_id":18,"link":"photo_5088385.html","width":130,"caption":"","height":276});
															thumbnails[5369841] = clik.newPhoto({"id":5369841,"src":"eilidh_2_thumb.jpg","galleries_id":287743,"server_id":18,"link":"photo_5369841.html","width":130,"caption":"","height":86});
															thumbnails[3935691] = clik.newPhoto({"id":3935691,"src":"web_thumb.jpg","galleries_id":229900,"server_id":18,"link":"photo_3935691.html","width":130,"caption":"","height":184});
															thumbnails[3769458] = clik.newPhoto({"id":3769458,"src":"HPIM0644_thumb.jpg","galleries_id":229900,"server_id":18,"link":"photo_3769458.html","width":130,"caption":"\"11 Ways\"<br>\r\nExhibition 2008","height":173});
															thumbnails[3769476] = clik.newPhoto({"id":3769476,"src":"HPIM0641_thumb.jpg","galleries_id":229900,"server_id":18,"link":"photo_3769476.html","width":130,"caption":"\"11 Ways\"<br>\r\nExhibition 2008","height":98});
															thumbnails[3769483] = clik.newPhoto({"id":3769483,"src":"HPIM0642_thumb.jpg","galleries_id":229900,"server_id":18,"link":"photo_3769483.html","width":130,"caption":"\"11 ways\"<br>\r\nExhibition 2008","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[309756] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Rock Formations","link":"gallery_309756.html","maxRecords":0.0,"photoIDs":[5473377.0,5473400.0,5473490.0,5473394.0,5473481.0,5473455.0,5473429.0,5473397.0,5473410.0,5473432.0,5473405.0,5473425.0,5473414.0,5473446.0,5473418.0,5473462.0,5473476.0],"skipIndex":0,"section_code":"gallery","featured_images":5473476.0,"id":309756,"singleSection":false});				  						galleries[97135] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Abandoned","link":"gallery_97135.html","maxRecords":0.0,"photoIDs":[3673809.0,3673819.0,3683217.0,4361112.0,4361125.0,4361199.0,4361201.0,4361211.0,6858975.0,6862895.0,6862899.0,6863047.0,1812112.0,1812129.0,2252513.0,2252520.0,2252526.0,2260827.0,2252335.0,6862910.0,6862913.0,6862900.0,6862897.0],"skipIndex":0,"section_code":"gallery","featured_images":6862910.0,"id":97135,"singleSection":false});				  						galleries[97138] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Abstract","link":"gallery_97138.html","maxRecords":0.0,"photoIDs":[2260950.0,3026298.0,1417242.0],"skipIndex":0,"section_code":"gallery","featured_images":2260950.0,"id":97138,"singleSection":false});				  						galleries[256563] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Exhibition ","link":"section281121_256563.html","maxRecords":0.0,"photoIDs":[4407860.0,4407895.0,4408138.0,4408210.0],"skipIndex":0,"section_code":"section281121","featured_images":4407860.0,"id":256563,"singleSection":false});				  						galleries[229900] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"\"11 Ways\" ","link":"section281121_229900.html","maxRecords":0.0,"photoIDs":[4366216.0,4366235.0,3935691.0,3769458.0,3769476.0,3769483.0],"skipIndex":0,"section_code":"section281121","featured_images":3935691.0,"id":229900,"singleSection":false});				  						galleries[256566] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"\"Diverse\"","link":"section281121_256566.html","maxRecords":0.0,"photoIDs":[4407792.0,4408252.0],"skipIndex":0,"section_code":"section281121","featured_images":4407792.0,"id":256566,"singleSection":false});				  						galleries[97137] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"By the Beach","link":"gallery_97137.html","maxRecords":0.0,"photoIDs":[2868635.0,5729238.0,5729255.0,6413029.0,6420303.0,6420355.0,6420455.0,6420639.0,6420643.0,6420681.0,1851113.0,1417249.0,1535049.0,1848646.0,1849423.0,1419199.0,2257683.0,2257632.0,2257645.0,2257702.0,2257704.0],"skipIndex":0,"section_code":"gallery","featured_images":2257704.0,"id":97137,"singleSection":false});				  						galleries[238712] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"BA (Hons) ","link":"section281121_238712.html","maxRecords":0.0,"photoIDs":[4521955.0,4522020.0,4522023.0,4522024.0],"skipIndex":0,"section_code":"section281121","featured_images":4521955.0,"id":238712,"singleSection":false});				  						galleries[223176] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Coasts","link":"gallery_223176.html","maxRecords":0.0,"photoIDs":[6858778.0,6858871.0,3651838.0,1849909.0],"skipIndex":0,"section_code":"gallery","featured_images":"6858871,6858778,3651838,1849909","id":223176,"singleSection":false});				  						galleries[97136] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_97136.html","maxRecords":0.0,"photoIDs":[2895879.0,6858839.0,6858972.0,1849869.0,1849751.0,1419203.0,1447681.0,1424424.0,1706352.0,2880553.0,1849871.0,2868540.0,2260967.0,1706353.0,1497861.0,1397245.0,1849923.0,1849867.0,2251842.0,2880672.0,2880740.0],"skipIndex":0,"section_code":"gallery","featured_images":"2868540,1706353","id":97136,"singleSection":false});				  						galleries[262897] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Highland Graduates","link":"section281121_262897.html","maxRecords":0.0,"photoIDs":[4521480.0,4521644.0,4521820.0],"skipIndex":0,"section_code":"section281121","featured_images":"4521820,4521644,4521480","id":262897,"singleSection":false});				  						galleries[287743] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Solo Exhibition \"ABANDONED\"","link":"section281121_287743.html","maxRecords":0.0,"photoIDs":[5088373.0,5088385.0,5369841.0],"skipIndex":0,"section_code":"section281121","featured_images":"5369841,5088385,5088373","id":287743,"singleSection":false});				  						galleries[102936] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Woodland","link":"gallery_102936.html","maxRecords":0.0,"photoIDs":[1497769.0,2257525.0,2895885.0],"skipIndex":0,"section_code":"gallery","featured_images":"2895885,2257525,1497769","id":102936,"singleSection":false});				  						galleries[97139] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Miscellaneous","link":"gallery_97139.html","maxRecords":0.0,"photoIDs":[1448026.0,2257549.0,2257551.0,2257565.0,2856711.0,2880736.0,3673892.0,3846902.0,3846951.0,3846955.0],"skipIndex":0,"section_code":"gallery","featured_images":"3846902,2856711","id":97139,"singleSection":false});				  						galleries[189977] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Night Photography","link":"gallery_189977.html","maxRecords":0.0,"photoIDs":[3096507.0,3096617.0],"skipIndex":0,"section_code":"gallery","featured_images":"3096617,3096507","id":189977,"singleSection":false});				  						galleries[133882] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Limited Edition-Panorama","link":"gallery_133882.html","maxRecords":0.0,"photoIDs":[1994842.0,1994868.0,3682385.0,3682863.0],"skipIndex":0,"section_code":"gallery","featured_images":"1994868,1994842","id":133882,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6863047,6862899,6862895,6858972,6858871,6858839,6858778,6420681,6420643,6420639,6420455,6420355,6420303,6413029,5729255,5729238,4361211,3846951,3846902,3683217,3682863,3682385,3673892,3673819,3673809,3096617,3096507,3026298,2895885,2895879,2880736,2868635,2856711,2260950,2257565,2257551,2257549,2257525,1497769,1448026,3651838,1851113,1417242,5473377,1849909,1812112,1417249,1812129,1535049,2252513,2252520,2252526,2260827,5473394,1849869,1848646,1849423,1419199,5473455,2252335,6862910,6862913,5473429,2257683,1849751,6862900,2257645,2257632,6862897,2257702,1419203,2257704,5473405,5473414,5473446,5473476,2880553,1849871,2868540,2260967,1706353,1497861,1849923,1849867,2251842,2880672,2880740';
imageSets[2] = '4521955,4407860,4407792,3846902,2856711,2260950,1994868,1994842,3935691,6862910,2257704,5473476,2868540,1706353';
imageSets[3] = '2257525,3769458';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/eilidh/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/eilidh/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/eilidh/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/eilidh/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/eilidh/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/eilidh/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/eilidh/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/eilidh/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 = 'Eilidh Thomson: ba hons     fine artist: ' + 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>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="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 += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="eilidh.thomson@yahoo.co.uk">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="eilidh.thomson@yahoo.co.uk">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"view cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

