window.thumbnails = new Object();
												thumbnails[563306] = new thumbnail(563306,'','','fromt01_thumb.jpg',130, 76,1,'															#');
												thumbnails[563338] = new thumbnail(563338,'43385','Jennifer Aniston and Brad Pitt Cannes Film Festival','anniston01_thumb.jpg',130, 135,1,'																			photo_563338.html');
												thumbnails[563351] = new thumbnail(563351,'43385','Angelina Jolie and Will Smith on an inflatable shark','SHARK TALE 021_thumb.jpg',130, 101,1,'																			photo_563351.html');
												thumbnails[563356] = new thumbnail(563356,'43385','Kevin Bacon Cannes Film Festival','bacon05_thumb.jpg',130, 87,1,'																			photo_563356.html');
												thumbnails[563366] = new thumbnail(563366,'43385','Nicole Kidman Cannes Film Festival','KIDMAN12_thumb.jpg',130, 93,1,'																			photo_563366.html');
												thumbnails[563380] = new thumbnail(563380,'43385','Uma Thurman and Quentin Tarantino','DSC_54961_thumb.jpg',130, 154,1,'																			photo_563380.html');
												thumbnails[563387] = new thumbnail(563387,'43382','Scotlands Cyclists train for the Commonwealth Games','10_thumb.CYCLISTS.10SY.jpg',130, 80,1,'																			photo_563387.html');
												thumbnails[563396] = new thumbnail(563396,'43382','Hibs v Aberdeen','hibs3_thumb.jpg',130, 86,1,'																			photo_563396.html');
												thumbnails[563402] = new thumbnail(563402,'43382','Jim Clark Memorial Rally,Scottish Borders','sport06_thumb.jpg',130, 89,1,'																			photo_563402.html');
												thumbnails[563405] = new thumbnail(563405,'43382','Rangers v Dundee','gers1 copy_thumb.jpg',130, 117,1,'																			photo_563405.html');
												thumbnails[563412] = new thumbnail(563412,'43382','British title fight Glasgow','boxing021_thumb.jpg',130, 94,1,'																			photo_563412.html');
												thumbnails[563416] = new thumbnail(563416,'43382','Horse racing Musselburgh','horse racing_thumb.jpg',130, 114,1,'																			photo_563416.html');
												thumbnails[563429] = new thumbnail(563429,'43382','Colin Montgomerie ,Dunhill Cup St Andrews','dunhill cup093_thumb.jpg',130, 112,1,'																			photo_563429.html');
												thumbnails[563725] = new thumbnail(563725,'43423','Children collect drinking water from river ','MALAWI36_thumb.JPG',130, 130,1,'																			photo_563725.html');
												thumbnails[563727] = new thumbnail(563727,'43423','','MALAWI74_thumb.JPG',130, 146,1,'																			photo_563727.html');
												thumbnails[563728] = new thumbnail(563728,'43423','','MALAWI75_thumb.JPG',130, 154,1,'																			photo_563728.html');
												thumbnails[563729] = new thumbnail(563729,'43423','','MALAWI84_thumb.JPG',130, 136,1,'																			photo_563729.html');
												thumbnails[563731] = new thumbnail(563731,'43423','Local Malawi Women paying their respects at the gravestone of 19th Century missionaries','malawi121_thumb.jpg',130, 122,1,'																			photo_563731.html');
												thumbnails[563733] = new thumbnail(563733,'43423','','malawi102_thumb.jpg',130, 87,1,'																			photo_563733.html');
												thumbnails[563734] = new thumbnail(563734,'43423','Eye hospital Lilongwe ,Malawi','malawi143_thumb.jpg',130, 95,1,'																			photo_563734.html');
												thumbnails[563735] = new thumbnail(563735,'43423','Carpenter making childrens coffins in Lilongwe,Life expectancy in Malawi is around 36 due to the effects of HIV and AIDS','MALAWI19_thumb.JPG',130, 87,1,'																			photo_563735.html');
												thumbnails[563736] = new thumbnail(563736,'43423','Day to day transport for most Malawians.','MALAWI25_thumb.JPG',130, 87,1,'																			photo_563736.html');
												thumbnails[563748] = new thumbnail(563748,'43385','Kyle MacLachlan','dunhill cup08_thumb.JPG',130, 89,1,'																			photo_563748.html');
												thumbnails[563753] = new thumbnail(563753,'43428','Model getting ready back stage','pink ribbon17_thumb.jpg',130, 85,1,'																			photo_563753.html');
												thumbnails[563759] = new thumbnail(563759,'43428','Model getting ready back stage','pink ribbon28_thumb.jpg',130, 104,1,'																			photo_563759.html');
												thumbnails[563772] = new thumbnail(563772,'43428','Japanese Sumo wrestlers','sy8_thumb.jpg',130, 109,1,'																			photo_563772.html');
												thumbnails[563774] = new thumbnail(563774,'43428','Japanese Sumo wrestlers','sy3_thumb.jpg',130, 161,1,'																			photo_563774.html');
												thumbnails[563778] = new thumbnail(563778,'43428','Collecting sand worms','sy1_thumb.jpg',130, 85,1,'																			photo_563778.html');
												thumbnails[563786] = new thumbnail(563786,'43385','Billy Connolly filming National Lottery advert','CONNOLLY4_thumb.jpg',130, 129,1,'																			photo_563786.html');
												thumbnails[564785] = new thumbnail(564785,'43384','The Cupping Salon Glasgow','005_thumb.JPG',130, 130,1,'																			photo_564785.html');
												thumbnails[564789] = new thumbnail(564789,'43384','The Cupping Salon Glasgow','008_thumb.JPG',130, 86,1,'																			photo_564789.html');
												thumbnails[564829] = new thumbnail(564829,'43384','Glorious Twelfth Jewellery','_SY00023_thumb.jpg',130, 120,1,'																			photo_564829.html');
												thumbnails[596847] = new thumbnail(596847,'45865','','angela_thumb.jpg',130, 83,1,'																			photo_596847.html');
												thumbnails[596918] = new thumbnail(596918,'45865','','people02A1_thumb.jpg',130, 87,1,'																			photo_596918.html');
												thumbnails[603392] = new thumbnail(603392,'45865','','gloria hunniford09_thumb.jpg',130, 89,1,'																			photo_603392.html');
												thumbnails[613433] = new thumbnail(613433,'45865','','Resize Assistant-1_thumb.jpg',130, 85,1,'																			photo_613433.html');
												thumbnails[613645] = new thumbnail(613645,'45865','','058web1_thumb.jpg',130, 96,1,'																			photo_613645.html');
												thumbnails[613654] = new thumbnail(613654,'45865','','0111web_thumb.jpg',130, 86,1,'																			photo_613654.html');
												thumbnails[613658] = new thumbnail(613658,'45865','','015web_thumb.jpg',130, 86,1,'																			photo_613658.html');
												thumbnails[613736] = new thumbnail(613736,'47069','','web06_thumb.jpg',130, 101,1,'																			photo_613736.html');
												thumbnails[613738] = new thumbnail(613738,'47069','','web08_thumb.jpg',130, 104,1,'																			photo_613738.html');
												thumbnails[613774] = new thumbnail(613774,'43381','WW2 fighter/bomber over the forth rail bridge,for the museum of flight air show','ww2plane_thumb.jpg',130, 82,1,'																			photo_613774.html');
												thumbnails[621195] = new thumbnail(621195,'43385','Clint Eastwood,photocall for Mystic River','eastwood01_thumb.jpg',130, 104,1,'																			photo_621195.html');
												thumbnails[621278] = new thumbnail(621278,'43385','ewan mcgregor','ewan mcgregor_thumb.jpg',130, 173,1,'																			photo_621278.html');
												thumbnails[716118] = new thumbnail(716118,'47069','','07868_thumb.jpg',130, 87,1,'																			photo_716118.html');
												thumbnails[716123] = new thumbnail(716123,'47069','','0088_thumb.jpg',130, 88,1,'																			photo_716123.html');
												thumbnails[972489] = new thumbnail(972489,'43381','Launch of new Juice Bar','juice almighty012_thumb.jpg',130, 138,1,'																			photo_972489.html');
												thumbnails[972519] = new thumbnail(972519,'45865','','_SY001321_thumb.jpg',130, 112,1,'																			photo_972519.html');
												thumbnails[972531] = new thumbnail(972531,'45865','','Sarah-Ellissa Marquey0141_thumb.jpg',130, 141,1,'																			photo_972531.html');
												thumbnails[1388353] = new thumbnail(1388353,'47069','','083a_thumb.jpg',130, 88,1,'																			photo_1388353.html');
												thumbnails[1388406] = new thumbnail(1388406,'47069','','035_thumb.jpg',130, 94,1,'																			photo_1388406.html');
												thumbnails[1697599] = new thumbnail(1697599,'43385','Melissa Etheridge, Al Gore, Kevin Spacey and KT Tunstall backstage at the Nobel Peace Prize Concert in Oslo.','backstage36_thumb.jpg',130, 86,1,'																			photo_1697599.html');
												thumbnails[1697650] = new thumbnail(1697650,'43385','Kylie Minogue rehearsing for the Nobel Peace Prize Concert in Oslo.','NOBEL38_thumb.jpg',130, 89,1,'																			photo_1697650.html');
												thumbnails[1697652] = new thumbnail(1697652,'43385','Kylie Minogue rehearsing for the Nobel Peace Prize Concert in Oslo.','NOBEL44_thumb.jpg',130, 90,1,'																			photo_1697652.html');
												thumbnails[1697654] = new thumbnail(1697654,'43385','Kevin Spacey and Uma Thurman Hosts of the Nobel Peace Prize Concert in Oslo.','HOSTS09_thumb.jpg',130, 96,1,'																			photo_1697654.html');
												thumbnails[1700272] = new thumbnail(1700272,'43382','UK\'s only female professional snooker referee.','michaela tabb01_thumb.jpg',130, 89,1,'																			photo_1700272.html');
												thumbnails[1767306] = new thumbnail(1767306,'43385','KT Tunstall and Annie Lennox','sy011_thumb.jpg',130, 87,1,'																			photo_1767306.html');
												thumbnails[1780836] = new thumbnail(1780836,'119751','','web04_thumb.jpg',130, 108,1,'																			photo_1780836.html');
												thumbnails[1781014] = new thumbnail(1781014,'119751','','web05_1_thumb.jpg',130, 93,1,'																			photo_1781014.html');
												thumbnails[1781021] = new thumbnail(1781021,'119751','','web021_thumb.jpg',130, 91,1,'																			photo_1781021.html');
												thumbnails[1781099] = new thumbnail(1781099,'119751','','web12_thumb.jpg',130, 135,1,'																			photo_1781099.html');
												thumbnails[1781107] = new thumbnail(1781107,'119751','','web13_thumb.jpg',130, 98,1,'																			photo_1781107.html');
												thumbnails[1781114] = new thumbnail(1781114,'119751','','web15_thumb.jpg',130, 94,1,'																			photo_1781114.html');
												thumbnails[1781143] = new thumbnail(1781143,'119751','','web09_thumb.jpg',130, 91,1,'																			photo_1781143.html');
												thumbnails[1781150] = new thumbnail(1781150,'119751','','web18_thumb.jpg',130, 92,1,'																			photo_1781150.html');
												thumbnails[1781167] = new thumbnail(1781167,'119751','','web161_thumb.jpg',130, 126,1,'																			photo_1781167.html');
												thumbnails[1781189] = new thumbnail(1781189,'119751','','web10_thumb.jpg',130, 87,1,'																			photo_1781189.html');
												thumbnails[1781190] = new thumbnail(1781190,'119751','','web19_thumb.jpg',130, 96,1,'																			photo_1781190.html');
												thumbnails[1781191] = new thumbnail(1781191,'119751','','web11_thumb.jpg',130, 125,1,'																			photo_1781191.html');
												thumbnails[1781293] = new thumbnail(1781293,'119751','','web22_thumb.jpg',130, 106,1,'																			photo_1781293.html');
												thumbnails[1781294] = new thumbnail(1781294,'119751','','web20_thumb.jpg',130, 113,1,'																			photo_1781294.html');
												thumbnails[1887982] = new thumbnail(1887982,'119751','','_DSC0078_thumb.jpg',130, 86,1,'																			photo_1887982.html');
												thumbnails[2172115] = new thumbnail(2172115,'47069','','steve&justine56_thumb.jpg',130, 86,1,'																			photo_2172115.html');
												thumbnails[2172116] = new thumbnail(2172116,'47069','','steve&justine25_thumb.jpg',130, 82,1,'																			photo_2172116.html');
												thumbnails[2229201] = new thumbnail(2229201,'47069','','098b_thumb.jpg',130, 92,1,'																			photo_2229201.html');
												thumbnails[2229336] = new thumbnail(2229336,'47069','','068_thumb.jpg',130, 90,1,'																			photo_2229336.html');
												thumbnails[2929803] = new thumbnail(2929803,'47069','','002a_thumb.jpg',130, 86,1,'																			photo_2929803.html');
												thumbnails[2929806] = new thumbnail(2929806,'47069','','013a_thumb.jpg',130, 93,1,'																			photo_2929806.html');
												thumbnails[2929808] = new thumbnail(2929808,'47069','','119_thumb.jpg',130, 89,1,'																			photo_2929808.html');
												thumbnails[2929809] = new thumbnail(2929809,'47069','','0141a_thumb.jpg',130, 86,1,'																			photo_2929809.html');
												thumbnails[2929811] = new thumbnail(2929811,'47069','','_DSC0317_thumb.jpg',130, 105,1,'																			photo_2929811.html');
												thumbnails[2929865] = new thumbnail(2929865,'47069','','_SY061761_thumb.jpg',130, 109,1,'																			photo_2929865.html');
												thumbnails[2929867] = new thumbnail(2929867,'47069','','morven&ross68a_thumb.jpg',130, 89,1,'																			photo_2929867.html');
												thumbnails[2929870] = new thumbnail(2929870,'47069','','0104a1_thumb.jpg',130, 86,1,'																			photo_2929870.html');
												thumbnails[2939743] = new thumbnail(2939743,'45865','','47_thumb.jpg',130, 86,1,'																			photo_2939743.html');
												thumbnails[2939745] = new thumbnail(2939745,'45865','','106_thumb.jpg',130, 87,1,'																			photo_2939745.html');
												thumbnails[2947519] = new thumbnail(2947519,'43385','','jk rowling-ed award03_thumb.jpg',130, 84,1,'																			photo_2947519.html');
												thumbnails[3129800] = new thumbnail(3129800,'192169','','ochil01a_thumb.jpg',130, 87,1,'																			photo_3129800.html');
												thumbnails[3133769] = new thumbnail(3133769,'43381','','wallace02_thumb.jpg',130, 93,1,'																			photo_3133769.html');
												thumbnails[3961092] = new thumbnail(3961092,'45865','','SAMH84_thumb.jpg',130, 82,1,'																			photo_3961092.html');
												thumbnails[3961100] = new thumbnail(3961100,'43381','extreme tea party','deep_sea_tea01_thumb.jpg',130, 88,1,'																			photo_3961100.html');
												thumbnails[5253760] = new thumbnail(5253760,'43385','','nobel_concert51A12_thumb.jpg',130, 88,1,'																			photo_5253760.html');
												thumbnails[5491521] = new thumbnail(5491521,'192169','','2142b1_thumb.jpg',130, 92,1,'																			photo_5491521.html');
												thumbnails[5491526] = new thumbnail(5491526,'192169','','311a_1_thumb.jpg',130, 95,1,'																			photo_5491526.html');
												thumbnails[563838] = new thumbnail(563838,'43377','Sir Timothy Clifford, director general of the National Galleries of Scotland,pictured in the Manhattan studio of artist Nelson Shanks','Sir Timothy Clifford001_thumb.JPG',130, 86,1,'																			photo_563838.html');
												thumbnails[564728] = new thumbnail(564728,'43381','Edinburgh City Council ,part of the hogmany celebrations','fire_eater_thumb.jpg',130, 89,1,'																			photo_564728.html');
												thumbnails[563797] = new thumbnail(563797,'43377',' Marking the anniversary of the death of Robert Burns at The Burns Monument Edinburgh','BURNS7_thumb.jpg',130, 85,1,'																			photo_563797.html');
												thumbnails[564722] = new thumbnail(564722,'43381','Robin Pellew Chief Executive of the National Trust for Scotland','trust6_thumb.jpg',130, 85,1,'																			photo_564722.html');
												thumbnails[563820] = new thumbnail(563820,'43377','Hogwarts Express sets hills on fire during filming of Harry Potter','potter01_thumb.jpg',130, 85,1,'																			photo_563820.html');
												thumbnails[564746] = new thumbnail(564746,'43381','Director General of the National Galleries of Scotland ,Sir Timothy Clifford at their storage centre.','people02_thumb.JPG',130, 85,1,'																			photo_564746.html');
												thumbnails[563806] = new thumbnail(563806,'43377','Conservative party leader Iain Duncan Smith days before his resignation<br>\r\n','IDS01_thumb.JPG',130, 133,1,'																			photo_563806.html');
												thumbnails[564754] = new thumbnail(564754,'43381','Edinburgh Science Festival','SKULL2_thumb.JPG',130, 85,1,'																			photo_564754.html');
												thumbnails[563810] = new thumbnail(563810,'43377','SNP press conference','snp01_thumb.JPG',130, 122,1,'																			photo_563810.html');
												thumbnails[564757] = new thumbnail(564757,'43381','Rosslyn Chapel for VisitScotland,Da Vinci Code campaign ','Rosslyn Chapel_thumb.jpg',130, 85,1,'																			photo_564757.html');
												thumbnails[563831] = new thumbnail(563831,'43377','Concorde leaving Edinburgh Airport on her last flight','concorde02_thumb.JPG',130, 98,1,'																			photo_563831.html');
												thumbnails[565423] = new thumbnail(565423,'43381','Royal Bank of Scotland AGM','rbs05_thumb.JPG',130, 86,1,'																			photo_565423.html');
												thumbnails[565424] = new thumbnail(565424,'43381','Hotscots campaign for VisitScotland','hotscot02_thumb.JPG',130, 85,1,'																			photo_565424.html');
												thumbnails[563844] = new thumbnail(563844,'43377','The Moscow State Circus, pictured both the Bugrova Sisters during there juggling act ','twin sisters01_thumb.jpg',130, 160,1,'																			photo_563844.html');
												thumbnails[564762] = new thumbnail(564762,'43381','National Lottery','lottery006_thumb.jpg',130, 161,1,'																			photo_564762.html');
												thumbnails[563847] = new thumbnail(563847,'43377','HRH The Prince of Wales(prince charles) on a visit to the Western General Hospital in Edinburgh','prince charles01_thumb.JPG',130, 96,1,'																			photo_563847.html');
												thumbnails[564767] = new thumbnail(564767,'43381','Dressed to Kilt fashion show New York','dressed to kilt51_thumb.jpg',130, 122,1,'																			photo_564767.html');
												thumbnails[564741] = new thumbnail(564741,'43381','Business profile for IT company','biz02A_thumb.JPG',130, 126,1,'																			photo_564741.html');
												thumbnails[564769] = new thumbnail(564769,'43377','Collapse of ITV Digital','monkey1A_thumb.JPG',130, 85,1,'																			photo_564769.html');
												thumbnails[4933673] = new thumbnail(4933673,'47069','','AC071_thumb.jpg',130, 87,1,'																			photo_4933673.html');
												thumbnails[4933737] = new thumbnail(4933737,'47069','','fiona111_thumb.jpg',130, 128,1,'																			photo_4933737.html');
												thumbnails[4933933] = new thumbnail(4933933,'47069','','web_wedding01_thumb.jpg',130, 87,1,'																			photo_4933933.html');
												thumbnails[4933994] = new thumbnail(4933994,'47069','','web_wedding07_thumb.jpg',130, 135,1,'																			photo_4933994.html');
												thumbnails[4934005] = new thumbnail(4934005,'47069','','web_wedding27_thumb.jpg',130, 88,1,'																			photo_4934005.html');
												thumbnails[4934213] = new thumbnail(4934213,'47069','','stevelea-ann111_thumb.jpg',130, 97,1,'																			photo_4934213.html');
												thumbnails[4934264] = new thumbnail(4934264,'47069','','0110_thumb.jpg',130, 89,1,'																			photo_4934264.html');
												thumbnails[4934368] = new thumbnail(4934368,'45865','','annie_lennox25_thumb.jpg',130, 166,1,'																			photo_4934368.html');
												thumbnails[5414975] = new thumbnail(5414975,'43384','SYP 3364','SYP_3364_65BA8ABC-1D09-001F-99ED309CE3F2E600_thumb.jpg',130, 174,1,'																			photo_5414975.html');
												thumbnails[4933675] = new thumbnail(4933675,'47069','','fiona092a_thumb.jpg',130, 98,1,'																			photo_4933675.html');
												thumbnails[4933996] = new thumbnail(4933996,'47069','','web_wedding26_thumb.jpg',130, 98,1,'																			photo_4933996.html');
												thumbnails[2929812] = new thumbnail(2929812,'47069','','_DSC0670_thumb.jpg',130, 102,1,'																			photo_2929812.html');
												thumbnails[3133782] = new thumbnail(3133782,'192169','2595 ','2595__thumb.jpg',130, 96,1,'																			photo_3133782.html');
												thumbnails[4933674] = new thumbnail(4933674,'47069','','fiona027a_thumb.jpg',130, 87,1,'																			photo_4933674.html');
												thumbnails[4933738] = new thumbnail(4933738,'47069','','greg_mel52_thumb.jpg',130, 87,1,'																			photo_4933738.html');
												thumbnails[4933934] = new thumbnail(4933934,'47069','','web_wedding02_thumb.jpg',130, 195,1,'																			photo_4933934.html');
												thumbnails[4933969] = new thumbnail(4933969,'47069','','web_wedding17_thumb.jpg',130, 87,1,'																			photo_4933969.html');
												thumbnails[4933995] = new thumbnail(4933995,'47069','','web_wedding23_thumb.jpg',130, 195,1,'																			photo_4933995.html');
												thumbnails[4934006] = new thumbnail(4934006,'47069','','web_wedding37_thumb.jpg',130, 87,1,'																			photo_4934006.html');
												thumbnails[4934214] = new thumbnail(4934214,'47069','','stevelea-ann155_thumb.jpg',130, 194,1,'																			photo_4934214.html');
												thumbnails[4934265] = new thumbnail(4934265,'47069','','094b_thumb.jpg',130, 90,1,'																			photo_4934265.html');
												thumbnails[5414976] = new thumbnail(5414976,'43384','SYP 3389','SYP_3389_65BA8C24-1D09-001F-99C13F21EA0777D3_thumb.jpg',130, 175,1,'																			photo_5414976.html');
												thumbnails[613734] = new thumbnail(613734,'47069','','web05_thumb.jpg',130, 96,1,'																			photo_613734.html');
												thumbnails[613692] = new thumbnail(613692,'47069','','02web_thumb.jpg',130, 130,1,'																			photo_613692.html');
												thumbnails[3133783] = new thumbnail(3133783,'192169','2729 ','2729__thumb.jpg',130, 175,1,'																			photo_3133783.html');
												thumbnails[4933715] = new thumbnail(4933715,'47069','','JL056a_thumb.jpg',130, 172,1,'																			photo_4933715.html');
												thumbnails[4933935] = new thumbnail(4933935,'47069','','web_wedding03_thumb.jpg',130, 102,1,'																			photo_4933935.html');
												thumbnails[4933970] = new thumbnail(4933970,'47069','','web_wedding18_thumb.jpg',130, 157,1,'																			photo_4933970.html');
												thumbnails[4934266] = new thumbnail(4934266,'47069','','renouf77_thumb.jpg',130, 98,1,'																			photo_4934266.html');
												thumbnails[5414977] = new thumbnail(5414977,'43384','SYP 3444','SYP_3444_65BA8DAB-1D09-001F-99C4F50E8FED3071_thumb.jpg',130, 142,1,'																			photo_5414977.html');
												thumbnails[3133787] = new thumbnail(3133787,'192169','LA beach01','LA_beach01_thumb.jpg',130, 91,1,'																			photo_3133787.html');
												thumbnails[4933716] = new thumbnail(4933716,'47069','','JL068_thumb.jpg',130, 87,1,'																			photo_4933716.html');
												thumbnails[4933739] = new thumbnail(4933739,'47069','','JL158_thumb.jpg',130, 165,1,'																			photo_4933739.html');
												thumbnails[4933936] = new thumbnail(4933936,'47069','','web_wedding04_thumb.jpg',130, 188,1,'																			photo_4933936.html');
												thumbnails[4934267] = new thumbnail(4934267,'47069','','renouf91a_thumb.jpg',130, 86,1,'																			photo_4934267.html');
												thumbnails[613726] = new thumbnail(613726,'47069','','061web_thumb.jpg',130, 86,1,'																			photo_613726.html');
												thumbnails[4933717] = new thumbnail(4933717,'47069','','JL104_thumb.jpg',130, 87,1,'																			photo_4933717.html');
												thumbnails[4933740] = new thumbnail(4933740,'47069','','JL166_thumb.jpg',130, 176,1,'																			photo_4933740.html');
												thumbnails[4933937] = new thumbnail(4933937,'47069','','web_wedding05_thumb.jpg',130, 99,1,'																			photo_4933937.html');
												thumbnails[4933997] = new thumbnail(4933997,'47069','','web_wedding36_thumb.jpg',130, 87,1,'																			photo_4933997.html');
												thumbnails[4934268] = new thumbnail(4934268,'47069','','_DSC0891_thumb.jpg',130, 86,1,'																			photo_4934268.html');
												thumbnails[4933988] = new thumbnail(4933988,'47069','','web_wedding49_thumb.jpg',130, 187,1,'																			photo_4933988.html');
												thumbnails[3133785] = new thumbnail(3133785,'192169','clackmanan bridge18b','clackmanan bridge18b_thumb.jpg',130, 87,1,'																			photo_3133785.html');
												thumbnails[4933938] = new thumbnail(4933938,'47069','','web_wedding06_thumb.jpg',130, 96,1,'																			photo_4933938.html');
												thumbnails[3133786] = new thumbnail(3133786,'192169','concorde','concorde_thumb.jpg',130, 104,1,'																			photo_3133786.html');
												thumbnails[4933971] = new thumbnail(4933971,'47069','','web_wedding28_thumb.jpg',130, 92,1,'																			photo_4933971.html');
												thumbnails[4933998] = new thumbnail(4933998,'47069','','web_wedding38_thumb.jpg',130, 195,1,'																			photo_4933998.html');
												thumbnails[3133784] = new thumbnail(3133784,'192169','american star','american star_thumb.jpg',130, 111,1,'																			photo_3133784.html');
												thumbnails[4933939] = new thumbnail(4933939,'47069','','web_wedding08_thumb.jpg',130, 92,1,'																			photo_4933939.html');
												thumbnails[4933972] = new thumbnail(4933972,'47069','','web_wedding29_thumb.jpg',130, 87,1,'																			photo_4933972.html');
												thumbnails[4933999] = new thumbnail(4933999,'47069','','web_wedding43_thumb.jpg',130, 87,1,'																			photo_4933999.html');
												thumbnails[3133788] = new thumbnail(3133788,'192169','mist','mist_thumb.jpg',130, 96,1,'																			photo_3133788.html');
												thumbnails[4933940] = new thumbnail(4933940,'47069','','web_wedding09_thumb.jpg',130, 105,1,'																			photo_4933940.html');
												thumbnails[4933973] = new thumbnail(4933973,'47069','','web_wedding30_thumb.jpg',130, 88,1,'																			photo_4933973.html');
												thumbnails[3133789] = new thumbnail(3133789,'192169','ochil01a','ochil01a1_thumb.jpg',130, 87,1,'																			photo_3133789.html');
												thumbnails[4933942] = new thumbnail(4933942,'47069','','web_wedding10_thumb.jpg',130, 87,1,'																			photo_4933942.html');
												thumbnails[4933974] = new thumbnail(4933974,'47069','','web_wedding31_thumb.jpg',130, 190,1,'																			photo_4933974.html');
												thumbnails[3133790] = new thumbnail(3133790,'192169','santa monica01','santa monica01_thumb.jpg',130, 95,1,'																			photo_3133790.html');
												thumbnails[4933943] = new thumbnail(4933943,'47069','','web_wedding11_thumb.jpg',130, 94,1,'																			photo_4933943.html');
												thumbnails[4933975] = new thumbnail(4933975,'47069','','web_wedding32_thumb.jpg',130, 194,1,'																			photo_4933975.html');
												thumbnails[3133791] = new thumbnail(3133791,'192169','Untitled-1','Untitled-1_thumb.jpg',130, 98,1,'																			photo_3133791.html');
												thumbnails[4933944] = new thumbnail(4933944,'47069','','web_wedding12_thumb.jpg',130, 98,1,'																			photo_4933944.html');
												thumbnails[4933976] = new thumbnail(4933976,'47069','','web_wedding33_thumb.jpg',130, 185,1,'																			photo_4933976.html');
												thumbnails[3133792] = new thumbnail(3133792,'192169',' DSC9060','_DSC9060_thumb.jpg',130, 96,1,'																			photo_3133792.html');
												thumbnails[4933945] = new thumbnail(4933945,'47069','','web_wedding13_thumb.jpg',130, 87,1,'																			photo_4933945.html');
												thumbnails[4933977] = new thumbnail(4933977,'47069','','web_wedding34_thumb.jpg',130, 99,1,'																			photo_4933977.html');
												thumbnails[4933946] = new thumbnail(4933946,'47069','','web_wedding14_thumb.jpg',130, 86,1,'																			photo_4933946.html');
												thumbnails[4933978] = new thumbnail(4933978,'47069','','web_wedding35_thumb.jpg',130, 107,1,'																			photo_4933978.html');
												thumbnails[4933947] = new thumbnail(4933947,'47069','','web_wedding15_thumb.jpg',130, 86,1,'																			photo_4933947.html');
												thumbnails[4933948] = new thumbnail(4933948,'47069','','web_wedding16_thumb.jpg',130, 87,1,'																			photo_4933948.html');
												thumbnails[4933979] = new thumbnail(4933979,'47069','','web_wedding39_thumb.jpg',130, 94,1,'																			photo_4933979.html');
												thumbnails[4933949] = new thumbnail(4933949,'47069','','web_wedding19_thumb.jpg',130, 89,1,'																			photo_4933949.html');
												thumbnails[4933980] = new thumbnail(4933980,'47069','','web_wedding40_thumb.jpg',130, 95,1,'																			photo_4933980.html');
												thumbnails[4933950] = new thumbnail(4933950,'47069','','web_wedding20_thumb.jpg',130, 97,1,'																			photo_4933950.html');
												thumbnails[4933981] = new thumbnail(4933981,'47069','','web_wedding41_thumb.jpg',130, 96,1,'																			photo_4933981.html');
												thumbnails[4933951] = new thumbnail(4933951,'47069','','web_wedding21_thumb.jpg',130, 126,1,'																			photo_4933951.html');
												thumbnails[4933982] = new thumbnail(4933982,'47069','','web_wedding42_thumb.jpg',130, 180,1,'																			photo_4933982.html');
												thumbnails[4933952] = new thumbnail(4933952,'47069','','web_wedding22_thumb.jpg',130, 89,1,'																			photo_4933952.html');
												thumbnails[4933983] = new thumbnail(4933983,'47069','','web_wedding44_thumb.jpg',130, 86,1,'																			photo_4933983.html');
												thumbnails[4933953] = new thumbnail(4933953,'47069','','web_wedding24_thumb.jpg',130, 157,1,'																			photo_4933953.html');
												thumbnails[4933984] = new thumbnail(4933984,'47069','','web_wedding45_thumb.jpg',130, 199,1,'																			photo_4933984.html');
												thumbnails[4933954] = new thumbnail(4933954,'47069','','web_wedding25_thumb.jpg',130, 97,1,'																			photo_4933954.html');
												thumbnails[4933985] = new thumbnail(4933985,'47069','','web_wedding46_thumb.jpg',130, 87,1,'																			photo_4933985.html');
												thumbnails[4933986] = new thumbnail(4933986,'47069','','web_wedding47_thumb.jpg',130, 95,1,'																			photo_4933986.html');
												thumbnails[4933987] = new thumbnail(4933987,'47069','','web_wedding48_thumb.jpg',130, 96,1,'																			photo_4933987.html');
												thumbnails[2290257] = new thumbnail(2290257,'47069','Bellisimo wedding album range, a high quality coffee table style book. Sizes 16x12, 12x12, 8x6 and 6x6. ','bellisimo05_thumb.jpg',130, 94,1,'																			photo_2290257.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[119751] = new gallery(119751,'1781293','cuttings','gallery',[1780836,1781014,1781021,1781099,1781107,1781114,1781143,1781150,1781167,1781189,1781190,1781191,1781293,1781294,1887982],0, 0, '', '																																																																																																							gallery_119751.html',0,0);
				  					galleries[192169] = new gallery(192169,'5491526,5491521,3133792,3133791,3133790,3133789,3133788,3133787,3133786,3133785','other stuff','gallery',[3129800,5491521,5491526,3133782,3133783,3133787,3133785,3133786,3133784,3133788,3133789,3133790,3133791,3133792],0, 0, '', '																																																																																																							gallery_192169.html',0,0);
				  					galleries[43377] = new gallery(43377,'563820','news','gallery',[563838,563797,563820,563806,563810,563831,563844,563847,564769],0, 0, '', '																																																																																																							gallery_43377.html',0,0);
				  					galleries[45865] = new gallery(45865,'3961092','people','gallery',[596847,596918,603392,613433,613645,613654,613658,972519,972531,2939743,2939745,3961092,4934368],0, 0, '', '																																																																																																							gallery_45865.html',0,0);
				  					galleries[43428] = new gallery(43428,'563753','Features','gallery',[563753,563759,563772,563774,563778],0, 0, '', '																																																																																																							gallery_43428.html',0,0);
				  					galleries[43381] = new gallery(43381,'613774','PR','gallery',[613774,972489,3133769,3961100,564728,564722,564746,564754,564757,565423,565424,564762,564767,564741],0, 0, '', '																																																																																																							gallery_43381.html',0,0);
				  					galleries[43385] = new gallery(43385,'621195,563366','celebs','gallery',[563338,563351,563356,563366,563380,563748,563786,621195,621278,1697599,1697650,1697652,1697654,1767306,2947519,5253760],0, 0, '', '																																																																																																							gallery_43385.html',0,0);
				  					galleries[43382] = new gallery(43382,'563405','sport','gallery',[563387,563396,563402,563405,563412,563416,563429,1700272],0, 0, '', '																																																																																																							gallery_43382.html',0,0);
				  					galleries[43423] = new gallery(43423,'563736,563735,563734,563733,563731,563729,563728,563727,563725','Malawi','gallery',[563725,563727,563728,563729,563731,563733,563734,563735,563736],0, 0, '', '																																																																																																							gallery_43423.html',0,0);
				  					galleries[47069] = new gallery(47069,'4933675','weddings','gallery',[613736,613738,716118,716123,1388353,1388406,2172115,2172116,2229201,2229336,2929803,2929806,2929808,2929809,2929811,2929865,2929867,2929870,4933673,4933737,4933933,4933994,4934005,4934213,4934264,4933675,4933996,2929812,4933674,4933738,4933934,4933969,4933995,4934006,4934214,4934265,613734,613692,4933715,4933935,4933970,4934266,4933716,4933739,4933936,4934267,613726,4933717,4933740,4933937,4933997,4934268,4933988,4933938,4933971,4933998,4933939,4933972,4933999,4933940,4933973,4933942,4933974,4933943,4933975,4933944,4933976,4933945,4933977,4933946,4933978,4933947,4933948,4933979,4933949,4933980,4933950,4933981,4933951,4933982,4933952,4933983,4933953,4933984,4933954,4933985,4933986,4933987,2290257],0, 0, '', '																																																																																																							gallery_47069.html',0,0);
				  					galleries[43384] = new gallery(43384,'5414977','studio','gallery',[564785,564789,564829,5414975,5414976,5414977],0, 0, '', '																																																																																																							gallery_43384.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '563306';
imageSets[2] = '5414977,4933675,3961092,1781293,621195,613774,563820,563753,563405,563366';
imageSets[3] = '5491526,5491521,5414977,5414976,5414975,5253760,4934368,4934268,4934267,4934266,4934265,4934264,4934214,4934213,4934006,4934005,4933999,4933998,4933997,4933996,4933995,4933994,4933988,4933987,4933986,4933985,4933984,4933983,4933982,4933981,4933980,4933979,4933978,4933977,4933976,4933975,4933974,4933973,4933972,4933971,4933970,4933969,4933954,4933953,4933952,4933951,4933950,4933949,4933948,4933947';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/sandyy/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/sandyy/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/sandyy/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/sandyy/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/sandyy/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/sandyy/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));		}, 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 = 'Sandy Young Photography, : ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {};	    	      	      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));    }        
    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 = 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>';
	}
					
				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>Order this print:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> 							' + (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 + '<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;
	}
}

		

