window.thumbnails = new Object();
												thumbnails[1657623] = new thumbnail(1657623,'','squinty bridge 2007','2081242015_29ad90f6c4-1_thumb.jpg',130, 118,1,'#');
												thumbnails[6893615] = new thumbnail(6893615,'','1162858907 5ab3c364d7 o','1162858907_5ab3c364d7_o_thumb.jpg',130, 93,1,'#');
												thumbnails[1605755] = new thumbnail(1605755,'','mainevent (13)','mainevent (13)_thumb.jpg',130, 87,1,'#');
												thumbnails[880727] = new thumbnail(880727,'','charingxlights4','charingxlights4_thumb.jpg',130, 84,1,'#');
												thumbnails[8179416] = new thumbnail(8179416,'','Boat house','wellingtonboathousebestversionburndodge_thumb.jpg',130, 35,1,'#');
												thumbnails[8179417] = new thumbnail(8179417,'','wellingtonboathousebestversionburndodge1','wellingtonboathousebestversionburndodge1_thumb.jpg',130, 35,1,'#');
												thumbnails[6899954] = new thumbnail(6899954,'','IMG 6220copy1','IMG_6220copy1_thumb.jpg',130, 97,1,'#');
												thumbnails[6899956] = new thumbnail(6899956,'','IMG 99151','IMG_99151_thumb.jpg',130, 93,1,'#');
												thumbnails[6884658] = new thumbnail(6884658,'','Toshfarrel','Toshfarrel_9D8ADED3-1D09-001F-99AEE0155B56972E_thumb.jpg',130, 115,1,'#');
												thumbnails[775720] = new thumbnail(775720,'','brionydavebwhite (34)','brionydavebwhite (34)_thumb.jpg',93, 130,1,'#');
												thumbnails[335545] = new thumbnail(335545,'22939','','IMG_31670111_thumb.jpg',130, 87,1,'photo_335545.html');
												thumbnails[335548] = new thumbnail(335548,'22939','','IMG_32190151_thumb.jpg',87, 130,1,'photo_335548.html');
												thumbnails[335554] = new thumbnail(335554,'22945','Lucky Strike','DSCF0089084_thumb.jpg',130, 98,1,'photo_335554.html');
												thumbnails[335557] = new thumbnail(335557,'22945','B2','yellowbest4277_thumb.jpg',130, 98,1,'photo_335557.html');
												thumbnails[1340732] = new thumbnail(1340732,'28168','Rugby (3)','Rugby (3)_thumb.jpg',130, 93,1,'photo_1340732.html');
												thumbnails[2536743] = new thumbnail(2536743,'34710','IMG 4405web','IMG_4405web_thumb.jpg',130, 87,1,'photo_2536743.html');
												thumbnails[2536756] = new thumbnail(2536756,'34710','IMG 4427originalweb','IMG_4427originalweb_thumb.jpg',130, 87,1,'photo_2536756.html');
												thumbnails[2549279] = new thumbnail(2549279,'29678','rugby portrait1','rugbysmallweb_thumb.jpg',130, 92,1,'photo_2549279.html');
												thumbnails[1340738] = new thumbnail(1340738,'28168','Rugby (4)','Rugby (4)_thumb.jpg',130, 93,1,'photo_1340738.html');
												thumbnails[2549278] = new thumbnail(2549278,'34710','rugby','IMG_5052newesteditweb_thumb.jpg',130, 106,1,'photo_2549278.html');
												thumbnails[2549277] = new thumbnail(2549277,'29678','rugbyportrait2','IMG_5033smallweb_thumb.jpg',130, 105,1,'photo_2549277.html');
												thumbnails[980133] = new thumbnail(980133,'34710','IMG 3323','IMG_3323reeditlightened_thumb.jpg',130, 87,1,'photo_980133.html');
												thumbnails[335555] = new thumbnail(335555,'22945','Merchant City','MerchantCityBWedit207_thumb.jpg',130, 87,1,'photo_335555.html');
												thumbnails[597714] = new thumbnail(597714,'29664','Stirling Awards (9)','Stirling Awards (9)_thumb.jpg',130, 92,1,'photo_597714.html');
												thumbnails[615137] = new thumbnail(615137,'29664','Awards061 ','Awards06 (35)1_thumb.jpg',130, 92,1,'photo_615137.html');
												thumbnails[1038458] = new thumbnail(1038458,'29664','Stirling Awards (0)','Stirling Awards (0)2_thumb.jpg',130, 87,1,'photo_1038458.html');
												thumbnails[1340777] = new thumbnail(1340777,'28168','Rugby (1)','Rugby (1)_thumb.jpg',130, 93,1,'photo_1340777.html');
												thumbnails[1884600] = new thumbnail(1884600,'34710','pitchescelebrationwebsized','pitchescelebrationwebsized_thumb.jpg',130, 87,1,'photo_1884600.html');
												thumbnails[2327493] = new thumbnail(2327493,'34710','dribblingdrill3','dribblingdrill3_thumb.jpg',130, 90,1,'photo_2327493.html');
												thumbnails[2564630] = new thumbnail(2564630,'34710','activestirling','IMG_3629editweb_thumb.jpg',130, 87,1,'photo_2564630.html');
												thumbnails[2564704] = new thumbnail(2564704,'34710','IMG 2592','IMG_25921_thumb.jpg',130, 87,1,'photo_2564704.html');
												thumbnails[6894072] = new thumbnail(6894072,'29678','IMG 5933web','IMG_5933web_thumb.jpg',125, 130,1,'photo_6894072.html');
												thumbnails[6899943] = new thumbnail(6899943,'22945','Grafitti','Grafitti_thumb.jpg',130, 98,1,'photo_6899943.html');
												thumbnails[7268926] = new thumbnail(7268926,'29678','boys1resize','boys1resize_thumb.jpg',130, 104,1,'photo_7268926.html');
												thumbnails[8179411] = new thumbnail(8179411,'436726','orang utan','IMG_2215_thumb.jpg',130, 87,1,'photo_8179411.html');
												thumbnails[8179448] = new thumbnail(8179448,'22939','dangerousIMG 3594-01','dangerousIMG_3594-01_thumb.jpg',130, 87,1,'photo_8179448.html');
												thumbnails[8181071] = new thumbnail(8181071,'29678','boys4s','boys4s_thumb.jpg',130, 37,1,'photo_8181071.html');
												thumbnails[8181347] = new thumbnail(8181347,'374053','ballboy','ballboy_thumb.jpg',87, 130,1,'photo_8181347.html');
												thumbnails[8183438] = new thumbnail(8183438,'29678','blueIMG 4143-01edit','blueIMG_4143-01edit_thumb.jpg',130, 102,1,'photo_8183438.html');
												thumbnails[8183686] = new thumbnail(8183686,'29678','abisleepbasket3blackandwhite','abisleepbasket3blackandwhite_thumb.jpg',95, 130,1,'photo_8183686.html');
												thumbnails[783416] = new thumbnail(783416,'60792','brionydavebwhite (13)','brionydavebwhite (13)1_thumb.jpg',130, 93,1,'photo_783416.html');
												thumbnails[880726] = new thumbnail(880726,'22945','charingxlights3','charingxlights3_thumb.jpg',130, 84,1,'photo_880726.html');
												thumbnails[1340778] = new thumbnail(1340778,'28168','Rugby (2)','Rugby (2)_thumb.jpg',130, 93,1,'photo_1340778.html');
												thumbnails[1998827] = new thumbnail(1998827,'22945','astropitch','2224439578_4267f36d29_thumb.jpg',130, 86,1,'photo_1998827.html');
												thumbnails[2564631] = new thumbnail(2564631,'374053','cricket','IMG_4249web_thumb.jpg',108, 130,1,'photo_2564631.html');
												thumbnails[6884642] = new thumbnail(6884642,'436726','boathouse','boathouse_thumb.jpg',130, 32,1,'photo_6884642.html');
												thumbnails[6893616] = new thumbnail(6893616,'22945','1162858907 5ab3c364d7 o1','1162858907_5ab3c364d7_o1_thumb.jpg',130, 93,1,'photo_6893616.html');
												thumbnails[7268927] = new thumbnail(7268927,'29678','boys2','boys2_thumb.jpg',130, 104,1,'photo_7268927.html');
												thumbnails[8179412] = new thumbnail(8179412,'436726','Vietnam','IMG_2734_thumb.jpg',130, 87,1,'photo_8179412.html');
												thumbnails[8179449] = new thumbnail(8179449,'22939','dangerousIMG 3606-01','dangerousIMG_3606-01_thumb.jpg',130, 87,1,'photo_8179449.html');
												thumbnails[8181072] = new thumbnail(8181072,'29678','groupshot','groupshot_thumb.jpg',130, 67,1,'photo_8181072.html');
												thumbnails[8181348] = new thumbnail(8181348,'374053','murray13','murray13_thumb.jpg',108, 130,1,'photo_8181348.html');
												thumbnails[8183439] = new thumbnail(8183439,'60792','brionyanddavebw (71)','brionyanddavebw_71_thumb.jpg',130, 116,1,'photo_8183439.html');
												thumbnails[8183688] = new thumbnail(8183688,'29678','IMG 1657finishededit copycontrast etc','IMG_1657finishededit_copycontrast_etc_thumb.jpg',130, 87,1,'photo_8183688.html');
												thumbnails[773931] = new thumbnail(773931,'59924','davebrionywedding (27)','davebrionywedding (27)_thumb.jpg',130, 93,1,'photo_773931.html');
												thumbnails[908035] = new thumbnail(908035,'374053','CSSB032','CSSB032_thumb.jpg',130, 93,1,'photo_908035.html');
												thumbnails[2077627] = new thumbnail(2077627,'22945','beach gymnastics','IMG_84812websized_thumb.jpg',130, 81,1,'photo_2077627.html');
												thumbnails[6884643] = new thumbnail(6884643,'22945','chuckscopy','chuckscopy_thumb.jpg',130, 61,1,'photo_6884643.html');
												thumbnails[6893886] = new thumbnail(6893886,'29678','cheyne','cheyne_thumb.jpg',86, 130,1,'photo_6893886.html');
												thumbnails[6893957] = new thumbnail(6893957,'29678','Author','2829356814_4ae463da1a_thumb.jpg',130, 96,1,'photo_6893957.html');
												thumbnails[6899945] = new thumbnail(6899945,'436726','IMG 2960','IMG_2960_thumb.jpg',130, 86,1,'photo_6899945.html');
												thumbnails[8160407] = new thumbnail(8160407,'374053','IMG 23003694','IMG_23003694_thumb.jpg',126, 130,1,'photo_8160407.html');
												thumbnails[8179413] = new thumbnail(8179413,'436726','Vietnam2','IMG_2735_thumb.jpg',130, 86,1,'photo_8179413.html');
												thumbnails[8179450] = new thumbnail(8179450,'22939','dangerousIMG 3675-01','dangerousIMG_3675-01_thumb.jpg',130, 87,1,'photo_8179450.html');
												thumbnails[8181073] = new thumbnail(8181073,'374053','Rugby (38)','Rugby_38_thumb.jpg',130, 93,1,'photo_8181073.html');
												thumbnails[8181349] = new thumbnail(8181349,'374053','murray3','murray3_thumb.jpg',130, 97,1,'photo_8181349.html');
												thumbnails[8183440] = new thumbnail(8183440,'22945','carradaleIMG 8701-01edit edited-1','carradaleIMG_8701-01edit_edited-1_thumb.jpg',130, 93,1,'photo_8183440.html');
												thumbnails[8183689] = new thumbnail(8183689,'22945','IMG 2283rotsted','IMG_2283rotsted_thumb.jpg',130, 93,1,'photo_8183689.html');
												thumbnails[615140] = new thumbnail(615140,'29664','Awards064','Awards06 (98)1_thumb.jpg',130, 92,1,'photo_615140.html');
												thumbnails[908039] = new thumbnail(908039,'374053','CSSB042','CSSB042_thumb.jpg',93, 130,1,'photo_908039.html');
												thumbnails[1218406] = new thumbnail(1218406,'29678','geetarIMG 1456-01edit','geetarIMG_1456-01edit_thumb.jpg',130, 118,1,'photo_1218406.html');
												thumbnails[1605886] = new thumbnail(1605886,'29664','mainevent (24)','mainevent (24)_thumb.jpg',130, 87,1,'photo_1605886.html');
												thumbnails[2077628] = new thumbnail(2077628,'34710','wheelchairracing','IMG_8828websized_thumb.jpg',130, 87,1,'photo_2077628.html');
												thumbnails[2117508] = new thumbnail(2117508,'374053','IMG 9327','IMG_9327_thumb.jpg',130, 93,1,'photo_2117508.html');
												thumbnails[2505679] = new thumbnail(2505679,'34710','IMG 24902','IMG_24902_thumb.jpg',130, 92,1,'photo_2505679.html');
												thumbnails[2519531] = new thumbnail(2519531,'34710','IMG 3848edit2web','IMG_3848edit2web_thumb.jpg',130, 75,1,'photo_2519531.html');
												thumbnails[6884644] = new thumbnail(6884644,'22945','IMG 2043firsteditsharpened','IMG_2043firsteditsharpened_thumb.jpg',130, 87,1,'photo_6884644.html');
												thumbnails[6893618] = new thumbnail(6893618,'436726','busseltonpierlight','busseltonpierlight_thumb.jpg',130, 86,1,'photo_6893618.html');
												thumbnails[6893887] = new thumbnail(6893887,'34710','connorheader1blackandwhite','connorheader1blackandwhite_thumb.jpg',93, 130,1,'photo_6893887.html');
												thumbnails[6893958] = new thumbnail(6893958,'436726','Hill Tribe Grandmother','4885817719_e48162cf12_z_thumb.jpg',94, 130,1,'photo_6893958.html');
												thumbnails[6899946] = new thumbnail(6899946,'436726','IMG 3016 copy','IMG_3016_copy_thumb.jpg',130, 91,1,'photo_6899946.html');
												thumbnails[8160408] = new thumbnail(8160408,'374053','IMG 235337391','IMG_235337391_thumb.jpg',130, 84,1,'photo_8160408.html');
												thumbnails[8179414] = new thumbnail(8179414,'436726','Vietnam field','IMG_2968_thumb.jpg',130, 86,1,'photo_8179414.html');
												thumbnails[8179451] = new thumbnail(8179451,'22939','dangerousIMG 3689-01','dangerousIMG_3689-01_thumb.jpg',130, 93,1,'photo_8179451.html');
												thumbnails[8181074] = new thumbnail(8181074,'374053','Rugby (81)','Rugby_81_thumb.jpg',130, 93,1,'photo_8181074.html');
												thumbnails[8183441] = new thumbnail(8183441,'374053','edinburghacademicals (10)','edinburghacademicals_10_thumb.jpg',114, 130,1,'photo_8183441.html');
												thumbnails[8183690] = new thumbnail(8183690,'22945','pipes','pipes_thumb.jpg',130, 87,1,'photo_8183690.html');
												thumbnails[783419] = new thumbnail(783419,'60792','brionydavebwhite (40)','brionydavebwhite (40)1_thumb.jpg',130, 100,1,'photo_783419.html');
												thumbnails[1503215] = new thumbnail(1503215,'22945','london1','london1_thumb.jpg',130, 87,1,'photo_1503215.html');
												thumbnails[2077629] = new thumbnail(2077629,'22945','merchantcitynight3','merchantcitynight3websized_thumb.jpg',130, 124,1,'photo_2077629.html');
												thumbnails[6893619] = new thumbnail(6893619,'374053','federer16','federer16_thumb.jpg',112, 130,1,'photo_6893619.html');
												thumbnails[6893888] = new thumbnail(6893888,'22945','horsem8','horsem8_thumb.jpg',130, 96,1,'photo_6893888.html');
												thumbnails[6893959] = new thumbnail(6893959,'34710','silk factory','4886004427_8362aac4b5_b_thumb.jpg',130, 101,1,'photo_6893959.html');
												thumbnails[6899947] = new thumbnail(6899947,'374053','IMG 3311','IMG_3311_thumb.jpg',130, 51,1,'photo_6899947.html');
												thumbnails[8160409] = new thumbnail(8160409,'374053','IMG 24243810','IMG_24243810_thumb.jpg',130, 105,1,'photo_8160409.html');
												thumbnails[8179415] = new thumbnail(8179415,'436726','Vietnam field 2','IMG_2985_thumb.jpg',130, 92,1,'photo_8179415.html');
												thumbnails[8179452] = new thumbnail(8179452,'22939','dangerousIMG 3712-01','dangerousIMG_3712-01_thumb.jpg',130, 93,1,'photo_8179452.html');
												thumbnails[8183442] = new thumbnail(8183442,'374053','edinburghacademicals (25)','edinburghacademicals_25_thumb.jpg',117, 130,1,'photo_8183442.html');
												thumbnails[8183691] = new thumbnail(8183691,'436726','rickshaw drivers','rickshaw_drivers_thumb.jpg',130, 75,1,'photo_8183691.html');
												thumbnails[412780] = new thumbnail(412780,'34710','IMG 5175','IMG_5175_thumb.jpg',87, 130,1,'photo_412780.html');
												thumbnails[783420] = new thumbnail(783420,'60792','brionydavebwhite (47)','brionydavebwhite (47)1_thumb.jpg',130, 47,1,'photo_783420.html');
												thumbnails[783479] = new thumbnail(783479,'22945','guitarcrop','guitarcrop_thumb.jpg',130, 122,1,'photo_783479.html');
												thumbnails[2117510] = new thumbnail(2117510,'34710','IMG 9433','IMG_9433_thumb.jpg',130, 93,1,'photo_2117510.html');
												thumbnails[2327498] = new thumbnail(2327498,'34710','IMG 5155','IMG_5155_thumb.jpg',107, 130,1,'photo_2327498.html');
												thumbnails[6893620] = new thumbnail(6893620,'374053','IMG 7296edit','IMG_7296edit_thumb.jpg',130, 129,1,'photo_6893620.html');
												thumbnails[6893889] = new thumbnail(6893889,'29678','IMG 4959bw','IMG_4959bw_thumb.jpg',130, 106,1,'photo_6893889.html');
												thumbnails[6893960] = new thumbnail(6893960,'436726','Vietnam','4886004455_90962283ee_b_thumb.jpg',130, 100,1,'photo_6893960.html');
												thumbnails[6899948] = new thumbnail(6899948,'374053','IMG 3490','IMG_3490_thumb.jpg',130, 92,1,'photo_6899948.html');
												thumbnails[8160410] = new thumbnail(8160410,'29678','linzistoppard2','linzistoppard2_thumb.jpg',130, 104,1,'photo_8160410.html');
												thumbnails[8183443] = new thumbnail(8183443,'374053','edinburghacademicals (4)','edinburghacademicals_4_thumb.jpg',130, 109,1,'photo_8183443.html');
												thumbnails[8183692] = new thumbnail(8183692,'29678','selfportrait','selfportrait_52F2A06C-1EC9-D45B-1C2D00D838B23CCC_thumb.jpg',130, 93,1,'photo_8183692.html');
												thumbnails[412781] = new thumbnail(412781,'34710','IMG 5296','IMG_5296_thumb.jpg',87, 130,1,'photo_412781.html');
												thumbnails[783480] = new thumbnail(783480,'29678','guitarcrop001','guitarcrop001_thumb.jpg',130, 122,1,'photo_783480.html');
												thumbnails[1218409] = new thumbnail(1218409,'22945','summer tears...','icecreamnewedit_edited-1_thumb.jpg',130, 93,1,'photo_1218409.html');
												thumbnails[2327499] = new thumbnail(2327499,'34710','IMG 5164','IMG_5164_thumb.jpg',130, 91,1,'photo_2327499.html');
												thumbnails[2505682] = new thumbnail(2505682,'34710','mental copy','mental copy_thumb.jpg',130, 124,1,'photo_2505682.html');
												thumbnails[2654727] = new thumbnail(2654727,'34710','IMG 5698latestcropweb','IMG_5698latestcropweb_thumb.jpg',130, 121,1,'photo_2654727.html');
												thumbnails[6884647] = new thumbnail(6884647,'22945','IMG 5319','IMG_5319_thumb.jpg',130, 62,1,'photo_6884647.html');
												thumbnails[6893621] = new thumbnail(6893621,'22945','IMG 7900 copy','IMG_7900_copy_thumb.jpg',130, 85,1,'photo_6893621.html');
												thumbnails[6893890] = new thumbnail(6893890,'29678','IMG 5031edit','IMG_5031edit_thumb.jpg',130, 91,1,'photo_6893890.html');
												thumbnails[6893961] = new thumbnail(6893961,'436726','temple','4901185593_16c10e4ac8_b_thumb.jpg',130, 84,1,'photo_6893961.html');
												thumbnails[6899949] = new thumbnail(6899949,'374053','IMG 3495small','IMG_3495small_thumb.jpg',130, 88,1,'photo_6899949.html');
												thumbnails[8183444] = new thumbnail(8183444,'22945','flowerywellies','flowerywellies_thumb.jpg',130, 87,1,'photo_8183444.html');
												thumbnails[8183693] = new thumbnail(8183693,'22945','todolist2','todolist2_thumb.jpg',130, 93,1,'photo_8183693.html');
												thumbnails[783422] = new thumbnail(783422,'60792','brionydavebwhite (87)','brionydavebwhite (87)1_thumb.jpg',130, 93,1,'photo_783422.html');
												thumbnails[783481] = new thumbnail(783481,'22945','fudoshin','judo12 copy_thumb.jpg',130, 88,1,'photo_783481.html');
												thumbnails[6884648] = new thumbnail(6884648,'22945','IMG 5676','IMG_5676_thumb.jpg',130, 86,1,'photo_6884648.html');
												thumbnails[6893622] = new thumbnail(6893622,'29678','selfportrait','selfportrait_thumb.jpg',130, 93,1,'photo_6893622.html');
												thumbnails[6893891] = new thumbnail(6893891,'374053','IMG 6220copy','IMG_6220copy_thumb.jpg',130, 97,1,'photo_6893891.html');
												thumbnails[6899951] = new thumbnail(6899951,'34710','IMG 4009','IMG_4009_thumb.jpg',130, 83,1,'photo_6899951.html');
												thumbnails[8183445] = new thumbnail(8183445,'29678','groupshot','groupshot_529D8B94-1EC9-D45B-1C53ECE552C6AF6F_thumb.jpg',130, 67,1,'photo_8183445.html');
												thumbnails[6884649] = new thumbnail(6884649,'22945','IMG 5698latest','IMG_5698latest_thumb.jpg',130, 84,1,'photo_6884649.html');
												thumbnails[6893892] = new thumbnail(6893892,'22945','IMG 8710edit','IMG_8710edit_thumb.jpg',130, 86,1,'photo_6893892.html');
												thumbnails[6899952] = new thumbnail(6899952,'34710','IMG 4525','IMG_4525_thumb.jpg',130, 86,1,'photo_6899952.html');
												thumbnails[8183446] = new thumbnail(8183446,'374053','IMG 0676','IMG_0676_thumb.jpg',130, 95,1,'photo_8183446.html');
												thumbnails[783483] = new thumbnail(783483,'22945','Shreddie','Shreddie001_thumb.jpg',130, 87,1,'photo_783483.html');
												thumbnails[1218411] = new thumbnail(1218411,'29678','PIXIMG 0788-01','PIXIMG_0788-01_thumb.jpg',130, 87,1,'photo_1218411.html');
												thumbnails[2327502] = new thumbnail(2327502,'34710','tosh5','tosh5_thumb.jpg',130, 87,1,'photo_2327502.html');
												thumbnails[6884650] = new thumbnail(6884650,'22945','IMG 5702','IMG_5702_thumb.jpg',130, 87,1,'photo_6884650.html');
												thumbnails[6899953] = new thumbnail(6899953,'34710','IMG 6220copy','IMG_6220copy_B0532CCB-1D09-001F-998F2BBD34D6C812_thumb.jpg',130, 97,1,'photo_6899953.html');
												thumbnails[8183447] = new thumbnail(8183447,'22939','IMG 3284022','IMG_3284022_thumb.jpg',130, 87,1,'photo_8183447.html');
												thumbnails[1218412] = new thumbnail(1218412,'374053','roundthebend','roundthebend_thumb.jpg',130, 81,1,'photo_1218412.html');
												thumbnails[6884651] = new thumbnail(6884651,'436726','IMG 8083','IMG_8083_thumb.jpg',89, 130,1,'photo_6884651.html');
												thumbnails[8183448] = new thumbnail(8183448,'374053','PCDSB034','PCDSB034_thumb.jpg',130, 93,1,'photo_8183448.html');
												thumbnails[1218413] = new thumbnail(1218413,'374053','The chase is on','The chase is on_thumb.jpg',130, 84,1,'photo_1218413.html');
												thumbnails[2327504] = new thumbnail(2327504,'34710','toshcoaching2','toshcoaching2_thumb.jpg',130, 87,1,'photo_2327504.html');
												thumbnails[6884652] = new thumbnail(6884652,'436726','IMG 8769','IMG_8769_thumb.jpg',130, 86,1,'photo_6884652.html');
												thumbnails[6899955] = new thumbnail(6899955,'28168','IMG 9915','IMG_9915_thumb.jpg',130, 93,1,'photo_6899955.html');
												thumbnails[8183449] = new thumbnail(8183449,'374053','PMSB04','PMSB04_thumb.jpg',130, 93,1,'photo_8183449.html');
												thumbnails[6884653] = new thumbnail(6884653,'436726','IMG 9374','IMG_9374_thumb.jpg',130, 89,1,'photo_6884653.html');
												thumbnails[8183450] = new thumbnail(8183450,'374053','PMSB042','PMSB042_thumb.jpg',130, 93,1,'photo_8183450.html');
												thumbnails[6884654] = new thumbnail(6884654,'436726','kitesurf2','kitesurf2_thumb.jpg',130, 75,1,'photo_6884654.html');
												thumbnails[6899957] = new thumbnail(6899957,'22945','theclydearc','theclydearc_thumb.jpg',130, 129,1,'photo_6899957.html');
												thumbnails[6906059] = new thumbnail(6906059,'436726','IMG 3155bw','IMG_3155bw_thumb.jpg',129, 130,1,'photo_6906059.html');
												thumbnails[6916770] = new thumbnail(6916770,'436726','IMG 6956','IMG_6956_thumb.jpg',130, 62,1,'photo_6916770.html');
												thumbnails[8183451] = new thumbnail(8183451,'374053','PMSB401','PMSB401_thumb.jpg',130, 93,1,'photo_8183451.html');
												thumbnails[2327507] = new thumbnail(2327507,'34710','Toshfarrel','Toshfarrel_thumb.jpg',130, 115,1,'photo_2327507.html');
												thumbnails[6884655] = new thumbnail(6884655,'34710','pitchescelebration3','pitchescelebration3_thumb.jpg',130, 87,1,'photo_6884655.html');
												thumbnails[8183452] = new thumbnail(8183452,'22945','yahtzee3','yahtzee3_thumb.jpg',130, 129,1,'photo_8183452.html');
												thumbnails[6884656] = new thumbnail(6884656,'436726','streetseller','streetseller_thumb.jpg',130, 86,1,'photo_6884656.html');
												thumbnails[6884657] = new thumbnail(6884657,'22945','summit','summit_thumb.jpg',130, 84,1,'photo_6884657.html');
												thumbnails[2505603] = new thumbnail(2505603,'34710','IMG 2470','IMG_2470_thumb.jpg',130, 87,1,'photo_2505603.html');
												thumbnails[6884659] = new thumbnail(6884659,'436726','vietnamfield','vietnamfield_thumb.jpg',130, 90,1,'photo_6884659.html');
												thumbnails[2505604] = new thumbnail(2505604,'34710','IMG 2473','IMG_2473_thumb.jpg',130, 85,1,'photo_2505604.html');
												thumbnails[6884660] = new thumbnail(6884660,'436726','wellingtonpanoramasaturated2','wellingtonpanoramasaturated2_thumb.jpg',130, 38,1,'photo_6884660.html');
												thumbnails[908093] = new thumbnail(908093,'374053','PCDSB222','PCDSB222_thumb.jpg',130, 93,1,'photo_908093.html');
												thumbnails[2505605] = new thumbnail(2505605,'34710','IMG 2474','IMG_2474_thumb.jpg',130, 112,1,'photo_2505605.html');
												thumbnails[6884661] = new thumbnail(6884661,'436726','womaninfield3bw','womaninfield3bw_thumb.jpg',130, 78,1,'photo_6884661.html');
												thumbnails[434415] = new thumbnail(434415,'28168','IMG 5392-015x7','IMG_5392-015x7_thumb.jpg',130, 93,1,'photo_434415.html');
												thumbnails[360864] = new thumbnail(360864,'34710','31JPG','31JPG2_thumb.jpg',130, 87,1,'photo_360864.html');
												thumbnails[434416] = new thumbnail(434416,'28168','IMG 5402-015x7','IMG_5402-015x7_thumb.jpg',130, 93,1,'photo_434416.html');
												thumbnails[535100] = new thumbnail(535100,'22939','IMG 2737001','IMG_2737001_thumb.jpg',130, 87,1,'photo_535100.html');
												thumbnails[908098] = new thumbnail(908098,'374053','PCDSB242','PCDSB242_thumb.jpg',130, 93,1,'photo_908098.html');
												thumbnails[2505607] = new thumbnail(2505607,'34710','IMG 2489','IMG_2489_thumb.jpg',130, 106,1,'photo_2505607.html');
												thumbnails[434417] = new thumbnail(434417,'28168','IMG 5408-015x7','IMG_5408-015x7_thumb.jpg',130, 93,1,'photo_434417.html');
												thumbnails[535101] = new thumbnail(535101,'22939','IMG 2751001','IMG_2751001_thumb.jpg',130, 87,1,'photo_535101.html');
												thumbnails[783441] = new thumbnail(783441,'22945','wellies','WELLIESIMGsmall_thumb.jpg',130, 86,1,'photo_783441.html');
												thumbnails[2328847] = new thumbnail(2328847,'34710','IMG 1471bw','IMG_1471bw_thumb.jpg',87, 130,1,'photo_2328847.html');
												thumbnails[2167200] = new thumbnail(2167200,'374053','rebeccalee3','rebeccalee3_thumb.jpg',93, 130,1,'photo_2167200.html');
												thumbnails[434431] = new thumbnail(434431,'28168','MG 5411-015x7','MG_5411-015x7_thumb.jpg',130, 93,1,'photo_434431.html');
												thumbnails[2167203] = new thumbnail(2167203,'374053','rebeccalee6','rebeccalee6_thumb.jpg',130, 93,1,'photo_2167203.html');
												thumbnails[434432] = new thumbnail(434432,'28168','IMG 5411-01A4','TeamphotosIMG_5411-01A4_thumb.jpg',130, 92,1,'photo_434432.html');
												thumbnails[2117543] = new thumbnail(2117543,'374053','IMG 9798','IMG_9798_thumb.jpg',130, 93,1,'photo_2117543.html');
												thumbnails[2117544] = new thumbnail(2117544,'34710','IMG 9810','IMG_9810_thumb.jpg',130, 97,1,'photo_2117544.html');
												thumbnails[1038499] = new thumbnail(1038499,'34710','Stirling Awards (45)','Stirling Awards (45)2_thumb.jpg',130, 92,1,'photo_1038499.html');
												thumbnails[775735] = new thumbnail(775735,'29678','brionydavebwhite (47)','brionydavebwhite (47)_thumb.jpg',130, 47,1,'photo_775735.html');
												thumbnails[775737] = new thumbnail(775737,'60792','brionydavebwhite (48)','brionydavebwhite (48)_thumb.jpg',130, 47,1,'photo_775737.html');
												thumbnails[597696] = new thumbnail(597696,'29664','Stirling Awards (49)','Stirling Awards (49)_thumb.jpg',130, 66,1,'photo_597696.html');
												thumbnails[775747] = new thumbnail(775747,'60792','brionydavebwhite (57)','brionydavebwhite (57)_thumb.jpg',130, 87,1,'photo_775747.html');
												thumbnails[775748] = new thumbnail(775748,'60792','brionydavebwhite (58)','brionydavebwhite (58)_thumb.jpg',130, 93,1,'photo_775748.html');
												thumbnails[2505531] = new thumbnail(2505531,'34710','IMG 2043firsteditsharpeneddodged','IMG_2043firsteditsharpeneddodged_thumb.jpg',130, 87,1,'photo_2505531.html');
												thumbnails[2086586] = new thumbnail(2086586,'34710','IMG 9252edit','IMG_9252edit_thumb.jpg',130, 106,1,'photo_2086586.html');
												thumbnails[2505538] = new thumbnail(2505538,'34710','IMG 2130original','IMG_2130original_thumb.jpg',130, 79,1,'photo_2505538.html');
												thumbnails[775781] = new thumbnail(775781,'60792','brionydavebwhite (87)','brionydavebwhite (87)_thumb.jpg',130, 93,1,'photo_775781.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[393226] = new gallery(393226,'','80th Birthday','section70840',[],0, 0, '', 'section70840.html',0,1);
				  					galleries[374053] = new gallery(374053,'8181349,908093','Action','section48872',[8181347,2564631,8181348,908035,8160407,8181073,8181349,908039,2117508,8160408,8181074,8183441,6893619,6899947,8160409,8183442,6893620,6899948,8183443,6899949,6893891,8183446,1218412,8183448,1218413,8183449,8183450,8183451,908093,908098,2167200,2167203,2117543],0, 0, '374047', 'section48872_374053.html',0,0);
				  					galleries[29664] = new gallery(29664,'1605886,1038458,615140,615137,597714,597696','Awards evenings','section48872',[597714,615137,1038458,615140,1605886,597696],0, 0, '374045', 'section48872_29664.html',0,0);
				  					galleries[22945] = new gallery(22945,'6899957,880726,783441','creative photos','section48872',[335554,335557,335555,6899943,880726,1998827,6893616,2077627,6884643,8183440,8183689,6884644,8183690,1503215,2077629,6893888,783479,1218409,6884647,6893621,8183444,8183693,783481,6884648,6884649,6893892,783483,6884650,6899957,8183452,6884657,783441],0, 0, '', 'section48872_22945.html',0,0);
				  					galleries[374045] = new gallery(374045,'335545','Events','section48872',[],0, 0, '', 'section48872_374045.html',0,0);
				  					galleries[41540] = new gallery(41540,'','Katie Oman','section63848',[],0, 0, '', 'section63848_41540.html',0,0);
				  					galleries[59924] = new gallery(59924,'773931','Mr. and Mrs. McLaughlin','section48872',[773931],0, 0, '374049', 'section48872_59924.html',0,0);
				  					galleries[29678] = new gallery(29678,'8183692,8183688,8183686,8183445,8183438,8181072,8181071,8160410,7268927,7268926','Portraits','section48872',[2549279,2549277,6894072,7268926,8181071,8183438,8183686,7268927,8181072,8183688,6893886,6893957,1218406,6893889,8160410,8183692,783480,6893890,6893622,8183445,1218411,775735],0, 0, '', 'section48872_29678.html',0,0);
				  					galleries[34710] = new gallery(34710,'6899953,6899952,6899951,6893959,6893887,6884655,2654727,2564704,2564630,2549278','PR/Media ','section48872',[2536743,2536756,2549278,980133,1884600,2327493,2564630,2564704,2077628,2505679,2519531,6893887,6893959,412780,2117510,2327498,412781,2327499,2505682,2654727,6899951,6899952,2327502,6899953,2327504,2327507,6884655,2505603,2505604,2505605,360864,2505607,2328847,2117544,1038499,2505531,2086586,2505538],0, 0, '', 'section48872_34710.html',0,0);
				  					galleries[374047] = new gallery(374047,'8181349,1340778,1340732,908093','Sport','section48872',[],0, 0, '', 'section48872_374047.html',0,0);
				  					galleries[41539] = new gallery(41539,'','Steph Brown','section63848',[],0, 0, '', 'section63848_41539.html',0,0);
				  					galleries[28168] = new gallery(28168,'1340778,1340732','Team Photography','section48872',[1340732,1340738,1340777,1340778,6899955,434415,434416,434417,434431,434432],0, 0, '374047', 'section48872_28168.html',0,0);
				  					galleries[436726] = new gallery(436726,'8183691,8179415,8179414,8179413,8179412,8179411,6916770,6906059,6899946,6899945','Travel Photography','section48872',[8179411,6884642,8179412,6899945,8179413,6893618,6893958,6899946,8179414,8179415,8183691,6893960,6893961,6884651,6884652,6884653,6884654,6906059,6916770,6884656,6884659,6884660,6884661],0, 0, '', 'section48872_436726.html',0,0);
				  					galleries[374049] = new gallery(374049,'773931','Weddings','section48872',[],0, 0, '', 'section48872_374049.html',0,0);
				  					galleries[60792] = new gallery(60792,'775781','Weddings','section48872',[783416,8183439,783419,783420,783422,775737,775747,775748,775781],0, 0, '', 'section48872_60792.html',0,0);
				  					galleries[22939] = new gallery(22939,'335545','Theatre','section48872',[335545,335548,8179448,8179449,8179450,8179451,8179452,8183447,535100,535101],0, 0, '374045', 'section48872_22939.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '8183444,8181349,8160410,8160408,8160407,7268926,6916770,6906059,6899957,6894072,6893961,6893960,6893958,6893890,6893889,6893888,6893887,6893621,6893620,6893619,6884661,6884659,6884657,6884656,6884654,6884653,6884648,6884644,2549278,2549277,2327507,2167203,2117544,1998827,1884600,1605755,1503215,1218412,980133,908098,908093,880726,783441,775747,775737';
imageSets[2] = '8181349,6899957,1340778,1340732,908093,880726,783441,775781,335545';
imageSets[3] = '6884661,6884660,6884659,6884658,6884657,6884656,6884655,6884654,6884653,6884652,6884651,6884650,6884649,6884648,6884647,6884644,6884643,6884642,2654727,2564704,2564631,2564630,2549279,2549278,2549277,2536756,2536743,2519531,2505682,2505679';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/stephbrown/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/stephbrown/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:'',
                    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 (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    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));		  $('body').trigger('clikUpdate');		}, op.onBefore);
      }    }
    	if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'omanbrown photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {photoinfominwidth:200};	    		options.photoinfoadjacent = true;			      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object' || array == undefined) {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			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').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
	temp = temp + this.fnGetPaymentInfo();
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp = temp + '<p>Buy now using PayPal:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = 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 = temp + '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = 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 = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="stephbrown8@aol.com">';
	temp = temp + '<input type="hidden" name="currency_code" value="GBP">';
	temp = temp + '<input type="hidden" name="add" value="1">';
					temp = temp + '<input type="hidden" name="amount" value="'+amount+'">';
	temp = temp + '<input type="hidden" name="item_number" value="'+ref+'">';
					temp = temp + '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
									temp = temp + '</form>';
								temp = temp + '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="stephbrown8@aol.com">';
	temp = temp + '<input type="hidden" name="display" value="1">';
	temp = temp + '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
	temp = temp + '</form>';
							temp = 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({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* 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 + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

