window.thumbnails = {};
															thumbnails[9061106] = clik.newPhoto({"id":9061106,"src":"Love_Heart_Winner_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":160,"caption":"Scottish Love Hearts","height":160});
															thumbnails[3284576] = clik.newPhoto({"id":3284576,"src":"T_Cone_square_thum1_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3284576.html","width":160,"caption":"Traffic Cone","height":160});
															thumbnails[5618345] = clik.newPhoto({"id":5618345,"src":"Tea_cake_thum_bord12_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_5618345.html","width":160,"caption":"Teacake","height":160});
															thumbnails[5757911] = clik.newPhoto({"id":5757911,"src":"Tea_cake_thum_bord1_thumb.jpg","galleries_id":318492,"server_id":15,"link":"photo_5757911.html","width":160,"caption":"Tea Cake","height":160});
															thumbnails[5850957] = clik.newPhoto({"id":5850957,"src":"Love_green_thum_thumb.jpg","galleries_id":330974,"server_id":15,"link":"photo_5850957.html","width":160,"caption":"Love's Green","height":224});
															thumbnails[6856464] = clik.newPhoto({"id":6856464,"src":"Green_40_thum_thumb.jpg","galleries_id":372207,"server_id":15,"link":"photo_6856464.html","width":160,"caption":"Green","height":160});
															thumbnails[8613780] = clik.newPhoto({"id":8613780,"src":"ailsa_thum_thumb.jpg","galleries_id":455353,"server_id":15,"link":"photo_8613780.html","width":160,"caption":"Ailsa Craig","height":160});
															thumbnails[3284607] = clik.newPhoto({"id":3284607,"src":"Tenament_thum_squ1_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3284607.html","width":160,"caption":"Tenement","height":160});
															thumbnails[5618389] = clik.newPhoto({"id":5618389,"src":"Irn_Bru_thum_no_bord_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_5618389.html","width":160,"caption":"Irn Bru","height":160});
															thumbnails[5757917] = clik.newPhoto({"id":5757917,"src":"Irn_Bru_thum_no_bord1_thumb.jpg","galleries_id":318492,"server_id":15,"link":"photo_5757917.html","width":160,"caption":"Irn Bru","height":160});
															thumbnails[5851050] = clik.newPhoto({"id":5851050,"src":"Love_pink_thum_thumb.jpg","galleries_id":330974,"server_id":15,"link":"photo_5851050.html","width":160,"caption":"Love's Pink","height":224});
															thumbnails[6856450] = clik.newPhoto({"id":6856450,"src":"Amber_40_thum_thumb.jpg","galleries_id":372207,"server_id":15,"link":"photo_6856450.html","width":160,"caption":"Amber","height":160});
															thumbnails[7539792] = clik.newPhoto({"id":7539792,"src":"Tree_green_thum_thumb.jpg","galleries_id":408757,"server_id":15,"link":"photo_7539792.html","width":160,"caption":"Tree Green","height":314});
															thumbnails[3284596] = clik.newPhoto({"id":3284596,"src":"Kelvingrove_lighter_thum_squ_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3284596.html","width":160,"caption":"Kelvingrove Museum","height":160});
															thumbnails[5618397] = clik.newPhoto({"id":5618397,"src":"Caramel_thum_no_bord_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_5618397.html","width":160,"caption":"Caramel Wafer","height":161});
															thumbnails[5757928] = clik.newPhoto({"id":5757928,"src":"Caramel_thum_no_bord1_thumb.jpg","galleries_id":318492,"server_id":15,"link":"photo_5757928.html","width":160,"caption":"Caramel Wafer","height":161});
															thumbnails[5851092] = clik.newPhoto({"id":5851092,"src":"Love_thum_thumb.jpg","galleries_id":330974,"server_id":15,"link":"photo_5851092.html","width":160,"caption":"Love's Orange","height":224});
															thumbnails[6856421] = clik.newPhoto({"id":6856421,"src":"Red_40_thum_thumb.jpg","galleries_id":372207,"server_id":15,"link":"photo_6856421.html","width":160,"caption":"Red","height":160});
															thumbnails[3284600] = clik.newPhoto({"id":3284600,"src":"oranmor_thum_squ_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3284600.html","width":160,"caption":"Oran Mor","height":160});
															thumbnails[5851104] = clik.newPhoto({"id":5851104,"src":"Playhouse_2_thum_thumb.jpg","galleries_id":330974,"server_id":15,"link":"photo_5851104.html","width":160,"caption":"Playhouse","height":224});
															thumbnails[6856476] = clik.newPhoto({"id":6856476,"src":"lamposts_40_thum_thumb.jpg","galleries_id":372207,"server_id":15,"link":"photo_6856476.html","width":160,"caption":"Lamp Posts","height":160});
															thumbnails[3284579] = clik.newPhoto({"id":3284579,"src":"Battlefield_Rest_thum_squ_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3284579.html","width":160,"caption":"Battlefield Rest","height":160});
															thumbnails[5851120] = clik.newPhoto({"id":5851120,"src":"St_Johns_Kirk_thum_thumb.jpg","galleries_id":330974,"server_id":15,"link":"photo_5851120.html","width":160,"caption":"St John's","height":224});
															thumbnails[7539795] = clik.newPhoto({"id":7539795,"src":"tree_orange_thum_thumb.jpg","galleries_id":408757,"server_id":15,"link":"photo_7539795.html","width":160,"caption":"Tree Orange","height":80});
															thumbnails[7817016] = clik.newPhoto({"id":7817016,"src":"high_rise_thum_thumb.jpg","galleries_id":372207,"server_id":15,"link":"photo_7817016.html","width":160,"caption":"High Rise","height":160});
															thumbnails[8703504] = clik.newPhoto({"id":8703504,"src":"Red_Red_Rose_thum_thumb.jpg","galleries_id":455353,"server_id":15,"link":"photo_8703504.html","width":160,"caption":"Red Red Rose","height":160});
															thumbnails[3284583] = clik.newPhoto({"id":3284583,"src":"Beresford_Thum_sqa_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3284583.html","width":160,"caption":"Beresford","height":160});
															thumbnails[6856480] = clik.newPhoto({"id":6856480,"src":"Ahead_Only_40_thum_thumb.jpg","galleries_id":372207,"server_id":15,"link":"photo_6856480.html","width":160,"caption":"Ahead Only","height":160});
															thumbnails[7673065] = clik.newPhoto({"id":7673065,"src":"Beach_thum_thumb.jpg","galleries_id":372206,"server_id":15,"link":"photo_7673065.html","width":160,"caption":"Aberdeen Beach","height":68});
															thumbnails[7852993] = clik.newPhoto({"id":7852993,"src":"King_James_VI_thum_thumb.jpg","galleries_id":330974,"server_id":15,"link":"photo_7852993.html","width":160,"caption":"St James VI Hospital","height":224});
															thumbnails[3284590] = clik.newPhoto({"id":3284590,"src":"Glasgow_Uni_thum_squ_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3284590.html","width":160,"caption":"Glasgow Uni","height":160});
															thumbnails[7673070] = clik.newPhoto({"id":7673070,"src":"Marishal_thum_thumb.jpg","galleries_id":372206,"server_id":15,"link":"photo_7673070.html","width":160,"caption":"Marischal College","height":84});
															thumbnails[8703574] = clik.newPhoto({"id":8703574,"src":"Scott_Love_hearts_Thum_thumb.jpg","galleries_id":455353,"server_id":15,"link":"photo_8703574.html","width":160,"caption":"Scottish Lovehearts","height":160});
															thumbnails[3319682] = clik.newPhoto({"id":3319682,"src":"St_Andrews_thum_squ_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3319682.html","width":160,"caption":"St Andrew's in the Square","height":160});
															thumbnails[7673072] = clik.newPhoto({"id":7673072,"src":"College_thum_thumb.jpg","galleries_id":372206,"server_id":15,"link":"photo_7673072.html","width":160,"caption":"King's College Chapel","height":67});
															thumbnails[3284602] = clik.newPhoto({"id":3284602,"src":"Squinty_Bridge_thum_squ_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3284602.html","width":160,"caption":"Squinty Bridge","height":160});
															thumbnails[5851235] = clik.newPhoto({"id":5851235,"src":"Huntingtower_thum_thumb.jpg","galleries_id":330974,"server_id":15,"link":"photo_5851235.html","width":130,"caption":"Huntingtower castle","height":54});
															thumbnails[3284597] = clik.newPhoto({"id":3284597,"src":"Kibble_Palace_thum_squ_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3284597.html","width":160,"caption":"Kibble Palace","height":160});
															thumbnails[3305960] = clik.newPhoto({"id":3305960,"src":"road_bridge_Ltd_thum_crop_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_3305960.html","width":160,"caption":"Forth Road Bridge","height":65});
															thumbnails[3320122] = clik.newPhoto({"id":3320122,"src":"Bridge No 1 thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_3320122.html","width":130,"caption":"Forth Rail Bridge 1","height":98});
															thumbnails[6856410] = clik.newPhoto({"id":6856410,"src":"Stir_Castle_thum_thumb.jpg","galleries_id":330974,"server_id":15,"link":"photo_6856410.html","width":130,"caption":"Stirling Castle","height":54});
															thumbnails[8702575] = clik.newPhoto({"id":8702575,"src":"Plain_loaf_thum_thumb.jpg","galleries_id":455353,"server_id":15,"link":"photo_8702575.html","width":160,"caption":"Plain Loaf","height":160});
															thumbnails[3284598] = clik.newPhoto({"id":3284598,"src":"lum_thum_squ_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3284598.html","width":160,"caption":"Luma Building","height":160});
															thumbnails[3305962] = clik.newPhoto({"id":3305962,"src":"Bridge Limited2 thum crop1_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_3305962.html","width":130,"caption":"Forth Rail Bridge","height":53});
															thumbnails[3320123] = clik.newPhoto({"id":3320123,"src":"Bridge No 2 thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_3320123.html","width":130,"caption":"Forth Rail Bridge 2","height":98});
															thumbnails[6856415] = clik.newPhoto({"id":6856415,"src":"Wallace_Mon_thum_thumb.jpg","galleries_id":330974,"server_id":15,"link":"photo_6856415.html","width":130,"caption":"Wallace Monument (Orange)","height":54});
															thumbnails[3284588] = clik.newPhoto({"id":3284588,"src":"Clockwork_thum_squ_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3284588.html","width":160,"caption":"Clockwork","height":160});
															thumbnails[3320124] = clik.newPhoto({"id":3320124,"src":"Bridge No 3 thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_3320124.html","width":130,"caption":"Forth Rail Bridge 3","height":98});
															thumbnails[6856417] = clik.newPhoto({"id":6856417,"src":"Wallace_thum_thumb.jpg","galleries_id":330974,"server_id":15,"link":"photo_6856417.html","width":130,"caption":"Wallace Monument (Red)","height":54});
															thumbnails[7809962] = clik.newPhoto({"id":7809962,"src":"Edin_Castle_thumltd_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_7809962.html","width":160,"caption":"Edinburgh Castle","height":67});
															thumbnails[3319972] = clik.newPhoto({"id":3319972,"src":"templetons_2_thum1_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3319972.html","width":160,"caption":"Templeton's","height":224});
															thumbnails[3319990] = clik.newPhoto({"id":3319990,"src":"templetons_3_thum1_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3319990.html","width":160,"caption":"Templeton's 2","height":224});
															thumbnails[3305958] = clik.newPhoto({"id":3305958,"src":"Nat Monument Ltd thum crop_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_3305958.html","width":130,"caption":"National Monument","height":53});
															thumbnails[3320006] = clik.newPhoto({"id":3320006,"src":"templeton_3_thum1_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3320006.html","width":160,"caption":"Templeton's 3","height":224});
															thumbnails[3320135] = clik.newPhoto({"id":3320135,"src":"Edinburgh thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_3320135.html","width":130,"caption":"Edinburgh","height":312});
															thumbnails[3305955] = clik.newPhoto({"id":3305955,"src":"Holyrood_Ltd_thum_crop_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_3305955.html","width":160,"caption":"Scottish Parliament","height":70});
															thumbnails[3319926] = clik.newPhoto({"id":3319926,"src":"armadillo close thum_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3319926.html","width":130,"caption":"Armadillo 1","height":98});
															thumbnails[3320143] = clik.newPhoto({"id":3320143,"src":"Town House thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_3320143.html","width":130,"caption":"Townhouse","height":312});
															thumbnails[7673079] = clik.newPhoto({"id":7673079,"src":"High_Street_thum_thumb.jpg","galleries_id":372206,"server_id":15,"link":"photo_7673079.html","width":160,"caption":"High Street","height":160});
															thumbnails[3320032] = clik.newPhoto({"id":3320032,"src":"armadillo2 thum_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3320032.html","width":130,"caption":"Armadillo 2","height":98});
															thumbnails[3320147] = clik.newPhoto({"id":3320147,"src":"Palace thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_3320147.html","width":130,"caption":"Holyrood Palace","height":312});
															thumbnails[7673090] = clik.newPhoto({"id":7673090,"src":"robert_G_thum12_thumb.jpg","galleries_id":372206,"server_id":15,"link":"photo_7673090.html","width":160,"caption":"Robert Gordon's","height":160});
															thumbnails[7677134] = clik.newPhoto({"id":7677134,"src":"Bass_rock_thum_squ_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_7677134.html","width":160,"caption":"Bass Rock","height":160});
															thumbnails[3320046] = clik.newPhoto({"id":3320046,"src":"armadillo1 thum_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3320046.html","width":130,"caption":"Armadillo 3","height":97});
															thumbnails[7673086] = clik.newPhoto({"id":7673086,"src":"Albert_Terr_thum_thumb.jpg","galleries_id":372206,"server_id":15,"link":"photo_7673086.html","width":160,"caption":"Albert Terrace","height":160});
															thumbnails[7809966] = clik.newPhoto({"id":7809966,"src":"Glasgow_thum_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_7809966.html","width":160,"caption":"Glasgow","height":67});
															thumbnails[3320091] = clik.newPhoto({"id":3320091,"src":"Art Lover thum_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3320091.html","width":130,"caption":"House for an Art Lover","height":312});
															thumbnails[7809967] = clik.newPhoto({"id":7809967,"src":"Blysthwood_thum_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_7809967.html","width":160,"caption":"Blythswood Square","height":67});
															thumbnails[3320101] = clik.newPhoto({"id":3320101,"src":"Scotland thum_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3320101.html","width":130,"caption":"Scotland Street School","height":312});
															thumbnails[3320149] = clik.newPhoto({"id":3320149,"src":"St Giles thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_3320149.html","width":130,"caption":"St Giles","height":312});
															thumbnails[7809968] = clik.newPhoto({"id":7809968,"src":"Glasgow_Towers_thum_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_7809968.html","width":160,"caption":"Glasgow Towers","height":67});
															thumbnails[3320106] = clik.newPhoto({"id":3320106,"src":"GSA thum_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3320106.html","width":130,"caption":"Glasgow School of Art","height":312});
															thumbnails[3320153] = clik.newPhoto({"id":3320153,"src":"St Stephen thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_3320153.html","width":130,"caption":"St Stephen's","height":312});
															thumbnails[3588141] = clik.newPhoto({"id":3588141,"src":"Tolbooth_tall_thum_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3588141.html","width":130,"caption":"Tolbooth Tower","height":325});
															thumbnails[4811679] = clik.newPhoto({"id":4811679,"src":"Castle_blue_thum12_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_4811679.html","width":130,"caption":"Tha Castle Blue","height":312});
															thumbnails[5181558] = clik.newPhoto({"id":5181558,"src":"Telephone_thum_no_bord_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_5181558.html","width":160,"caption":"Telephone Box","height":160});
															thumbnails[3588238] = clik.newPhoto({"id":3588238,"src":"Tron_thum_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3588238.html","width":130,"caption":"Tron","height":312});
															thumbnails[4595669] = clik.newPhoto({"id":4595669,"src":"Piller_box_no_border_thum_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_4595669.html","width":160,"caption":"Post Box","height":161});
															thumbnails[3588194] = clik.newPhoto({"id":3588194,"src":"Cathedral_thum_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_3588194.html","width":130,"caption":"Glasgow Cathedral","height":312});
															thumbnails[4595641] = clik.newPhoto({"id":4595641,"src":"John_Knox_thum_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_4595641.html","width":130,"caption":"John Knox's House","height":130});
															thumbnails[7673106] = clik.newPhoto({"id":7673106,"src":"Old_pilot_thum_thumb.jpg","galleries_id":372206,"server_id":15,"link":"photo_7673106.html","width":160,"caption":"Old Pilot House","height":384});
															thumbnails[7673109] = clik.newPhoto({"id":7673109,"src":"His_Majestys_thum_thumb.jpg","galleries_id":372206,"server_id":15,"link":"photo_7673109.html","width":160,"caption":"His Majesty's","height":384});
															thumbnails[7673116] = clik.newPhoto({"id":7673116,"src":"Cadonas_thum_thumb.jpg","galleries_id":372206,"server_id":15,"link":"photo_7673116.html","width":160,"caption":"Codona's","height":384});
															thumbnails[4586788] = clik.newPhoto({"id":4586788,"src":"lighthouse_thum_squ_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_4586788.html","width":160,"caption":"The Lighthouse","height":160});
															thumbnails[5338842] = clik.newPhoto({"id":5338842,"src":"Angel_thunb_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_5338842.html","width":160,"caption":"Angel of the North","height":67});
															thumbnails[3288783] = clik.newPhoto({"id":3288783,"src":"Botanics_thum_squ_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_3288783.html","width":160,"caption":"Botanics","height":160});
															thumbnails[4586793] = clik.newPhoto({"id":4586793,"src":"Tower_red_thum_squ_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_4586793.html","width":160,"caption":"Glasgow Tower","height":160});
															thumbnails[5338922] = clik.newPhoto({"id":5338922,"src":"Baltic_thum_sma_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_5338922.html","width":160,"caption":"Baltic","height":67});
															thumbnails[3320118] = clik.newPhoto({"id":3320118,"src":"Tenament_thum_squ_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_3320118.html","width":160,"caption":"Tenement","height":160});
															thumbnails[4586854] = clik.newPhoto({"id":4586854,"src":"Vicky_thum_squ_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_4586854.html","width":160,"caption":"Vicky","height":160});
															thumbnails[5338935] = clik.newPhoto({"id":5338935,"src":"Newcastle_thumb_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_5338935.html","width":160,"caption":"Newcastle","height":67});
															thumbnails[3288785] = clik.newPhoto({"id":3288785,"src":"Castle_thum_squ_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_3288785.html","width":160,"caption":"The Castle","height":160});
															thumbnails[4586865] = clik.newPhoto({"id":4586865,"src":"BBC_Clyde_thum_sqa_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_4586865.html","width":160,"caption":"BBC","height":160});
															thumbnails[4586870] = clik.newPhoto({"id":4586870,"src":"Finnieston_thum_squ_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_4586870.html","width":160,"caption":"Finnieston Crane","height":160});
															thumbnails[3288791] = clik.newPhoto({"id":3288791,"src":"Museum thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_3288791.html","width":130,"caption":"Museum","height":179});
															thumbnails[4586932] = clik.newPhoto({"id":4586932,"src":"Glass_house_thum_squ_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_4586932.html","width":160,"caption":"Glass House","height":160});
															thumbnails[7673120] = clik.newPhoto({"id":7673120,"src":"Union_Street_thum_thumb.jpg","galleries_id":372206,"server_id":15,"link":"photo_7673120.html","width":160,"caption":"Union Street","height":384});
															thumbnails[3288788] = clik.newPhoto({"id":3288788,"src":"fettes_thum_squ_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_3288788.html","width":160,"caption":"Fettes","height":160});
															thumbnails[7673126] = clik.newPhoto({"id":7673126,"src":"Powis_Gates_thum_thumb.jpg","galleries_id":372206,"server_id":15,"link":"photo_7673126.html","width":160,"caption":"Pows Gates","height":384});
															thumbnails[7673129] = clik.newPhoto({"id":7673129,"src":"Beach_ballr_thum_thumb.jpg","galleries_id":372206,"server_id":15,"link":"photo_7673129.html","width":160,"caption":"Beach Ballroom","height":384});
															thumbnails[4811690] = clik.newPhoto({"id":4811690,"src":"ramsey_gdns1_square_thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_4811690.html","width":160,"caption":"Ramsey Garden","height":160});
															thumbnails[4811723] = clik.newPhoto({"id":4811723,"src":"Dominion_thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_4811723.html","width":160,"caption":"Dominion","height":384});
															thumbnails[7331868] = clik.newPhoto({"id":7331868,"src":"Uni_cafe_1_thum_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_7331868.html","width":160,"caption":"Uni Cafe","height":384});
															thumbnails[7809985] = clik.newPhoto({"id":7809985,"src":"Beach_thum1_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_7809985.html","width":160,"caption":"Aberdeen Beach","height":68});
															thumbnails[7534824] = clik.newPhoto({"id":7534824,"src":"Waverly_thum_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_7534824.html","width":160,"caption":"Waverley","height":384});
															thumbnails[7809987] = clik.newPhoto({"id":7809987,"src":"Marishal_thum_no_border_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_7809987.html","width":160,"caption":"Marishal College","height":67});
															thumbnails[4811730] = clik.newPhoto({"id":4811730,"src":"Canny_mans_thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_4811730.html","width":130,"caption":"Canny Mans","height":312});
															thumbnails[7809990] = clik.newPhoto({"id":7809990,"src":"College_thum1_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_7809990.html","width":160,"caption":"King's College Chapel, Aberdeen","height":67});
															thumbnails[7810748] = clik.newPhoto({"id":7810748,"src":"Red_statue_tall_thum_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_7810748.html","width":160,"caption":"Angel, Paisley Road West","height":384});
															thumbnails[4811828] = clik.newPhoto({"id":4811828,"src":"Castle_tall_thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_4811828.html","width":130,"caption":"Castle Orange","height":312});
															thumbnails[7810009] = clik.newPhoto({"id":7810009,"src":"High_Street_thum_no_border_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_7810009.html","width":160,"caption":"High Street, Old Aberdeen","height":160});
															thumbnails[7810825] = clik.newPhoto({"id":7810825,"src":"Glasgow_thum1_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_7810825.html","width":160,"caption":"Glasgow","height":67});
															thumbnails[4811903] = clik.newPhoto({"id":4811903,"src":"Scott_Monument_thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_4811903.html","width":130,"caption":"Scott Monument","height":312});
															thumbnails[7810011] = clik.newPhoto({"id":7810011,"src":"robert_G_thum1_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_7810011.html","width":160,"caption":"Robert Gordon's Aberdeen","height":160});
															thumbnails[7810829] = clik.newPhoto({"id":7810829,"src":"Blysthwood_thum1_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_7810829.html","width":160,"caption":"Blythswood Square","height":67});
															thumbnails[7810012] = clik.newPhoto({"id":7810012,"src":"Albert_Terr_thum_no_bord_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_7810012.html","width":160,"caption":"Albert Terrace, Aberdeen","height":160});
															thumbnails[7810830] = clik.newPhoto({"id":7810830,"src":"Glasgow_Towers_thum1_thumb.jpg","galleries_id":200278,"server_id":15,"link":"photo_7810830.html","width":160,"caption":"Glasgow Towers","height":67});
															thumbnails[4811915] = clik.newPhoto({"id":4811915,"src":"Obscura_orange_thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_4811915.html","width":130,"caption":"Camera Obscura","height":312});
															thumbnails[4595632] = clik.newPhoto({"id":4595632,"src":"Scott_thum_thumb.jpg","galleries_id":200472,"server_id":15,"link":"photo_4595632.html","width":130,"caption":"Scott Monument","height":130});
															thumbnails[4811925] = clik.newPhoto({"id":4811925,"src":"Jenners_Scott_Mon_thum_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_4811925.html","width":130,"caption":"Jenners & Scott Monument","height":312});
															thumbnails[7810837] = clik.newPhoto({"id":7810837,"src":"road_bridge_Ltd_thum_crop1_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_7810837.html","width":160,"caption":"Forth Road Bridge","height":65});
															thumbnails[7810844] = clik.newPhoto({"id":7810844,"src":"Bridge_Limited2_thum_crop_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_7810844.html","width":160,"caption":"Forth Rail Bridge","height":66});
															thumbnails[7810953] = clik.newPhoto({"id":7810953,"src":"Edin_Castle_thumltd1_thumb.jpg","galleries_id":200279,"server_id":15,"link":"photo_7810953.html","width":160,"caption":"Edinburgh Castle","height":67});
															thumbnails[8567694] = clik.newPhoto({"id":8567694,"src":"Kelvingrove_mug_thumb.jpg","galleries_id":452852,"server_id":15,"link":"photo_8567694.html","width":160,"caption":"Kelvingrove Mug","height":160});
															thumbnails[8569741] = clik.newPhoto({"id":8569741,"src":"Tenement_mug_thumb.jpg","galleries_id":452852,"server_id":15,"link":"photo_8569741.html","width":160,"caption":"Tenement","height":160});
															thumbnails[8569743] = clik.newPhoto({"id":8569743,"src":"T_Cone_Mug_thumb.jpg","galleries_id":452852,"server_id":15,"link":"photo_8569743.html","width":160,"caption":"Traffic Cone","height":160});
															thumbnails[8794512] = clik.newPhoto({"id":8794512,"src":"Castle_Mug_thum_thumb.jpg","galleries_id":452852,"server_id":15,"link":"photo_8794512.html","width":160,"caption":"Edinburgh Castle Mug","height":160});
															thumbnails[8794518] = clik.newPhoto({"id":8794518,"src":"F_Bridge_Mug_thum_thumb.jpg","galleries_id":452852,"server_id":15,"link":"photo_8794518.html","width":160,"caption":"Forth Rail Bridge Mug","height":160});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[200278] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Glasgow","link":"gallery_200278.html","maxRecords":0.0,"photoIDs":[3284576.0,3284607.0,3284596.0,3284600.0,3284579.0,3284583.0,3284590.0,3319682.0,3284602.0,3284597.0,3284598.0,3284588.0,3319972.0,3319990.0,3320006.0,3319926.0,3320032.0,3320046.0,3320091.0,3320101.0,3320106.0,3588141.0,3588238.0,3588194.0,4586788.0,4586793.0,4586854.0,4586865.0,4586870.0,4586932.0,7331868.0,7534824.0,7810748.0,7810825.0,7810829.0,7810830.0],"skipIndex":0,"section_code":"gallery","featured_images":3284576.0,"id":200278,"singleSection":false});				  						galleries[452852] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Mugs","link":"section546933.html","maxRecords":0.0,"photoIDs":[8567694.0,8569741.0,8569743.0,8794512.0,8794518.0],"skipIndex":0,"section_code":"section546933","featured_images":"8794518,8794512,8569743,8569741,8567694","id":452852,"singleSection":true});				  						galleries[200279] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Edinburgh","link":"gallery_200279.html","maxRecords":0.0,"photoIDs":[3320122.0,3320123.0,3320124.0,3320135.0,3320143.0,3320147.0,3320149.0,3320153.0,4811679.0,3288783.0,3320118.0,3288785.0,3288791.0,3288788.0,4811690.0,4811723.0,4811730.0,4811828.0,4811903.0,4811915.0,4811925.0,7810837.0,7810844.0,7810953.0],"skipIndex":0,"section_code":"gallery","featured_images":3288783.0,"id":200279,"singleSection":false});				  						galleries[200472] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Limited Edition Prints","link":"gallery_200472.html","maxRecords":0.0,"photoIDs":[5618345.0,5618389.0,5618397.0,3305960.0,3305962.0,7809962.0,3305958.0,3305955.0,7677134.0,7809966.0,7809967.0,7809968.0,5181558.0,4595669.0,4595641.0,5338842.0,5338922.0,5338935.0,7809985.0,7809987.0,7809990.0,7810009.0,7810011.0,7810012.0,4595632.0],"skipIndex":0,"section_code":"gallery","featured_images":7677134.0,"id":200472,"singleSection":false});				  						galleries[318492] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Tunnock's & Irn Bru","link":"gallery_318492.html","maxRecords":0.0,"photoIDs":[5757911.0,5757917.0,5757928.0],"skipIndex":0,"section_code":"gallery","featured_images":5757911.0,"id":318492,"singleSection":false});				  						galleries[330974] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Perth & Stirling","link":"gallery_330974.html","maxRecords":0.0,"photoIDs":[5850957.0,5851050.0,5851092.0,5851104.0,5851120.0,7852993.0,5851235.0,6856410.0,6856415.0,6856417.0],"skipIndex":0,"section_code":"gallery","featured_images":5851050.0,"id":330974,"singleSection":false});				  						galleries[372206] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Aberdeen","link":"gallery_372206.html","maxRecords":0.0,"photoIDs":[7673065.0,7673070.0,7673072.0,7673079.0,7673090.0,7673086.0,7673106.0,7673109.0,7673116.0,7673120.0,7673126.0,7673129.0],"skipIndex":0,"section_code":"gallery","featured_images":7673090.0,"id":372206,"singleSection":false});				  						galleries[372207] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Urban","link":"gallery_372207.html","maxRecords":0.0,"photoIDs":[6856464.0,6856450.0,6856421.0,6856476.0,7817016.0,6856480.0],"skipIndex":0,"section_code":"gallery","featured_images":6856421.0,"id":372207,"singleSection":false});				  						galleries[408757] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Country","link":"gallery_408757.html","maxRecords":0.0,"photoIDs":[7539792.0,7539795.0],"skipIndex":0,"section_code":"gallery","featured_images":7539792.0,"id":408757,"singleSection":false});				  						galleries[455353] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"NEW","link":"gallery_455353.html","maxRecords":0.0,"photoIDs":[8613780.0,8703504.0,8703574.0,8702575.0],"skipIndex":0,"section_code":"gallery","featured_images":"8703574,8703504,8702575,8613780","id":455353,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9061106';
imageSets[2] = '5757911,3284576,7539792,5851050,6856421,7677134,7673090,3288783';
imageSets[3] = '6856464,6856450,6856421,6856476,6856480,6856410,6856415,6856417,5181558,4811679,4595669,4595641,4586788,4586793,4586865,4586870,4586932,4811690,4811723,4811730,4811828,4811903,4811915,4811925,4595632';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/peggy_610/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/peggy_610/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'STEPHEN O\'NEIL digital art: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="PEGGY_610">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

