window.thumbnails = new Object();
												thumbnails[1834377] = new thumbnail(1834377,'','','norge_thumb.jpg',130, 159,1,'#');
												thumbnails[7154963] = new thumbnail(7154963,'120902','Fossekall, Cinclus cinclus','1012-0035-2_thumb.jpg',130, 168,1,'photo_7154963.html');
												thumbnails[6977216] = new thumbnail(6977216,'378206','Jevnaker kirke','1010-1286_thumb.jpg',130, 196,1,'photo_6977216.html');
												thumbnails[6977217] = new thumbnail(6977217,'378206','Jevnaker kirke','1010-1287_thumb.jpg',130, 196,1,'photo_6977217.html');
												thumbnails[6977219] = new thumbnail(6977219,'378206','Jevnaker kirke','1010-1290_thumb.jpg',130, 86,1,'photo_6977219.html');
												thumbnails[6977221] = new thumbnail(6977221,'378206','Hadeland glassverk','1010-1324_thumb.jpg',130, 86,1,'photo_6977221.html');
												thumbnails[6904156] = new thumbnail(6904156,'143743','Sunset','1010-0929_thumb.jpg',130, 196,1,'photo_6904156.html');
												thumbnails[6904194] = new thumbnail(6904194,'143743','Shell','1010-0682_thumb.jpg',130, 196,1,'photo_6904194.html');
												thumbnails[6904298] = new thumbnail(6904298,'143743','Autumn landscape','1010-0786_thumb.jpg',130, 86,1,'photo_6904298.html');
												thumbnails[6904305] = new thumbnail(6904305,'143743','The moon','1010-0838_thumb.jpg',130, 196,1,'photo_6904305.html');
												thumbnails[6904317] = new thumbnail(6904317,'143743','Clouds over the ocean','1010-0849_thumb.jpg',130, 86,1,'photo_6904317.html');
												thumbnails[6904337] = new thumbnail(6904337,'143743','The fisherman','1010-0895_thumb.jpg',130, 86,1,'photo_6904337.html');
												thumbnails[6904378] = new thumbnail(6904378,'143743','The ferry','1010-0898_thumb.jpg',130, 86,1,'photo_6904378.html');
												thumbnails[6904399] = new thumbnail(6904399,'143743','Torbjørnskjær','1010-0904_thumb.jpg',130, 86,1,'photo_6904399.html');
												thumbnails[6904469] = new thumbnail(6904469,'143743','The ferry by Torbjørnskjær','1010-0943_thumb.jpg',130, 86,1,'photo_6904469.html');
												thumbnails[6904656] = new thumbnail(6904656,'143743','Shell','1010-0731_thumb.jpg',130, 196,1,'photo_6904656.html');
												thumbnails[6185078] = new thumbnail(6185078,'286602','Nordsjørittet','1006-0259_thumb.jpg',130, 86,1,'photo_6185078.html');
												thumbnails[6186336] = new thumbnail(6186336,'345511','Feistein fyr','1006-0283_thumb.jpg',130, 60,1,'photo_6186336.html');
												thumbnails[6186342] = new thumbnail(6186342,'286602','Surfers','1006-0284_thumb.jpg',130, 86,1,'photo_6186342.html');
												thumbnails[6186401] = new thumbnail(6186401,'286602','Windy day on the beach.','1006-0291_thumb.jpg',130, 49,1,'photo_6186401.html');
												thumbnails[6185055] = new thumbnail(6185055,'286602','Preikestolen','1006-0238_thumb.jpg',130, 86,1,'photo_6185055.html');
												thumbnails[6185059] = new thumbnail(6185059,'286602','Preikestolen','1006-0241_thumb.jpg',130, 196,1,'photo_6185059.html');
												thumbnails[6185067] = new thumbnail(6185067,'286602','Preikestolen','1006-0245_thumb.jpg',130, 196,1,'photo_6185067.html');
												thumbnails[6184920] = new thumbnail(6184920,'143773','Liljekongvall','1006-0072_thumb.jpg',130, 130,1,'photo_6184920.html');
												thumbnails[6185046] = new thumbnail(6185046,'143773','Liljekongvall','1006-0094_thumb.jpg',130, 183,1,'photo_6185046.html');
												thumbnails[6097575] = new thumbnail(6097575,'143771','Appleflower / Epleblomst','1005-2174-4_thumb.jpg',130, 86,1,'photo_6097575.html');
												thumbnails[5950618] = new thumbnail(5950618,'120902','Cinclus cinclus','1005-0629_thumb.jpg',130, 86,1,'photo_5950618.html');
												thumbnails[5950630] = new thumbnail(5950630,'120902','Cinclus cinclus','1005-0709_thumb.jpg',130, 156,1,'photo_5950630.html');
												thumbnails[5950791] = new thumbnail(5950791,'120902','Cinclus cinclus','1005-0841_thumb.jpg',130, 195,1,'photo_5950791.html');
												thumbnails[5950796] = new thumbnail(5950796,'120902','Cinclus cinclus','1005-0847_thumb.jpg',130, 87,1,'photo_5950796.html');
												thumbnails[5957227] = new thumbnail(5957227,'143742','Sunrise','1005-0242_thumb.jpg',130, 72,1,'photo_5957227.html');
												thumbnails[5524646] = new thumbnail(5524646,'126439','Figure','1002-0888_thumb.jpg',130, 196,1,'photo_5524646.html');
												thumbnails[5524656] = new thumbnail(5524656,'126439','Chrystals in the sun','1002-0924_thumb.jpg',130, 130,1,'photo_5524656.html');
												thumbnails[5524628] = new thumbnail(5524628,'126439','Icechrystals','1002-0592_thumb.jpg',130, 86,1,'photo_5524628.html');
												thumbnails[5208701] = new thumbnail(5208701,'293962','Christmas tree','0912-0005_thumb.jpg',130, 89,1,'photo_5208701.html');
												thumbnails[5208704] = new thumbnail(5208704,'293962','In the eavning','0912-0009_thumb.jpg',130, 134,1,'photo_5208704.html');
												thumbnails[5208706] = new thumbnail(5208706,'293962','Christmas shopping in town','0912-0013_thumb.jpg',130, 90,1,'photo_5208706.html');
												thumbnails[5208699] = new thumbnail(5208699,'293962','Oslo City ','0912-0001_thumb.jpg',130, 143,1,'photo_5208699.html');
												thumbnails[5104827] = new thumbnail(5104827,'145246','Winterly river','0911-0139_thumb.jpg',130, 86,1,'photo_5104827.html');
												thumbnails[5104829] = new thumbnail(5104829,'145246','Water and snow fantasy','0911-0143_thumb.jpg',130, 86,1,'photo_5104829.html');
												thumbnails[5104832] = new thumbnail(5104832,'143742','Water beauty','0911-0180_thumb.jpg',130, 91,1,'photo_5104832.html');
												thumbnails[5104834] = new thumbnail(5104834,'145246','Amazing winterly river','0911-0181_thumb.jpg',130, 86,1,'photo_5104834.html');
												thumbnails[5104835] = new thumbnail(5104835,'145246','The face in the river','0911-0186_thumb.jpg',130, 115,1,'photo_5104835.html');
												thumbnails[5065244] = new thumbnail(5065244,'286602','','0911-0007_thumb.jpg',130, 92,1,'photo_5065244.html');
												thumbnails[5065256] = new thumbnail(5065256,'286602','','0911-0009_thumb.jpg',130, 86,1,'photo_5065256.html');
												thumbnails[5065272] = new thumbnail(5065272,'286602','','0911-0014_thumb.jpg',130, 86,1,'photo_5065272.html');
												thumbnails[5065279] = new thumbnail(5065279,'286602','','0911-0019_thumb.jpg',130, 86,1,'photo_5065279.html');
												thumbnails[5066294] = new thumbnail(5066294,'143739','Skarselva, The river','0911-0073_thumb.jpg',130, 86,1,'photo_5066294.html');
												thumbnails[4928007] = new thumbnail(4928007,'143742','Autumn landscape','0910-0047_thumb.jpg',130, 83,1,'photo_4928007.html');
												thumbnails[4928265] = new thumbnail(4928265,'143742','Snow on the top','0910-0036_thumb.jpg',130, 70,1,'photo_4928265.html');
												thumbnails[5175223] = new thumbnail(5175223,'292207','Ice sculpture, Isformasjon','0910-0134_thumb.jpg',130, 86,1,'photo_5175223.html');
												thumbnails[5175225] = new thumbnail(5175225,'292207','Autumn','0910-0149_thumb.jpg',130, 86,1,'photo_5175225.html');
												thumbnails[5175550] = new thumbnail(5175550,'292207','Pilfink, Passeridae','0909-0111_thumb.jpg',130, 135,1,'photo_5175550.html');
												thumbnails[5176150] = new thumbnail(5176150,'197782','In the forest','0908-0808_thumb.jpg',130, 86,1,'photo_5176150.html');
												thumbnails[4886471] = new thumbnail(4886471,'143742','Reflections, Speiling','0908-0729_thumb.jpg',130, 196,1,'photo_4886471.html');
												thumbnails[4886553] = new thumbnail(4886553,'143742','Morning is broken','0908-0440_thumb.jpg',130, 86,1,'photo_4886553.html');
												thumbnails[4886582] = new thumbnail(4886582,'143742','The early morning light','0908-0413_thumb.jpg',130, 89,1,'photo_4886582.html');
												thumbnails[5175221] = new thumbnail(5175221,'292207','Sensommer, Early autumn','0908-07631_thumb.jpg',130, 86,1,'photo_5175221.html');
												thumbnails[4886341] = new thumbnail(4886341,'143742','Night over the mountains. ','0908-0393_thumb.jpg',130, 86,1,'photo_4886341.html');
												thumbnails[4886375] = new thumbnail(4886375,'143742','Moonlight over Båthusberget','0908-0389_thumb.jpg',130, 196,1,'photo_4886375.html');
												thumbnails[5175204] = new thumbnail(5175204,'292207','Blåklokke','0908-0172_thumb.jpg',130, 196,1,'photo_5175204.html');
												thumbnails[6097461] = new thumbnail(6097461,'120902','Toppdykker / Podicipedidae','0907-0785-2_thumb.jpg',130, 130,1,'photo_6097461.html');
												thumbnails[5175199] = new thumbnail(5175199,'292207','Waterlily, Vannlilje','0907-0214_thumb.jpg',130, 86,1,'photo_5175199.html');
												thumbnails[4030091] = new thumbnail(4030091,'143773','Skogstorkenebb','0906-0005_thumb.jpg',130, 196,1,'photo_4030091.html');
												thumbnails[4033141] = new thumbnail(4033141,'143773','Skogstorkenebb','0906-0009_thumb.jpg',130, 86,1,'photo_4033141.html');
												thumbnails[4033158] = new thumbnail(4033158,'143773','Skogstorkenebb','0906-0015_thumb.jpg',130, 86,1,'photo_4033158.html');
												thumbnails[4033173] = new thumbnail(4033173,'143773','Skogstorkenebb','0906-0017_thumb.jpg',130, 108,1,'photo_4033173.html');
												thumbnails[4033192] = new thumbnail(4033192,'143773','Skogstorkenebb','0906-0021_thumb.jpg',130, 86,1,'photo_4033192.html');
												thumbnails[4033288] = new thumbnail(4033288,'197782','Bever','0905-0745_thumb.jpg',130, 74,1,'photo_4033288.html');
												thumbnails[5175196] = new thumbnail(5175196,'292207','Bever','0905-0745_3C121439-2219-B5B5-4CAF6FC1ADD55BD3_thumb.jpg',130, 74,1,'photo_5175196.html');
												thumbnails[4886390] = new thumbnail(4886390,'143739','The springbrook','0904-1510_thumb.jpg',130, 86,1,'photo_4886390.html');
												thumbnails[4886065] = new thumbnail(4886065,'143742','Beautiful sunrise in Trysil','0904-0818_thumb.jpg',130, 198,1,'photo_4886065.html');
												thumbnails[5175190] = new thumbnail(5175190,'292207','Sunrise','0904-0818_3C1041B1-2219-B5B5-4CF06A82802CE68F_thumb.jpg',130, 198,1,'photo_5175190.html');
												thumbnails[4886043] = new thumbnail(4886043,'197782','Take off','0904-0581-1_thumb.jpg',130, 75,1,'photo_4886043.html');
												thumbnails[5175185] = new thumbnail(5175185,'292207','Take off','0904-0581_thumb.jpg',130, 75,1,'photo_5175185.html');
												thumbnails[3548333] = new thumbnail(3548333,'120902','Anatidae','0903-0171_thumb.jpg',130, 86,1,'photo_3548333.html');
												thumbnails[3548350] = new thumbnail(3548350,'120902',' Anatidae','0903-0191_thumb.jpg',130, 86,1,'photo_3548350.html');
												thumbnails[3550819] = new thumbnail(3550819,'120902','Anas platyrhynchos, Anatidae','0903-0177_thumb.jpg',130, 196,1,'photo_3550819.html');
												thumbnails[3550826] = new thumbnail(3550826,'120902','Anatidae','0903-0204_thumb.jpg',130, 86,1,'photo_3550826.html');
												thumbnails[3547593] = new thumbnail(3547593,'120902','Dendrocopos major','0903-0013_thumb.jpg',130, 98,1,'photo_3547593.html');
												thumbnails[4886007] = new thumbnail(4886007,'197782','Familien Elg','0902-0760-1_thumb.jpg',130, 97,1,'photo_4886007.html');
												thumbnails[3459459] = new thumbnail(3459459,'120902','Sitta europaea, Sittidae<br>\r\n','0902-0259_thumb.jpg',130, 105,1,'photo_3459459.html');
												thumbnails[3459484] = new thumbnail(3459484,'120902','Paridae, Parus major','0902-0270_thumb.jpg',130, 134,1,'photo_3459484.html');
												thumbnails[3459525] = new thumbnail(3459525,'120902','Cyanistes caeruleus,  Paridae','0902-0281_thumb.jpg',130, 107,1,'photo_3459525.html');
												thumbnails[3459677] = new thumbnail(3459677,'120902',' Paridae, Parus major','0902-0289_thumb.jpg',130, 72,1,'photo_3459677.html');
												thumbnails[3459691] = new thumbnail(3459691,'120902','Paridae, Periparus ater','0902-0336_thumb.jpg',130, 119,1,'photo_3459691.html');
												thumbnails[3459407] = new thumbnail(3459407,'143742','Sunrise','0902-0086_thumb.jpg',130, 66,1,'photo_3459407.html');
												thumbnails[4885955] = new thumbnail(4885955,'197782','Elga og Elgine','0901-0447-1_thumb.jpg',130, 140,1,'photo_4885955.html');
												thumbnails[5175177] = new thumbnail(5175177,'292207','Elga og Elgine','0901-0447_thumb.jpg',130, 140,1,'photo_5175177.html');
												thumbnails[5176134] = new thumbnail(5176134,'197782','Moose','0901-0476_thumb.jpg',130, 78,1,'photo_5176134.html');
												thumbnails[5176135] = new thumbnail(5176135,'197782','Moose, elk','0901-0573-2_thumb.jpg',130, 86,1,'photo_5176135.html');
												thumbnails[5176146] = new thumbnail(5176146,'197782','Running moose (elk)','0901-0588-2_thumb.jpg',130, 86,1,'photo_5176146.html');
												thumbnails[3266360] = new thumbnail(3266360,'120902','Spettmeis','skogen_trysil20090102_023-178-Edit_filtered_thumb.jpg',130, 86,1,'photo_3266360.html');
												thumbnails[3266373] = new thumbnail(3266373,'143742','Eavning and the moon','skogen_trysil20090102_023-319-Edit_thumb.jpg',130, 86,1,'photo_3266373.html');
												thumbnails[3268188] = new thumbnail(3268188,'126439','Abstraction','skogen_trysil20081231_021-27_thumb.jpg',130, 100,1,'photo_3268188.html');
												thumbnails[3268269] = new thumbnail(3268269,'126439','Deep in the forest 2','skogen_trysil20081231_021-88_thumb.jpg',130, 85,1,'photo_3268269.html');
												thumbnails[3241092] = new thumbnail(3241092,'197782','Squirrel','Skogen_trysil_ekorn20081229_001_thumb.jpg',130, 92,1,'photo_3241092.html');
												thumbnails[3241264] = new thumbnail(3241264,'120902','Paridae, Parus major ','Skogen_trysil_fugler20081229_077_filtered_thumb.jpg',130, 121,1,'photo_3241264.html');
												thumbnails[5175596] = new thumbnail(5175596,'292207','Heisekraner','0812-0300_thumb.jpg',130, 86,1,'photo_5175596.html');
												thumbnails[2827259] = new thumbnail(2827259,'126439','Old','20080917_003_thumb.jpg',130, 86,1,'photo_2827259.html');
												thumbnails[2821658] = new thumbnail(2821658,'143742','Autumn birch','20080914_001_thumb.jpg',130, 62,1,'photo_2821658.html');
												thumbnails[2826574] = new thumbnail(2826574,'143742','Mountains by Femund','20080907_0118_thumb.jpg',130, 67,1,'photo_2826574.html');
												thumbnails[2826774] = new thumbnail(2826774,'143742','Mountains by Femund','20080907_0125_thumb.jpg',130, 86,1,'photo_2826774.html');
												thumbnails[2826888] = new thumbnail(2826888,'143742','Femund','20080907_0144_thumb.jpg',130, 49,1,'photo_2826888.html');
												thumbnails[2811177] = new thumbnail(2811177,'143773','','20080902_0154_thumb.jpg',130, 86,1,'photo_2811177.html');
												thumbnails[2811270] = new thumbnail(2811270,'143773','','20080902_0157_thumb.jpg',130, 93,1,'photo_2811270.html');
												thumbnails[2811281] = new thumbnail(2811281,'143742','Together, Valdalsfjellet Engerdal','20080902_0329_thumb.jpg',130, 86,1,'photo_2811281.html');
												thumbnails[2406302] = new thumbnail(2406302,'155870','Digitalis Purpurea','KSA6003_thumb.jpg',130, 93,1,'photo_2406302.html');
												thumbnails[2434924] = new thumbnail(2434924,'155870','Leucanthemum vulgare<br>\r\n','KLA6001_thumb.jpg',130, 48,1,'photo_2434924.html');
												thumbnails[2435010] = new thumbnail(2435010,'155870','Caltha Palustris','KSA6002_thumb.jpg',130, 93,1,'photo_2435010.html');
												thumbnails[2435031] = new thumbnail(2435031,'155870','Rosa','KSA6004_thumb.jpg',130, 93,1,'photo_2435031.html');
												thumbnails[2337945] = new thumbnail(2337945,'143771','Rosa','Blomster_Risløkka080616-029-53-Edit_thumb.jpg',130, 196,1,'photo_2337945.html');
												thumbnails[2342653] = new thumbnail(2342653,'143771','Digitalis purpurea','Blomster_Risløkka080616-029-9-Edit_thumb.jpg',130, 196,1,'photo_2342653.html');
												thumbnails[2342651] = new thumbnail(2342651,'143771','Leucanthemum vulgare','Blomster080605-023-32-Edit_thumb.jpg',130, 86,1,'photo_2342651.html');
												thumbnails[2248386] = new thumbnail(2248386,'143743','','Lyseren080531-021-289-Edit_thumb.jpg',130, 91,1,'photo_2248386.html');
												thumbnails[2248394] = new thumbnail(2248394,'143743','','Lyseren080531-021-299-Edit_thumb.jpg',130, 86,1,'photo_2248394.html');
												thumbnails[2248400] = new thumbnail(2248400,'143743','','Lyseren080531-021-316-Edit_thumb.jpg',130, 145,1,'photo_2248400.html');
												thumbnails[2361535] = new thumbnail(2361535,'153697','Arnfinn','Stavanger080523-019-13_thumb.jpg',130, 86,1,'photo_2361535.html');
												thumbnails[2361544] = new thumbnail(2361544,'153697','Tord','Stavanger080523-019-24_thumb.jpg',130, 86,1,'photo_2361544.html');
												thumbnails[2361552] = new thumbnail(2361552,'153697','Arnfinn','Stavanger080523-019-40_thumb.jpg',130, 86,1,'photo_2361552.html');
												thumbnails[2361557] = new thumbnail(2361557,'153697','Tord','Stavanger080523-019-43_thumb.jpg',130, 86,1,'photo_2361557.html');
												thumbnails[2194931] = new thumbnail(2194931,'143773','Rubus chamaemorus','Skog080518-018-3-Edit_thumb.jpg',130, 196,1,'photo_2194931.html');
												thumbnails[2194938] = new thumbnail(2194938,'143773','Rubus chamaemorus','Skog080518-018-7-Edit_thumb.jpg',130, 86,1,'photo_2194938.html');
												thumbnails[2195006] = new thumbnail(2195006,'143773','Convallaria majalis','Skog080518-018-76-Edit_thumb.jpg',130, 86,1,'photo_2195006.html');
												thumbnails[2195025] = new thumbnail(2195025,'143739','The soul','Skog080518-018-12-Edit_thumb.jpg',130, 86,1,'photo_2195025.html');
												thumbnails[2195034] = new thumbnail(2195034,'143739','Old tree','Skog080518-018-26-Edit_thumb.jpg',130, 86,1,'photo_2195034.html');
												thumbnails[2195305] = new thumbnail(2195305,'145246','Convallaria majalis','Skog080518-018-53-Edit_thumb.jpg',130, 86,1,'photo_2195305.html');
												thumbnails[2168528] = new thumbnail(2168528,'143739','The spring birch','Blomster080511-015-20-Edit_thumb.jpg',130, 91,1,'photo_2168528.html');
												thumbnails[2173444] = new thumbnail(2173444,'143773','Caltha Palustris','Blomster080511-015-10-Edit_thumb.jpg',130, 196,1,'photo_2173444.html');
												thumbnails[2173503] = new thumbnail(2173503,'143773','Anemone nemorosa','Blomster080511-015-13-Edit-Edit_thumb.jpg',130, 104,1,'photo_2173503.html');
												thumbnails[2173618] = new thumbnail(2173618,'143773','Oxalis acetosella','Blomster080511-015-16-Edit_thumb.jpg',130, 86,1,'photo_2173618.html');
												thumbnails[2161667] = new thumbnail(2161667,'145246','Hope and joy','Blomster080508-013-31-Edit_thumb.jpg',130, 196,1,'photo_2161667.html');
												thumbnails[2161594] = new thumbnail(2161594,'143771','Tullip romantic','Blomster080507-010-8-Edit_thumb.jpg',130, 115,1,'photo_2161594.html');
												thumbnails[2161660] = new thumbnail(2161660,'143771','All Things Grow With Love','Blomster080507-012_thumb.jpg',130, 123,1,'photo_2161660.html');
												thumbnails[2361583] = new thumbnail(2361583,'153697','Håkon','Konfirmasjon080504-009-75-Edit_thumb.jpg',130, 103,1,'photo_2361583.html');
												thumbnails[2136419] = new thumbnail(2136419,'143771','Simple','BlomsterDSC_0019-008-Edit-2_thumb.jpg',130, 70,1,'photo_2136419.html');
												thumbnails[2136729] = new thumbnail(2136729,'143771','Beauty','BlomsterDSC_0024-008-Edit_thumb.jpg',130, 97,1,'photo_2136729.html');
												thumbnails[2137508] = new thumbnail(2137508,'143771','Burning love','BlomsterDSC_0051-008-Edit-2_thumb.jpg',130, 76,1,'photo_2137508.html');
												thumbnails[2111515] = new thumbnail(2111515,'145246','Spring brook','vann20080425-1_thumb.jpg',130, 86,1,'photo_2111515.html');
												thumbnails[2111518] = new thumbnail(2111518,'145246','Spring river','vann20080425-3_thumb.jpg',130, 86,1,'photo_2111518.html');
												thumbnails[2111522] = new thumbnail(2111522,'143739','The lake','vann20080425-2_thumb.jpg',130, 62,1,'photo_2111522.html');
												thumbnails[2064368] = new thumbnail(2064368,'143739','The brook','DSC_0021-Edit_thumb.jpg',130, 86,1,'photo_2064368.html');
												thumbnails[1960652] = new thumbnail(1960652,'131757','','2008-03-07-Barcelona-004_thumb.jpg',100, 150,1,'photo_1960652.html');
												thumbnails[1960658] = new thumbnail(1960658,'131757','','2008-03-07-Barcelona-005_thumb.jpg',100, 150,1,'photo_1960658.html');
												thumbnails[1960660] = new thumbnail(1960660,'131757','','2008-03-07-Barcelona-006_ed_thumb.jpg',97, 150,1,'photo_1960660.html');
												thumbnails[1882629] = new thumbnail(1882629,'120902','Parus major','2008-02-23-Trysil-014_2_thumb.jpg',130, 85,1,'photo_1882629.html');
												thumbnails[1882524] = new thumbnail(1882524,'126439','','2008-02-22-Trysil-079_edite_thumb.jpg',130, 86,1,'photo_1882524.html');
												thumbnails[1777189] = new thumbnail(1777189,'143742','Winter landscape from Trysil','Trysil-14_thumb.jpg',122, 86,1,'photo_1777189.html');
												thumbnails[1777195] = new thumbnail(1777195,'143742','Winter landscape from Trysil','Trysil-15_thumb.jpg',129, 86,1,'photo_1777195.html');
												thumbnails[1777197] = new thumbnail(1777197,'143742','Winter landscape from Trysil','Trysil-20_thumb.jpg',129, 86,1,'photo_1777197.html');
												thumbnails[1777206] = new thumbnail(1777206,'143742','Winter landscape from Trysil','Trysil-35_thumb.jpg',129, 86,1,'photo_1777206.html');
												thumbnails[1777210] = new thumbnail(1777210,'143742','Winter landscape from Trysil','Trysil-38_thumb.jpg',129, 86,1,'photo_1777210.html');
												thumbnails[1777211] = new thumbnail(1777211,'143742','Winter landscape from Trysil','Trysil-40_thumb.jpg',86, 129,1,'photo_1777211.html');
												thumbnails[1777332] = new thumbnail(1777332,'143742','Winter landscape from Trysil','Trysil-41_thumb.jpg',129, 86,1,'photo_1777332.html');
												thumbnails[1777335] = new thumbnail(1777335,'143742','Winter landscape from Trysil','Trysil-43_thumb.jpg',129, 86,1,'photo_1777335.html');
												thumbnails[1777338] = new thumbnail(1777338,'143742','Winter landscape from Trysil','Trysil-44_thumb.jpg',129, 86,1,'photo_1777338.html');
												thumbnails[1777342] = new thumbnail(1777342,'143742','Winter landscape from Trysil','Trysil-49_thumb.jpg',129, 86,1,'photo_1777342.html');
												thumbnails[1323931] = new thumbnail(1323931,'143741','Tuva','DSC_0068-68-1T.jpg',130, 86,1,'photo_1323931.html');
												thumbnails[1330327] = new thumbnail(1330327,'143741','Tuva','DSC_0086-86-2T.jpg',130, 78,1,'photo_1330327.html');
												thumbnails[1433160] = new thumbnail(1433160,'143741','Hardangervidda','20070818-DSC_0057-57-2-T.jpg',57, 86,1,'photo_1433160.html');
												thumbnails[1835263] = new thumbnail(1835263,'143773','','Lyseren20070726-005-22_thumb.jpg',130, 86,1,'photo_1835263.html');
												thumbnails[1795634] = new thumbnail(1795634,'143773','','Lyseren20070720-004-45_thumb.jpg',130, 196,1,'photo_1795634.html');
												thumbnails[1795643] = new thumbnail(1795643,'143773','','Lyseren20070720-004-71_thumb.jpg',130, 154,1,'photo_1795643.html');
												thumbnails[1795652] = new thumbnail(1795652,'143773','','Lyseren20070720-004-77_thumb.jpg',130, 86,1,'photo_1795652.html');
												thumbnails[1795862] = new thumbnail(1795862,'143773','','Lyseren20070720-004-78_thumb.jpg',130, 86,1,'photo_1795862.html');
												thumbnails[1795872] = new thumbnail(1795872,'143773','','Lyseren20070720-004-91_thumb.jpg',130, 146,1,'photo_1795872.html');
												thumbnails[1197853] = new thumbnail(1197853,'143743','Lyseren ','Lyseren20070715-003-96T.jpg',130, 86,1,'photo_1197853.html');
												thumbnails[1796183] = new thumbnail(1796183,'143743','Canoeing ','Lyseren20070715-003-46_thumb.jpg',130, 86,1,'photo_1796183.html');
												thumbnails[1796211] = new thumbnail(1796211,'143743','Canoeing','Lyseren20070715-003-47_thumb.jpg',130, 86,1,'photo_1796211.html');
												thumbnails[1162413] = new thumbnail(1162413,'84042','','Kristiansand-20070709-001-187T7.jpg',130, 95,1,'photo_1162413.html');
												thumbnails[1162372] = new thumbnail(1162372,'84042','','Kristiansand-20070708-0015T.jpg',130, 86,1,'photo_1162372.html');
												thumbnails[1162375] = new thumbnail(1162375,'84042','','Kristiansand-20070708-0027T.jpg',130, 86,1,'photo_1162375.html');
												thumbnails[1162378] = new thumbnail(1162378,'84042','','Kristiansand-20070708-0012T2.jpg',130, 86,1,'photo_1162378.html');
												thumbnails[1162383] = new thumbnail(1162383,'84042','','Kristiansand-20070708-0029T.jpg',130, 105,1,'photo_1162383.html');
												thumbnails[1795895] = new thumbnail(1795895,'84042','','Kristiansand-20070708-0072_thumb.jpg',130, 86,1,'photo_1795895.html');
												thumbnails[1795896] = new thumbnail(1795896,'84042','','Kristiansand-20070708-0078_thumb.jpg',130, 196,1,'photo_1795896.html');
												thumbnails[1795898] = new thumbnail(1795898,'84042','','Kristiansand-20070708-0115_thumb.jpg',130, 86,1,'photo_1795898.html');
												thumbnails[1795905] = new thumbnail(1795905,'84042','','Kristiansand-20070708-0122_thumb.jpg',130, 103,1,'photo_1795905.html');
												thumbnails[1795915] = new thumbnail(1795915,'84042','','Kristiansand-20070709-001-99_thumb.jpg',130, 86,1,'photo_1795915.html');
												thumbnails[1795921] = new thumbnail(1795921,'84042','','Kristiansand-20070709-001-128_thumb.jpg',130, 86,1,'photo_1795921.html');
												thumbnails[1799247] = new thumbnail(1799247,'120902','Muscicapa striata','Møkeren-20070630-0100_thumb.jpg',130, 90,1,'photo_1799247.html');
												thumbnails[1799255] = new thumbnail(1799255,'120902','Muscicapa striata','Møkeren-20070630-0134_thumb.jpg',130, 86,1,'photo_1799255.html');
												thumbnails[1799259] = new thumbnail(1799259,'120902','Muscicapa striata','Møkeren-20070630-0138_thumb.jpg',130, 86,1,'photo_1799259.html');
												thumbnails[1134996] = new thumbnail(1134996,'143771','','DSC_0108T1.jpg',130, 86,1,'photo_1134996.html');
												thumbnails[1134998] = new thumbnail(1134998,'143773','','DSC_0121T.jpg',130, 86,1,'photo_1134998.html');
												thumbnails[1134999] = new thumbnail(1134999,'143773','','DSC_0142T.jpg',130, 86,1,'photo_1134999.html');
												thumbnails[1136499] = new thumbnail(1136499,'143742','Summer in Trysil','DSC_0213T.jpg',130, 86,1,'photo_1136499.html');
												thumbnails[1136513] = new thumbnail(1136513,'143742','Summer in Trysil','DSC_0227T.jpg',130, 86,1,'photo_1136513.html');
												thumbnails[1136516] = new thumbnail(1136516,'143742','Summer in Trysil','DSC_0241T.jpg',130, 86,1,'photo_1136516.html');
												thumbnails[1136523] = new thumbnail(1136523,'143742','Summer in Trysil','DSC_0263T.jpg',86, 130,1,'photo_1136523.html');
												thumbnails[1795624] = new thumbnail(1795624,'143773','','DSC_0137_thumb.jpg',130, 86,1,'photo_1795624.html');
												thumbnails[1785156] = new thumbnail(1785156,'120045','','20070603-Insekt-blomst-Lyseren0127_thumb.jpg',110, 86,1,'photo_1785156.html');
												thumbnails[1785181] = new thumbnail(1785181,'120045','','20070603-Insekt-blomst-Lyseren0130_thumb.jpg',129, 86,1,'photo_1785181.html');
												thumbnails[1785186] = new thumbnail(1785186,'120045','','20070603-Insekt-blomst-Lyseren0146_thumb.jpg',116, 86,1,'photo_1785186.html');
												thumbnails[1134989] = new thumbnail(1134989,'143773','','20070531-Hageblomster0015T2.jpg',130, 86,1,'photo_1134989.html');
												thumbnails[1835149] = new thumbnail(1835149,'143773','','20070531-Hageblomster0068_thumb.jpg',130, 196,1,'photo_1835149.html');
												thumbnails[1835152] = new thumbnail(1835152,'143773','','20070531-Hageblomster0077_thumb.jpg',130, 86,1,'photo_1835152.html');
												thumbnails[1134981] = new thumbnail(1134981,'143771','','20070525-Hageblomster0039T2.jpg',130, 109,1,'photo_1134981.html');
												thumbnails[1795455] = new thumbnail(1795455,'143771','','20070525-Hageblomster0101_thumb.jpg',130, 86,1,'photo_1795455.html');
												thumbnails[1795459] = new thumbnail(1795459,'143771','','20070525-Hageblomster0112_thumb.jpg',130, 86,1,'photo_1795459.html');
												thumbnails[1795619] = new thumbnail(1795619,'143771','','20070525-Hageblomster0117_thumb.jpg',130, 120,1,'photo_1795619.html');
												thumbnails[1832173] = new thumbnail(1832173,'143739','Sørkedalselven','Sørkedalselven-0023_thumb.jpg',130, 133,1,'photo_1832173.html');
												thumbnails[1832180] = new thumbnail(1832180,'143773','','Sørkedalselven-0035_thumb.jpg',130, 137,1,'photo_1832180.html');
												thumbnails[1832205] = new thumbnail(1832205,'143773','','Sørkedalselven-0055_thumb.jpg',130, 161,1,'photo_1832205.html');
												thumbnails[1795155] = new thumbnail(1795155,'143771','','2007 05 13 Blomster 034_thumb.jpg',130, 104,1,'photo_1795155.html');
												thumbnails[1795158] = new thumbnail(1795158,'143771','','2007 05 13 Blomster 035_thumb.jpg',130, 94,1,'photo_1795158.html');
												thumbnails[1795163] = new thumbnail(1795163,'143771','','2007 05 13 Blomster 038_thumb.jpg',130, 86,1,'photo_1795163.html');
												thumbnails[1795290] = new thumbnail(1795290,'143771','','2007 05 13 Blomster 040_thumb.jpg',130, 99,1,'photo_1795290.html');
												thumbnails[1795296] = new thumbnail(1795296,'143771','','2007 05 13 Blomster 042_thumb.jpg',130, 86,1,'photo_1795296.html');
												thumbnails[1795313] = new thumbnail(1795313,'143771','','2007 05 13 Blomster 050_thumb.jpg',130, 86,1,'photo_1795313.html');
												thumbnails[1832628] = new thumbnail(1832628,'143740','Tromsø 2007','DSC_0018 016_thumb.jpg',130, 86,1,'photo_1832628.html');
												thumbnails[1832632] = new thumbnail(1832632,'143740','Tromsø 2007','DSC_0019 017_thumb.jpg',130, 86,1,'photo_1832632.html');
												thumbnails[1832633] = new thumbnail(1832633,'143740','Tromsø 2007','DSC_0053 051_thumb.jpg',130, 86,1,'photo_1832633.html');
												thumbnails[1832640] = new thumbnail(1832640,'143740','Tromsø 2007','DSC_0057 055_thumb.jpg',130, 86,1,'photo_1832640.html');
												thumbnails[4886407] = new thumbnail(4886407,'197782','Burre bever','0905-0417_thumb.jpg',130, 81,1,'photo_4886407.html');
												thumbnails[5066285] = new thumbnail(5066285,'143739','Skars elva','0911-0068_thumb.jpg',130, 196,1,'photo_5066285.html');
												thumbnails[5175192] = new thumbnail(5175192,'292207','The spring brook','0904-1510_3C115B3B-2219-B5B5-4C5DCC872B5AE112_thumb.jpg',130, 86,1,'photo_5175192.html');
												thumbnails[5208705] = new thumbnail(5208705,'293962','Activity','0912-0010_thumb.jpg',130, 136,1,'photo_5208705.html');
												thumbnails[6186269] = new thumbnail(6186269,'286602','The surfers','1006-0267_thumb.jpg',130, 163,1,'photo_6186269.html');
												thumbnails[4879016] = new thumbnail(4879016,'278364','Mountain birch','0910-0028-1_thumb.jpg',130, 79,1,'photo_4879016.html');
												thumbnails[3241031] = new thumbnail(3241031,'126439','Frost','skogen_trysil20081228_017-102_thumb.jpg',130, 89,1,'photo_3241031.html');
												thumbnails[2926858] = new thumbnail(2926858,'180972','Crusified','20081011_BarnehelgTonsen_01171_thumb.jpg',130, 86,1,'photo_2926858.html');
												thumbnails[2926863] = new thumbnail(2926863,'180972','Piano','20081011_BarnehelgTonsen_0123_thumb.jpg',130, 86,1,'photo_2926863.html');
												thumbnails[2926864] = new thumbnail(2926864,'180972','The man and the light','20081011_BarnehelgTonsen_0126_thumb.jpg',130, 192,1,'photo_2926864.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[131757] = new gallery(131757,'1960660,1960658,1960652','Architecture','gallery',[1960652,1960658,1960660],0, 0, '', 'gallery_131757.html',0,0);
				  					galleries[120902] = new gallery(120902,'7154963','Birds','gallery',[7154963,5950618,5950630,5950791,5950796,6097461,3548333,3548350,3550819,3550826,3547593,3459459,3459484,3459525,3459677,3459691,3266360,3241264,1882629,1799247,1799255,1799259],0, 0, '84041', 'gallery_120902.html',0,0);
				  					galleries[143741] = new gallery(143741,'1433160,1330327,1323931','Buskerud','gallery',[1323931,1330327,1433160],0, 0, '82706', 'gallery_143741.html',0,0);
				  					galleries[143771] = new gallery(143771,'6097575,2342653,2342651,2337945,2161660,2161594,2137508,2136729,2136419,1795619','Garden','gallery',[6097575,2337945,2342653,2342651,2161594,2161660,2136419,2136729,2137508,1134996,1134981,1795455,1795459,1795619,1795155,1795158,1795163,1795290,1795296,1795313],0, 0, '82594', 'gallery_143771.html',0,0);
				  					galleries[143742] = new gallery(143742,'4886375','Hedmark','gallery',[5957227,5104832,4928007,4928265,4886471,4886553,4886582,4886341,4886375,4886065,3459407,3266373,2821658,2826574,2826774,2826888,2811281,1777189,1777195,1777197,1777206,1777210,1777211,1777332,1777335,1777338,1777342,1136499,1136513,1136516,1136523],0, 0, '82706', 'gallery_143742.html',0,0);
				  					galleries[180969] = new gallery(180969,'6186269','Human activity','gallery',[],0, 0, '', 'gallery_180969.html',0,0);
				  					galleries[286602] = new gallery(286602,'6186269','Human and nature','gallery',[6185078,6186342,6186401,6185055,6185059,6185067,5065244,5065256,5065272,5065279,6186269],0, 0, '180969', 'gallery_286602.html',0,0);
				  					galleries[126439] = new gallery(126439,'5524656','Impressionistic and Abstract','gallery',[5524646,5524656,5524628,3268188,3268269,2827259,1882524,3241031],0, 0, '', 'gallery_126439.html',0,0);
				  					galleries[378206] = new gallery(378206,'6977221,6977219,6977217,6977216','Oppland','gallery',[6977216,6977217,6977219,6977221],0, 0, '82706', 'gallery_378206.html',0,0);
				  					galleries[143739] = new gallery(143739,'4886390','Oslo','gallery',[5066294,4886390,2195025,2195034,2168528,2111522,2064368,1832173,5066285],0, 0, '82706', 'gallery_143739.html',0,0);
				  					galleries[293962] = new gallery(293962,'5208706,5208705,5208704,5208701,5208699','Oslo town','gallery',[5208701,5208704,5208706,5208699,5208705],0, 0, '', 'gallery_293962.html',0,0);
				  					galleries[143743] = new gallery(143743,'6904399,6904378,6904317','Østfold','gallery',[6904156,6904194,6904298,6904305,6904317,6904337,6904378,6904399,6904469,6904656,2248386,2248394,2248400,1197853,1796183,1796211],0, 0, '82706', 'gallery_143743.html',0,0);
				  					galleries[345511] = new gallery(345511,'6186336','Rogaland','gallery',[6186336],0, 0, '82706', 'gallery_345511.html',0,0);
				  					galleries[292207] = new gallery(292207,'5175596,5175550,5175225,5175223,5175221,5175204,5175199,5175196,5175192,5175190','Sold pictures','gallery',[5175223,5175225,5175550,5175221,5175204,5175199,5175196,5175190,5175185,5175177,5175596,5175192],0, 0, '', 'gallery_292207.html',0,0);
				  					galleries[278364] = new gallery(278364,'4879016','Sweden','gallery',[4879016],0, 0, '82706', 'gallery_278364.html',0,0);
				  					galleries[180972] = new gallery(180972,'2926864,2926863,2926858','The church','gallery',[2926858,2926863,2926864],0, 0, '180969', 'gallery_180972.html',0,0);
				  					galleries[143740] = new gallery(143740,'1832640,1832633,1832632,1832628','Troms','gallery',[1832628,1832632,1832633,1832640],0, 0, '82706', 'gallery_143740.html',0,0);
				  					galleries[197782] = new gallery(197782,'5176150,5176146,5176135,5176134,4886407,4886043,4886007,4885955,4033288,3241092','Wild animals','gallery',[5176150,4033288,4886043,4886007,4885955,5176134,5176135,5176146,3241092,4886407],0, 0, '84041', 'gallery_197782.html',0,0);
				  					galleries[143773] = new gallery(143773,'6185046','Wild flowers','gallery',[6184920,6185046,4030091,4033141,4033158,4033173,4033192,2811177,2811270,2194931,2194938,2195006,2173444,2173503,2173618,1835263,1795634,1795643,1795652,1795862,1795872,1134998,1134999,1795624,1134989,1835149,1835152,1832180,1832205],0, 0, '82594', 'gallery_143773.html',0,0);
				  					galleries[155870] = new gallery(155870,'2435031,2435010,2434924,2406302','Cards','gallery',[2406302,2434924,2435010,2435031],0, 0, '', 'gallery_155870.html',0,0);
				  					galleries[82706] = new gallery(82706,'6904399,6904378,6904317,6186336,4886390,4886375','Landscapes','gallery',[],0, 0, '', 'gallery_82706.html',0,0);
				  					galleries[82594] = new gallery(82594,'6185046','Flora','gallery',[],0, 0, '', 'gallery_82594.html',0,0);
				  					galleries[84041] = new gallery(84041,'7154963','Fauna','gallery',[],0, 0, '', 'gallery_84041.html',0,0);
				  					galleries[84042] = new gallery(84042,'1795921,1795915,1795905,1795898,1795896,1795895,1162413,1162383,1162378,1162375','Zoological park','gallery',[1162413,1162372,1162375,1162378,1162383,1795895,1795896,1795898,1795905,1795915,1795921],0, 0, '84041', 'gallery_84042.html',0,0);
				  					galleries[120045] = new gallery(120045,'1785186,1785181,1785156','Insects','gallery',[1785156,1785181,1785186],0, 0, '84041', 'gallery_120045.html',0,0);
				  					galleries[145246] = new gallery(145246,'5104835,5104834,5104829,5104827,2195305,2161667,2111518,2111515','Black and white','gallery',[5104827,5104829,5104834,5104835,2195305,2161667,2111515,2111518],0, 0, '', 'gallery_145246.html',0,0);
				  					galleries[153697] = new gallery(153697,'2361583,2361557,2361552,2361544,2361535','Portraits','gallery',[2361535,2361544,2361552,2361557,2361583],0, 0, '180969', 'gallery_153697.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '7154963,6186401,6186336,6186269,6185078,6185067,6185059,6185046,6097575,6097461,5950796,5524656,5208704,5066294,4928265,4886553,4886390,4886341,4886043,4886007,4885955,4033288,4033173,4033158,3548333,3547593,3459459,3459407,2826574,2811281,2811177,2248400,2161594,1799247';
imageSets[2] = '7154963,6904399,6904378,6904317,6186336,6186269,6185046,5524656,4886390,4886375';
imageSets[3] = '7154963,6977221,6977219,6977217,6977216,6904656,6904469,6904399,6904378,6904337,6904317,6904305,6904298,6904194,6904156,6186401,6186342,6186336,6186269,6185078,6185067,6185059,6185055,6185046,6184920,6097575,6097461,5957227,5950796,5950791,5950630,5950618,5524656,5524646,5524628,5208706,5208705,5208704,5208701,5208699,5176150,5176146,5176135,5176134,5175596,5175550,5175225,5175223,5175221,5175204';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/eliirene/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/eliirene/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/eliirene/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/eliirene/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/eliirene/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/eliirene/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {

	imageID = randomListVal('');
		if (!basic) {
	img.src = photos[imageID].src;
	img.width = photos[imageID].width;
	img.height = photos[imageID].height;
  img.parentNode.title = img.alt = photos[imageID].caption;
	}
	else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
				
	}
			}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}
