window.thumbnails = {};
															thumbnails[8129988] = clik.newPhoto({"id":8129988,"src":"_DSC2816_thumb.JPG","galleries_id":434851,"server_id":5,"link":"photo_8129988.html","width":130,"caption":"","height":195});
															thumbnails[8129989] = clik.newPhoto({"id":8129989,"src":"_DSC2817_thumb.JPG","galleries_id":434851,"server_id":5,"link":"photo_8129989.html","width":130,"caption":"","height":195});
															thumbnails[8129992] = clik.newPhoto({"id":8129992,"src":"_DSC2895_thumb.JPG","galleries_id":434851,"server_id":5,"link":"photo_8129992.html","width":130,"caption":"","height":195});
															thumbnails[8129994] = clik.newPhoto({"id":8129994,"src":"_DSC2896_thumb.JPG","galleries_id":434851,"server_id":5,"link":"photo_8129994.html","width":130,"caption":"","height":195});
															thumbnails[8129997] = clik.newPhoto({"id":8129997,"src":"_DSC3657_thumb.JPG","galleries_id":434851,"server_id":5,"link":"photo_8129997.html","width":130,"caption":"","height":195});
															thumbnails[8130000] = clik.newPhoto({"id":8130000,"src":"_DSC3753_thumb.JPG","galleries_id":434851,"server_id":5,"link":"photo_8130000.html","width":130,"caption":"","height":195});
															thumbnails[8130002] = clik.newPhoto({"id":8130002,"src":"1_thumb.JPG","galleries_id":434851,"server_id":5,"link":"photo_8130002.html","width":130,"caption":"","height":87});
															thumbnails[8130003] = clik.newPhoto({"id":8130003,"src":"2_thumb.JPG","galleries_id":434851,"server_id":5,"link":"photo_8130003.html","width":130,"caption":"","height":86});
															thumbnails[8130005] = clik.newPhoto({"id":8130005,"src":"raps_thumb.JPG","galleries_id":434851,"server_id":5,"link":"photo_8130005.html","width":130,"caption":"","height":200});
															thumbnails[8130007] = clik.newPhoto({"id":8130007,"src":"THL_2402_thumb.JPG","galleries_id":434851,"server_id":5,"link":"photo_8130007.html","width":130,"caption":"","height":87});
															thumbnails[8130009] = clik.newPhoto({"id":8130009,"src":"THL_2773_thumb.JPG","galleries_id":434851,"server_id":5,"link":"photo_8130009.html","width":130,"caption":"","height":86});
															thumbnails[8130010] = clik.newPhoto({"id":8130010,"src":"THL_17305_thumb.JPG","galleries_id":434851,"server_id":5,"link":"photo_8130010.html","width":130,"caption":"","height":87});
															thumbnails[8130011] = clik.newPhoto({"id":8130011,"src":"_THL9007_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8130011.html","width":130,"caption":"","height":201});
															thumbnails[8130012] = clik.newPhoto({"id":8130012,"src":"_THL9035_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8130012.html","width":130,"caption":"","height":194});
															thumbnails[8130014] = clik.newPhoto({"id":8130014,"src":"_THL9037_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8130014.html","width":130,"caption":"","height":194});
															thumbnails[8130015] = clik.newPhoto({"id":8130015,"src":"_THL9039_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8130015.html","width":130,"caption":"","height":194});
															thumbnails[8130024] = clik.newPhoto({"id":8130024,"src":"_THL90371_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8130024.html","width":130,"caption":"","height":194});
															thumbnails[8130032] = clik.newPhoto({"id":8130032,"src":"THL_66911_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8130032.html","width":130,"caption":"","height":87});
															thumbnails[8130033] = clik.newPhoto({"id":8130033,"src":"THL_66921_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8130033.html","width":130,"caption":"","height":87});
															thumbnails[8130039] = clik.newPhoto({"id":8130039,"src":"THL_66941_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8130039.html","width":130,"caption":"","height":194});
															thumbnails[8130040] = clik.newPhoto({"id":8130040,"src":"THL_66961_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8130040.html","width":130,"caption":"","height":194});
															thumbnails[8130042] = clik.newPhoto({"id":8130042,"src":"alsion_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8130042.html","width":130,"caption":"","height":61});
															thumbnails[8136333] = clik.newPhoto({"id":8136333,"src":"THL_5293_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8136333.html","width":130,"caption":"","height":194});
															thumbnails[8136335] = clik.newPhoto({"id":8136335,"src":"THL_5295_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8136335.html","width":130,"caption":"","height":87});
															thumbnails[8136336] = clik.newPhoto({"id":8136336,"src":"THL_6639_40_41_42_43_tonemapped_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8136336.html","width":130,"caption":"","height":58});
															thumbnails[8136338] = clik.newPhoto({"id":8136338,"src":"THL_4975_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8136338.html","width":130,"caption":"","height":77});
															thumbnails[8136339] = clik.newPhoto({"id":8136339,"src":"Mølle_på_Ærø-11_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8136339.html","width":130,"caption":"","height":86});
															thumbnails[8136340] = clik.newPhoto({"id":8136340,"src":"THL_4915_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8136340.html","width":130,"caption":"","height":200});
															thumbnails[8136342] = clik.newPhoto({"id":8136342,"src":"THL_5963_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8136342.html","width":130,"caption":"","height":194});
															thumbnails[8136343] = clik.newPhoto({"id":8136343,"src":"Træ_ved_slot-1_thumb.JPG","galleries_id":434852,"server_id":5,"link":"photo_8136343.html","width":130,"caption":"","height":208});
															thumbnails[8136346] = clik.newPhoto({"id":8136346,"src":"1_24F27E20-1E4F-37DC-71BEC1708A00050C_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136346.html","width":130,"caption":"","height":202});
															thumbnails[8136347] = clik.newPhoto({"id":8136347,"src":"2_24F2A15A-1E4F-37DC-71CC3F6855189213_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136347.html","width":130,"caption":"","height":194});
															thumbnails[8136348] = clik.newPhoto({"id":8136348,"src":"3_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136348.html","width":130,"caption":"","height":197});
															thumbnails[8136351] = clik.newPhoto({"id":8136351,"src":"5_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136351.html","width":130,"caption":"","height":202});
															thumbnails[8136354] = clik.newPhoto({"id":8136354,"src":"6_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136354.html","width":130,"caption":"","height":196});
															thumbnails[8136356] = clik.newPhoto({"id":8136356,"src":"7_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136356.html","width":130,"caption":"","height":208});
															thumbnails[8136360] = clik.newPhoto({"id":8136360,"src":"8_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136360.html","width":130,"caption":"","height":194});
															thumbnails[8136361] = clik.newPhoto({"id":8136361,"src":"9_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136361.html","width":130,"caption":"","height":194});
															thumbnails[8136362] = clik.newPhoto({"id":8136362,"src":"10_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136362.html","width":130,"caption":"","height":165});
															thumbnails[8136363] = clik.newPhoto({"id":8136363,"src":"71_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136363.html","width":130,"caption":"","height":208});
															thumbnails[8136365] = clik.newPhoto({"id":8136365,"src":"11_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136365.html","width":130,"caption":"","height":102});
															thumbnails[8136367] = clik.newPhoto({"id":8136367,"src":"12_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136367.html","width":130,"caption":"","height":112});
															thumbnails[8136368] = clik.newPhoto({"id":8136368,"src":"13_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136368.html","width":130,"caption":"","height":106});
															thumbnails[8136369] = clik.newPhoto({"id":8136369,"src":"14_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136369.html","width":130,"caption":"","height":86});
															thumbnails[8136371] = clik.newPhoto({"id":8136371,"src":"15_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136371.html","width":130,"caption":"","height":81});
															thumbnails[8136373] = clik.newPhoto({"id":8136373,"src":"16_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136373.html","width":130,"caption":"","height":87});
															thumbnails[8136377] = clik.newPhoto({"id":8136377,"src":"17_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136377.html","width":130,"caption":"","height":90});
															thumbnails[8136396] = clik.newPhoto({"id":8136396,"src":"18_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136396.html","width":130,"caption":"","height":87});
															thumbnails[8136413] = clik.newPhoto({"id":8136413,"src":"211_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136413.html","width":130,"caption":"","height":87});
															thumbnails[8136416] = clik.newPhoto({"id":8136416,"src":"24_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136416.html","width":130,"caption":"","height":83});
															thumbnails[8136417] = clik.newPhoto({"id":8136417,"src":"25_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136417.html","width":130,"caption":"","height":132});
															thumbnails[8136421] = clik.newPhoto({"id":8136421,"src":"221_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136421.html","width":130,"caption":"","height":196});
															thumbnails[8136425] = clik.newPhoto({"id":8136425,"src":"231_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136425.html","width":130,"caption":"","height":196});
															thumbnails[8136428] = clik.newPhoto({"id":8136428,"src":"191_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136428.html","width":130,"caption":"","height":209});
															thumbnails[8136429] = clik.newPhoto({"id":8136429,"src":"201_thumb.JPG","galleries_id":434853,"server_id":5,"link":"photo_8136429.html","width":130,"caption":"","height":147});
															thumbnails[8136604] = clik.newPhoto({"id":8136604,"src":"1_2505EAF9-1E4F-37DC-7125708F33675A5B_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136604.html","width":130,"caption":"","height":83});
															thumbnails[8136637] = clik.newPhoto({"id":8136637,"src":"2_25066395-1E4F-37DC-7151309287848461_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136637.html","width":130,"caption":"","height":86});
															thumbnails[8136652] = clik.newPhoto({"id":8136652,"src":"31_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136652.html","width":130,"caption":"","height":75});
															thumbnails[8136653] = clik.newPhoto({"id":8136653,"src":"41_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136653.html","width":130,"caption":"","height":78});
															thumbnails[8136654] = clik.newPhoto({"id":8136654,"src":"51_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136654.html","width":130,"caption":"","height":86});
															thumbnails[8136655] = clik.newPhoto({"id":8136655,"src":"61_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136655.html","width":130,"caption":"","height":85});
															thumbnails[8136656] = clik.newPhoto({"id":8136656,"src":"72_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136656.html","width":130,"caption":"","height":81});
															thumbnails[8136674] = clik.newPhoto({"id":8136674,"src":"81_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136674.html","width":130,"caption":"","height":84});
															thumbnails[8136696] = clik.newPhoto({"id":8136696,"src":"91_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136696.html","width":130,"caption":"","height":82});
															thumbnails[8136730] = clik.newPhoto({"id":8136730,"src":"101_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136730.html","width":130,"caption":"","height":81});
															thumbnails[8136775] = clik.newPhoto({"id":8136775,"src":"111_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136775.html","width":130,"caption":"","height":176});
															thumbnails[8136788] = clik.newPhoto({"id":8136788,"src":"121_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136788.html","width":130,"caption":"","height":174});
															thumbnails[8136789] = clik.newPhoto({"id":8136789,"src":"141_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136789.html","width":130,"caption":"","height":87});
															thumbnails[8136790] = clik.newPhoto({"id":8136790,"src":"151_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136790.html","width":130,"caption":"","height":85});
															thumbnails[8136791] = clik.newPhoto({"id":8136791,"src":"132_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136791.html","width":130,"caption":"","height":122});
															thumbnails[8136792] = clik.newPhoto({"id":8136792,"src":"161_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136792.html","width":130,"caption":"","height":45});
															thumbnails[8136793] = clik.newPhoto({"id":8136793,"src":"171_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136793.html","width":130,"caption":"","height":45});
															thumbnails[8136796] = clik.newPhoto({"id":8136796,"src":"181_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136796.html","width":130,"caption":"","height":92});
															thumbnails[8136797] = clik.newPhoto({"id":8136797,"src":"192_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136797.html","width":130,"caption":"","height":68});
															thumbnails[8136798] = clik.newPhoto({"id":8136798,"src":"202_thumb.JPG","galleries_id":434854,"server_id":5,"link":"photo_8136798.html","width":130,"caption":"","height":47});
															thumbnails[8188933] = clik.newPhoto({"id":8188933,"src":"THL_6639_40_41_42_43_tonemapped_587B950F-1EC9-D45B-1C37D8890E49BCED_thumb.JPG","galleries_id":437130,"server_id":5,"link":"photo_8188933.html","width":130,"caption":"","height":58});
															thumbnails[8188935] = clik.newPhoto({"id":8188935,"src":"alsion_587BE2F0-1EC9-D45B-1C45B8AB5EC592C2_thumb.JPG","galleries_id":437130,"server_id":5,"link":"photo_8188935.html","width":130,"caption":"","height":61});
															thumbnails[8188937] = clik.newPhoto({"id":8188937,"src":"THL_6691_thumb.JPG","galleries_id":437130,"server_id":5,"link":"photo_8188937.html","width":130,"caption":"","height":87});
															thumbnails[8188939] = clik.newPhoto({"id":8188939,"src":"THL_6692_thumb.JPG","galleries_id":437130,"server_id":5,"link":"photo_8188939.html","width":130,"caption":"","height":87});
															thumbnails[8188940] = clik.newPhoto({"id":8188940,"src":"THL_6694_thumb.JPG","galleries_id":437130,"server_id":5,"link":"photo_8188940.html","width":130,"caption":"","height":194});
															thumbnails[8188941] = clik.newPhoto({"id":8188941,"src":"THL_6696_thumb.JPG","galleries_id":437130,"server_id":5,"link":"photo_8188941.html","width":130,"caption":"","height":194});
															thumbnails[8188946] = clik.newPhoto({"id":8188946,"src":"alsion_58810593-1EC9-D45B-1C9B68FEB5B42F19_thumb.JPG","galleries_id":437132,"server_id":5,"link":"photo_8188946.html","width":130,"caption":"","height":61});
															thumbnails[8188947] = clik.newPhoto({"id":8188947,"src":"THL_6639_40_41_42_43_tonemapped_58813DBA-1EC9-D45B-1CD224BEF1B28A30_thumb.JPG","galleries_id":437132,"server_id":5,"link":"photo_8188947.html","width":130,"caption":"","height":58});
															thumbnails[8188949] = clik.newPhoto({"id":8188949,"src":"12_588224CE-1EC9-D45B-1C08605AE05D4BFC_thumb.JPG","galleries_id":437132,"server_id":5,"link":"photo_8188949.html","width":130,"caption":"","height":112});
															thumbnails[8188952] = clik.newPhoto({"id":8188952,"src":"16_5883270C-1EC9-D45B-1C5AFAEE05652DDB_thumb.JPG","galleries_id":437132,"server_id":5,"link":"photo_8188952.html","width":130,"caption":"","height":106});
															thumbnails[8188953] = clik.newPhoto({"id":8188953,"src":"Træ_ved_slot-1_5883504E-1EC9-D45B-1CD8195B4D699584_thumb.JPG","galleries_id":437132,"server_id":5,"link":"photo_8188953.html","width":130,"caption":"","height":208});
															thumbnails[8188955] = clik.newPhoto({"id":8188955,"src":"Træ_ved_slot-2_thumb.JPG","galleries_id":437132,"server_id":5,"link":"photo_8188955.html","width":130,"caption":"","height":87});
															thumbnails[8188963] = clik.newPhoto({"id":8188963,"src":"alsion-2_-FISH-2_thumb.JPG","galleries_id":437132,"server_id":5,"link":"photo_8188963.html","width":130,"caption":"","height":82});
															thumbnails[8188965] = clik.newPhoto({"id":8188965,"src":"Alssundbroen-1_thumb.JPG","galleries_id":437132,"server_id":5,"link":"photo_8188965.html","width":130,"caption":"","height":88});
															thumbnails[8188966] = clik.newPhoto({"id":8188966,"src":"Havn_thumb.JPG","galleries_id":437132,"server_id":5,"link":"photo_8188966.html","width":130,"caption":"","height":51});
															thumbnails[8253186] = clik.newPhoto({"id":8253186,"src":"THL_5293_9A5B5A85-24E8-5EC4-4F299277AF594348_thumb.JPG","galleries_id":437130,"server_id":37,"link":"photo_8253186.html","width":130,"caption":"","height":194});
															thumbnails[8253188] = clik.newPhoto({"id":8253188,"src":"THL_5297_thumb.JPG","galleries_id":437130,"server_id":37,"link":"photo_8253188.html","width":130,"caption":"","height":194});
															thumbnails[8253191] = clik.newPhoto({"id":8253191,"src":"THL_5295_9A5BC45B-24E8-5EC4-4FBDF83957522D6C_thumb.JPG","galleries_id":437130,"server_id":37,"link":"photo_8253191.html","width":130,"caption":"","height":87});
															thumbnails[8253192] = clik.newPhoto({"id":8253192,"src":"silo_thumb.JPG","galleries_id":437132,"server_id":37,"link":"photo_8253192.html","width":130,"caption":"","height":87});
															thumbnails[8253195] = clik.newPhoto({"id":8253195,"src":"silo-1_thumb.JPG","galleries_id":437132,"server_id":37,"link":"photo_8253195.html","width":130,"caption":"","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[434851] = clik.newGallery({"parentGallery":"","usePopups":true,"title":2008.0,"link":"gallery_434851.html","maxRecords":0.0,"photoIDs":[8129988.0,8129989.0,8129992.0,8129994.0,8129997.0,8130000.0,8130002.0,8130003.0,8130005.0,8130007.0,8130009.0,8130010.0],"skipIndex":0,"section_code":"gallery","featured_images":8129994.0,"id":434851,"singleSection":false});				  						galleries[434852] = clik.newGallery({"parentGallery":"","usePopups":true,"title":2009.0,"link":"gallery_434852.html","maxRecords":0.0,"photoIDs":[8130011.0,8130012.0,8130014.0,8130015.0,8130024.0,8130032.0,8130033.0,8130039.0,8130040.0,8130042.0,8136333.0,8136335.0,8136336.0,8136338.0,8136339.0,8136340.0,8136342.0,8136343.0],"skipIndex":0,"section_code":"gallery","featured_images":8136340.0,"id":434852,"singleSection":false});				  						galleries[434853] = clik.newGallery({"parentGallery":"","usePopups":true,"title":2010.0,"link":"gallery_434853.html","maxRecords":0.0,"photoIDs":[8136346.0,8136347.0,8136348.0,8136351.0,8136354.0,8136356.0,8136360.0,8136361.0,8136362.0,8136363.0,8136365.0,8136367.0,8136368.0,8136369.0,8136371.0,8136373.0,8136377.0,8136396.0,8136413.0,8136416.0,8136417.0,8136421.0,8136425.0,8136428.0,8136429.0],"skipIndex":0,"section_code":"gallery","featured_images":8136356.0,"id":434853,"singleSection":false});				  						galleries[437130] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Alsion","link":"gallery_437130.html","maxRecords":0.0,"photoIDs":[8188933.0,8188935.0,8188937.0,8188939.0,8188940.0,8188941.0,8253186.0,8253188.0,8253191.0],"skipIndex":0,"section_code":"gallery","featured_images":"8253191,8253188,8253186,8188941,8188940,8188939,8188937,8188935,8188933","id":437130,"singleSection":false});				  						galleries[434854] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Cars","link":"gallery_434854.html","maxRecords":0.0,"photoIDs":[8136604.0,8136637.0,8136652.0,8136653.0,8136654.0,8136655.0,8136656.0,8136674.0,8136696.0,8136730.0,8136775.0,8136788.0,8136789.0,8136790.0,8136791.0,8136792.0,8136793.0,8136796.0,8136797.0,8136798.0],"skipIndex":0,"section_code":"gallery","featured_images":8136775.0,"id":434854,"singleSection":false});				  						galleries[437132] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Sønderborg","link":"gallery_437132.html","maxRecords":0.0,"photoIDs":[8188946.0,8188947.0,8188949.0,8188952.0,8188953.0,8188955.0,8188963.0,8188965.0,8188966.0,8253192.0,8253195.0],"skipIndex":0,"section_code":"gallery","featured_images":"8253195,8253192,8188966,8188965,8188963,8188955,8188953,8188952,8188949,8188947","id":437132,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8136604,8136413';
imageSets[2] = '8136775,8136356,8136340,8129994';
imageSets[234221] = '8130010,8130009,8130007,8130005,8130003,8130002,8129997,8129992,8129989,8129988';
imageSets[3] = '8253195,8253192,8253191,8253188,8253186,8188966,8188965,8188963,8188955,8188953,8188952,8188949,8188947,8188946,8188941,8188940,8188939,8188937,8188935,8188933,8136798,8136797,8136796,8136793,8136792,8136791,8136790,8136789,8136788,8136775,8136730,8136696,8136674,8136656,8136655,8136654,8136653,8136652,8136637,8136604,8136429,8136428,8136425,8136421,8136417,8136416,8136413,8136396,8136377,8136373';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/tloekke/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/tloekke/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/tloekke/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/tloekke/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/tloekke/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/tloekke/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/tloekke/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 = 'THL-FOTO.DK: ' + 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>Thorkild Løkke </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> &euro;' + (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 += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			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 += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="thl@thorkild.org">';
					temp += '<input type="hidden" name="currency_code" value="EUR">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="thl@thorkild.org">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						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;
	}
}

			

