window.thumbnails = new Object();
												thumbnails[4754478] = new thumbnail(4754478,'108015','','Ollie_And_Sharon_thumb.jpg',104, 130,1,'photo_4754478.html');
												thumbnails[3742842] = new thumbnail(3742842,'117874','Rhiannon','RhiannonBW170409_thumb.jpg',104, 130,1,'photo_3742842.html');
												thumbnails[3412282] = new thumbnail(3412282,'108019','Three Tier Tree\'s','Snow Day1Web_thumb.jpg',87, 130,1,'photo_3412282.html');
												thumbnails[2509682] = new thumbnail(2509682,'108019','Branksome Beach<br>\r\n<br>\r\n','BranksomeWeb_thumb.jpg',130, 160,1,'photo_2509682.html');
												thumbnails[2421791] = new thumbnail(2421791,'108019','Kimmeridge Bay','Kimmeridge1Websize_thumb.jpg',130, 91,1,'photo_2421791.html');
												thumbnails[2155630] = new thumbnail(2155630,'117874','Rhiannon','Rhiannonmay2_thumb.jpg',130, 163,1,'photo_2155630.html');
												thumbnails[1930057] = new thumbnail(1930057,'165057','Sammie-Jo','_GPW0008_thumb.jpg',130, 163,1,'photo_1930057.html');
												thumbnails[1931789] = new thumbnail(1931789,'117879','Sammie-Jo','©GPW8_thumb.jpg',130, 194,1,'photo_1931789.html');
												thumbnails[1760053] = new thumbnail(1760053,'165049','David','David 2008_thumb.jpg',130, 221,1,'photo_1760053.html');
												thumbnails[1816919] = new thumbnail(1816919,'165049','David Hodgson','David 2008 7 11Face_thumb.jpg',130, 194,1,'photo_1816919.html');
												thumbnails[1709520] = new thumbnail(1709520,'117879','Laura And Lisa','Lisa&Laura102_thumb.jpg',130, 106,1,'photo_1709520.html');
												thumbnails[1709522] = new thumbnail(1709522,'117879','Laura','Lisa&Laura092_thumb.jpg',130, 168,1,'photo_1709522.html');
												thumbnails[1688373] = new thumbnail(1688373,'117879','The two Scots','KGregory Shoot15_thumb.jpg',130, 196,1,'photo_1688373.html');
												thumbnails[1688626] = new thumbnail(1688626,'117874','Three Sisters','McMillansLass\'s_thumb.jpg',130, 192,1,'photo_1688626.html');
												thumbnails[1688816] = new thumbnail(1688816,'117874','Mum And Son','Mum and Son_thumb.jpg',130, 168,1,'photo_1688816.html');
												thumbnails[1582841] = new thumbnail(1582841,'117874','Angharad','81with_thumb.jpg',130, 142,1,'photo_1582841.html');
												thumbnails[1582860] = new thumbnail(1582860,'117874','Hayley','upsepiaweb_thumb.jpg',130, 194,1,'photo_1582860.html');
												thumbnails[1582951] = new thumbnail(1582951,'117874','On The Beach','bw_thumb.jpg',130, 90,1,'photo_1582951.html');
												thumbnails[1582955] = new thumbnail(1582955,'117874','Rhys Mountain','RhysMountain_thumb.jpg',130, 92,1,'photo_1582955.html');
												thumbnails[1582956] = new thumbnail(1582956,'108019','Hardy\'s Monument','Hardy\'s_thumb.jpg',130, 176,1,'photo_1582956.html');
												thumbnails[1582958] = new thumbnail(1582958,'108019','Loch Linnhe','LockSkyweb_thumb.jpg',130, 87,1,'photo_1582958.html');
												thumbnails[1582960] = new thumbnail(1582960,'176375','','ButterflyWeb_thumb.jpg',130, 88,1,'photo_1582960.html');
												thumbnails[1582962] = new thumbnail(1582962,'108017','','Rallye1_thumb.jpg',130, 91,1,'photo_1582962.html');
												thumbnails[1589358] = new thumbnail(1589358,'108017','','Flips_thumb.jpg',130, 83,1,'photo_1589358.html');
												thumbnails[1589361] = new thumbnail(1589361,'108017','','Bike_thumb.jpg',130, 138,1,'photo_1589361.html');
												thumbnails[1609276] = new thumbnail(1609276,'117874','Rhiannon2','Onion1911_6_thumb.jpg',130, 194,1,'photo_1609276.html');
												thumbnails[1641183] = new thumbnail(1641183,'165057','Face','LM04_thumb.jpg',130, 145,1,'photo_1641183.html');
												thumbnails[1641203] = new thumbnail(1641203,'165057','Pink','LM05web_thumb.jpg',130, 205,1,'photo_1641203.html');
												thumbnails[1641210] = new thumbnail(1641210,'117879','Laura-Marie','LM03web_thumb.jpg',130, 198,1,'photo_1641210.html');
												thumbnails[1641212] = new thumbnail(1641212,'165057','Laura-Marie','LM020web_thumb.jpg',130, 225,1,'photo_1641212.html');
												thumbnails[1641458] = new thumbnail(1641458,'117874','Rhiannon','Onion1911_thumb.jpg',130, 177,1,'photo_1641458.html');
												thumbnails[1653934] = new thumbnail(1653934,'117874','Angharad Tummy','Belly Only_thumb.jpg',130, 177,1,'photo_1653934.html');
												thumbnails[1671937] = new thumbnail(1671937,'117879','Kayleigh','KGregory Shoot53_1_web_thumb.jpg',130, 159,1,'photo_1671937.html');
												thumbnails[1672129] = new thumbnail(1672129,'108019','Church','Mountains1_thumb.jpg',130, 80,1,'photo_1672129.html');
												thumbnails[1672131] = new thumbnail(1672131,'176375','Jacobite','Jacobite1_thumb.jpg',130, 83,1,'photo_1672131.html');
												thumbnails[1672269] = new thumbnail(1672269,'117879','','KateM1BWWeb_thumb.jpg',130, 163,1,'photo_1672269.html');
												thumbnails[1672271] = new thumbnail(1672271,'117879','','KateM2Web_thumb.jpg',130, 156,1,'photo_1672271.html');
												thumbnails[1672273] = new thumbnail(1672273,'117879','','KateM6bwWeb1_thumb.jpg',130, 206,1,'photo_1672273.html');
												thumbnails[1727983] = new thumbnail(1727983,'117879','Laura Face','Lauraside_thumb.jpg',130, 115,1,'photo_1727983.html');
												thumbnails[1816934] = new thumbnail(1816934,'117874','Rhys Boo','RhysBoo_thumb.jpg',130, 131,1,'photo_1816934.html');
												thumbnails[1816937] = new thumbnail(1816937,'108019','St Catherine\'s Church','Overlooking St_thumb. Catherine\'s Chapel, Abbotsbury.jpg',130, 87,1,'photo_1816937.html');
												thumbnails[1816941] = new thumbnail(1816941,'108019','Portland Bill','PortlandBill_thumb.jpg',130, 191,1,'photo_1816941.html');
												thumbnails[1817045] = new thumbnail(1817045,'108019','Portland Bill','Portland_boatsjpegweb_thumb.jpg',130, 71,1,'photo_1817045.html');
												thumbnails[1873094] = new thumbnail(1873094,'117879','Vicky','Vicky_thumb.jpg',130, 153,1,'photo_1873094.html');
												thumbnails[1873101] = new thumbnail(1873101,'117879','Andy Pete','AP_thumb.jpg',130, 143,1,'photo_1873101.html');
												thumbnails[1922584] = new thumbnail(1922584,'117879','Adam Walker','Adam Walker ©GPW006_thumb.jpg',130, 163,1,'photo_1922584.html');
												thumbnails[1993282] = new thumbnail(1993282,'108019','Portland Storm','Portland1Web_thumb.jpg',130, 95,1,'photo_1993282.html');
												thumbnails[2220112] = new thumbnail(2220112,'117879','Darkness','Kelly13_thumb.jpg',130, 158,1,'photo_2220112.html');
												thumbnails[2664835] = new thumbnail(2664835,'117879','Lauren','Lauren Lorretto ©GPW017_thumb.jpg',111, 130,1,'photo_2664835.html');
												thumbnails[2827448] = new thumbnail(2827448,'108019','Alone','Sandy_thumb.jpg',104, 130,1,'photo_2827448.html');
												thumbnails[2827483] = new thumbnail(2827483,'176375','Orange','Boat2_thumb.jpg',130, 105,1,'photo_2827483.html');
												thumbnails[2827490] = new thumbnail(2827490,'176375','Getting ready to go','train2_thumb.jpg',103, 130,1,'photo_2827490.html');
												thumbnails[2834158] = new thumbnail(2834158,'176375','Light','Light_thumb.jpg',97, 130,1,'photo_2834158.html');
												thumbnails[2930977] = new thumbnail(2930977,'165057','Harley Davidson Shoot','2_thumb.jpg',104, 130,1,'photo_2930977.html');
												thumbnails[2930985] = new thumbnail(2930985,'117879','Georgiek Headshot','_GPW2145_thumb.jpg',105, 130,1,'photo_2930985.html');
												thumbnails[3025391] = new thumbnail(3025391,'176375','Basic','A3_Screw Hi_ISO3200_thumb.jpg',130, 89,1,'photo_3025391.html');
												thumbnails[3025403] = new thumbnail(3025403,'176375','','A5_pomegranate_thumb.jpg',130, 99,1,'photo_3025403.html');
												thumbnails[3025408] = new thumbnail(3025408,'176375','Cog','CogWeb_thumb.jpg',130, 113,1,'photo_3025408.html');
												thumbnails[3025413] = new thumbnail(3025413,'176375','RGB','A5_RGBV2_thumb.0Web.jpg',130, 130,1,'photo_3025413.html');
												thumbnails[3084764] = new thumbnail(3084764,'176375','Grafiti','Grafiti_thumb.jpg',87, 130,1,'photo_3084764.html');
												thumbnails[3207397] = new thumbnail(3207397,'108019','','Towards Bridport_web_thumb.jpg',130, 83,1,'photo_3207397.html');
												thumbnails[3243305] = new thumbnail(3243305,'117879','','©GPW19_thumb.jpg',87, 130,1,'photo_3243305.html');
												thumbnails[3243315] = new thumbnail(3243315,'165057','','©GPW07_thumb.jpg',87, 130,1,'photo_3243315.html');
												thumbnails[3274337] = new thumbnail(3274337,'108019','A Farm Building All Alone','StinfordWeb_thumb.jpg',130, 104,1,'photo_3274337.html');
												thumbnails[3412269] = new thumbnail(3412269,'108019','Snow Log','LogWeb_thumb.jpg',87, 130,1,'photo_3412269.html');
												thumbnails[3412277] = new thumbnail(3412277,'108019','Sunrise','SunriseWeb_thumb.jpg',130, 105,1,'photo_3412277.html');
												thumbnails[3412362] = new thumbnail(3412362,'117879','Adam On Film','Adam1Web_thumb.jpg',108, 130,1,'photo_3412362.html');
												thumbnails[3597584] = new thumbnail(3597584,'108015','','31_thumb.jpg',130, 130,1,'photo_3597584.html');
												thumbnails[3597585] = new thumbnail(3597585,'108015','','4_thumb.jpg',87, 130,1,'photo_3597585.html');
												thumbnails[3597586] = new thumbnail(3597586,'108015','','50_thumb.jpg',91, 130,1,'photo_3597586.html');
												thumbnails[3597587] = new thumbnail(3597587,'108015','','61_thumb.jpg',130, 130,1,'photo_3597587.html');
												thumbnails[3597589] = new thumbnail(3597589,'108015','','80_thumb.jpg',130, 130,1,'photo_3597589.html');
												thumbnails[3597590] = new thumbnail(3597590,'108015','','Catherine1_thumb.jpg',104, 130,1,'photo_3597590.html');
												thumbnails[3597591] = new thumbnail(3597591,'108015','','champers1_thumb.jpg',130, 93,1,'photo_3597591.html');
												thumbnails[3597592] = new thumbnail(3597592,'108015','','MAJ_thumb.jpg',130, 93,1,'photo_3597592.html');
												thumbnails[3597694] = new thumbnail(3597694,'108015','','GPW20_thumb.jpg',93, 130,1,'photo_3597694.html');
												thumbnails[3597697] = new thumbnail(3597697,'108015','','GPW22_thumb.jpg',104, 130,1,'photo_3597697.html');
												thumbnails[3597699] = new thumbnail(3597699,'108015','','GPW28_1_thumb.jpg',87, 130,1,'photo_3597699.html');
												thumbnails[3600140] = new thumbnail(3600140,'165057','','over_18_thumb.jpg',130, 130,1,'photo_3600140.html');
												thumbnails[3600171] = new thumbnail(3600171,'117874','','GPW191_thumb.jpg',87, 130,1,'photo_3600171.html');
												thumbnails[3600173] = new thumbnail(3600173,'117874','','GPW56_thumb.jpg',87, 130,1,'photo_3600173.html');
												thumbnails[3600184] = new thumbnail(3600184,'117879','','GPW06AbiWeb_thumb.jpg',130, 130,1,'photo_3600184.html');
												thumbnails[3600186] = new thumbnail(3600186,'176375','','Old_WatchWeb_thumb.jpg',130, 130,1,'photo_3600186.html');
												thumbnails[3600188] = new thumbnail(3600188,'176375','','Landy1Web_thumb.jpg',105, 130,1,'photo_3600188.html');
												thumbnails[3600192] = new thumbnail(3600192,'176375','','DangerWeb_thumb.jpg',109, 130,1,'photo_3600192.html');
												thumbnails[3627348] = new thumbnail(3627348,'221792','Bench','BenchWb_thumb.jpg',130, 93,1,'photo_3627348.html');
												thumbnails[3627359] = new thumbnail(3627359,'221792','Lifebouy','LifeWeb_thumb.jpg',130, 93,1,'photo_3627359.html');
												thumbnails[3627399] = new thumbnail(3627399,'221792','Moorings','WelliesWeb_thumb.jpg',93, 130,1,'photo_3627399.html');
												thumbnails[3627435] = new thumbnail(3627435,'221792','Rhys','RhysWeb_thumb.jpg',93, 130,1,'photo_3627435.html');
												thumbnails[3627498] = new thumbnail(3627498,'221792','Tractor','TractorWeb_thumb.jpg',130, 93,1,'photo_3627498.html');
												thumbnails[3627512] = new thumbnail(3627512,'221792','Frog','FrogWeb_thumb.jpg',130, 93,1,'photo_3627512.html');
												thumbnails[3630015] = new thumbnail(3630015,'221792','Sea Break','SeaBreakWeb_thumb.jpg',130, 93,1,'photo_3630015.html');
												thumbnails[3630155] = new thumbnail(3630155,'221792','Peg','PegWeb_thumb.jpg',130, 93,1,'photo_3630155.html');
												thumbnails[3657278] = new thumbnail(3657278,'108015','','GPW145_thumb.jpg',130, 93,1,'photo_3657278.html');
												thumbnails[3712026] = new thumbnail(3712026,'165057','Sammy','GPW_7772Bw_thumb.jpg',93, 130,1,'photo_3712026.html');
												thumbnails[4333985] = new thumbnail(4333985,'176375','Wolf','Wolf_thumb.jpg',130, 104,1,'photo_4333985.html');
												thumbnails[4333994] = new thumbnail(4333994,'108019','Luchon','Mountains_thumb.jpg',130, 105,1,'photo_4333994.html');
												thumbnails[4333999] = new thumbnail(4333999,'165057','Sammy 09','GPW_7752_thumb.jpg',104, 130,1,'photo_4333999.html');
												thumbnails[4334001] = new thumbnail(4334001,'165057','Sammy 09','GPW_7783_thumb.jpg',104, 130,1,'photo_4334001.html');
												thumbnails[4334005] = new thumbnail(4334005,'165057','Blue Shorts','GPW_8419_thumb.jpg',130, 104,1,'photo_4334005.html');
												thumbnails[4334009] = new thumbnail(4334009,'117879','Old Frenchman','Man_thumb.jpg',130, 130,1,'photo_4334009.html');
												thumbnails[4334014] = new thumbnail(4334014,'117874','Alice','GPW_8131_thumb.jpg',104, 130,1,'photo_4334014.html');
												thumbnails[4334017] = new thumbnail(4334017,'117874','Alice','GPW_8087_thumb.jpg',104, 130,1,'photo_4334017.html');
												thumbnails[4754484] = new thumbnail(4754484,'108015','','Ollie_And_Sharon2_thumb.jpg',104, 130,1,'photo_4754484.html');
												thumbnails[5948260] = new thumbnail(5948260,'165049','Zoe','GPW294_thumb.jpg',104, 130,1,'photo_5948260.html');
												thumbnails[5948271] = new thumbnail(5948271,'165049','Sam','Sam_Collage_thumb.jpg',130, 104,1,'photo_5948271.html');
												thumbnails[5948309] = new thumbnail(5948309,'165049','Zoe','GPW_1551_thumb.jpg',94, 130,1,'photo_5948309.html');
												thumbnails[5948411] = new thumbnail(5948411,'165049','Twin','Duel_thumb.jpg',130, 87,1,'photo_5948411.html');
												thumbnails[5948437] = new thumbnail(5948437,'165049','','WebThree_8EBDAAD8-1D09-001F-9927C95AFB5FB1CA_thumb.jpg',104, 130,1,'photo_5948437.html');
												thumbnails[5948443] = new thumbnail(5948443,'165049','','Webtwo_8EBE6A11-1D09-001F-99359B0A95604194_thumb.jpg',104, 130,1,'photo_5948443.html');
												thumbnails[5948463] = new thumbnail(5948463,'165057','','GPW_0784_thumb.jpg',104, 130,1,'photo_5948463.html');
												thumbnails[5948465] = new thumbnail(5948465,'165057','','Pink_thumb.jpg',104, 130,1,'photo_5948465.html');
												thumbnails[5948467] = new thumbnail(5948467,'165057','','GPW_9338_thumb.jpg',104, 130,1,'photo_5948467.html');
												thumbnails[6377281] = new thumbnail(6377281,'165049','','GPWSDS43_thumb.jpg',104, 130,1,'photo_6377281.html');
												thumbnails[6377295] = new thumbnail(6377295,'165049','','GPWSDS52_thumb.jpg',104, 130,1,'photo_6377295.html');
												thumbnails[6377340] = new thumbnail(6377340,'165049','','GPWSDS39_thumb.jpg',104, 130,1,'photo_6377340.html');
												thumbnails[6377344] = new thumbnail(6377344,'165049','','GPWSDS58_thumb.jpg',104, 130,1,'photo_6377344.html');
												thumbnails[6763780] = new thumbnail(6763780,'108015','The boys','GPW003_thumb.jpg',106, 130,1,'photo_6763780.html');
												thumbnails[6763784] = new thumbnail(6763784,'108015','Mr & Mrs','GPW220_thumb.jpg',104, 130,1,'photo_6763784.html');
												thumbnails[6763786] = new thumbnail(6763786,'108015','','GPW082_thumb.jpg',130, 104,1,'photo_6763786.html');
												thumbnails[6763790] = new thumbnail(6763790,'108015','Bridesmaid','GPW058_thumb.jpg',130, 104,1,'photo_6763790.html');
												thumbnails[7078604] = new thumbnail(7078604,'165049','Hannah','GPW340_thumb.jpg',104, 130,1,'photo_7078604.html');
												thumbnails[7078647] = new thumbnail(7078647,'165049','','CornerZoe1Col_thumb.jpg',104, 130,1,'photo_7078647.html');
												thumbnails[7078664] = new thumbnail(7078664,'165049','','GPW395_thumb.jpg',130, 130,1,'photo_7078664.html');
												thumbnails[7078667] = new thumbnail(7078667,'165049','','GPW197_thumb.jpg',104, 130,1,'photo_7078667.html');
												thumbnails[7078672] = new thumbnail(7078672,'165049','','An_Idea6_thumb.jpg',104, 130,1,'photo_7078672.html');
												thumbnails[7079023] = new thumbnail(7079023,'108015','','GPW_7447p_thumb.jpg',105, 130,1,'photo_7079023.html');
												thumbnails[7079033] = new thumbnail(7079033,'108015','','GPW_4219_thumb.jpg',104, 130,1,'photo_7079033.html');
												thumbnails[7079048] = new thumbnail(7079048,'108015','','GPW047_thumb.jpg',104, 130,1,'photo_7079048.html');
												thumbnails[7079056] = new thumbnail(7079056,'165057','','Faye1528_thumb.jpg',130, 104,1,'photo_7079056.html');
												thumbnails[7079058] = new thumbnail(7079058,'165057','','Faye1534_thumb.jpg',86, 130,1,'photo_7079058.html');
												thumbnails[7079069] = new thumbnail(7079069,'165057','','Gemmila3_84BW_thumb.jpg',130, 104,1,'photo_7079069.html');
												thumbnails[7079073] = new thumbnail(7079073,'165057','','Gemmila3_113_thumb.jpg',104, 130,1,'photo_7079073.html');
												thumbnails[7079074] = new thumbnail(7079074,'165057','','Faye1542_thumb.jpg',97, 130,1,'photo_7079074.html');
												thumbnails[7079075] = new thumbnail(7079075,'165057','','Faye1546_thumb.jpg',130, 87,1,'photo_7079075.html');
												thumbnails[8047570] = new thumbnail(8047570,'165049','Sophie','GPW_5716_thumb.jpg',102, 130,1,'photo_8047570.html');
												thumbnails[8047572] = new thumbnail(8047572,'108015','','GPW_6517_copy_thumb.jpg',104, 130,1,'photo_8047572.html');
												thumbnails[8047574] = new thumbnail(8047574,'108015','','GPW_6533_thumb.jpg',130, 104,1,'photo_8047574.html');
												thumbnails[8047576] = new thumbnail(8047576,'165049','Wabbit','Sophie5802_thumb.jpg',104, 130,1,'photo_8047576.html');
												thumbnails[8047578] = new thumbnail(8047578,'165049','','Sophie5809_thumb.jpg',87, 130,1,'photo_8047578.html');
												thumbnails[8047704] = new thumbnail(8047704,'165049','Hair','SMGHair_0667Edit1_thumb.jpg',130, 104,1,'photo_8047704.html');
												thumbnails[8047707] = new thumbnail(8047707,'165049','Hair','SMGHair-0716_thumb.jpg',130, 102,1,'photo_8047707.html');
												thumbnails[8047709] = new thumbnail(8047709,'165049','','SMGHair-0782_thumb.jpg',104, 130,1,'photo_8047709.html');
												thumbnails[8048662] = new thumbnail(8048662,'165049','','Wabbit_thumb.jpg',89, 130,1,'photo_8048662.html');
												thumbnails[8048663] = new thumbnail(8048663,'117874','','GPW_6887_thumb.jpg',104, 130,1,'photo_8048663.html');
												thumbnails[7078637] = new thumbnail(7078637,'165049','','GPWSaS_Shoot09_thumb.jpg',104, 130,1,'photo_7078637.html');
												thumbnails[7078634] = new thumbnail(7078634,'165049','T.LeClerc','An_Idea4BW_thumb.jpg',104, 130,1,'photo_7078634.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[176375] = new gallery(176375,'3025408,1582960','All Shapes And sizes','gallery',[1582960,1672131,2827483,2827490,2834158,3025391,3025403,3025408,3025413,3084764,3600186,3600188,3600192,4333985],0, 0, '', 'gallery_176375.html',0,0);
				  					galleries[117874] = new gallery(117874,'1582951','Children & Parent','gallery',[3742842,2155630,1688626,1688816,1582841,1582860,1582951,1582955,1609276,1641458,1653934,1816934,3600171,3600173,4334014,4334017,8048663],0, 0, '108018', 'gallery_117874.html',0,0);
				  					galleries[165049] = new gallery(165049,'7078634,7078604,1816919','Fashion','gallery',[1760053,1816919,5948260,5948271,5948309,5948411,5948437,5948443,6377281,6377295,6377340,6377344,7078604,7078647,7078664,7078667,7078672,8047570,8047576,8047578,8047704,8047707,8047709,8048662,7078637,7078634],0, 0, '', 'gallery_165049.html',0,0);
				  					galleries[221792] = new gallery(221792,'3630155,3630015,3627512,3627498,3627435,3627399,3627359,3627348','Film Images','gallery',[3627348,3627359,3627399,3627435,3627498,3627512,3630015,3630155],0, 0, '', 'gallery_221792.html',0,0);
				  					galleries[109259] = new gallery(109259,'3600140','Glamour','gallery',[],0, 0, '', 'gallery_109259.html',0,0);
				  					galleries[165057] = new gallery(165057,'3600140','Glamour Images','gallery',[1930057,1641183,1641203,1641212,2930977,3243315,3600140,3712026,4333999,4334001,4334005,5948463,5948465,5948467,7079056,7079058,7079069,7079073,7079074,7079075],0, 0, '109259', 'gallery_165057.html',0,0);
				  					galleries[108019] = new gallery(108019,'3412277','Landscape','gallery',[3412282,2509682,2421791,1582956,1582958,1672129,1816937,1816941,1817045,1993282,2827448,3207397,3274337,3412269,3412277,4333994],0, 0, '', 'gallery_108019.html',0,0);
				  					galleries[108018] = new gallery(108018,'1582951','Portrait','gallery',[],0, 0, '', 'gallery_108018.html',0,0);
				  					galleries[117879] = new gallery(117879,'4334009,3600184,3412362,3243305,2930985,2664835,2220112,1931789,1922584,1873101','Portraits','gallery',[1931789,1709520,1709522,1688373,1641210,1671937,1672269,1672271,1672273,1727983,1873094,1873101,1922584,2220112,2664835,2930985,3243305,3412362,3600184,4334009],0, 0, '108018', 'gallery_117879.html',0,0);
				  					galleries[108017] = new gallery(108017,'1582962','Sport','gallery',[1582962,1589358,1589361],0, 0, '', 'gallery_108017.html',0,0);
				  					galleries[108015] = new gallery(108015,'3597587','Weddings','gallery',[4754478,3597584,3597585,3597586,3597587,3597589,3597590,3597591,3597592,3597694,3597697,3597699,3657278,4754484,6763780,6763784,6763786,6763790,7079023,7079033,7079048,8047572,8047574],0, 0, '', 'gallery_108015.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '8047707,1582960,1582958,1582955';
imageSets[2] = '7078634,7078604,3600140,3597587,3412277,3025408,1816919,1582962,1582960,1582951';
imageSets[3] = '8048663,8048662,8047709,8047707,8047704,8047578,8047576,8047574,8047572,8047570,7079075,7079074,7079073,7079069,7079058,7079056,7079048,7079033,7079023,7078672,7078667,7078664,7078647,7078637,7078634,7078604,6763790,6763786,6763784,6763780,6377344,6377340,6377295,6377281,5948467,5948465,5948463,5948443,5948437,5948411,5948309,5948271,5948260,4754484,4754478,4334017,4334014,4334009,4334005,4334001';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/gwoolie/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/gwoolie/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 = 'Graham Woolcott Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {photoinfominwidth:200};	    		options.photoinfoadjacent = true;			      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object' || array == undefined) {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>©Graham Woolcott </strong>' + this.photographer + '</p>';
	}
					
	temp = temp + this.fnGetPaymentInfo();
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp = temp + '<p>Buy now using PayPal:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = temp + '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
				
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
																				temp = temp + '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="item_name" value="'+item_name+'">';
								ref = '';
				if(this.photo_ref != ''){
					ref = this.photo_ref+' - '+this.caption;
				}
				else{
					ref = this.id+' - '+this.caption;
				}
				price = amount;					temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="g.woolie@zen.co.uk">';
	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="g.woolie@zen.co.uk">';
	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;
	}
}

			