/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
  var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
		if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
    
  updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
  var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
      op = $.extend({},defaults,options),
      html = '', temp = '',
      photoId = op.nextPhoto.id,
      photoCaption = op.nextPhoto.caption,
      photoSrc = op.nextPhoto.src;
		
		if (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    if (op.$photo.length > 0) {
      html = $('<img/>',{
        'class': 'mainphoto photo',
        src: photoSrc,
        id: 'mainPic',
        name: 'mainPic',
        width: op.nextPhoto.width,
        height: op.nextPhoto.height,
        alt: photoCaption,
        css: op.css || {}
      });
      if (op.href) {
      	if (op.href.match(/<a/)) {
      	  html = $(op.href).append(html);
      	} else {
		  html = $('<a/>', {
			href: op.href,
			title: photoCaption
		  }).append(html);
	    }
      } else {
      	html = $('<a/>', {
			title: photoCaption
		  }).append(html);
      }
      if (op.speed == 0) {        op.$photo.html(html);        if (op.onBefore) {          op.onBefore.apply(op.$photo);        }        if (op.onAfter) {          op.onAfter.apply(op.$photo);        }      } else {        op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){            if (op.onAfter) {		    op.onAfter.apply(this);          }		  clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));		  $('body').trigger('clikUpdate');		}, op.onBefore);
      }    }
    	if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Eli Brager Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {photoinfominwidth:200};	    		options.photoinfoadjacent = true;			      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object') {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
	temp = temp + this.fnGetPaymentInfo();
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp = temp + '<p>Buy now using PayPal:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> kr ' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = temp + '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
				
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
																				temp = temp + '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="item_name" value="'+item_name+'">';
								ref = '';
				if(this.photo_ref != ''){
					ref = this.photo_ref+' - '+this.caption;
				}
				else{
					ref = this.id+' - '+this.caption;
				}
				price = amount;					temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="eli.irene.brager@vikenfiber.no">';
	temp = temp + '<input type="hidden" name="currency_code" value="NOK">';
	temp = temp + '<input type="hidden" name="add" value="1">';
					temp = temp + '<input type="hidden" name="amount" value="'+amount+'">';
	temp = temp + '<input type="hidden" name="item_number" value="'+ref+'">';
					temp = temp + '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
									temp = temp + '</form>';
								temp = temp + '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
	temp = temp + '<input type="hidden" name="cmd" value="_cart">';
	temp = temp + '<input type="hidden" name="business" value="eli.irene.brager@vikenfiber.no">';
	temp = temp + '<input type="hidden" name="display" value="1">';
	temp = temp + '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
	temp = temp + '</form>';
							temp = temp + '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
		
	if(img){
	      if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
        imageID = imageID[1];
      } else {
			  imageID = randomListVal(galleries[gallery_id].featured_images);
      }
							
			if (imageID != 0) {
				img.src = thumbnails[imageID].src;
				img.width = thumbnails[imageID].width;
				img.height = thumbnails[imageID].height;
				img.alt = galleries[gallery_id].title;
        if (updateLink) {
          $(img).parent().attr({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

		

