window.thumbnails = {};
thumbnails[7416903] = clik.newPhoto({"link":"photo_7416903.html","caption":"Swan Earings ","height":173,"id":7416903,"server_id":31,"src":"1_thumb.jpg","galleries_id":401935,"width":130});
thumbnails[7416946] = clik.newPhoto({"link":"photo_7416946.html","caption":"Blue Swirl Earrings","height":173,"id":7416946,"server_id":31,"src":"4_thumb.jpg","galleries_id":401935,"width":130});
thumbnails[7416948] = clik.newPhoto({"link":"photo_7416948.html","caption":"Deep sea diver","height":173,"id":7416948,"server_id":31,"src":"14_thumb.jpg","galleries_id":401948,"width":130});
thumbnails[7416952] = clik.newPhoto({"link":"photo_7416952.html","caption":"Fish in reeds","height":173,"id":7416952,"server_id":31,"src":"15_thumb.jpg","galleries_id":401948,"width":130});
thumbnails[7416953] = clik.newPhoto({"link":"photo_7416953.html","caption":"Clown fish in coral","height":173,"id":7416953,"server_id":31,"src":"16_thumb.jpg","galleries_id":401948,"width":130});
thumbnails[7416954] = clik.newPhoto({"link":"photo_7416954.html","caption":"Dolphin","height":118,"id":7416954,"server_id":31,"src":"17_thumb.jpg","galleries_id":401948,"width":130});
thumbnails[7421114] = clik.newPhoto({"link":"photo_7421114.html","caption":"Snake","height":173,"id":7421114,"server_id":31,"src":"18_thumb.jpg","galleries_id":401936,"width":130});
thumbnails[7421117] = clik.newPhoto({"link":"photo_7421117.html","caption":"Great Crested Grebe","height":97,"id":7421117,"server_id":31,"src":"20_thumb.jpg","galleries_id":401949,"width":130});
thumbnails[7421119] = clik.newPhoto({"link":"photo_7421119.html","caption":"Flamingo","height":182,"id":7421119,"server_id":31,"src":"21_thumb.jpg","galleries_id":401949,"width":130});
thumbnails[7421126] = clik.newPhoto({"link":"photo_7421126.html","caption":"Swans","height":173,"id":7421126,"server_id":31,"src":"22_thumb.jpg","galleries_id":401949,"width":130});
thumbnails[7421129] = clik.newPhoto({"link":"photo_7421129.html","caption":"Bumble Bee","height":98,"id":7421129,"server_id":31,"src":"23_thumb.jpg","galleries_id":401947,"width":130});
thumbnails[7421138] = clik.newPhoto({"link":"photo_7421138.html","caption":"Gazelle","height":206,"id":7421138,"server_id":31,"src":"gazelle_2_thumb.jpg","galleries_id":401936,"width":130});
thumbnails[7421139] = clik.newPhoto({"link":"photo_7421139.html","caption":"Dragonfly","height":97,"id":7421139,"server_id":31,"src":"50_thumb.jpg","galleries_id":401947,"width":130});
thumbnails[7421141] = clik.newPhoto({"link":"photo_7421141.html","caption":"Flying Mallards","height":98,"id":7421141,"server_id":31,"src":"61_thumb.jpg","galleries_id":401949,"width":130});
thumbnails[7421143] = clik.newPhoto({"link":"photo_7421143.html","caption":"Archer","height":173,"id":7421143,"server_id":31,"src":"75_thumb.jpg","galleries_id":403656,"width":130});
thumbnails[7421145] = clik.newPhoto({"link":"photo_7421145.html","caption":"Meerkat family","height":109,"id":7421145,"server_id":31,"src":"205_thumb.jpg","galleries_id":401936,"width":130});
thumbnails[7421148] = clik.newPhoto({"link":"photo_7421148.html","caption":"Tarantula spider","height":98,"id":7421148,"server_id":31,"src":"224_thumb.jpg","galleries_id":401947,"width":130});
thumbnails[7421149] = clik.newPhoto({"link":"photo_7421149.html","caption":"Art Deco Style Wrestlers","height":98,"id":7421149,"server_id":31,"src":"wrestlers_thumb.jpg","galleries_id":403656,"width":130});
thumbnails[7442448] = clik.newPhoto({"link":"photo_7442448.html","caption":"glass dinosaur","height":173,"id":7442448,"server_id":31,"src":"dino_003_thumb.jpg","galleries_id":401950,"width":130});
thumbnails[7445567] = clik.newPhoto({"link":"photo_7445567.html","caption":"Canada Geese","height":97,"id":7445567,"server_id":31,"src":"canada_geese_new_thumb.jpg","galleries_id":401949,"width":130});
thumbnails[7445569] = clik.newPhoto({"link":"photo_7445569.html","caption":"Chaffinch on blossom","height":98,"id":7445569,"server_id":31,"src":"chaffinch_blossom_ok_1_thumb.jpg","galleries_id":401949,"width":130});
thumbnails[7445571] = clik.newPhoto({"link":"photo_7445571.html","caption":"Curlew","height":174,"id":7445571,"server_id":31,"src":"curlew_1m_1_new_thumb.jpg","galleries_id":401949,"width":130});
thumbnails[7445573] = clik.newPhoto({"link":"photo_7445573.html","caption":"macaw","height":174,"id":7445573,"server_id":31,"src":"macaw_thumb.jpg","galleries_id":401949,"width":130});
thumbnails[7445580] = clik.newPhoto({"link":"photo_7445580.html","caption":"Avocet","height":97,"id":7445580,"server_id":31,"src":"jewellery_030_thumb.jpg","galleries_id":401949,"width":130});
thumbnails[7445583] = clik.newPhoto({"link":"photo_7445583.html","caption":"Kingfisher on bullrushes","height":98,"id":7445583,"server_id":31,"src":"k_f_on_b_r_2_thumb.jpg","galleries_id":401949,"width":130});
thumbnails[7445585] = clik.newPhoto({"link":"photo_7445585.html","caption":"Tree Creepers","height":173,"id":7445585,"server_id":31,"src":"tree_creepers_4_thumb.jpg","galleries_id":401949,"width":130});
thumbnails[7445618] = clik.newPhoto({"link":"photo_7445618.html","caption":"Diana goddess of hunting","height":173,"id":7445618,"server_id":31,"src":"diana_ok_thumb.JPG","galleries_id":403656,"width":130});
thumbnails[7445625] = clik.newPhoto({"link":"photo_7445625.html","caption":"The proposal","height":98,"id":7445625,"server_id":31,"src":"proposal_web_thumb.jpg","galleries_id":403656,"width":130});
thumbnails[7445630] = clik.newPhoto({"link":"photo_7445630.html","caption":"art deco style dancers","height":97,"id":7445630,"server_id":31,"src":"dancers_ok_thumb.jpg","galleries_id":403656,"width":130});
thumbnails[7445637] = clik.newPhoto({"link":"photo_7445637.html","caption":"Elegance","height":174,"id":7445637,"server_id":31,"src":"elegance_thumb.jpg","galleries_id":403656,"width":130});
thumbnails[7445648] = clik.newPhoto({"link":"photo_7445648.html","caption":"Giraffe","height":201,"id":7445648,"server_id":31,"src":"giraf_thumb.jpg","galleries_id":401936,"width":130});
thumbnails[7445652] = clik.newPhoto({"link":"photo_7445652.html","caption":"African Bongo","height":112,"id":7445652,"server_id":31,"src":"African_bongo_1_thumb.jpg","galleries_id":401936,"width":130});
thumbnails[7445658] = clik.newPhoto({"link":"photo_7445658.html","caption":"Welsh dragon","height":143,"id":7445658,"server_id":31,"src":"dragon_2_thumb.jpg","galleries_id":403657,"width":130});
thumbnails[7447040] = clik.newPhoto({"link":"photo_7447040.html","caption":"Unicorn","height":173,"id":7447040,"server_id":31,"src":"unicorn_thumb.jpg","galleries_id":403657,"width":130});
thumbnails[7447043] = clik.newPhoto({"link":"photo_7447043.html","caption":"Pegasus","height":173,"id":7447043,"server_id":31,"src":"k__g_013_thumb.jpg","galleries_id":403657,"width":130});
thumbnails[7447045] = clik.newPhoto({"link":"photo_7447045.html","caption":"Robin Hood","height":174,"id":7447045,"server_id":31,"src":"robin_hood_ok_thumb.jpg","galleries_id":403657,"width":130});
thumbnails[7447049] = clik.newPhoto({"link":"photo_7447049.html","caption":"Large Green Dragon","height":97,"id":7447049,"server_id":31,"src":"green_dragon_004_thumb.jpg","galleries_id":403657,"width":130});
thumbnails[7447060] = clik.newPhoto({"link":"photo_7447060.html","caption":"Gent & Pennyfarthing","height":179,"id":7447060,"server_id":31,"src":"penny_farthing_1_thumb.jpg","galleries_id":401950,"width":130});
thumbnails[7447065] = clik.newPhoto({"link":"photo_7447065.html","caption":"clown on unicycle","height":173,"id":7447065,"server_id":31,"src":"clown_unicycle_21_thumb.jpg","galleries_id":401950,"width":130});
thumbnails[7481746] = clik.newPhoto({"link":"photo_7481746.html","caption":"Diver ","height":174,"id":7481746,"server_id":31,"src":"diver_1_thumb.jpg","galleries_id":401948,"width":130});
thumbnails[7481751] = clik.newPhoto({"link":"photo_7481751.html","caption":"Lobster","height":98,"id":7481751,"server_id":31,"src":"lobster_1_thumb.jpg","galleries_id":401948,"width":130});
thumbnails[7481757] = clik.newPhoto({"link":"photo_7481757.html","caption":"Sea Horse","height":202,"id":7481757,"server_id":31,"src":"new_try_for_web_022_thumb.jpg","galleries_id":401948,"width":130});
thumbnails[7481762] = clik.newPhoto({"link":"photo_7481762.html","caption":"Hermit Crab","height":97,"id":7481762,"server_id":31,"src":"small_hermit_crab_2_thumb.jpg","galleries_id":401948,"width":130});
thumbnails[7481811] = clik.newPhoto({"link":"photo_7481811.html","caption":"Crane fly","height":98,"id":7481811,"server_id":31,"src":"cranefly_1_thumb.jpg","galleries_id":401947,"width":130});
thumbnails[7481825] = clik.newPhoto({"link":"photo_7481825.html","caption":"Earwig","height":98,"id":7481825,"server_id":31,"src":"earwig_1_thumb.jpg","galleries_id":401947,"width":130});
thumbnails[7481832] = clik.newPhoto({"link":"photo_7481832.html","caption":"Centipede","height":98,"id":7481832,"server_id":31,"src":"centipede_2_thumb.jpg","galleries_id":401947,"width":130});
thumbnails[7481838] = clik.newPhoto({"link":"photo_7481838.html","caption":"Bath Spider","height":98,"id":7481838,"server_id":31,"src":"bath_spider_new_thumb.jpg","galleries_id":401947,"width":130});
thumbnails[7481848] = clik.newPhoto({"link":"photo_7481848.html","caption":"Scorpion","height":98,"id":7481848,"server_id":31,"src":"scorpion_thumb.jpg","galleries_id":401947,"width":130});
thumbnails[7481855] = clik.newPhoto({"link":"photo_7481855.html","caption":"Spring Flowers","height":174,"id":7481855,"server_id":31,"src":"mixed_flowers_thumb.jpg","galleries_id":401936,"width":130});
thumbnails[7481868] = clik.newPhoto({"link":"photo_7481868.html","caption":"Violets","height":174,"id":7481868,"server_id":31,"src":"violets_thumb.jpg","galleries_id":401936,"width":130});
thumbnails[7481877] = clik.newPhoto({"link":"photo_7481877.html","caption":"Lily of the Valley","height":218,"id":7481877,"server_id":31,"src":"lilly_of_valley_4_thumb.jpg","galleries_id":401936,"width":130});
thumbnails[7481888] = clik.newPhoto({"link":"photo_7481888.html","caption":"Whitemead spider","height":114,"id":7481888,"server_id":31,"src":"whitemead_spider_4mp_2_thumb.JPG","galleries_id":401947,"width":130});
thumbnails[7481897] = clik.newPhoto({"link":"photo_7481897.html","caption":"Dolphins","height":179,"id":7481897,"server_id":31,"src":"double_dolphin_thumb.jpg","galleries_id":401948,"width":130});
thumbnails[7481903] = clik.newPhoto({"link":"photo_7481903.html","caption":"Fly fisherman","height":173,"id":7481903,"server_id":31,"src":"fly_fisherman_thumb.jpg","galleries_id":401948,"width":130});
thumbnails[7481907] = clik.newPhoto({"link":"photo_7481907.html","caption":"Octopus","height":98,"id":7481907,"server_id":31,"src":"octopus_4_thumb.jpg","galleries_id":401948,"width":130});
thumbnails[7484665] = clik.newPhoto({"link":"photo_7484665.html","caption":"Blue tit earrings","height":168,"id":7484665,"server_id":31,"src":"blue_titis_thumb.jpg","galleries_id":401935,"width":130});
thumbnails[7484671] = clik.newPhoto({"link":"photo_7484671.html","caption":"blue and white swirl set","height":173,"id":7484671,"server_id":31,"src":"blue_white_swirl_web_thumb.jpg","galleries_id":401935,"width":130});
thumbnails[7484680] = clik.newPhoto({"link":"photo_7484680.html","caption":"kingfisher earrings","height":167,"id":7484680,"server_id":31,"src":"kingfishers_thumb.jpg","galleries_id":401935,"width":130});
thumbnails[7484683] = clik.newPhoto({"link":"photo_7484683.html","caption":"Green set","height":163,"id":7484683,"server_id":31,"src":"green_set_thumb.jpg","galleries_id":401935,"width":130});
thumbnails[7484700] = clik.newPhoto({"link":"photo_7484700.html","caption":"","height":174,"id":7484700,"server_id":31,"src":"no_web_12_thumb.jpg","galleries_id":401935,"width":130});
thumbnails[7484714] = clik.newPhoto({"link":"photo_7484714.html","caption":"Turquoise necklace","height":174,"id":7484714,"server_id":31,"src":"turq_necklace_thumb.jpg","galleries_id":401935,"width":130});
thumbnails[7484722] = clik.newPhoto({"link":"photo_7484722.html","caption":"Yellow and Clear glass drops","height":219,"id":7484722,"server_id":31,"src":"yellow_insert_thumb.jpg","galleries_id":401935,"width":130});
thumbnails[7746027] = clik.newPhoto({"link":"photo_7746027.html","caption":"Chimps","height":173,"id":7746027,"server_id":31,"src":"chimps_thumb.jpg","galleries_id":401936,"width":130});
thumbnails[7746047] = clik.newPhoto({"link":"photo_7746047.html","caption":"Giraffe family","height":173,"id":7746047,"server_id":31,"src":"giraffe_family_thumb.jpg","galleries_id":401936,"width":130});
thumbnails[7746076] = clik.newPhoto({"link":"photo_7746076.html","caption":"Tractor","height":97,"id":7746076,"server_id":31,"src":"tractor_2_thumb.jpg","galleries_id":418835,"width":130});
thumbnails[7746077] = clik.newPhoto({"link":"photo_7746077.html","caption":"Yamaha motor bike","height":98,"id":7746077,"server_id":31,"src":"yamahaYZF_R1_NO1_thumb.jpg","galleries_id":418835,"width":130});
thumbnails[7746079] = clik.newPhoto({"link":"photo_7746079.html","caption":"Daisies","height":174,"id":7746079,"server_id":31,"src":"flowers_004_thumb.jpg","galleries_id":401936,"width":130});
thumbnails[7753774] = clik.newPhoto({"link":"photo_7753774.html","caption":"Jester","height":174,"id":7753774,"server_id":31,"src":"jester_2_thumb.jpg","galleries_id":401950,"width":130});
thumbnails[7753833] = clik.newPhoto({"link":"photo_7753833.html","caption":"Lizard","height":183,"id":7753833,"server_id":31,"src":"lizard_thumb.jpg","galleries_id":401936,"width":130});
thumbnails[7753839] = clik.newPhoto({"link":"photo_7753839.html","caption":"Stag","height":98,"id":7753839,"server_id":31,"src":"stag_thumb.jpg","galleries_id":401936,"width":130});
thumbnails[7753844] = clik.newPhoto({"link":"photo_7753844.html","caption":"Small Dragon","height":97,"id":7753844,"server_id":31,"src":"small_dragon_thumb.jpg","galleries_id":403657,"width":130});
thumbnails[8417223] = clik.newPhoto({"link":"photo_8417223.html","caption":"boxer dog","height":98,"id":8417223,"server_id":31,"src":"boxer_thumb.jpg","galleries_id":401950,"width":130});
thumbnails[8417227] = clik.newPhoto({"link":"photo_8417227.html","caption":" dolphins","height":145,"id":8417227,"server_id":31,"src":"dolphins_order_thumb.jpg","galleries_id":418835,"width":130});
thumbnails[8417230] = clik.newPhoto({"link":"photo_8417230.html","caption":"clown & dog","height":98,"id":8417230,"server_id":31,"src":"clown__dog_thumb.jpg","galleries_id":401950,"width":130});
thumbnails[8417235] = clik.newPhoto({"link":"photo_8417235.html","caption":"centipede","height":97,"id":8417235,"server_id":31,"src":"centipede_thumb.jpg","galleries_id":401947,"width":130});
thumbnails[8417238] = clik.newPhoto({"link":"photo_8417238.html","caption":"blue butterfly on flower","height":97,"id":8417238,"server_id":31,"src":"blue_butterly_on_flower_thumb.jpg","galleries_id":401947,"width":130});
thumbnails[8417247] = clik.newPhoto({"link":"photo_8417247.html","caption":"honey bees","height":97,"id":8417247,"server_id":31,"src":"honey_bees_2_thumb.jpg","galleries_id":401947,"width":130});
thumbnails[8417250] = clik.newPhoto({"link":"photo_8417250.html","caption":"honey bee on daisy","height":97,"id":8417250,"server_id":31,"src":"bee_on_daisy_3_thumb.jpg","galleries_id":401947,"width":130});
thumbnails[8417252] = clik.newPhoto({"link":"photo_8417252.html","caption":"dolphin","height":173,"id":8417252,"server_id":31,"src":"dolphin_thumb.jpg","galleries_id":401948,"width":130});
thumbnails[8417255] = clik.newPhoto({"link":"photo_8417255.html","caption":"dragon gold","height":97,"id":8417255,"server_id":31,"src":"dragon_gold_thumb.jpg","galleries_id":403657,"width":130});
thumbnails[8417265] = clik.newPhoto({"link":"photo_8417265.html","caption":"scorpion","height":97,"id":8417265,"server_id":31,"src":"scorpion_order_thumb.jpg","galleries_id":418835,"width":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
galleries[403656] = clik.newGallery({"photoIDs":[7421143,7421149,7445618,7445625,7445630,7445637],"link":"gallery_403656.html","skipIndex":0,"section_code":"gallery","id":403656,"parentGallery":"","featured_images":7421143,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Art Deco\/ Modern"});galleries[403657] = clik.newGallery({"photoIDs":[7445658,7447040,7447043,7447045,7447049,7753844,8417255],"link":"gallery_403657.html","skipIndex":0,"section_code":"gallery","id":403657,"parentGallery":"","featured_images":"8417255,7753844,7447049,7447045,7447043,7447040,7445658","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Mythical "});galleries[401935] = clik.newGallery({"photoIDs":[7416903,7416946,7484665,7484671,7484680,7484683,7484700,7484714,7484722],"link":"gallery_401935.html","skipIndex":0,"section_code":"gallery","id":401935,"parentGallery":"","featured_images":7416903,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Jewellery"});galleries[401936] = clik.newGallery({"photoIDs":[7421114,7421138,7421145,7445648,7445652,7481855,7481868,7481877,7746027,7746047,7746079,7753833,7753839],"link":"gallery_401936.html","skipIndex":0,"section_code":"gallery","id":401936,"parentGallery":"","featured_images":"7753839,7753833,7746079,7746047,7746027,7481877,7481868,7481855,7445652,7445648","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Flora and Fauna"});galleries[401947] = clik.newGallery({"photoIDs":[7421129,7421139,7421148,7481811,7481825,7481832,7481838,7481848,7481888,8417235,8417238,8417247,8417250],"link":"gallery_401947.html","skipIndex":0,"section_code":"gallery","id":401947,"parentGallery":"","featured_images":"8417250,8417247,8417238,8417235,7481888,7481848,7481838,7481832,7481825,7481811","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Insects"});galleries[401948] = clik.newGallery({"photoIDs":[7416948,7416952,7416953,7416954,7481746,7481751,7481757,7481762,7481897,7481903,7481907,8417252],"link":"gallery_401948.html","skipIndex":0,"section_code":"gallery","id":401948,"parentGallery":"","featured_images":"8417252,7481907,7481903,7481897,7481762,7481757,7481751,7481746,7416954,7416953","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Sealife"});galleries[401949] = clik.newGallery({"photoIDs":[7421117,7421119,7421126,7421141,7445567,7445569,7445571,7445573,7445580,7445583,7445585],"link":"gallery_401949.html","skipIndex":0,"section_code":"gallery","id":401949,"parentGallery":"","featured_images":"7421126,7421119","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Birds"});galleries[401950] = clik.newGallery({"photoIDs":[7442448,7447060,7447065,7753774,8417223,8417230],"link":"gallery_401950.html","skipIndex":0,"section_code":"gallery","id":401950,"parentGallery":"","featured_images":"8417230,8417223,7753774,7447065,7447060,7442448","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Others"});galleries[418835] = clik.newGallery({"photoIDs":[7746076,7746077,8417227,8417265],"link":"gallery_418835.html","skipIndex":0,"section_code":"gallery","id":418835,"parentGallery":"","featured_images":"8417265,8417227,7746077,7746076","maxRecords":0,"usePopups":false,"singleSection":false,"title":"commissions"});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[3] = '8417265,8417255,8417252,8417250,8417247,8417238,8417235,8417230,8417227,8417223,7753844,7753839,7753833,7753774,7746079,7746077,7746076,7746047,7746027,7484722,7484714,7484700,7484683,7484680,7484671,7484665,7481907,7481903,7481897,7481888,7481877,7481868,7481855,7481848,7481838,7481832,7481825,7481811,7481762,7481757,7481751,7481746,7447065,7447060,7447049,7447045,7447043,7447040,7445658,7445652';
imageSets[2] = '7421143,7421126,7421119,7416903';
imageSets[1] = '8417255,7746076,7484665,7447049,7445648,7445637,7421143,7421119,7416903';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/LINDADAVID/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/LINDADAVID/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 || photos || {})[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 = 'Glass Sculptures by DMBeardGlass: ' + 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>Hand Crafted by </strong>' + this.photographer + '</div>';
	}
			
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this glass sculpture online</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
						temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
					temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="LINDADAVID">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

		

