window.thumbnails = {};
															thumbnails[5752061] = clik.newPhoto({"id":5752061,"src":"Nocturnal09_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":89});
															thumbnails[6562051] = clik.newPhoto({"id":6562051,"src":"immortal_thumb.jpg","galleries_id":320388,"server_id":1,"link":"photo_6562051.html","width":130,"caption":"","height":89});
															thumbnails[6562055] = clik.newPhoto({"id":6562055,"src":"nocturnal_thumb.jpg","galleries_id":257383,"server_id":1,"link":"photo_6562055.html","width":130,"caption":"","height":89});
															thumbnails[6562056] = clik.newPhoto({"id":6562056,"src":"north_country_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6562056.html","width":130,"caption":"","height":89});
															thumbnails[6562061] = clik.newPhoto({"id":6562061,"src":"pptd_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_6562061.html","width":130,"caption":"","height":89});
															thumbnails[5752033] = clik.newPhoto({"id":5752033,"src":"Fuji-Highland_031_thumb.jpg","galleries_id":257383,"server_id":1,"link":"photo_5752033.html","width":130,"caption":"","height":89});
															thumbnails[6243808] = clik.newPhoto({"id":6243808,"src":"IMG_3785_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6243808.html","width":130,"caption":"","height":89});
															thumbnails[6963356] = clik.newPhoto({"id":6963356,"src":"frontier_thumb.jpg","galleries_id":377458,"server_id":1,"link":"photo_6963356.html","width":130,"caption":"","height":89});
															thumbnails[7056583] = clik.newPhoto({"id":7056583,"src":"St_Valantinus1_thumb.jpg","galleries_id":320388,"server_id":1,"link":"photo_7056583.html","width":160,"caption":"St Valantinus","height":192});
															thumbnails[5945942] = clik.newPhoto({"id":5945942,"src":"IMG_1466_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5945942.html","width":130,"caption":"","height":89});
															thumbnails[6166411] = clik.newPhoto({"id":6166411,"src":"dprk_02_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6166411.html","width":130,"caption":"","height":89});
															thumbnails[6963309] = clik.newPhoto({"id":6963309,"src":"frontier_01_thumb.JPG","galleries_id":377458,"server_id":1,"link":"photo_6963309.html","width":130,"caption":"","height":89});
															thumbnails[5752044] = clik.newPhoto({"id":5752044,"src":"Nocturnal02_thumb.jpg","galleries_id":257383,"server_id":1,"link":"photo_5752044.html","width":130,"caption":"","height":89});
															thumbnails[6166416] = clik.newPhoto({"id":6166416,"src":"dprk_03_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6166416.html","width":130,"caption":"","height":89});
															thumbnails[6166715] = clik.newPhoto({"id":6166715,"src":"IMG_2279_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_6166715.html","width":130,"caption":"","height":89});
															thumbnails[6963341] = clik.newPhoto({"id":6963341,"src":"frontier_02_thumb.JPG","galleries_id":377458,"server_id":1,"link":"photo_6963341.html","width":130,"caption":"","height":89});
															thumbnails[7056584] = clik.newPhoto({"id":7056584,"src":"St_Alexander12_thumb.jpg","galleries_id":320388,"server_id":1,"link":"photo_7056584.html","width":160,"caption":"St Alexander","height":192});
															thumbnails[6166420] = clik.newPhoto({"id":6166420,"src":"dprk_04_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6166420.html","width":130,"caption":"","height":89});
															thumbnails[6243812] = clik.newPhoto({"id":6243812,"src":"IMG_3327_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6243812.html","width":130,"caption":"","height":89});
															thumbnails[5752045] = clik.newPhoto({"id":5752045,"src":"Nocturnal03_thumb.jpg","galleries_id":257383,"server_id":1,"link":"photo_5752045.html","width":130,"caption":"","height":89});
															thumbnails[6166421] = clik.newPhoto({"id":6166421,"src":"dprk_05_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6166421.html","width":130,"caption":"","height":89});
															thumbnails[6963342] = clik.newPhoto({"id":6963342,"src":"frontier_03_thumb.JPG","galleries_id":377458,"server_id":1,"link":"photo_6963342.html","width":130,"caption":"","height":89});
															thumbnails[7056576] = clik.newPhoto({"id":7056576,"src":"St_Maximus_thumb.jpg","galleries_id":320388,"server_id":1,"link":"photo_7056576.html","width":160,"caption":"St Maximus","height":192});
															thumbnails[5850283] = clik.newPhoto({"id":5850283,"src":"jukai06_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5850283.html","width":130,"caption":"","height":89});
															thumbnails[6166424] = clik.newPhoto({"id":6166424,"src":"dprk_06_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6166424.html","width":130,"caption":"","height":89});
															thumbnails[5752048] = clik.newPhoto({"id":5752048,"src":"Nocturnal04_thumb.jpg","galleries_id":257383,"server_id":1,"link":"photo_5752048.html","width":130,"caption":"","height":89});
															thumbnails[5850292] = clik.newPhoto({"id":5850292,"src":"jukai07_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5850292.html","width":130,"caption":"","height":89});
															thumbnails[6166426] = clik.newPhoto({"id":6166426,"src":"dprk_07_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6166426.html","width":130,"caption":"","height":89});
															thumbnails[6963343] = clik.newPhoto({"id":6963343,"src":"frontier_04_thumb.JPG","galleries_id":377458,"server_id":1,"link":"photo_6963343.html","width":130,"caption":"","height":89});
															thumbnails[7056590] = clik.newPhoto({"id":7056590,"src":"St_Theodosi_Miles1_thumb.jpg","galleries_id":320388,"server_id":1,"link":"photo_7056590.html","width":160,"caption":"St Theodosi Miles","height":192});
															thumbnails[5850309] = clik.newPhoto({"id":5850309,"src":"jukai11_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5850309.html","width":130,"caption":"","height":89});
															thumbnails[6166448] = clik.newPhoto({"id":6166448,"src":"dprk_08_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6166448.html","width":130,"caption":"","height":89});
															thumbnails[5752052] = clik.newPhoto({"id":5752052,"src":"Nocturnal05_thumb.jpg","galleries_id":257383,"server_id":1,"link":"photo_5752052.html","width":130,"caption":"","height":89});
															thumbnails[5850306] = clik.newPhoto({"id":5850306,"src":"jukai10_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5850306.html","width":130,"caption":"","height":89});
															thumbnails[6963344] = clik.newPhoto({"id":6963344,"src":"frontier_05_thumb.JPG","galleries_id":377458,"server_id":1,"link":"photo_6963344.html","width":130,"caption":"","height":89});
															thumbnails[7056591] = clik.newPhoto({"id":7056591,"src":"St_Deodatus1_thumb.jpg","galleries_id":320388,"server_id":1,"link":"photo_7056591.html","width":160,"caption":"St Deodatus","height":192});
															thumbnails[5752055] = clik.newPhoto({"id":5752055,"src":"Nocturnal06_thumb.jpg","galleries_id":257383,"server_id":1,"link":"photo_5752055.html","width":130,"caption":"","height":89});
															thumbnails[6166480] = clik.newPhoto({"id":6166480,"src":"dprk_11_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6166480.html","width":130,"caption":"","height":89});
															thumbnails[6963345] = clik.newPhoto({"id":6963345,"src":"frontier_06_thumb.JPG","galleries_id":377458,"server_id":1,"link":"photo_6963345.html","width":130,"caption":"","height":89});
															thumbnails[7056592] = clik.newPhoto({"id":7056592,"src":"St_Gratian_thumb.jpg","galleries_id":320388,"server_id":1,"link":"photo_7056592.html","width":160,"caption":"St Gratian","height":192});
															thumbnails[6166528] = clik.newPhoto({"id":6166528,"src":"dprk_12_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6166528.html","width":130,"caption":"","height":89});
															thumbnails[6166742] = clik.newPhoto({"id":6166742,"src":"IMG_2995_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_6166742.html","width":130,"caption":"","height":89});
															thumbnails[6243811] = clik.newPhoto({"id":6243811,"src":"dprk_13_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6243811.html","width":130,"caption":"","height":89});
															thumbnails[6963346] = clik.newPhoto({"id":6963346,"src":"frontier_07_thumb.JPG","galleries_id":377458,"server_id":1,"link":"photo_6963346.html","width":130,"caption":"","height":89});
															thumbnails[7056595] = clik.newPhoto({"id":7056595,"src":"St_Vitalian_thumb.jpg","galleries_id":320388,"server_id":1,"link":"photo_7056595.html","width":160,"caption":"St Vitalian","height":192});
															thumbnails[5726063] = clik.newPhoto({"id":5726063,"src":"IMG_9509_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5726063.html","width":130,"caption":"","height":89});
															thumbnails[6166534] = clik.newPhoto({"id":6166534,"src":"dprk_14_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6166534.html","width":130,"caption":"","height":89});
															thumbnails[5752056] = clik.newPhoto({"id":5752056,"src":"Nocturnal07_thumb.jpg","galleries_id":257383,"server_id":1,"link":"photo_5752056.html","width":130,"caption":"","height":89});
															thumbnails[5850316] = clik.newPhoto({"id":5850316,"src":"jukai14_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5850316.html","width":130,"caption":"","height":89});
															thumbnails[6166561] = clik.newPhoto({"id":6166561,"src":"dprk_15_thumb.jpg","galleries_id":344771,"server_id":1,"link":"photo_6166561.html","width":130,"caption":"","height":89});
															thumbnails[6963347] = clik.newPhoto({"id":6963347,"src":"frontier_08_thumb.JPG","galleries_id":377458,"server_id":1,"link":"photo_6963347.html","width":130,"caption":"","height":89});
															thumbnails[7056603] = clik.newPhoto({"id":7056603,"src":"St_Victorius_thumb.jpg","galleries_id":320388,"server_id":1,"link":"photo_7056603.html","width":160,"caption":"St Victorius","height":192});
															thumbnails[5750967] = clik.newPhoto({"id":5750967,"src":"Jukai_04_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5750967.html","width":130,"caption":"","height":89});
															thumbnails[5751008] = clik.newPhoto({"id":5751008,"src":"Jukai_07_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5751008.html","width":130,"caption":"","height":89});
															thumbnails[6963348] = clik.newPhoto({"id":6963348,"src":"frontier_09_thumb.JPG","galleries_id":377458,"server_id":1,"link":"photo_6963348.html","width":130,"caption":"","height":89});
															thumbnails[7056606] = clik.newPhoto({"id":7056606,"src":"St_Maximinus_thumb.jpg","galleries_id":320388,"server_id":1,"link":"photo_7056606.html","width":160,"caption":"St Maximus","height":191});
															thumbnails[5751018] = clik.newPhoto({"id":5751018,"src":"Jukai_10_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5751018.html","width":130,"caption":"","height":89});
															thumbnails[5751010] = clik.newPhoto({"id":5751010,"src":"Jukai_08_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5751010.html","width":130,"caption":"","height":89});
															thumbnails[5825192] = clik.newPhoto({"id":5825192,"src":"IMG_0975_thumb.jpg","galleries_id":257383,"server_id":1,"link":"photo_5825192.html","width":130,"caption":"","height":89});
															thumbnails[6963349] = clik.newPhoto({"id":6963349,"src":"frontier_10_thumb.JPG","galleries_id":377458,"server_id":1,"link":"photo_6963349.html","width":130,"caption":"","height":89});
															thumbnails[5850326] = clik.newPhoto({"id":5850326,"src":"jukai20_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5850326.html","width":130,"caption":"","height":89});
															thumbnails[5751038] = clik.newPhoto({"id":5751038,"src":"Jukai_14_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5751038.html","width":130,"caption":"","height":89});
															thumbnails[6963350] = clik.newPhoto({"id":6963350,"src":"frontier_11_thumb.JPG","galleries_id":377458,"server_id":1,"link":"photo_6963350.html","width":130,"caption":"","height":89});
															thumbnails[5751030] = clik.newPhoto({"id":5751030,"src":"Jukai_12_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5751030.html","width":130,"caption":"","height":89});
															thumbnails[5825188] = clik.newPhoto({"id":5825188,"src":"IMG_1072_thumb.jpg","galleries_id":257383,"server_id":1,"link":"photo_5825188.html","width":130,"caption":"","height":89});
															thumbnails[5945950] = clik.newPhoto({"id":5945950,"src":"IMG_1534_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5945950.html","width":130,"caption":"","height":89});
															thumbnails[6963351] = clik.newPhoto({"id":6963351,"src":"frontier_12_thumb.JPG","galleries_id":377458,"server_id":1,"link":"photo_6963351.html","width":130,"caption":"","height":89});
															thumbnails[5751066] = clik.newPhoto({"id":5751066,"src":"Jukai_16_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5751066.html","width":130,"caption":"","height":89});
															thumbnails[5751071] = clik.newPhoto({"id":5751071,"src":"Jukai_18_thumb.jpg","galleries_id":197817,"server_id":1,"link":"photo_5751071.html","width":130,"caption":"","height":89});
															thumbnails[6963353] = clik.newPhoto({"id":6963353,"src":"frontier_13_thumb.JPG","galleries_id":377458,"server_id":1,"link":"photo_6963353.html","width":130,"caption":"","height":89});
															thumbnails[6963354] = clik.newPhoto({"id":6963354,"src":"frontier_14_thumb.JPG","galleries_id":377458,"server_id":1,"link":"photo_6963354.html","width":130,"caption":"","height":89});
															thumbnails[5752707] = clik.newPhoto({"id":5752707,"src":"text-jack_thumb.jpg","galleries_id":267099,"server_id":1,"link":"photo_5752707.html","width":130,"caption":"","height":89});
															thumbnails[5752724] = clik.newPhoto({"id":5752724,"src":"text-horror_thumb.jpg","galleries_id":257571,"server_id":1,"link":"photo_5752724.html","width":130,"caption":"","height":89});
															thumbnails[6562059] = clik.newPhoto({"id":6562059,"src":"plateau_thumb.jpg","galleries_id":344690,"server_id":1,"link":"photo_6562059.html","width":130,"caption":"","height":89});
															thumbnails[4385655] = clik.newPhoto({"id":4385655,"src":"The_American_Dream_001_thumb.jpg","galleries_id":324321,"server_id":1,"link":"photo_4385655.html","width":130,"caption":"","height":87});
															thumbnails[4389335] = clik.newPhoto({"id":4389335,"src":"poltergeist_thumb.jpg","galleries_id":257571,"server_id":1,"link":"photo_4389335.html","width":130,"caption":"poltergeist","height":87});
															thumbnails[6164133] = clik.newPhoto({"id":6164133,"src":"plateau_01_thumb.jpg","galleries_id":344690,"server_id":1,"link":"photo_6164133.html","width":130,"caption":"","height":89});
															thumbnails[7280789] = clik.newPhoto({"id":7280789,"src":"annie-chapman_thumb.jpg","galleries_id":267099,"server_id":1,"link":"photo_7280789.html","width":160,"caption":"Annie Chapman","height":106});
															thumbnails[4385658] = clik.newPhoto({"id":4385658,"src":"The_American_Dream_002_thumb.jpg","galleries_id":324321,"server_id":1,"link":"photo_4385658.html","width":130,"caption":"","height":87});
															thumbnails[4389337] = clik.newPhoto({"id":4389337,"src":"halloween1_thumb.jpg","galleries_id":257571,"server_id":1,"link":"photo_4389337.html","width":130,"caption":"halloween","height":87});
															thumbnails[6164134] = clik.newPhoto({"id":6164134,"src":"plateau_02_thumb.jpg","galleries_id":344690,"server_id":1,"link":"photo_6164134.html","width":130,"caption":"","height":89});
															thumbnails[7280798] = clik.newPhoto({"id":7280798,"src":"catherine-eddows_thumb.jpg","galleries_id":267099,"server_id":1,"link":"photo_7280798.html","width":160,"caption":"Catherine Eddows","height":106});
															thumbnails[4389449] = clik.newPhoto({"id":4389449,"src":"the_amityville_horror_thumb.jpg","galleries_id":257571,"server_id":1,"link":"photo_4389449.html","width":130,"caption":"the amityville horror","height":87});
															thumbnails[7280763] = clik.newPhoto({"id":7280763,"src":"alice-mckenzie_74AE0C9A-24E8-5EC4-4F0165E2AB6D51C9_thumb.jpg","galleries_id":267099,"server_id":1,"link":"photo_7280763.html","width":160,"caption":"Alice McKenzie","height":106});
															thumbnails[4389452] = clik.newPhoto({"id":4389452,"src":"a_nightmare_on_elm_street_thumb.jpg","galleries_id":257571,"server_id":1,"link":"photo_4389452.html","width":130,"caption":"a nightmare on elm street","height":87});
															thumbnails[6164136] = clik.newPhoto({"id":6164136,"src":"plateau_04_thumb.jpg","galleries_id":344690,"server_id":1,"link":"photo_6164136.html","width":130,"caption":"","height":89});
															thumbnails[7280795] = clik.newPhoto({"id":7280795,"src":"elizabeth-stride_thumb.jpg","galleries_id":267099,"server_id":1,"link":"photo_7280795.html","width":160,"caption":"Elizabeth Stride","height":107});
															thumbnails[4385678] = clik.newPhoto({"id":4385678,"src":"The_American_Dream_005_thumb.jpg","galleries_id":324321,"server_id":1,"link":"photo_4385678.html","width":130,"caption":"","height":87});
															thumbnails[4389454] = clik.newPhoto({"id":4389454,"src":"the_exorcist_thumb.jpg","galleries_id":257571,"server_id":1,"link":"photo_4389454.html","width":130,"caption":"the exorcist","height":87});
															thumbnails[6519752] = clik.newPhoto({"id":6519752,"src":"P1010485_thumb.jpg","galleries_id":344690,"server_id":1,"link":"photo_6519752.html","width":130,"caption":"","height":89});
															thumbnails[7280608] = clik.newPhoto({"id":7280608,"src":"Martha_Turner_thumb.jpg","galleries_id":267099,"server_id":1,"link":"photo_7280608.html","width":160,"caption":"Martha Turner","height":106});
															thumbnails[6164145] = clik.newPhoto({"id":6164145,"src":"plateau_06_thumb.jpg","galleries_id":344690,"server_id":1,"link":"photo_6164145.html","width":130,"caption":"","height":89});
															thumbnails[7280620] = clik.newPhoto({"id":7280620,"src":"Mary_Anne_Nichols_thumb.jpg","galleries_id":267099,"server_id":1,"link":"photo_7280620.html","width":160,"caption":"Mary Anne Nichols","height":106});
															thumbnails[4385684] = clik.newPhoto({"id":4385684,"src":"The_American_Dream_007_thumb.jpg","galleries_id":324321,"server_id":1,"link":"photo_4385684.html","width":130,"caption":"","height":87});
															thumbnails[7280801] = clik.newPhoto({"id":7280801,"src":"mary-jane-kelly_thumb.jpg","galleries_id":267099,"server_id":1,"link":"photo_7280801.html","width":160,"caption":"Mary Jane Kelly","height":107});
															thumbnails[4385686] = clik.newPhoto({"id":4385686,"src":"The_American_Dream_008_thumb.jpg","galleries_id":324321,"server_id":1,"link":"photo_4385686.html","width":130,"caption":"","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[324321] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"American dreams","link":"section389066_324321.html","maxRecords":0.0,"photoIDs":[4385655.0,4385658.0,4385678.0,4385684.0,4385686.0],"skipIndex":0,"section_code":"section389066","featured_images":4385655.0,"id":324321,"singleSection":false});				  						galleries[197817] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"the perfect place to die","link":"gallery_197817.html","maxRecords":0.0,"photoIDs":[6562061.0,5945942.0,6166715.0,5850283.0,5850292.0,5850309.0,5850306.0,6166742.0,5726063.0,5850316.0,5750967.0,5751008.0,5751018.0,5751010.0,5850326.0,5751038.0,5751030.0,5945950.0,5751066.0,5751071.0],"skipIndex":0,"section_code":"gallery","featured_images":"6166742,5726063","id":197817,"singleSection":false});				  						galleries[344771] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"republic","link":"gallery_344771.html","maxRecords":0.0,"photoIDs":[6562056.0,6243808.0,6166411.0,6166416.0,6166420.0,6243812.0,6166421.0,6166424.0,6166426.0,6166448.0,6166480.0,6166528.0,6243811.0,6166534.0,6166561.0],"skipIndex":0,"section_code":"gallery","featured_images":6166480.0,"id":344771,"singleSection":false});				  						galleries[320388] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"immortal","link":"gallery_320388.html","maxRecords":0.0,"photoIDs":[6562051.0,7056583.0,7056584.0,7056576.0,7056590.0,7056591.0,7056592.0,7056595.0,7056603.0,7056606.0],"skipIndex":0,"section_code":"gallery","featured_images":7056583.0,"id":320388,"singleSection":false});				  						galleries[377458] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"frontier","link":"gallery_377458.html","maxRecords":0.0,"photoIDs":[6963356.0,6963309.0,6963341.0,6963342.0,6963343.0,6963344.0,6963345.0,6963346.0,6963347.0,6963348.0,6963349.0,6963350.0,6963351.0,6963353.0,6963354.0],"skipIndex":0,"section_code":"gallery","featured_images":6963341.0,"id":377458,"singleSection":false});				  						galleries[257571] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"horror houses","link":"section389066_257571.html","maxRecords":0.0,"photoIDs":[5752724.0,4389335.0,4389337.0,4389449.0,4389452.0,4389454.0],"skipIndex":0,"section_code":"section389066","featured_images":4389449.0,"id":257571,"singleSection":false});				  						galleries[267099] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"jack","link":"section389066_267099.html","maxRecords":0.0,"photoIDs":[5752707.0,7280789.0,7280798.0,7280763.0,7280795.0,7280608.0,7280620.0,7280801.0],"skipIndex":0,"section_code":"section389066","featured_images":"7280801,7280798,7280795,7280789,7280763,7280620,7280608,5752707","id":267099,"singleSection":false});				  						galleries[257383] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"nocturnal","link":"gallery_257383.html","maxRecords":0.0,"photoIDs":[6562055.0,5752033.0,5752044.0,5752045.0,5752048.0,5752052.0,5752055.0,5752056.0,5825192.0,5825188.0],"skipIndex":0,"section_code":"gallery","featured_images":5752048.0,"id":257383,"singleSection":false});				  						galleries[344690] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"plateau","link":"section389066_344690.html","maxRecords":0.0,"photoIDs":[6562059.0,6164133.0,6164134.0,6164136.0,6519752.0,6164145.0],"skipIndex":0,"section_code":"section389066","featured_images":6164133.0,"id":344690,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '5752061';
imageSets[2] = '7056583,6963341,6166742,6166480,6164133,5752048,5726063,4389449,4385655';
imageSets[3] = '7280801,7280798,7280795,7280789,7280763,7280620,7280608,7056606,7056603,7056595,7056592,7056591,7056590,7056584,7056583,7056576,6963356,6963354,6963353,6963351,6963350,6963349,6963348,6963347,6963346,6963345,6963344,6963343,6963342,6963341,6963309,6562061,6562059,6562056,6562055,6562051,6519752,6243812,6243811,6243808,6166742,6166715,6166561,6166534,6166528,6166480,6166448,6166426,6166424,6166421';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/tobiasthe1st/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/tobiasthe1st/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 = 'toby de silva photography';
			    }
        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>';
	}
				
				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>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (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="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		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 += '<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 += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

