window.thumbnails = new Object();
												thumbnails[4979367] = new thumbnail(4979367,'','','homepage_thumb.jpg',130, 130,5,'#');
												thumbnails[5066991] = new thumbnail(5066991,'','','homepage24_thumb.jpg',130, 59,5,'#');
												thumbnails[4864260] = new thumbnail(4864260,'','From the Coast of Light series','N09_013_035Av3_thumb.jpg',130, 86,5,'#');
												thumbnails[4854125] = new thumbnail(4854125,'241066','Flat Iron Building, New York','N08_026_01v6_thumb.jpg',130, 130,5,'photo_4854125.html');
												thumbnails[2823464] = new thumbnail(2823464,'176038','Pinhole Impressions 1 - Poplar','N07_062_01v4_thumb.jpg',130, 130,5,'photo_2823464.html');
												thumbnails[3984726] = new thumbnail(3984726,'241065','43 Gardeners\' Hands','many_hands_thumb.jpg',130, 130,5,'photo_3984726.html');
												thumbnails[2823472] = new thumbnail(2823472,'176038','Pinhole Impressions 2 - Tilia Tomentosa','N07_064_01v4_thumb.jpg',130, 130,5,'photo_2823472.html');
												thumbnails[2823482] = new thumbnail(2823482,'176038','Pinhole Impressions 3 - Tilia Tomentosa','N07_064_04v4_v2_thumb.jpg',130, 130,5,'photo_2823482.html');
												thumbnails[2825166] = new thumbnail(2825166,'176039','Pinhole Impressions 29 - Beach series','N07_041_01v3_thumb.jpg',130, 130,5,'photo_2825166.html');
												thumbnails[2823487] = new thumbnail(2823487,'176038','Pinhole Impressions  4 - Acer Henryi','N08_005_02v3_v2_thumb.jpg',130, 130,5,'photo_2823487.html');
												thumbnails[2825175] = new thumbnail(2825175,'176039','Pinhole Impressions 30 - Beach series','N07_042_01_v2_thumb.jpg',130, 130,5,'photo_2825175.html');
												thumbnails[2823540] = new thumbnail(2823540,'176038','Pinhole Impressions 5  - Poplar','N08_005_03v4_v2_thumb.jpg',130, 130,5,'photo_2823540.html');
												thumbnails[2825188] = new thumbnail(2825188,'176039','Pinhole Impressions 24 - Beach series','N07_050_03v2_v2_thumb.jpg',130, 130,5,'photo_2825188.html');
												thumbnails[2823485] = new thumbnail(2823485,'176038','Pinhole Impressions 6 - Fagus Sylvatica Pendula','N08_004_01v5_v2_thumb.jpg',130, 130,5,'photo_2823485.html');
												thumbnails[2823729] = new thumbnail(2823729,'176038','Pinhole Impressions 15 - Fraxinus Americana Rosehill','N07_063_06v4_thumb.jpg',130, 130,5,'photo_2823729.html');
												thumbnails[2823732] = new thumbnail(2823732,'176038','Pinhole Impressions 7 - Prunus \'Choshu-Hizakura\'','N07_064_02v4_thumb.jpg',128, 130,5,'photo_2823732.html');
												thumbnails[2825210] = new thumbnail(2825210,'176039','Pinhole Impressions 37 - Beach series','N08_009_001v4_thumb.jpg',130, 130,5,'photo_2825210.html');
												thumbnails[2825221] = new thumbnail(2825221,'176039','Pinhole Impressions 39 - Beach series','N08_013_003v3_thumb.jpg',130, 130,5,'photo_2825221.html');
												thumbnails[2823765] = new thumbnail(2823765,'176038','Pinhole Impressions 10 - Silver Birch','N08_001_01v3_thumb.jpg',130, 130,5,'photo_2823765.html');
												thumbnails[6749427] = new thumbnail(6749427,'188301','Tulips - Manton de Manila series 4','PDB_11_03_10_0038v2print_thumb.jpg',87, 130,5,'photo_6749427.html');
												thumbnails[2825228] = new thumbnail(2825228,'176039','Pinhole Impressions 41 - Beach series','N08_013_004v5_thumb.jpg',130, 130,5,'photo_2825228.html');
												thumbnails[2823775] = new thumbnail(2823775,'176038','Pinhole Impressions 11 - Betula Pendula Laciniata','N08_002_01v3_thumb.jpg',130, 130,5,'photo_2823775.html');
												thumbnails[2825966] = new thumbnail(2825966,'176039','Pinhole Impressions 42 - Beach Series','N08_014_001v3_thumb.jpg',130, 130,5,'photo_2825966.html');
												thumbnails[2823776] = new thumbnail(2823776,'176038','Pinhole Impressions 13 - Fagus Sylvatica \'Rohan Obelisk\'','N08_003_02v4_thumb.jpg',130, 130,5,'photo_2823776.html');
												thumbnails[2825970] = new thumbnail(2825970,'176039','Pinhole Impressions 43 - Beach Series','N08_014_002v2_thumb.jpg',130, 130,5,'photo_2825970.html');
												thumbnails[2823778] = new thumbnail(2823778,'176038','Pinhole Impressions 9 - Poplar','N08_004_02v4_thumb.jpg',130, 130,5,'photo_2823778.html');
												thumbnails[3062161] = new thumbnail(3062161,'176039','Pinhole Impressions 28 - Beach series','N07_040_01_thumb.jpg',130, 130,5,'photo_3062161.html');
												thumbnails[2946780] = new thumbnail(2946780,'176039','Pinhole Impressions 25 - Beach series','N07_056_01v2_thumb.jpg',130, 130,5,'photo_2946780.html');
												thumbnails[4956714] = new thumbnail(4956714,'176038','Pinhole Impressions 14 - Liquidambar Styraciflua \'Anja\'','N07_063_01v6_thumb.jpg',130, 130,5,'photo_4956714.html');
												thumbnails[2946790] = new thumbnail(2946790,'176039','Pinhole Impressions 26 - Beach series','N07_056_02v5v2_thumb.jpg',130, 130,5,'photo_2946790.html');
												thumbnails[4956715] = new thumbnail(4956715,'176038','Pinhole Impressions 17 - Pterocarya Stenoptera','N07_063_08v5_thumb.jpg',130, 130,5,'photo_4956715.html');
												thumbnails[2946794] = new thumbnail(2946794,'176039','Pinhole Impressions 27 - Beach series','N07_039_01v3_thumb.jpg',130, 130,5,'photo_2946794.html');
												thumbnails[4956716] = new thumbnail(4956716,'176038','Pinhole Impressions 18 - Liriodendron tulipifera','N07_067_01v5_thumb.jpg',130, 130,5,'photo_4956716.html');
												thumbnails[4728301] = new thumbnail(4728301,'176039','Pinhole Impressions 48 - Waves, Conil','N09_011_010v4_thumb.jpg',130, 130,5,'photo_4728301.html');
												thumbnails[3984812] = new thumbnail(3984812,'241066','River Thames - PDB 13-3-09 0023','PDB_13-3-09_0023_thumb.jpg',125, 130,5,'photo_3984812.html');
												thumbnails[4956717] = new thumbnail(4956717,'176038','Pinhole Impressions 19 - Populus x canadensis \'aureum\'','N07_068_01v4_thumb.jpg',130, 130,5,'photo_4956717.html');
												thumbnails[4728508] = new thumbnail(4728508,'176039','Pinhole Impressions 49 - Waves, Conil','N09_011_017v2_thumb.jpg',130, 130,5,'photo_4728508.html');
												thumbnails[3984811] = new thumbnail(3984811,'241066','Battersea - PDB 13-3-09 0019','PDB_13-3-09_0019_thumb.jpg',118, 130,5,'photo_3984811.html');
												thumbnails[4728510] = new thumbnail(4728510,'176039','Pinhole Impressions 50 - beach, Conil','N09_012_011v3_thumb.jpg',130, 130,5,'photo_4728510.html');
												thumbnails[3984814] = new thumbnail(3984814,'241066','Millennium Wheel - PDB 13-3-09 0123v2','PDB_13-3-09_0123v21_thumb.jpg',130, 129,5,'photo_3984814.html');
												thumbnails[3984813] = new thumbnail(3984813,'241066','St Paul\'s Cathedral - PDB 13-3-09 0039v4','PDB_13-3-09_0039v4_thumb.jpg',130, 76,5,'photo_3984813.html');
												thumbnails[4853746] = new thumbnail(4853746,'176039','Pinhole impressions 32 - 3 stones','N08_007_01v3_thumb.jpg',130, 130,5,'photo_4853746.html');
												thumbnails[2832939] = new thumbnail(2832939,'176039','Pinhole Impressions 38 - Moonrise, Cape Trafalgar - Image size 85cm x 23cm on paper 95cm x 43cm','N08_010_001v5_thumb.jpg',130, 35,5,'photo_2832939.html');
												thumbnails[2833078] = new thumbnail(2833078,'176039','Pinhole Impressions 40  - Cape Trafalgar, Image size 70cm x 32cm on paper 80cm x 42cm','N08_011_005v4_thumb.jpg',130, 59,5,'photo_2833078.html');
												thumbnails[2833097] = new thumbnail(2833097,'176039','Pinhole Impressions 45 - Cape Trafalgar -  Image size 71cm x 32cm on paper 81cm x 42cm','N08_015_003v3_thumb.jpg',130, 58,5,'photo_2833097.html');
												thumbnails[4864258] = new thumbnail(4864258,'241066','From the Coast of Light series','N09_013_032Av2_thumb.jpg',130, 86,5,'photo_4864258.html');
												thumbnails[6749429] = new thumbnail(6749429,'188301','Tulips - Manton de Manila series 3','PDB_11_03_10_0133v2print_thumb.jpg',87, 130,5,'photo_6749429.html');
												thumbnails[6749430] = new thumbnail(6749430,'188301','Tulips - Manton de Manila series 10','PDB_11_03_10_0180v2print_thumb.jpg',87, 130,5,'photo_6749430.html');
												thumbnails[6749431] = new thumbnail(6749431,'188301','Roses - Manton de Manila series 11','PDB_15_03_10_0022print_thumb.jpg',87, 130,5,'photo_6749431.html');
												thumbnails[6749432] = new thumbnail(6749432,'188301','green chrysanthemum - Manton de Manila series 8','PDB_17_03_10_0091print_thumb.jpg',87, 130,5,'photo_6749432.html');
												thumbnails[6749433] = new thumbnail(6749433,'188301','Gerbera petals - Manton de Manila series 2','PDB_17_03_10_0292v2print_thumb.jpg',87, 130,5,'photo_6749433.html');
												thumbnails[6749434] = new thumbnail(6749434,'188301','Chrysanthemum petals - Manton de Manila series 6','PDB_19_03_10_0026print_thumb.jpg',87, 130,5,'photo_6749434.html');
												thumbnails[6749435] = new thumbnail(6749435,'188301','rose petals - Manton de Manila series 1','PDB_19_03_10_0156v2print_thumb.jpg',87, 130,5,'photo_6749435.html');
												thumbnails[6749436] = new thumbnail(6749436,'188301','rose petals - Manton de Manila series 7','PDB_19_03_10_0176print_thumb.jpg',87, 130,5,'photo_6749436.html');
												thumbnails[6749437] = new thumbnail(6749437,'188301','rose petals - Manton de Manila series 9','PDB_19_03_10_0190print_thumb.jpg',87, 130,5,'photo_6749437.html');
												thumbnails[6749438] = new thumbnail(6749438,'188301','Tulips - Manton de Manila series 5','PDB_19_03_10_0224v2print_thumb.jpg',87, 130,5,'photo_6749438.html');
												thumbnails[6749440] = new thumbnail(6749440,'188301','Echinops ritro - Light and Line series - 2','PDB_4_03_10_0125print_thumb.jpg',87, 130,5,'photo_6749440.html');
												thumbnails[6749441] = new thumbnail(6749441,'188301','Tulips - Light and Line series - 3','PDB_9_03_10_0044print_thumb.jpg',87, 130,5,'photo_6749441.html');
												thumbnails[6749442] = new thumbnail(6749442,'188301','Tulips - Light and Line series - 4','PDB_9_03_10_0083v2print_thumb.jpg',87, 130,5,'photo_6749442.html');
												thumbnails[6749443] = new thumbnail(6749443,'188301','Tulips - Light and Line series - 5','PDB_9_03_10_0102v2print_thumb.jpg',87, 130,5,'photo_6749443.html');
												thumbnails[6749445] = new thumbnail(6749445,'188301','Tulips - Light and Line series - 7','PDB_9_03_10_0125v3print_thumb.jpg',87, 130,5,'photo_6749445.html');
												thumbnails[6749446] = new thumbnail(6749446,'188301','Miscanthus sinensis - Light and Line series - 8','PDB_9_03_10_0146printlarge_thumb.jpg',87, 130,5,'photo_6749446.html');
												thumbnails[6749447] = new thumbnail(6749447,'188301','Miscanthus sinensis - Light and Line series - 9','PDB_9_03_10_0155printlarge_thumb.jpg',87, 130,5,'photo_6749447.html');
												thumbnails[6755486] = new thumbnail(6755486,'188301','Cloud Series - 1','PDB_15_03_10_0305v3_thumb.jpg',87, 130,5,'photo_6755486.html');
												thumbnails[6755487] = new thumbnail(6755487,'188301','Cloud Series - 2','PDB_25_4_10_0319v2_thumb.jpg',87, 130,5,'photo_6755487.html');
												thumbnails[3984806] = new thumbnail(3984806,'188301','Beech Tree - Image size 55.5cm x 37cm on A2 paper','PDB_10-3-09_0055v212_thumb.jpg',130, 87,5,'photo_3984806.html');
												thumbnails[3984809] = new thumbnail(3984809,'188301','Gunnersbury - Image size 55.5cm x 37cm on A2 paper','PDB_10-3-09_0091_thumb.jpg',87, 130,5,'photo_3984809.html');
												thumbnails[4853837] = new thumbnail(4853837,'188301','Beech Tree 3 - Image size 55.5cm x 37cm on A2 paper','PDB_26-6-09_0164_thumb.jpg',87, 130,5,'photo_4853837.html');
												thumbnails[2910282] = new thumbnail(2910282,'180271','Photogram 1','pol_82_011_thumb.jpg',109, 130,5,'photo_2910282.html');
												thumbnails[2929449] = new thumbnail(2929449,'180277','Lavender field 1 - Gum Bichromate print','alt_1999_01_thumb.jpg',130, 84,5,'photo_2929449.html');
												thumbnails[2911347] = new thumbnail(2911347,'180271','Photogram 2','pol_82_012_thumb.jpg',108, 130,5,'photo_2911347.html');
												thumbnails[2935269] = new thumbnail(2935269,'180277','Phalaenopsis orchid - Cyanotype print','alt_1999_03_thumb.jpg',130, 89,5,'photo_2935269.html');
												thumbnails[2911364] = new thumbnail(2911364,'180271','Photogram 3','pol_82_013_thumb.jpg',108, 130,5,'photo_2911364.html');
												thumbnails[2955253] = new thumbnail(2955253,'180277','Phalaenopsis - Gum Bichromate print','alt_1999_17_thumb.jpg',130, 88,5,'photo_2955253.html');
												thumbnails[2911369] = new thumbnail(2911369,'180271','Photogram 4','pol_82_015_thumb.jpg',109, 130,5,'photo_2911369.html');
												thumbnails[2955041] = new thumbnail(2955041,'180277','frozen grass - cyanotype print','alt_1999_06_thumb.jpg',130, 86,5,'photo_2955041.html');
												thumbnails[2911385] = new thumbnail(2911385,'180271','Photogram 5','pol_82_016_thumb.jpg',107, 130,5,'photo_2911385.html');
												thumbnails[2955113] = new thumbnail(2955113,'180277','water droplet on grass - cyanotype print','alt_1999_07_thumb.jpg',130, 85,5,'photo_2955113.html');
												thumbnails[2911427] = new thumbnail(2911427,'180271','Photogram 6','pol_82_017_thumb.jpg',108, 130,5,'photo_2911427.html');
												thumbnails[2955124] = new thumbnail(2955124,'180277','water droplets on camelia leaf - cyanotype print','alt_1999_08_thumb.jpg',130, 83,5,'photo_2955124.html');
												thumbnails[2911432] = new thumbnail(2911432,'180271','Photogram 7','pol_82_036_thumb.jpg',106, 130,5,'photo_2911432.html');
												thumbnails[2955146] = new thumbnail(2955146,'180277','Richmond lock on River Thames - Kallitype print','alt_1999_11_thumb.jpg',130, 99,5,'photo_2955146.html');
												thumbnails[2911435] = new thumbnail(2911435,'180271','Photogram 8','pol_82_037_thumb.jpg',108, 130,5,'photo_2911435.html');
												thumbnails[2955207] = new thumbnail(2955207,'180277','chrysanthemum - Gum Bichromate print','alt_1999_12_thumb.jpg',130, 89,5,'photo_2955207.html');
												thumbnails[2911439] = new thumbnail(2911439,'180271','Photogram 9','pol_82_038_thumb.jpg',106, 130,5,'photo_2911439.html');
												thumbnails[2935279] = new thumbnail(2935279,'180277','Phalaenopsis orchid 2 - Cyanotype print. Image size approximately 23cm x34cm on paper 39cm x 47cm - limited edition of 3 - prints will vary','alt_1999_04_thumb.jpg',130, 90,5,'photo_2935279.html');
												thumbnails[2911443] = new thumbnail(2911443,'180271','Photogram 10','pol_82_039_thumb.jpg',107, 130,5,'photo_2911443.html');
												thumbnails[2929925] = new thumbnail(2929925,'180277','Lavender field 2 - Gum Bichromate print. Image size approx 26cm x 17cm on Bockingford watercolour paper - Limited edition of 3 - prints will vary','alt_1999_02_thumb.jpg',85, 130,5,'photo_2929925.html');
												thumbnails[2935318] = new thumbnail(2935318,'180277','Onopordum acanthium - Cyanotype print. Image size approximately 22.5cm x34cm on paper 39cm x 47cm - Unique print','alt_1999_05_thumb.jpg',86, 130,5,'photo_2935318.html');
												thumbnails[2955234] = new thumbnail(2955234,'180277','Tulip - Gum Bichromate print. Image size 33cm x 21cm on paper 35cm x 44cm - Edition of three - Images may vary','alt_1999_13_thumb.jpg',82, 130,5,'photo_2955234.html');
												thumbnails[2955258] = new thumbnail(2955258,'180277','Fritillaria Meleagris 1 - Gum Bichromate print. Image size approx 23cm x 35cm on Bockingford watercolour paper - Edition of three - Images may vary','alt_1999_14_thumb.jpg',87, 130,5,'photo_2955258.html');
												thumbnails[2955489] = new thumbnail(2955489,'180277','Fritillaria Meleagris 2 - Gum Bichromate print. Image size approx 23cm x 35cm on Bockingford watercolour paper - Edition of three - Images may vary','alt_1999_16_D535845F-1D09-001F-990C9A8287BBCBA9_thumb.jpg',94, 130,5,'photo_2955489.html');
												thumbnails[2955494] = new thumbnail(2955494,'180277','Fritillaria Meleagris 3 - Gum Bichromate print. Image size approx 23cm x 35cm on Bockingford watercolour paper - Edition of three - Images may vary','alt_1999_15_thumb.jpg',96, 130,5,'photo_2955494.html');
												thumbnails[2955511] = new thumbnail(2955511,'180277','Stargazer lily - Kallitype print. Image size approximately 18cm x 23cm - Unique print','alt_1999_21_thumb.jpg',103, 130,5,'photo_2955511.html');
												thumbnails[2972928] = new thumbnail(2972928,'180277','Dandelions - Kallitype print','alt_1999_19_thumb.jpg',130, 84,5,'photo_2972928.html');
												thumbnails[2972991] = new thumbnail(2972991,'180277','Twickenham Bridge - Gum Bichromate print','alt_1999_22_thumb.jpg',130, 101,5,'photo_2972991.html');
												thumbnails[2973047] = new thumbnail(2973047,'180277','Twickenham Bridge 2- Gum Bichromate print','alt_1999_28_thumb.jpg',130, 102,5,'photo_2973047.html');
												thumbnails[2973108] = new thumbnail(2973108,'180277','Charing Cross Station at night - Gum Bichromate print','alt_1999_32_thumb.jpg',130, 100,5,'photo_2973108.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[180271] = new gallery(180271,'2911435','Polaroid','section223844',[2910282,2911347,2911364,2911369,2911385,2911427,2911432,2911435,2911439,2911443],0, 0, '', 'section223844_180271.html',0,0);
				  					galleries[180277] = new gallery(180277,'2929925','alternative processes','section223844',[2929449,2935269,2955253,2955041,2955113,2955124,2955146,2955207,2935279,2929925,2935318,2955234,2955258,2955489,2955494,2955511,2972928,2972991,2973047,2973108],0, 0, '', 'section223844_180277.html',0,0);
				  					galleries[176038] = new gallery(176038,'2823482','Impressions series 1','gallery',[2823464,2823472,2823482,2823487,2823540,2823485,2823729,2823732,2823765,2823775,2823776,2823778,4956714,4956715,4956716,4956717],0, 0, '', 'gallery_176038.html',0,0);
				  					galleries[176039] = new gallery(176039,'2825188','Impressions series 2','gallery',[2825166,2825175,2825188,2825210,2825221,2825228,2825966,2825970,3062161,2946780,2946790,2946794,4728301,4728508,4728510,4853746,2832939,2833078,2833097],0, 0, '', 'gallery_176039.html',0,0);
				  					galleries[241065] = new gallery(241065,'3984726','43 Gardeners\' Hands','gallery',[3984726],0, 0, '', 'gallery_241065.html',0,0);
				  					galleries[241066] = new gallery(241066,'3984814','Urban Landscapes','gallery',[4854125,3984812,3984811,3984814,3984813,4864258],0, 0, '', 'gallery_241066.html',0,0);
				  					galleries[188301] = new gallery(188301,'6749438','Landscape and Botanical','gallery',[6749427,6749429,6749430,6749431,6749432,6749433,6749434,6749435,6749436,6749437,6749438,6749440,6749441,6749442,6749443,6749445,6749446,6749447,6755486,6755487,3984806,3984809,4853837],0, 0, '', 'gallery_188301.html',0,0);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[1] = '5066991';
imageSets[2] = '6749438,3984814,3984726,2929925,2911435,2825188,2823482';
imageSets[3] = '3984726';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/pauldebois/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/pauldebois/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 = 'Paul Debois Images: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {};	    	      	      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> &pound;' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
				
		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">';
	temp = temp + '	<input type="hidden" name="item_option" value="' + item_option + '">';
	temp = temp + '	<input type="hidden" name="site" value="PAULDEBOIS">';
		temp = temp + '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp = temp + '	<input type="hidden" name="quantity" value="1">';
								temp = temp + '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
			temp = temp + '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
	temp = temp + '</form>';
		temp = temp + '<div class="clearing">&nbsp;</div>';
	temp = temp + '<div id="confirmContainer">';
	temp = temp + '<div id="paymentConfirm">Item added to cart</div>';
	temp = temp + '</div>';
			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;
	}
}

			

