window.thumbnails = {};
															thumbnails[718461] = clik.newPhoto({"id":718461,"src":"Thorpe Cloud 7 thumbnail.jpg","galleries_id":33374,"server_id":1,"link":"photo_718461.html","width":130,"caption":"Thorpe Cloud ","height":85});
															thumbnails[718437] = clik.newPhoto({"id":718437,"src":"Thorpe Cloud 7 B&W thumbnail.jpg","galleries_id":33374,"server_id":1,"link":"photo_718437.html","width":130,"caption":"Thorpe Cloud, Dovedale, Derbyshire","height":85});
															thumbnails[2949987] = clik.newPhoto({"id":2949987,"src":"Hartington trees_thumb.jpg","galleries_id":33374,"server_id":1,"link":"photo_2949987.html","width":130,"caption":"Line of trees seen from Tissington Trail","height":82});
															thumbnails[1581415] = clik.newPhoto({"id":1581415,"src":"The Copse thumbnail.jpg","galleries_id":33374,"server_id":1,"link":"photo_1581415.html","width":130,"caption":"The Copse","height":68});
															thumbnails[415606] = clik.newPhoto({"id":415606,"src":"Peak Field barn thumbnail.jpg","galleries_id":33374,"server_id":1,"link":"photo_415606.html","width":130,"caption":"Field barn","height":70});
															thumbnails[749475] = clik.newPhoto({"id":749475,"src":"Dereliction thumbnail.jpg","galleries_id":33374,"server_id":1,"link":"photo_749475.html","width":130,"caption":"Dereliction","height":89});
															thumbnails[415613] = clik.newPhoto({"id":415613,"src":"Parkhouse Hill Peak District thumbnail.jpg","galleries_id":33374,"server_id":1,"link":"photo_415613.html","width":130,"caption":"Parkhouse and Chrome Hills, Peak District","height":88});
															thumbnails[445289] = clik.newPhoto({"id":445289,"src":"Bunster and Thorpe Cloud thumbnail.jpg","galleries_id":33374,"server_id":1,"link":"photo_445289.html","width":130,"caption":"Bunster Hill, Ilam, Staffs","height":93});
															thumbnails[415647] = clik.newPhoto({"id":415647,"src":"Baslow Edge B&W thumbnail.jpg","galleries_id":33374,"server_id":1,"link":"photo_415647.html","width":130,"caption":"Baslow Edge","height":92});
															thumbnails[494585] = clik.newPhoto({"id":494585,"src":"Bunster thumbnail.jpg","galleries_id":33374,"server_id":1,"link":"photo_494585.html","width":130,"caption":"Bunster Hill, Ilam, Staffs","height":74});
															thumbnails[2485942] = clik.newPhoto({"id":2485942,"src":"Thorpe Cloud with snow _thumb.jpg","galleries_id":33374,"server_id":1,"link":"photo_2485942.html","width":130,"caption":"Thorpe Cloud with snow","height":89});
															thumbnails[416957] = clik.newPhoto({"id":416957,"src":"Tissington Trail Country thumbnail.jpg","galleries_id":33374,"server_id":1,"link":"photo_416957.html","width":94,"caption":"Tissington Trail country","height":130});
															thumbnails[476302] = clik.newPhoto({"id":476302,"src":"Johnson's Knoll B&W thumbnail.jpg","galleries_id":33374,"server_id":1,"link":"photo_476302.html","width":130,"caption":"Johnson's Knoll","height":66});
															thumbnails[1518677] = clik.newPhoto({"id":1518677,"src":"Tissington Trail thumbnail.jpg","galleries_id":33374,"server_id":1,"link":"photo_1518677.html","width":130,"caption":"Tissington Trail","height":130});
															thumbnails[415618] = clik.newPhoto({"id":415618,"src":"Ilam village Peak District thumbnail.jpg","galleries_id":33374,"server_id":1,"link":"photo_415618.html","width":130,"caption":"Ilam village, Staffordshire","height":90});
															thumbnails[707064] = clik.newPhoto({"id":707064,"src":"Moor Farm Barn in landscape 2 thumbnail.jpg","galleries_id":33374,"server_id":1,"link":"photo_707064.html","width":130,"caption":"Shepherds barn above Dovedale","height":44});
															thumbnails[415662] = clik.newPhoto({"id":415662,"src":"Cumbrian mountains thumbnail.jpg","galleries_id":33375,"server_id":1,"link":"photo_415662.html","width":130,"caption":"Cat Bells, Cumbria","height":86});
															thumbnails[446032] = clik.newPhoto({"id":446032,"src":"Langdale Pikes from Loughrigg Tarn thumbnail.jpg","galleries_id":33375,"server_id":1,"link":"photo_446032.html","width":130,"caption":"Langdale Pikes from Loughrigg Tarn","height":88});
															thumbnails[8820805] = clik.newPhoto({"id":8820805,"src":"Langdale_Pikes_image_thumb.jpg","galleries_id":33375,"server_id":1,"link":"photo_8820805.html","width":92,"caption":"Langdale Pikes from Langdale","height":130});
															thumbnails[4402999] = clik.newPhoto({"id":4402999,"src":"Reflections_in_Wast_Water_thumb.jpg","galleries_id":33375,"server_id":1,"link":"photo_4402999.html","width":130,"caption":"Wast Water reflections","height":92});
															thumbnails[415655] = clik.newPhoto({"id":415655,"src":"Crinkle Crags Cumbria thumbnail.jpg","galleries_id":33375,"server_id":1,"link":"photo_415655.html","width":130,"caption":"Crinkle Crags","height":98});
															thumbnails[493886] = clik.newPhoto({"id":493886,"src":"sunrise on Wetherlam thumbnail.jpg","galleries_id":33375,"server_id":1,"link":"photo_493886.html","width":130,"caption":"Sunrise on Wetherlam","height":78});
															thumbnails[8803365] = clik.newPhoto({"id":8803365,"src":"Buttermere_tree_web_image_thumb.jpg","galleries_id":33375,"server_id":1,"link":"photo_8803365.html","width":130,"caption":"Tree on Buttermere","height":91});
															thumbnails[8803373] = clik.newPhoto({"id":8803373,"src":"Loughrigg_Tarn_web_image_thumb.jpg","galleries_id":33375,"server_id":1,"link":"photo_8803373.html","width":80,"caption":"Loughrigg Tarn","height":120});
															thumbnails[725214] = clik.newPhoto({"id":725214,"src":"Buttermere 3 thumbnail.jpg","galleries_id":33375,"server_id":1,"link":"photo_725214.html","width":130,"caption":"Lake Buttermere, Cumbria","height":69});
															thumbnails[1518704] = clik.newPhoto({"id":1518704,"src":"Blea Tarn square thumbnail.jpg","galleries_id":33375,"server_id":1,"link":"photo_1518704.html","width":130,"caption":"Blea Tarn","height":130});
															thumbnails[1772990] = clik.newPhoto({"id":1772990,"src":"White Sail hut_thumb.jpg","galleries_id":33375,"server_id":1,"link":"photo_1772990.html","width":130,"caption":"Black Sail hut","height":60});
															thumbnails[720068] = clik.newPhoto({"id":720068,"src":"Milford Sound with Mitre Peak thumbnail.jpg","galleries_id":33376,"server_id":1,"link":"photo_720068.html","width":123,"caption":"Milford Sound with Mitre Peak","height":160});
															thumbnails[720091] = clik.newPhoto({"id":720091,"src":"hunting for supper thumbnail.jpg","galleries_id":33376,"server_id":1,"link":"photo_720091.html","width":130,"caption":"Hunting for supper","height":57});
															thumbnails[707070] = clik.newPhoto({"id":707070,"src":"Mount Cook 8 thumbnails.jpg","galleries_id":33376,"server_id":1,"link":"photo_707070.html","width":130,"caption":"Mount Cook","height":76});
															thumbnails[1518403] = clik.newPhoto({"id":1518403,"src":"Nelson thumbnail.jpg","galleries_id":33376,"server_id":1,"link":"photo_1518403.html","width":130,"caption":"The beach at Nelson","height":75});
															thumbnails[707124] = clik.newPhoto({"id":707124,"src":"Nelson beach 2 B&W thumbnail.jpg","galleries_id":33376,"server_id":1,"link":"photo_707124.html","width":130,"caption":"Nelson beach in monochrome","height":54});
															thumbnails[8820504] = clik.newPhoto({"id":8820504,"src":"Driftwood_at_Farewell_Cape_image_thumb.jpg","galleries_id":33376,"server_id":1,"link":"photo_8820504.html","width":130,"caption":"Archway Islands, Tasman","height":92});
															thumbnails[8820594] = clik.newPhoto({"id":8820594,"src":"Walking_on_Farewell_Spit_image_thumb.jpg","galleries_id":33376,"server_id":1,"link":"photo_8820594.html","width":130,"caption":" Farewell Spit dunes","height":92});
															thumbnails[8820615] = clik.newPhoto({"id":8820615,"src":"Collingwood_New_Zealand_image_thumb.jpg","galleries_id":33376,"server_id":1,"link":"photo_8820615.html","width":130,"caption":"Ruataniwha Inlet, Golden Bay","height":154});
															thumbnails[414894] = clik.newPhoto({"id":414894,"src":"Mount Cook NZ thumbnail.jpg","galleries_id":33376,"server_id":1,"link":"photo_414894.html","width":130,"caption":"Mount Cook from Lake Tekapo","height":88});
															thumbnails[415610] = clik.newPhoto({"id":415610,"src":"Road Poplars thumbnail.jpg","galleries_id":33376,"server_id":1,"link":"photo_415610.html","width":90,"caption":"Autumnal Poplars","height":130});
															thumbnails[415608] = clik.newPhoto({"id":415608,"src":"West Coast beach thumbnail.jpg","galleries_id":33376,"server_id":1,"link":"photo_415608.html","width":130,"caption":"West Coast beach","height":81});
															thumbnails[445194] = clik.newPhoto({"id":445194,"src":"Mount Cook from Lake Pukaki thumbnail.jpg","galleries_id":33376,"server_id":1,"link":"photo_445194.html","width":130,"caption":"Lake Pukaki","height":87});
															thumbnails[445186] = clik.newPhoto({"id":445186,"src":"Mount Cook 2 B&W thumbnail.jpg","galleries_id":33376,"server_id":1,"link":"photo_445186.html","width":130,"caption":"Mount Cook from Lake Tekapo B&W","height":94});
															thumbnails[2294304] = clik.newPhoto({"id":2294304,"src":"Surat Bay_thumb.jpg","galleries_id":33376,"server_id":1,"link":"photo_2294304.html","width":130,"caption":"Surat Bay","height":87});
															thumbnails[2294318] = clik.newPhoto({"id":2294318,"src":"Hokianga Harbour_thumb.jpg","galleries_id":33376,"server_id":1,"link":"photo_2294318.html","width":130,"caption":"Hokianga harbour","height":82});
															thumbnails[3011175] = clik.newPhoto({"id":3011175,"src":"Wellington sculpture_thumb.jpg","galleries_id":33376,"server_id":1,"link":"photo_3011175.html","width":95,"caption":"Sculpture in Civic Square, Wellington","height":130});
															thumbnails[2950004] = clik.newPhoto({"id":2950004,"src":"Mountain shadows _thumb.jpg","galleries_id":33376,"server_id":1,"link":"photo_2950004.html","width":130,"caption":"Mountains from the road through Lindis Pass","height":82});
															thumbnails[2950012] = clik.newPhoto({"id":2950012,"src":"Ninety Mile beach with sky 2_thumb.jpg","galleries_id":33376,"server_id":1,"link":"photo_2950012.html","width":130,"caption":"Ninety Mile beach","height":92});
															thumbnails[8457917] = clik.newPhoto({"id":8457917,"src":"Tree_on_the_peninsular_thumb.jpg","galleries_id":33376,"server_id":1,"link":"photo_8457917.html","width":130,"caption":"Flotsam on beach by Cape Farewell","height":92});
															thumbnails[8463256] = clik.newPhoto({"id":8463256,"src":"grass_study_thumb.jpg","galleries_id":33376,"server_id":1,"link":"photo_8463256.html","width":130,"caption":"Farewell Spit","height":168});
															thumbnails[416085] = clik.newPhoto({"id":416085,"src":"British Library thumbnail.jpg","galleries_id":33322,"server_id":1,"link":"photo_416085.html","width":130,"caption":"British Library","height":90});
															thumbnails[3685830] = clik.newPhoto({"id":3685830,"src":"Derelict_barge_thumb.jpg","galleries_id":33322,"server_id":1,"link":"photo_3685830.html","width":130,"caption":"Abandoned barge ","height":92});
															thumbnails[448117] = clik.newPhoto({"id":448117,"src":"Imperial War Museum 3 thumbnail.jpg","galleries_id":33322,"server_id":1,"link":"photo_448117.html","width":130,"caption":"Imperial War Museum North","height":67});
															thumbnails[1460302] = clik.newPhoto({"id":1460302,"src":"Lloyds building thumbnail.jpg","galleries_id":33322,"server_id":1,"link":"photo_1460302.html","width":91,"caption":"Lloyds Building","height":130});
															thumbnails[476304] = clik.newPhoto({"id":476304,"src":"bridge at Salford Quays thumbnail.jpg","galleries_id":33322,"server_id":1,"link":"photo_476304.html","width":130,"caption":"Salford Quay footbridge","height":86});
															thumbnails[1772994] = clik.newPhoto({"id":1772994,"src":"Imperial War Museum_1_thumb.jpg","galleries_id":33322,"server_id":1,"link":"photo_1772994.html","width":101,"caption":"Imperial War Museum, Manchester","height":130});
															thumbnails[2298834] = clik.newPhoto({"id":2298834,"src":"Samantha_thumb.jpg","galleries_id":33322,"server_id":1,"link":"photo_2298834.html","width":130,"caption":"Samantha","height":92});
															thumbnails[879627] = clik.newPhoto({"id":879627,"src":"castle with boat thumbnail.jpg","galleries_id":67428,"server_id":1,"link":"photo_879627.html","width":130,"caption":"Lindisfarne Castle","height":72});
															thumbnails[879653] = clik.newPhoto({"id":879653,"src":"Dunstanburgh Castle 3 B&W thumbnail.jpg","galleries_id":67428,"server_id":1,"link":"photo_879653.html","width":130,"caption":"Dunstanburgh Castle","height":85});
															thumbnails[4042086] = clik.newPhoto({"id":4042086,"src":"Loch_on_Rannoch_Moor_4_thumb.jpg","galleries_id":188140,"server_id":1,"link":"photo_4042086.html","width":130,"caption":"Loch on Rannoch Moor","height":89});
															thumbnails[879633] = clik.newPhoto({"id":879633,"src":"Dunstanburgh 4 thumbnails.jpg","galleries_id":67428,"server_id":1,"link":"photo_879633.html","width":130,"caption":"Beach below Dunstanburgh Castle","height":86});
															thumbnails[4041930] = clik.newPhoto({"id":4041930,"src":"Salen_boats_Mull_thumb.jpg","galleries_id":188140,"server_id":1,"link":"photo_4041930.html","width":130,"caption":"Derelict boats, Salen, Mull","height":89});
															thumbnails[879670] = clik.newPhoto({"id":879670,"src":"Dunstanburgh 6 thumbnail.jpg","galleries_id":67428,"server_id":1,"link":"photo_879670.html","width":130,"caption":"Dunstanburgh Castle from beach","height":81});
															thumbnails[3059675] = clik.newPhoto({"id":3059675,"src":"Loch Arklet 2_thumb.jpg","galleries_id":188140,"server_id":1,"link":"photo_3059675.html","width":130,"caption":"Loch Arklet","height":66});
															thumbnails[879646] = clik.newPhoto({"id":879646,"src":"Dunstanburgh Castle 1 thumbnail.jpg","galleries_id":67428,"server_id":1,"link":"photo_879646.html","width":130,"caption":"Dunstanburgh Castle","height":197});
															thumbnails[3113277] = clik.newPhoto({"id":3113277,"src":"Trees by a Loch 10_thumb.jpg","galleries_id":188140,"server_id":1,"link":"photo_3113277.html","width":130,"caption":"Loch on Rannoch Moor","height":97});
															thumbnails[1518396] = clik.newPhoto({"id":1518396,"src":"Driftwood thumbnail.jpg","galleries_id":67428,"server_id":1,"link":"photo_1518396.html","width":130,"caption":"The beach at Dunstanburgh Castle","height":87});
															thumbnails[3113287] = clik.newPhoto({"id":3113287,"src":"Loch on Rannoch Moor_thumb.jpg","galleries_id":188140,"server_id":1,"link":"photo_3113287.html","width":117,"caption":"Loch on Rannoch Moor","height":160});
															thumbnails[3113282] = clik.newPhoto({"id":3113282,"src":"Black Rock Hut1_thumb.jpg","galleries_id":188140,"server_id":1,"link":"photo_3113282.html","width":130,"caption":"Black Rock Hut in Glencoe","height":89});
															thumbnails[3113291] = clik.newPhoto({"id":3113291,"src":"Loch Arklet1_thumb.jpg","galleries_id":188140,"server_id":1,"link":"photo_3113291.html","width":130,"caption":"Loch Arklet in the Trossachs","height":59});
															thumbnails[3113294] = clik.newPhoto({"id":3113294,"src":"Rock in Loch_thumb.jpg","galleries_id":188140,"server_id":1,"link":"photo_3113294.html","width":130,"caption":"Rock in Loch on Rannock Moor","height":182});
															thumbnails[3572850] = clik.newPhoto({"id":3572850,"src":"Black_Rock_Hut_thumb.jpg","galleries_id":188140,"server_id":1,"link":"photo_3572850.html","width":130,"caption":"Black Rock Hut, Glencoe","height":97});
															thumbnails[3572855] = clik.newPhoto({"id":3572855,"src":"Loch_on_Rannoch_Moor_BW_thumb.jpg","galleries_id":188140,"server_id":1,"link":"photo_3572855.html","width":130,"caption":"Loch on Rannoch Moor","height":93});
															thumbnails[1460292] = clik.newPhoto({"id":1460292,"src":"Cwmorthin barracks thumbnailjpg.jpg","galleries_id":62516,"server_id":1,"link":"photo_1460292.html","width":130,"caption":"Cwmorthin barracks","height":84});
															thumbnails[3223962] = clik.newPhoto({"id":3223962,"src":"Milford Sound_thumb.jpg","galleries_id":196935,"server_id":1,"link":"photo_3223962.html","width":97,"caption":"Milford Sound","height":130});
															thumbnails[3223986] = clik.newPhoto({"id":3223986,"src":"Imperial War Museum_thumb.jpg","galleries_id":196935,"server_id":1,"link":"photo_3223986.html","width":92,"caption":"Imperial war Museum","height":130});
															thumbnails[3223994] = clik.newPhoto({"id":3223994,"src":"Abandoned barge_thumb.jpg","galleries_id":196935,"server_id":1,"link":"photo_3223994.html","width":97,"caption":"Abandoned barge","height":130});
															thumbnails[3224014] = clik.newPhoto({"id":3224014,"src":"Wellington sculpture1_thumb.jpg","galleries_id":196935,"server_id":1,"link":"photo_3224014.html","width":95,"caption":"Wellington sculpture","height":130});
															thumbnails[3224004] = clik.newPhoto({"id":3224004,"src":"Off to see Grandma 2_thumb.jpg","galleries_id":196935,"server_id":1,"link":"photo_3224004.html","width":92,"caption":"Of to see Grandma","height":130});
															thumbnails[3223972] = clik.newPhoto({"id":3223972,"src":"Ninety Mile beach_thumb.jpg","galleries_id":196935,"server_id":1,"link":"photo_3223972.html","width":130,"caption":"Ninety Mile beach","height":92});
															thumbnails[3223976] = clik.newPhoto({"id":3223976,"src":"Dereliction_1_thumb.jpg","galleries_id":196935,"server_id":1,"link":"photo_3223976.html","width":130,"caption":"Dereliction","height":91});
															thumbnails[3224011] = clik.newPhoto({"id":3224011,"src":"Mountain shadows 1_thumb.jpg","galleries_id":196935,"server_id":1,"link":"photo_3224011.html","width":130,"caption":"Mountain Shadows","height":82});
															thumbnails[3223991] = clik.newPhoto({"id":3223991,"src":"samantha1_thumb.jpg","galleries_id":196935,"server_id":1,"link":"photo_3223991.html","width":130,"caption":"Samantha","height":92});
															thumbnails[3223997] = clik.newPhoto({"id":3223997,"src":"Trees and a barn_thumb.jpg","galleries_id":196935,"server_id":1,"link":"photo_3223997.html","width":130,"caption":"Trees and a barn","height":82});
															thumbnails[3223999] = clik.newPhoto({"id":3223999,"src":"The Copse 2_thumb.jpg","galleries_id":196935,"server_id":1,"link":"photo_3223999.html","width":130,"caption":"The Copse","height":76});
															thumbnails[3224002] = clik.newPhoto({"id":3224002,"src":"Blackwater barge_1_thumb.jpg","galleries_id":196935,"server_id":1,"link":"photo_3224002.html","width":130,"caption":"Blackwater barge","height":92});
															thumbnails[3224003] = clik.newPhoto({"id":3224003,"src":"Sailing toward Kapiti 2_thumb.jpg","galleries_id":196935,"server_id":1,"link":"photo_3224003.html","width":130,"caption":"Sailing towards Kapiti","height":62});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[33374] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Peak District Landscapes","link":"gallery_33374.html","maxRecords":0.0,"photoIDs":[718461.0,718437.0,2949987.0,1581415.0,415606.0,749475.0,415613.0,445289.0,415647.0,494585.0,2485942.0,416957.0,476302.0,1518677.0,415618.0,707064.0],"skipIndex":0,"section_code":"gallery","featured_images":"2949987,749475,718461,415606","id":33374,"singleSection":false});				  						galleries[33375] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Lake District Landscapes","link":"gallery_33375.html","maxRecords":0.0,"photoIDs":[415662.0,446032.0,8820805.0,4402999.0,415655.0,493886.0,8803365.0,8803373.0,725214.0,1518704.0,1772990.0],"skipIndex":0,"section_code":"gallery","featured_images":"4402999,1772990,1518704","id":33375,"singleSection":false});				  						galleries[33376] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"New Zealand","link":"gallery_33376.html","maxRecords":0.0,"photoIDs":[720068.0,720091.0,707070.0,1518403.0,707124.0,8820504.0,8820594.0,8820615.0,414894.0,415610.0,415608.0,445194.0,445186.0,2294304.0,2294318.0,3011175.0,2950004.0,2950012.0,8457917.0,8463256.0],"skipIndex":0,"section_code":"gallery","featured_images":"2950012,2294304,720068,415610","id":33376,"singleSection":false});				  						galleries[33322] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Miscellaneous","link":"gallery_33322.html","maxRecords":0.0,"photoIDs":[416085.0,3685830.0,448117.0,1460302.0,476304.0,1772994.0,2298834.0],"skipIndex":0,"section_code":"gallery","featured_images":"1772994,416085","id":33322,"singleSection":false});				  						galleries[188140] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Scotland","link":"gallery_188140.html","maxRecords":0.0,"photoIDs":[4042086.0,4041930.0,3059675.0,3113277.0,3113287.0,3113282.0,3113291.0,3113294.0,3572850.0,3572855.0],"skipIndex":0,"section_code":"gallery","featured_images":"4041930,3572850","id":188140,"singleSection":false});				  						galleries[62516] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"North Wales","link":"gallery_62516.html","maxRecords":0.0,"photoIDs":[1460292.0],"skipIndex":0,"section_code":"gallery","featured_images":1460292.0,"id":62516,"singleSection":false});				  						galleries[67428] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Northumberland","link":"gallery_67428.html","maxRecords":0.0,"photoIDs":[879627.0,879653.0,879633.0,879670.0,879646.0,1518396.0],"skipIndex":0,"section_code":"gallery","featured_images":"879653,879646,879627","id":67428,"singleSection":false});				  						galleries[196935] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"DPAGB","link":"gallery_196935.html","maxRecords":0.0,"photoIDs":[3223962.0,3223986.0,3223994.0,3224014.0,3224004.0,3223972.0,3223976.0,3224011.0,3223991.0,3223997.0,3223999.0,3224002.0,3224003.0],"skipIndex":0,"section_code":"gallery","featured_images":"3224014,3224011,3224004,3224003,3224002,3223999,3223997,3223994,3223991,3223986","id":196935,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '718461,2949987,415606,749475,4402999,1518704,1772990,720068,445194,445186,2294304,2950012,1772994,879653,4041930,879646,3572850,1460292';
imageSets[2] = '718461,2949987,415606,749475,4402999,1518704,1772990,720068,415610,2294304,2950012,416085,1772994,879627,879653,4041930,879646,3572850,1460292';
imageSets[3] = '8820805,8820615,8820594,8820504,8803373,8803365,8463256,8457917,4402999,4042086,4041930,3685830,3572855,3572850,3224014,3224011,3224004,3224003,3224002,3223999,3223997,3223994,3223991,3223986,3223976,3223972,3223962,3113294,3113291,3113287,3113282,3113277,3059675,3011175,2950012,2950004,2949987,2485942,2298834,2294318,2294304,1772994,1772990,1581415,1518704,1518677,1518403,1518396,1460302,1460292';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/davidslade/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/davidslade/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/davidslade/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/davidslade/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/davidslade/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/davidslade/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/davidslade/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:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'David Slade MA, DPAGB, Photographer: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="DAVIDSLADE">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

