window.thumbnails = new Object();
												thumbnails[7856098] = new thumbnail(7856098,'','','_DSC0003_thumb.jpg',130, 87,18,'#');
												thumbnails[7856103] = new thumbnail(7856103,'','','_DSC0020_thumb.jpg',130, 87,18,'#');
												thumbnails[7299891] = new thumbnail(7299891,'',' DSC0317','_DSC0317_8FDE49DB-1E4F-37DC-7182F9EA8F2557A8_thumb.jpg',130, 196,18,'#');
												thumbnails[7299892] = new thumbnail(7299892,'',' DSC0343','_DSC0343_8FDE4A29-1E4F-37DC-718A6716AB47645A_thumb.jpg',130, 196,18,'#');
												thumbnails[5921202] = new thumbnail(5921202,'334173','','Claire_thumb.jpg',130, 195,18,'photo_5921202.html');
												thumbnails[5921203] = new thumbnail(5921203,'334173','','claire-2_thumb.jpg',130, 95,18,'photo_5921203.html');
												thumbnails[5921244] = new thumbnail(5921244,'334173','','claire-5_thumb.jpg',130, 195,18,'photo_5921244.html');
												thumbnails[5921247] = new thumbnail(5921247,'334173','','claire-6_thumb.jpg',130, 195,18,'photo_5921247.html');
												thumbnails[5921248] = new thumbnail(5921248,'334173','','claire-8_thumb.jpg',130, 195,18,'photo_5921248.html');
												thumbnails[5921250] = new thumbnail(5921250,'282855','','cathedral_thumb.jpg',130, 206,18,'photo_5921250.html');
												thumbnails[5921251] = new thumbnail(5921251,'282855','','cathedral-2_thumb.jpg',130, 195,18,'photo_5921251.html');
												thumbnails[5921253] = new thumbnail(5921253,'282855','','cloisters_thumb.jpg',130, 197,18,'photo_5921253.html');
												thumbnails[5921261] = new thumbnail(5921261,'282064','','keith_thumb.jpg',130, 195,18,'photo_5921261.html');
												thumbnails[5921306] = new thumbnail(5921306,'282064','','sad-boy_thumb.jpg',130, 195,18,'photo_5921306.html');
												thumbnails[6277885] = new thumbnail(6277885,'348757','','DSC_0023_thumb.jpg',130, 195,18,'photo_6277885.html');
												thumbnails[6277890] = new thumbnail(6277890,'348757','','DSC_0031_thumb.jpg',130, 195,18,'photo_6277890.html');
												thumbnails[6277892] = new thumbnail(6277892,'348757','','DSC_0042_thumb.jpg',130, 86,18,'photo_6277892.html');
												thumbnails[6277893] = new thumbnail(6277893,'348757','','DSC_0048_thumb.jpg',130, 86,18,'photo_6277893.html');
												thumbnails[6277895] = new thumbnail(6277895,'348757','','DSC_0072_thumb.jpg',130, 86,18,'photo_6277895.html');
												thumbnails[6277898] = new thumbnail(6277898,'348761','','DSC_0073_thumb.jpg',130, 86,18,'photo_6277898.html');
												thumbnails[6280134] = new thumbnail(6280134,'348761','','DSC_0077_thumb.jpg',130, 195,18,'photo_6280134.html');
												thumbnails[6280137] = new thumbnail(6280137,'348809','','DSC_0080_thumb.jpg',130, 86,18,'photo_6280137.html');
												thumbnails[6280140] = new thumbnail(6280140,'348809','','DSC_0086_thumb.jpg',130, 86,18,'photo_6280140.html');
												thumbnails[6280347] = new thumbnail(6280347,'348809','','DSC_0091_thumb.jpg',130, 86,18,'photo_6280347.html');
												thumbnails[6280349] = new thumbnail(6280349,'348809','','DSC_0106_thumb.jpg',130, 86,18,'photo_6280349.html');
												thumbnails[6280370] = new thumbnail(6280370,'348809','','DSC_0110_thumb.jpg',130, 86,18,'photo_6280370.html');
												thumbnails[6280381] = new thumbnail(6280381,'348806','','DSC_0167_thumb.jpg',130, 195,18,'photo_6280381.html');
												thumbnails[6280388] = new thumbnail(6280388,'348806','','DSC_0168_thumb.jpg',130, 86,18,'photo_6280388.html');
												thumbnails[6280394] = new thumbnail(6280394,'348806','','DSC_0169_thumb.jpg',130, 86,18,'photo_6280394.html');
												thumbnails[6280396] = new thumbnail(6280396,'348806','','DSC_0171_thumb.jpg',130, 86,18,'photo_6280396.html');
												thumbnails[7856099] = new thumbnail(7856099,'424003','','_DSC00031_thumb.jpg',130, 87,18,'photo_7856099.html');
												thumbnails[7856100] = new thumbnail(7856100,'424003','','_DSC0008_thumb.jpg',130, 117,18,'photo_7856100.html');
												thumbnails[7856101] = new thumbnail(7856101,'424003','','_DSC0010_thumb.jpg',130, 87,18,'photo_7856101.html');
												thumbnails[7856102] = new thumbnail(7856102,'424003','','_DSC0016_thumb.jpg',130, 194,18,'photo_7856102.html');
												thumbnails[7856105] = new thumbnail(7856105,'424003','','_DSC00201_thumb.jpg',130, 87,18,'photo_7856105.html');
												thumbnails[7856107] = new thumbnail(7856107,'424003','','DSC_0029_thumb.jpg',130, 194,18,'photo_7856107.html');
												thumbnails[7856110] = new thumbnail(7856110,'424003','','DSC_0151_thumb.jpg',130, 184,18,'photo_7856110.html');
												thumbnails[7856111] = new thumbnail(7856111,'424003','','DSC_0215_thumb.jpg',130, 108,18,'photo_7856111.html');
												thumbnails[7856112] = new thumbnail(7856112,'424003','','DSC_0227_thumb.jpg',130, 89,18,'photo_7856112.html');
												thumbnails[7856113] = new thumbnail(7856113,'424003','','DSC_0236_thumb.jpg',130, 194,18,'photo_7856113.html');
												thumbnails[7856117] = new thumbnail(7856117,'424003','','DSC_0237_thumb.jpg',130, 87,18,'photo_7856117.html');
												thumbnails[8139188] = new thumbnail(8139188,'348823','','_DSC0287_thumb.jpg',130, 86,18,'photo_8139188.html');
												thumbnails[8139189] = new thumbnail(8139189,'348823','','_DSC0292_thumb.jpg',130, 86,18,'photo_8139189.html');
												thumbnails[8139190] = new thumbnail(8139190,'348823','','DSC_0158_thumb.jpg',130, 86,18,'photo_8139190.html');
												thumbnails[8139192] = new thumbnail(8139192,'348823','','red-leaves1_thumb.jpg',130, 87,18,'photo_8139192.html');
												thumbnails[8149777] = new thumbnail(8149777,'348823','','_DSC0023_thumb.jpg',130, 86,18,'photo_8149777.html');
												thumbnails[8149782] = new thumbnail(8149782,'348823','','_DSC0025_thumb.jpg',130, 86,18,'photo_8149782.html');
												thumbnails[8149785] = new thumbnail(8149785,'348823','','_DSC0031_thumb.jpg',130, 86,18,'photo_8149785.html');
												thumbnails[8149789] = new thumbnail(8149789,'348823','','_DSC0034_thumb.jpg',130, 86,18,'photo_8149789.html');
												thumbnails[8149795] = new thumbnail(8149795,'348823','','_DSC0035_thumb.jpg',130, 86,18,'photo_8149795.html');
												thumbnails[8149801] = new thumbnail(8149801,'348823','','_DSC0038_thumb.jpg',130, 86,18,'photo_8149801.html');
												thumbnails[8149805] = new thumbnail(8149805,'348823','','_DSC0040_thumb.jpg',130, 86,18,'photo_8149805.html');
												thumbnails[8149828] = new thumbnail(8149828,'348823','','_DSC0049_thumb.jpg',130, 86,18,'photo_8149828.html');
												thumbnails[8149870] = new thumbnail(8149870,'348823','','_DSC0051_thumb.jpg',130, 86,18,'photo_8149870.html');
												thumbnails[8149892] = new thumbnail(8149892,'348823','','_DSC0055_thumb.jpg',130, 95,18,'photo_8149892.html');
												thumbnails[8149898] = new thumbnail(8149898,'348823','','_DSC0056_thumb.jpg',130, 86,18,'photo_8149898.html');
												thumbnails[8149904] = new thumbnail(8149904,'348823','','_DSC0057_thumb.jpg',130, 86,18,'photo_8149904.html');
												thumbnails[8149907] = new thumbnail(8149907,'348823','','_DSC0286_thumb.jpg',130, 86,18,'photo_8149907.html');
												thumbnails[8149937] = new thumbnail(8149937,'348823','','_DSC0287_342F723C-1EC9-D45B-1CBF24BBABBFD0F4_thumb.jpg',130, 86,18,'photo_8149937.html');
												thumbnails[8150642] = new thumbnail(8150642,'435667','','_DSC0416_thumb.jpg',130, 86,18,'photo_8150642.html');
												thumbnails[8150645] = new thumbnail(8150645,'435667','','_DSC0417_thumb.jpg',130, 86,18,'photo_8150645.html');
												thumbnails[8150690] = new thumbnail(8150690,'435667','','_DSC0418_thumb.jpg',130, 86,18,'photo_8150690.html');
												thumbnails[8150706] = new thumbnail(8150706,'435667','','_DSC0424_thumb.jpg',130, 86,18,'photo_8150706.html');
												thumbnails[8150715] = new thumbnail(8150715,'435667','','_DSC0425_thumb.jpg',130, 86,18,'photo_8150715.html');
												thumbnails[8150718] = new thumbnail(8150718,'435667','','_DSC0426_thumb.jpg',130, 86,18,'photo_8150718.html');
												thumbnails[8150722] = new thumbnail(8150722,'282861','','_DSC0294_thumb.jpg',130, 95,18,'photo_8150722.html');
												thumbnails[8150724] = new thumbnail(8150724,'282861','','_DSC0304_thumb.jpg',130, 240,18,'photo_8150724.html');
												thumbnails[8150725] = new thumbnail(8150725,'282861','','_DSC0414_thumb.jpg',130, 86,18,'photo_8150725.html');
												thumbnails[8154471] = new thumbnail(8154471,'435834','','_DSC00351_thumb.jpg',130, 195,18,'photo_8154471.html');
												thumbnails[8154481] = new thumbnail(8154481,'435834','','_DSC00511_thumb.jpg',130, 195,18,'photo_8154481.html');
												thumbnails[8154487] = new thumbnail(8154487,'435834','','_DSC0052_thumb.jpg',130, 195,18,'photo_8154487.html');
												thumbnails[8154574] = new thumbnail(8154574,'435834','','_DSC0069_thumb.jpg',130, 195,18,'photo_8154574.html');
												thumbnails[8154581] = new thumbnail(8154581,'435834','','_DSC0094_thumb.jpg',130, 195,18,'photo_8154581.html');
												thumbnails[8154617] = new thumbnail(8154617,'435834','','_DSC0126_thumb.jpg',130, 195,18,'photo_8154617.html');
												thumbnails[8154621] = new thumbnail(8154621,'435834','','_DSC0076_thumb.jpg',130, 86,18,'photo_8154621.html');
												thumbnails[8154623] = new thumbnail(8154623,'435834','','_DSC0098_thumb.jpg',130, 183,18,'photo_8154623.html');
												thumbnails[8154629] = new thumbnail(8154629,'435834','','_DSC0105_thumb.jpg',130, 86,18,'photo_8154629.html');
												thumbnails[8154673] = new thumbnail(8154673,'435834','','_DSC0082_thumb.jpg',130, 183,18,'photo_8154673.html');
												thumbnails[8154727] = new thumbnail(8154727,'435834','','_DSC0139_thumb.jpg',130, 195,18,'photo_8154727.html');
												thumbnails[8154735] = new thumbnail(8154735,'435834','','_DSC0123_thumb.jpg',130, 195,18,'photo_8154735.html');
												thumbnails[4958436] = new thumbnail(4958436,'281943','lisa car 2','lisacar-2_thumb.jpg',130, 87,18,'photo_4958436.html');
												thumbnails[4958899] = new thumbnail(4958899,'281942','Couple 1','black-1_thumb.jpg',130, 86,18,'photo_4958899.html');
												thumbnails[4958910] = new thumbnail(4958910,'281946','Kiri 1','DSC0-074_thumb.jpg',130, 196,18,'photo_4958910.html');
												thumbnails[4958913] = new thumbnail(4958913,'281945','Fabi 1','DSC0-200_thumb.jpg',130, 196,18,'photo_4958913.html');
												thumbnails[4977470] = new thumbnail(4977470,'281944','together','cd-cov_thumb.jpg',130, 208,18,'photo_4977470.html');
												thumbnails[4978017] = new thumbnail(4978017,'282855','two sailing boats','twosailing-boats_thumb.jpg',130, 196,18,'photo_4978017.html');
												thumbnails[4978506] = new thumbnail(4978506,'282860','Brown Stingray','DSC0-015_thumb.jpg',130, 86,18,'photo_4978506.html');
												thumbnails[4978930] = new thumbnail(4978930,'282860','Yellow Tang','DSC0-207_thumb.jpg',130, 86,18,'photo_4978930.html');
												thumbnails[5370185] = new thumbnail(5370185,'282861','horses','horsebwwebready_2EA7BAFA-1D09-001F-995A3DFA87742CE9_thumb.jpg',130, 195,18,'photo_5370185.html');
												thumbnails[5370218] = new thumbnail(5370218,'282861','hamster','hammywebready_2EAD076C-1D09-001F-99B6CE85A6057218_thumb.jpg',130, 195,18,'photo_5370218.html');
												thumbnails[5370246] = new thumbnail(5370246,'302653','Vocal Booth mic','micweb_2EB2C2C4-1D09-001F-99CF050FEFCDC85F_thumb.jpg',130, 194,18,'photo_5370246.html');
												thumbnails[5673343] = new thumbnail(5673343,'282064','Ian 2','ian-blackchair_7DC9435E-1EC9-D45B-1C6263766E02454A_thumb.jpg',130, 216,18,'photo_5673343.html');
												thumbnails[7299884] = new thumbnail(7299884,'394909','Jo and Family','_DSC0255_thumb.jpg',130, 196,18,'photo_7299884.html');
												thumbnails[4958428] = new thumbnail(4958428,'281943','lisa 1','lisa-1_thumb.jpg',130, 195,18,'photo_4958428.html');
												thumbnails[4958900] = new thumbnail(4958900,'281942','Couple 2','black-2_thumb.jpg',130, 196,18,'photo_4958900.html');
												thumbnails[4958909] = new thumbnail(4958909,'281946','Kiri 2','DSC0-069_thumb.jpg',130, 196,18,'photo_4958909.html');
												thumbnails[4958914] = new thumbnail(4958914,'281945','Fabi 2','DSC0-215_thumb.jpg',130, 196,18,'photo_4958914.html');
												thumbnails[4958918] = new thumbnail(4958918,'282064','Ian 1','ian-brown-one_thumb.jpg',130, 196,18,'photo_4958918.html');
												thumbnails[4977471] = new thumbnail(4977471,'281944','waiting','DSC-0011_thumb.jpg',130, 86,18,'photo_4977471.html');
												thumbnails[4978016] = new thumbnail(4978016,'282855','turning boat','turning-boat_thumb.jpg',130, 196,18,'photo_4978016.html');
												thumbnails[4978507] = new thumbnail(4978507,'282860','Poison Dart Tree Frogs','DSC0-016_8D624AAB-1D09-001F-991C5DD15CFAF708_thumb.jpg',130, 86,18,'photo_4978507.html');
												thumbnails[5370219] = new thumbnail(5370219,'282861','owl','owlwebready_2EAD0960-1D09-001F-99D965521FE57382_thumb.jpg',130, 195,18,'photo_5370219.html');
												thumbnails[5370244] = new thumbnail(5370244,'302653','Vocal Booth drums','drumsready_2EB2BEFC-1D09-001F-992AE946D0212149_thumb.jpg',130, 87,18,'photo_5370244.html');
												thumbnails[7299885] = new thumbnail(7299885,'394909','Jo and Family 2','_DSC0303_thumb.jpg',130, 196,18,'photo_7299885.html');
												thumbnails[4958429] = new thumbnail(4958429,'281943','lisa 2','lisa-2_thumb.jpg',130, 87,18,'photo_4958429.html');
												thumbnails[4958901] = new thumbnail(4958901,'281942','Couple 3','black1-1_thumb.jpg',130, 196,18,'photo_4958901.html');
												thumbnails[4958908] = new thumbnail(4958908,'281946','Kiri 3','DSC0-063_thumb.jpg',130, 232,18,'photo_4958908.html');
												thumbnails[4958915] = new thumbnail(4958915,'281945','Fabi 3','DSC0-233_thumb.jpg',130, 196,18,'photo_4958915.html');
												thumbnails[4958922] = new thumbnail(4958922,'282064','Kim 2','white2-1_thumb.jpg',130, 204,18,'photo_4958922.html');
												thumbnails[4977472] = new thumbnail(4977472,'281944','pageboy','DSC-0055_thumb.jpg',130, 196,18,'photo_4977472.html');
												thumbnails[4978011] = new thumbnail(4978011,'282855','sunset','sun-set_thumb.jpg',130, 86,18,'photo_4978011.html');
												thumbnails[4978508] = new thumbnail(4978508,'282860','DSC0-023','DSC0-023_thumb.jpg',130, 86,18,'photo_4978508.html');
												thumbnails[5370217] = new thumbnail(5370217,'282861','ferret','ferretwebready_2EAD0539-1D09-001F-99B8806944A5E3FC_thumb.jpg',130, 195,18,'photo_5370217.html');
												thumbnails[5370245] = new thumbnail(5370245,'302653','Vocal Booth','ianmic1web_2EB2C0E0-1D09-001F-99941295F3D98EA1_thumb.jpg',130, 194,18,'photo_5370245.html');
												thumbnails[7299886] = new thumbnail(7299886,'394909','Jo and Family 3','_DSC0317_thumb.jpg',130, 196,18,'photo_7299886.html');
												thumbnails[4958421] = new thumbnail(4958421,'281943','john 1','john-1_thumb.jpg',130, 195,18,'photo_4958421.html');
												thumbnails[4958897] = new thumbnail(4958897,'281942','Couple 4','abbey-1_thumb.jpg',130, 246,18,'photo_4958897.html');
												thumbnails[4958902] = new thumbnail(4958902,'282064','Kim 1','black2-1_thumb.jpg',130, 196,18,'photo_4958902.html');
												thumbnails[4958907] = new thumbnail(4958907,'281946','Kiri 4','DSC0-058_thumb.jpg',130, 196,18,'photo_4958907.html');
												thumbnails[4958916] = new thumbnail(4958916,'281945','Fabi 4','DSC0-234_thumb.jpg',130, 196,18,'photo_4958916.html');
												thumbnails[4977473] = new thumbnail(4977473,'281944','registar signing','DSC-0068_thumb.jpg',130, 86,18,'photo_4977473.html');
												thumbnails[4978010] = new thumbnail(4978010,'282855','reeds','reeds-1_thumb.jpg',130, 87,18,'photo_4978010.html');
												thumbnails[4978509] = new thumbnail(4978509,'282860','Brown Camo Shrimp','DSC0-071_thumb.jpg',130, 86,18,'photo_4978509.html');
												thumbnails[5370220] = new thumbnail(5370220,'282861','small owl','smallowlwebready_2EAD0B44-1D09-001F-99569D7646A96329_thumb.jpg',130, 195,18,'photo_5370220.html');
												thumbnails[5370247] = new thumbnail(5370247,'302653','Vocal Booth mixer','mixerweb_2EB2C4A9-1D09-001F-99C165A39F028FB1_thumb.jpg',130, 87,18,'photo_5370247.html');
												thumbnails[7299887] = new thumbnail(7299887,'394909','Jo and Family 4','_DSC0329_thumb.jpg',130, 196,18,'photo_7299887.html');
												thumbnails[4958422] = new thumbnail(4958422,'281943','john and bestman','johnand-bestman_thumb.jpg',130, 195,18,'photo_4958422.html');
												thumbnails[4958898] = new thumbnail(4958898,'281942','Couple 5','abbey-2_thumb.jpg',130, 86,18,'photo_4958898.html');
												thumbnails[4958906] = new thumbnail(4958906,'281946','Kiri 5','DSC0-056_thumb.jpg',130, 215,18,'photo_4958906.html');
												thumbnails[4958917] = new thumbnail(4958917,'281945','Fabi 5','DSC0-235_thumb.jpg',130, 196,18,'photo_4958917.html');
												thumbnails[4977474] = new thumbnail(4977474,'281944','ceremony','DSC-0069_thumb.jpg',130, 35,18,'photo_4977474.html');
												thumbnails[4978087] = new thumbnail(4978087,'282855','pond leaves','pond-leaves_8D360134-1D09-001F-99565B7DF533743E_thumb.jpg',130, 86,18,'photo_4978087.html');
												thumbnails[4978510] = new thumbnail(4978510,'282860','Hermit Crab','DSC0-147_thumb.jpg',130, 86,18,'photo_4978510.html');
												thumbnails[5673344] = new thumbnail(5673344,'282064','Keith and James','keith-and-james-1_thumb.jpg',130, 85,18,'photo_5673344.html');
												thumbnails[7299888] = new thumbnail(7299888,'394909','Jo and Family 5','_DSC0343_thumb.jpg',130, 196,18,'photo_7299888.html');
												thumbnails[4958441] = new thumbnail(4958441,'281943','walkto the church','walk-to-the-church_thumb.jpg',130, 195,18,'photo_4958441.html');
												thumbnails[4958912] = new thumbnail(4958912,'281945','Fabi 6','DSC0-188_thumb.jpg',130, 86,18,'photo_4958912.html');
												thumbnails[4958919] = new thumbnail(4958919,'281942','Couple 6','umbrella1-1_thumb.jpg',130, 196,18,'photo_4958919.html');
												thumbnails[4977475] = new thumbnail(4977475,'281944','Bev','DSC-0072_thumb.jpg',130, 196,18,'photo_4977475.html');
												thumbnails[4978008] = new thumbnail(4978008,'282855','boat','pudsey-boat_thumb.jpg',130, 86,18,'photo_4978008.html');
												thumbnails[4978511] = new thumbnail(4978511,'282860','Yellowbox Fish','DSC0-153_thumb.jpg',130, 86,18,'photo_4978511.html');
												thumbnails[5673346] = new thumbnail(5673346,'282064','Keith 2','keith-handstand_7DC94794-1EC9-D45B-1C6737CC9B3F3097_thumb.jpg',130, 300,18,'photo_5673346.html');
												thumbnails[4958440] = new thumbnail(4958440,'281943','sorting out the dress','sorting-out-the-dress_7D96E73F-1D09-001F-99AFBE39BE706A66_thumb.jpg',130, 195,18,'photo_4958440.html');
												thumbnails[4958911] = new thumbnail(4958911,'281945','Fabi 7','DSC0-075_thumb.jpg',130, 196,18,'photo_4958911.html');
												thumbnails[4958920] = new thumbnail(4958920,'281942','Couple 7','umbrella2-1_thumb.jpg',130, 205,18,'photo_4958920.html');
												thumbnails[4977476] = new thumbnail(4977476,'281944','congratulations','DSC-0096_thumb.jpg',130, 212,18,'photo_4977476.html');
												thumbnails[4978088] = new thumbnail(4978088,'282855','red leaves','red-leaves2_8D36028C-1D09-001F-9946238C86C84A99_thumb.jpg',130, 87,18,'photo_4978088.html');
												thumbnails[4978512] = new thumbnail(4978512,'282860','Clown Fish','DSC0-166_thumb.jpg',130, 86,18,'photo_4978512.html');
												thumbnails[5673347] = new thumbnail(5673347,'282064','Keith 3','polarized-keith_7DC948EC-1EC9-D45B-1C2D804A59CE2F5D_thumb.jpg',130, 196,18,'photo_5673347.html');
												thumbnails[4958420] = new thumbnail(4958420,'281943','going into the church','goinginto-the-church_thumb.jpg',130, 195,18,'photo_4958420.html');
												thumbnails[4958905] = new thumbnail(4958905,'281945','Fabi 8','DSC0-048_thumb.jpg',130, 196,18,'photo_4958905.html');
												thumbnails[4958921] = new thumbnail(4958921,'281942','Couple 8','white-2_thumb.jpg',130, 217,18,'photo_4958921.html');
												thumbnails[4977478] = new thumbnail(4977478,'281944','confetti','DSC-0100_thumb.jpg',130, 230,18,'photo_4977478.html');
												thumbnails[4978006] = new thumbnail(4978006,'282841','wales 1','DSC0-230_thumb.jpg',130, 86,18,'photo_4978006.html');
												thumbnails[4978513] = new thumbnail(4978513,'282860','Powderblue SergeonFish','DSC0-184_thumb.jpg',130, 196,18,'photo_4978513.html');
												thumbnails[5673345] = new thumbnail(5673345,'282064','Keith 1','keith-grass_thumb.jpg',130, 86,18,'photo_5673345.html');
												thumbnails[4958439] = new thumbnail(4958439,'281943','register signing','register-signing1_thumb.jpg',130, 87,18,'photo_4958439.html');
												thumbnails[4958904] = new thumbnail(4958904,'281945','Fabi 9','DSC0-047_thumb.jpg',130, 196,18,'photo_4958904.html');
												thumbnails[4977479] = new thumbnail(4977479,'281944','bride and groom','DSC-0114_thumb.jpg',130, 196,18,'photo_4977479.html');
												thumbnails[4978005] = new thumbnail(4978005,'282841','wales 2','DSC0-214_thumb.jpg',130, 86,18,'photo_4978005.html');
												thumbnails[4978514] = new thumbnail(4978514,'282860','Purple Urchin','DSC0-185_thumb.jpg',130, 86,18,'photo_4978514.html');
												thumbnails[4958437] = new thumbnail(4958437,'281943','lisa john b/w','lisajohn-black-and-white_thumb.jpg',130, 195,18,'photo_4958437.html');
												thumbnails[4958903] = new thumbnail(4958903,'281945','Fabi 10','DSC0-045_thumb.jpg',130, 196,18,'photo_4958903.html');
												thumbnails[4977480] = new thumbnail(4977480,'281944','bride and groom 2','DSC-0117_thumb.jpg',130, 184,18,'photo_4977480.html');
												thumbnails[4978004] = new thumbnail(4978004,'282855','Hamble 1','DSC0-141_thumb.jpg',130, 195,18,'photo_4978004.html');
												thumbnails[4958426] = new thumbnail(4958426,'281943','john and lisa 4','johnandlisa-4_thumb.jpg',130, 195,18,'photo_4958426.html');
												thumbnails[4977481] = new thumbnail(4977481,'281944','everyone 1','DSC-0132_thumb.jpg',130, 80,18,'photo_4977481.html');
												thumbnails[4978003] = new thumbnail(4978003,'282855','Hamble 2','DSC0-132_thumb.jpg',130, 195,18,'photo_4978003.html');
												thumbnails[4978516] = new thumbnail(4978516,'282860','Frog 1','DSC0-216_thumb.jpg',130, 86,18,'photo_4978516.html');
												thumbnails[4958427] = new thumbnail(4958427,'281943','john and lisa flowers','johnandlisa-flowers_thumb.jpg',130, 144,18,'photo_4958427.html');
												thumbnails[4977483] = new thumbnail(4977483,'281944','everyone 2','DSC-0134_thumb.jpg',130, 86,18,'photo_4977483.html');
												thumbnails[4977991] = new thumbnail(4977991,'282855','Salisbury 1','DSC0-069_8D24BA99-1D09-001F-9986A5B7A3F1F27E_thumb.jpg',130, 86,18,'photo_4977991.html');
												thumbnails[4978517] = new thumbnail(4978517,'282860','Fish ','DSC0-223_8D625692-1D09-001F-99E12C07C2F33634_thumb.jpg',130, 86,18,'photo_4978517.html');
												thumbnails[4958423] = new thumbnail(4958423,'281943','john and lisa 1','johnandlisa-1_thumb.jpg',130, 195,18,'photo_4958423.html');
												thumbnails[4977484] = new thumbnail(4977484,'281944','the men','DSC-0144_thumb.jpg',130, 77,18,'photo_4977484.html');
												thumbnails[4977990] = new thumbnail(4977990,'282855','Salisbury 2','DSC0-044_thumb.jpg',130, 86,18,'photo_4977990.html');
												thumbnails[4978518] = new thumbnail(4978518,'282860','Snapping Turtle','DSC0-236_thumb.jpg',130, 86,18,'photo_4978518.html');
												thumbnails[4958424] = new thumbnail(4958424,'281943','john and lisa 2','johnandlisa-2_thumb.jpg',130, 234,18,'photo_4958424.html');
												thumbnails[4977485] = new thumbnail(4977485,'281944','father and daughter','DSC-0148_thumb.jpg',130, 168,18,'photo_4977485.html');
												thumbnails[4977988] = new thumbnail(4977988,'282855','Salisbury 3','DSC0-037_thumb.jpg',130, 86,18,'photo_4977988.html');
												thumbnails[4978519] = new thumbnail(4978519,'282860','Frog 2','DSC0-240_thumb.jpg',130, 196,18,'photo_4978519.html');
												thumbnails[4958431] = new thumbnail(4958431,'281943','lisa flowers','lisa-flowers_thumb.jpg',130, 87,18,'photo_4958431.html');
												thumbnails[4977486] = new thumbnail(4977486,'281944','the cake','DSC-0161_thumb.jpg',130, 196,18,'photo_4977486.html');
												thumbnails[4977987] = new thumbnail(4977987,'282855','St Bennetts Abbey','DSC0-016_thumb.jpg',130, 86,18,'photo_4977987.html');
												thumbnails[4978520] = new thumbnail(4978520,'282861','Iguana','DSC0-247_thumb.jpg',130, 86,18,'photo_4978520.html');
												thumbnails[4958432] = new thumbnail(4958432,'281943','lisa john and bridemaids','lisa-johnandbridemaids_thumb.jpg',130, 87,18,'photo_4958432.html');
												thumbnails[4977487] = new thumbnail(4977487,'281944','balloons','DSC-0162_thumb.jpg',130, 196,18,'photo_4977487.html');
												thumbnails[4978015] = new thumbnail(4978015,'282855','sunset-4','sunset-4_thumb.jpg',130, 87,18,'photo_4978015.html');
												thumbnails[4978522] = new thumbnail(4978522,'282861','Black Tegu Lizard','DSC0-266_thumb.jpg',130, 86,18,'photo_4978522.html');
												thumbnails[4958433] = new thumbnail(4958433,'281943','lisa john and parents','lisa-johnmumanddad_thumb.jpg',130, 201,18,'photo_4958433.html');
												thumbnails[4977489] = new thumbnail(4977489,'281944','bouquet','DSC-0174_thumb.jpg',130, 196,18,'photo_4977489.html');
												thumbnails[4978014] = new thumbnail(4978014,'282855','sunset-3','sunset-3_thumb.jpg',130, 198,18,'photo_4978014.html');
												thumbnails[4978523] = new thumbnail(4978523,'282860','Unknown Species','DSC0-292_thumb.jpg',130, 86,18,'photo_4978523.html');
												thumbnails[4958434] = new thumbnail(4958434,'281943','lisa john and ushers','lisa-ushers_thumb.jpg',130, 87,18,'photo_4958434.html');
												thumbnails[4977490] = new thumbnail(4977490,'281944','father and bride','DSC-0184_thumb.jpg',130, 213,18,'photo_4977490.html');
												thumbnails[4978013] = new thumbnail(4978013,'282855','sunset-2','sunset-2_thumb.jpg',130, 194,18,'photo_4978013.html');
												thumbnails[4978524] = new thumbnail(4978524,'282860','Sea Bass','DSC0-296_8D626084-1D09-001F-994466876858B13D_thumb.jpg',130, 97,18,'photo_4978524.html');
												thumbnails[4958435] = new thumbnail(4958435,'281943','lisa and bridesmaids','lisaand-bridesmaids_thumb.jpg',130, 87,18,'photo_4958435.html');
												thumbnails[4977491] = new thumbnail(4977491,'281944','family','DSC-0199_thumb.jpg',130, 179,18,'photo_4977491.html');
												thumbnails[4978012] = new thumbnail(4978012,'282855','sunset-1','sunset-1_thumb.jpg',130, 87,18,'photo_4978012.html');
												thumbnails[4978525] = new thumbnail(4978525,'282860','fish 2','DSC0-306_thumb.jpg',130, 86,18,'photo_4978525.html');
												thumbnails[4958438] = new thumbnail(4958438,'281943','mum dad bridemaids','mum-dadbridemaids_thumb.jpg',130, 89,18,'photo_4958438.html');
												thumbnails[4977492] = new thumbnail(4977492,'281944','first dance','DSC-0224_thumb.jpg',130, 196,18,'photo_4977492.html');
												thumbnails[4978002] = new thumbnail(4978002,'282843','Moors Valley Country Park 1','DSC0-109_thumb.jpg',130, 195,18,'photo_4978002.html');
												thumbnails[4958425] = new thumbnail(4958425,'281943','john and lisa 3','johnandlisa-3_thumb.jpg',130, 87,18,'photo_4958425.html');
												thumbnails[4977494] = new thumbnail(4977494,'281944','cutting the cake','DSC-0239-1_thumb.jpg',130, 196,18,'photo_4977494.html');
												thumbnails[4978001] = new thumbnail(4978001,'282843','Moors Valley Country Park 2','DSC0-105_thumb.jpg',130, 86,18,'photo_4978001.html');
												thumbnails[4958419] = new thumbnail(4958419,'281943','everyone 2','everyone-2_thumb.jpg',130, 69,18,'photo_4958419.html');
												thumbnails[4977495] = new thumbnail(4977495,'281944','cutting the cake 2','DSC-0239_thumb.jpg',130, 196,18,'photo_4977495.html');
												thumbnails[4978000] = new thumbnail(4978000,'282843','Moors Valley Country Park 3','DSC0-099_thumb.jpg',130, 195,18,'photo_4978000.html');
												thumbnails[4958418] = new thumbnail(4958418,'281943','every one','every-one_thumb.jpg',130, 52,18,'photo_4958418.html');
												thumbnails[4977496] = new thumbnail(4977496,'281944','cutting the cake 3','DSC-0241_thumb.jpg',130, 86,18,'photo_4977496.html');
												thumbnails[4977999] = new thumbnail(4977999,'282843','Moors Valley Country Park 4','DSC0-097_thumb.jpg',130, 86,18,'photo_4977999.html');
												thumbnails[4958430] = new thumbnail(4958430,'281943','lisa car','lisa-car_thumb.jpg',130, 92,18,'photo_4958430.html');
												thumbnails[4977497] = new thumbnail(4977497,'281944','flower decorations','pink-flowers_thumb.jpg',130, 347,18,'photo_4977497.html');
												thumbnails[4977998] = new thumbnail(4977998,'282843','Moors Valley Country Park 5','DSC0-094_thumb.jpg',130, 204,18,'photo_4977998.html');
												thumbnails[4958417] = new thumbnail(4958417,'281943','car flower','car-flower_thumb.jpg',130, 87,18,'photo_4958417.html');
												thumbnails[4977499] = new thumbnail(4977499,'281944','collage','_flowers_thumb.jpg',130, 130,18,'photo_4977499.html');
												thumbnails[4977997] = new thumbnail(4977997,'282843','Moors Valley Country Park 6','DSC0-093_thumb.jpg',130, 195,18,'photo_4977997.html');
												thumbnails[4977995] = new thumbnail(4977995,'282843','Moors Valley Country Park 7','DSC0-086_thumb.jpg',130, 195,18,'photo_4977995.html');
												thumbnails[4977993] = new thumbnail(4977993,'282842','Newforest 1','DSC0-080_thumb.jpg',130, 86,18,'photo_4977993.html');
												thumbnails[4977992] = new thumbnail(4977992,'282842','Newforest 2','DSC0-075_8D24BC6D-1D09-001F-99D540E84E491E5E_thumb.jpg',130, 195,18,'photo_4977992.html');
												thumbnails[4977989] = new thumbnail(4977989,'282842','Newforest 3','DSC0-043_thumb.jpg',130, 86,18,'photo_4977989.html');
												thumbnails[4978036] = new thumbnail(4978036,'282841','Wales 3','DSC0-173_thumb.jpg',130, 87,18,'photo_4978036.html');
												thumbnails[4978035] = new thumbnail(4978035,'282843','Moors Valley Country Park 7','DSC0-088_thumb.jpg',130, 195,18,'photo_4978035.html');
												thumbnails[4977986] = new thumbnail(4977986,'282842','Newforest 4','DSC0-005_thumb.jpg',130, 86,18,'photo_4977986.html');
												thumbnails[4978034] = new thumbnail(4978034,'282842','Newforest 5','DSC0-024_thumb.jpg',130, 87,18,'photo_4978034.html');
												thumbnails[4977994] = new thumbnail(4977994,'282843','Landscape 1','DSC0-084_thumb.jpg',130, 51,18,'photo_4977994.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[282861] = new gallery(282861,'5370218','Animals','gallery',[8150722,8150724,8150725,5370185,5370218,5370219,5370217,5370220,4978520,4978522],0, 0, '278119', 'gallery_282861.html',0,0);
				  					galleries[424003] = new gallery(424003,'7856117,7856113,7856112,7856111,7856110,7856107,7856105,7856102,7856101,7856100','Becky and Andy','gallery',[7856099,7856100,7856101,7856102,7856105,7856107,7856110,7856111,7856112,7856113,7856117],0, 0, '281573', 'gallery_424003.html',0,0);
				  					galleries[281944] = new gallery(281944,'4977499,4977497,4977496,4977495,4977494,4977492,4977491,4977490,4977489,4977487','Bev and Mick','gallery',[4977470,4977471,4977472,4977473,4977474,4977475,4977476,4977478,4977479,4977480,4977481,4977483,4977484,4977485,4977486,4977487,4977489,4977490,4977491,4977492,4977494,4977495,4977496,4977497,4977499],0, 0, '281573', 'gallery_281944.html',0,0);
				  					galleries[435834] = new gallery(435834,'8154735,8154727,8154673,8154629,8154623,8154621,8154617,8154581,8154574,8154487','Chrissie and family','gallery',[8154471,8154481,8154487,8154574,8154581,8154617,8154621,8154623,8154629,8154673,8154727,8154735],0, 0, '281574', 'gallery_435834.html',0,0);
				  					galleries[281942] = new gallery(281942,'4958921,4958920,4958919,4958901,4958900,4958899,4958898,4958897','Couples','gallery',[4958899,4958900,4958901,4958897,4958898,4958919,4958920,4958921],0, 0, '281574', 'gallery_281942.html',0,0);
				  					galleries[281945] = new gallery(281945,'4958917,4958916,4958915,4958914,4958913,4958912,4958911,4958905,4958904,4958903','Fabiola','gallery',[4958913,4958914,4958915,4958916,4958917,4958912,4958911,4958905,4958904,4958903],0, 0, '281574', 'gallery_281945.html',0,0);
				  					galleries[348823] = new gallery(348823,'8149937,8149907,8149904,8149898,8149892,8149870,8149828,8149805,8149801,8149795','Flora and Fauna','gallery',[8139188,8139189,8139190,8139192,8149777,8149782,8149785,8149789,8149795,8149801,8149805,8149828,8149870,8149892,8149898,8149904,8149907,8149937],0, 0, '', 'gallery_348823.html',0,0);
				  					galleries[435667] = new gallery(435667,'8150718,8150715,8150706,8150690,8150645,8150642','Food','gallery',[8150642,8150645,8150690,8150706,8150715,8150718],0, 0, '', 'gallery_435667.html',0,0);
				  					galleries[348809] = new gallery(348809,'6280370,6280349,6280347,6280140,6280137','Godshill Model Village','gallery',[6280137,6280140,6280347,6280349,6280370],0, 0, '348759', 'gallery_348809.html',0,0);
				  					galleries[348761] = new gallery(348761,'6280134,6277898','Isle of Wight','gallery',[6277898,6280134],0, 0, '278118', 'gallery_348761.html',0,0);
				  					galleries[394909] = new gallery(394909,'7299888,7299887,7299886,7299885,7299884','Jo and Family','gallery',[7299884,7299885,7299886,7299887,7299888],0, 0, '281574', 'gallery_394909.html',0,0);
				  					galleries[281946] = new gallery(281946,'4958910,4958909,4958908,4958907,4958906','Kiri','gallery',[4958910,4958909,4958908,4958907,4958906],0, 0, '281574', 'gallery_281946.html',0,0);
				  					galleries[281943] = new gallery(281943,'4958441,4958440,4958439,4958438,4958437,4958436,4958435,4958434,4958433,4958432','Lisa and John','gallery',[4958436,4958428,4958429,4958421,4958422,4958441,4958440,4958420,4958439,4958437,4958426,4958427,4958423,4958424,4958431,4958432,4958433,4958434,4958435,4958438,4958425,4958419,4958418,4958430,4958417],0, 0, '281573', 'gallery_281943.html',0,0);
				  					galleries[282860] = new gallery(282860,'4978930,4978525,4978524,4978523,4978519,4978518,4978517,4978516,4978514,4978513','Marine Life','gallery',[4978506,4978930,4978507,4978508,4978509,4978510,4978511,4978512,4978513,4978514,4978516,4978517,4978518,4978519,4978523,4978524,4978525],0, 0, '278119', 'gallery_282860.html',0,0);
				  					galleries[282855] = new gallery(282855,'5921253,5921251,5921250','Miscellaneous landscape','gallery',[5921250,5921251,5921253,4978017,4978016,4978011,4978010,4978087,4978008,4978088,4978004,4978003,4977991,4977990,4977988,4977987,4978015,4978014,4978013,4978012],0, 0, '278118', 'gallery_282855.html',0,0);
				  					galleries[282843] = new gallery(282843,'4978035,4978002,4978001,4978000,4977999,4977998,4977997,4977995,4977994','Moors Valley Country Park','gallery',[4978002,4978001,4978000,4977999,4977998,4977997,4977995,4978035,4977994],0, 0, '278118', 'gallery_282843.html',0,0);
				  					galleries[282842] = new gallery(282842,'4978034,4977993,4977992,4977989,4977986','New Forest','gallery',[4977993,4977992,4977989,4977986,4978034],0, 0, '278118', 'gallery_282842.html',0,0);
				  					galleries[282064] = new gallery(282064,'5673343','Portraits','gallery',[5921261,5921306,5673343,4958918,4958922,4958902,5673344,5673346,5673347,5673345],0, 0, '281574', 'gallery_282064.html',0,0);
				  					galleries[348806] = new gallery(348806,'6280396,6280394,6280388,6280381','Sculptured Glass','gallery',[6280381,6280388,6280394,6280396],0, 0, '348759', 'gallery_348806.html',0,0);
				  					galleries[348757] = new gallery(348757,'6277895,6277893,6277892,6277890,6277885','The Scout Association','gallery',[6277885,6277890,6277892,6277893,6277895],0, 0, '348759', 'gallery_348757.html',0,0);
				  					galleries[302653] = new gallery(302653,'5370247,5370246,5370245,5370244','VocalBooth Recording Studio','gallery',[5370246,5370244,5370245,5370247],0, 0, '348759', 'gallery_302653.html',0,0);
				  					galleries[282841] = new gallery(282841,'4978036,4978006,4978005','Wales','gallery',[4978006,4978005,4978036],0, 0, '278118', 'gallery_282841.html',0,0);
				  					galleries[281573] = new gallery(281573,'7856117,7856113,7856112,7856111,7856110,7856107,7856105,7856102,7856101,7856100','Weddings','gallery',[],0, 0, '', 'gallery_281573.html',0,0);
				  					galleries[281574] = new gallery(281574,'5673343','Portraiture','gallery',[],0, 0, '', 'gallery_281574.html',0,0);
				  					galleries[278118] = new gallery(278118,'5921253,5921251,5921250','Landscapes ','gallery',[],0, 0, '', 'gallery_278118.html',0,0);
				  					galleries[278119] = new gallery(278119,'5370218','Wildlife','gallery',[],0, 0, '', 'gallery_278119.html',0,0);
				  					galleries[348759] = new gallery(348759,'6280396,6280394,6280388,6280381,6280370,6280349,6280347,6280140,6280137,6277895','Corporate Photography','gallery',[],0, 0, '', 'gallery_348759.html',0,0);
				  					galleries[334173] = new gallery(334173,'5921248,5921247,5921244,5921203,5921202','Claire','gallery',[5921202,5921203,5921244,5921247,5921248],0, 0, '281574', 'gallery_334173.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '5921253,5921251,5921250,5673343,5370246,5370218,4978930,4978520,4978519,4978516,4978513,4978088,4978087,4978017,4978016,4978011,4978010,4978008,4978006,4978004,4978003,4977991,4977990,4977987,4977499,4977490,4977489,4977472,4977471,4958920,4958919,4958918,4958917,4958916,4958915,4958914,4958913,4958911,4958910,4958909,4958908,4958907,4958906,4958905,4958904,4958903,4958902,4958899,4958439,4958437,4958435,4958434,4958433,4958432,4958431,4958430,4958426,4958425,4958424,4958422,4958417';
imageSets[2] = '5921253,5921251,5921250,5673343,5370218';
imageSets[3] = '5921253,5921251,5921250,5673343,4978520,4978513,4978088,4978087,4978010,4978006,4978003,4977987,4977472,4977471,4958920,4958919,4958918,4958917,4958916,4958915,4958914,4958913,4958911,4958910,4958909,4958905,4958904,4958903,4958899,4958431,4958430,4958425';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/lucymcguinness/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/lucymcguinness/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {

	imageID = randomListVal('');
		if (!basic) {
	img.src = photos[imageID].src;
	img.width = photos[imageID].width;
	img.height = photos[imageID].height;
  img.parentNode.title = img.alt = photos[imageID].caption;
	}
	else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
				
	}
			}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}
/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
  var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
		if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
    
  updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
  var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
      op = $.extend({},defaults,options),
      html = '', temp = '',
      photoId = op.nextPhoto.id,
      photoCaption = op.nextPhoto.caption,
      photoSrc = op.nextPhoto.src;
		
		if (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    if (op.$photo.length > 0) {
      html = $('<img/>',{
        'class': 'mainphoto photo',
        src: photoSrc,
        id: 'mainPic',
        name: 'mainPic',
        width: op.nextPhoto.width,
        height: op.nextPhoto.height,
        alt: photoCaption,
        css: op.css || {}
      });
      if (op.href) {
      	if (op.href.match(/<a/)) {
      	  html = $(op.href).append(html);
      	} else {
		  html = $('<a/>', {
			href: op.href,
			title: photoCaption
		  }).append(html);
	    }
      } else {
      	html = $('<a/>', {
			title: photoCaption
		  }).append(html);
      }
      if (op.speed == 0) {        op.$photo.html(html);        if (op.onBefore) {          op.onBefore.apply(op.$photo);        }        if (op.onAfter) {          op.onAfter.apply(op.$photo);        }      } else {        op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){            if (op.onAfter) {		    op.onAfter.apply(this);          }		  clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));		  $('body').trigger('clikUpdate');		}, op.onBefore);
      }    }
    	if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Lucy McGuinness 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));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object' || array == undefined) {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
				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> &pound;' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = temp + '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
				
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
																				temp = temp + '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="item_name" value="'+item_name+'">';
								ref = '';
				if(this.photo_ref != ''){
					ref = this.photo_ref+' - '+this.caption;
				}
				else{
					ref = this.id+' - '+this.caption;
				}
				price = amount;					temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="">';
	temp = temp + '<input type="hidden" name="currency_code" value="GBP">';
	temp = temp + '<input type="hidden" name="add" value="1">';
					temp = temp + '<input type="hidden" name="amount" value="'+amount+'">';
	temp = temp + '<input type="hidden" name="item_number" value="'+ref+'">';
					temp = temp + '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
									temp = temp + '</form>';
								temp = temp + '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="">';
	temp = temp + '<input type="hidden" name="display" value="1">';
	temp = temp + '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
	temp = temp + '</form>';
							temp = temp + '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
		
	if(img){
	      if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
        imageID = imageID[1];
      } else {
			  imageID = randomListVal(galleries[gallery_id].featured_images);
      }
							
			if (imageID != 0) {
				img.src = thumbnails[imageID].src;
				img.width = thumbnails[imageID].width;
				img.height = thumbnails[imageID].height;
				img.alt = galleries[gallery_id].title;
        if (updateLink) {
          $(img).parent().attr({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

