window.thumbnails = {};
															thumbnails[9026546] = clik.newPhoto({"id":9026546,"src":"LloydsTSB_60171_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9026546.html","width":130,"caption":"LloydsTSB, Bridgend","height":86});
															thumbnails[9037676] = clik.newPhoto({"id":9037676,"src":"10-04-062_3_Assembly_Sq_Cardiff_Bay_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9037676.html","width":130,"caption":"3 Assembly Sq., Cardiff Bay","height":107});
															thumbnails[6152379] = clik.newPhoto({"id":6152379,"src":"Altair_House_2_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_6152379.html","width":84,"caption":"Altair House, Cardiff Bay","height":130});
															thumbnails[6152378] = clik.newPhoto({"id":6152378,"src":"Altair_House_1_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_6152378.html","width":87,"caption":"Altair House, Cardiff Bay","height":130});
															thumbnails[9028871] = clik.newPhoto({"id":9028871,"src":"LloydsTSB_6071_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9028871.html","width":87,"caption":"LloydsTSB, Bridgend","height":130});
															thumbnails[6152592] = clik.newPhoto({"id":6152592,"src":"3_Assembly_Sq_3_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_6152592.html","width":87,"caption":"3 Assembly Sq., Cardiff Bay","height":130});
															thumbnails[6152375] = clik.newPhoto({"id":6152375,"src":"3_Assembly_Sq_2_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_6152375.html","width":76,"caption":"3 Assembly Sq., Cardiff Bay","height":130});
															thumbnails[9033965] = clik.newPhoto({"id":9033965,"src":"Bankside_1_0356_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9033965.html","width":79,"caption":"Celsa Steel (UK), Bankside 123, London","height":130});
															thumbnails[9033964] = clik.newPhoto({"id":9033964,"src":"Bankside_1_0319_A2A7846C-24E8-5EC4-4F394DC807E3F5D6_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9033964.html","width":130,"caption":"Celsa Steel (UK), Bankside 123, London","height":86});
															thumbnails[9033886] = clik.newPhoto({"id":9033886,"src":"Albion_Wharf_3283_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9033886.html","width":130,"caption":"Celsa Steel (UK), Albion Riverside, London","height":105});
															thumbnails[9033967] = clik.newPhoto({"id":9033967,"src":"Bankside_2_0359_A2AD0AF5-24E8-5EC4-4F769385AC716E42_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9033967.html","width":130,"caption":"Celsa Steel (UK), Bankside 123, London","height":87});
															thumbnails[9034022] = clik.newPhoto({"id":9034022,"src":"JJenkins_6749_A2B553D9-24E8-5EC4-4F810B06CFD02D25_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034022.html","width":130,"caption":"Castleoak  Care Home, Luton, under construction","height":87});
															thumbnails[9033958] = clik.newPhoto({"id":9033958,"src":"Banbury_Orchard_Fields_xc_5869_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9033958.html","width":130,"caption":"Castleoak  Care Home, Banbury","height":87});
															thumbnails[9034025] = clik.newPhoto({"id":9034025,"src":"Letcombe_appts_52171_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034025.html","width":130,"caption":"Castleoak  Care Home, Letcombe Regis","height":90});
															thumbnails[9034059] = clik.newPhoto({"id":9034059,"src":"Windmill_Manor_0342_A2E04F4D-24E8-5EC4-4FF269C67490F16F_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034059.html","width":130,"caption":"Castleoak Care Home, Oxted","height":88});
															thumbnails[9034027] = clik.newPhoto({"id":9034027,"src":"Letcombe_wellness_5277_A2BEC2B1-24E8-5EC4-4FBD451F520C89FC_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034027.html","width":130,"caption":"Castleoak Care Home, Letcombe Regis","height":97});
															thumbnails[9034028] = clik.newPhoto({"id":9034028,"src":"Letcombe_wellness_9223_A2C155AF-24E8-5EC4-4F1CD058E965E764_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034028.html","width":130,"caption":"Castleoak Care Home, Letcombe Regis","height":87});
															thumbnails[9034055] = clik.newPhoto({"id":9034055,"src":"Trefoil_House_0646_A2DE4AE4-24E8-5EC4-4F3E5EDF0B612B38_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034055.html","width":130,"caption":"Castleoak Care Home, Luton","height":86});
															thumbnails[9034030] = clik.newPhoto({"id":9034030,"src":"Lightmoor_View_5860_A2C42B9C-24E8-5EC4-4F50B84A14FD6353_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034030.html","width":130,"caption":"Castleoak Care Home, Telford","height":87});
															thumbnails[9034045] = clik.newPhoto({"id":9034045,"src":"Rosebrook_Court_5662_corr_web_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034045.html","width":130,"caption":"Castleoak Care Home, Southampton","height":95});
															thumbnails[9034042] = clik.newPhoto({"id":9034042,"src":"Rosebrook_Court_5532_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034042.html","width":130,"caption":"Castleoak Carehome, Southampton","height":87});
															thumbnails[9034036] = clik.newPhoto({"id":9034036,"src":"New_Street_Square_3268_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034036.html","width":97,"caption":"Celsa Steel (UK), New Street Square, London","height":130});
															thumbnails[9034052] = clik.newPhoto({"id":9034052,"src":"SD2_7590_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034052.html","width":86,"caption":"Deckmaster, Cardiff","height":130});
															thumbnails[9034049] = clik.newPhoto({"id":9034049,"src":"SD2_5569_A2D78142-24E8-5EC4-4F166C1FE52406E4_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034049.html","width":130,"caption":"Deckmaster, Cardiff","height":91});
															thumbnails[9034051] = clik.newPhoto({"id":9034051,"src":"SD2_7532_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034051.html","width":130,"caption":"Deckmaster, Cardiff","height":90});
															thumbnails[9033997] = clik.newPhoto({"id":9033997,"src":"Carterton_0226_A2AFA2AF-24E8-5EC4-4FAB7D69C7E2B7FD_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9033997.html","width":130,"caption":"Castleoak  Care Home, Oxfordshire","height":85});
															thumbnails[9034024] = clik.newPhoto({"id":9034024,"src":"Letcombe_9169_A2B8856D-24E8-5EC4-4F5A3DD47A564436_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034024.html","width":130,"caption":"Castleoak  Care Home, Letcombe Regis","height":86});
															thumbnails[9034021] = clik.newPhoto({"id":9034021,"src":"Hafan_y_Waun_4103_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034021.html","width":130,"caption":"Castleoak  Care Home, Aberystwyth","height":87});
															thumbnails[9034048] = clik.newPhoto({"id":9034048,"src":"Rothsay_Grange_5776_A2D52B04-24E8-5EC4-4F4CC599E85ECABE_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034048.html","width":130,"caption":"Castleoak Care Home, Weyhill","height":87});
															thumbnails[9034063] = clik.newPhoto({"id":9034063,"src":"Wing_Lodge_6671_A2E2D960-24E8-5EC4-4F91AAECF4DC6F42_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9034063.html","width":130,"caption":"Castleoak Care Home, Buckinghamshire","height":87});
															thumbnails[9053646] = clik.newPhoto({"id":9053646,"src":"Lent_Rise_House_7829_A82A02EF-1EC9-D45B-1C1D3FEF86B46EE8_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9053646.html","width":130,"caption":"Castleoak Care Home, Burnham","height":87});
															thumbnails[9053647] = clik.newPhoto({"id":9053647,"src":"Picton_1644_A82A6242-1EC9-D45B-1CDB64F9B740A72B_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9053647.html","width":130,"caption":"Hendre Care Home, Porthcawl","height":87});
															thumbnails[9053645] = clik.newPhoto({"id":9053645,"src":"Cherry_Garth_2579_A829B925-1EC9-D45B-1C3F5CD2FB02A892_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9053645.html","width":130,"caption":"Castleoak Care Home, High Wycombe","height":87});
															thumbnails[9053644] = clik.newPhoto({"id":9053644,"src":"Brocastle_1653_A82961F0-1EC9-D45B-1C85B7B4A3BDFC97_thumb.jpg","galleries_id":331214,"server_id":18,"link":"photo_9053644.html","width":130,"caption":"Hendre Care Home, Bridgend","height":87});
															thumbnails[9059712] = clik.newPhoto({"id":9059712,"src":"Mifflin_8190_00067865-24E8-5EC4-4F7778E6C37893B5_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059712.html","width":130,"caption":"Mifflin Construction, Leominster","height":86});
															thumbnails[9059713] = clik.newPhoto({"id":9059713,"src":"Pan_proj_0485_0006B8C6-24E8-5EC4-4F6E099C09EA412C_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059713.html","width":130,"caption":"Panasonic","height":86});
															thumbnails[9059718] = clik.newPhoto({"id":9059718,"src":"05_0019_00082116-24E8-5EC4-4F3273F5214DD48C_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059718.html","width":130,"caption":"Celsa Steel (UK), Cardiff","height":88});
															thumbnails[9059719] = clik.newPhoto({"id":9059719,"src":"35_0073_00086C7B-24E8-5EC4-4F2634C751DCEEFE_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059719.html","width":130,"caption":"Celsa Steel (UK), Cardiff","height":86});
															thumbnails[9034035] = clik.newPhoto({"id":9034035,"src":"Medway_0047_A2CA18B3-24E8-5EC4-4F1DE3292256639A_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9034035.html","width":130,"caption":"Celsa (UK), Medway Viaduct","height":86});
															thumbnails[9059723] = clik.newPhoto({"id":9059723,"src":"Celsa_1_0114_0009B6B0-24E8-5EC4-4F9E1C436381EC7F_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059723.html","width":130,"caption":"Celsa Steel (UK), Cardiff","height":87});
															thumbnails[9059725] = clik.newPhoto({"id":9059725,"src":"Celsa_EMAS_6871_000A567C-24E8-5EC4-4F356B8D13D982F2_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059725.html","width":130,"caption":"Celsa Steel (UK), Cardiff","height":85});
															thumbnails[9059722] = clik.newPhoto({"id":9059722,"src":"AEL_0433_00095420-24E8-5EC4-4FEDA826C0D823AE_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059722.html","width":130,"caption":"Autocraft Engineering","height":86});
															thumbnails[9059724] = clik.newPhoto({"id":9059724,"src":"Celsa_EMAS_0750_000A0367-24E8-5EC4-4FB1AB281C12EED8_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059724.html","width":130,"caption":"Celsa Steel (UK), Cardiff","height":94});
															thumbnails[9037773] = clik.newPhoto({"id":9037773,"src":"Snowdonia_9366_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9037773.html","width":86,"caption":"Wales&West Utilities","height":130});
															thumbnails[9037771] = clik.newPhoto({"id":9037771,"src":"Snowdonia_9308_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9037771.html","width":130,"caption":"Wales&West Utilities","height":86});
															thumbnails[9059727] = clik.newPhoto({"id":9059727,"src":"Clydach_5412_000B00AE-24E8-5EC4-4FFB67CFC12F1CD8_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059727.html","width":130,"caption":"Wales&West Utilities, Clydach Vale","height":86});
															thumbnails[9059721] = clik.newPhoto({"id":9059721,"src":"Abercanaid_pipe_spray_11_8470_0009098A-24E8-5EC4-4F84A983343D0D27_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059721.html","width":130,"caption":"Wales&West Utilities, Abercanaid, Merthyr Tydfil","height":87});
															thumbnails[9059720] = clik.newPhoto({"id":9059720,"src":"Abercanaid_connect_11_0292_0008C3F6-24E8-5EC4-4F30C1E818AE3876_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059720.html","width":130,"caption":"Wales&West Utilities, Abercanaid, Merthyr Tydfil","height":86});
															thumbnails[9059726] = clik.newPhoto({"id":9059726,"src":"Cherry_Garth_ME_2638_000AA18F-24E8-5EC4-4F7829A8BC17EEE4_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059726.html","width":130,"caption":"Castleoak Care Home, High Wycombe","height":87});
															thumbnails[9059717] = clik.newPhoto({"id":9059717,"src":"Windmill_Manor_ME_0390_0007CCB0-24E8-5EC4-4FC61395885E677B_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059717.html","width":130,"caption":"Castleoak Care Home, Oxted","height":86});
															thumbnails[9059716] = clik.newPhoto({"id":9059716,"src":"Trefoil_House_ME_0525_000790B3-24E8-5EC4-4FE333F0BDF1B2D5_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059716.html","width":130,"caption":"Castleoak Care Home, Luton","height":86});
															thumbnails[9059729] = clik.newPhoto({"id":9059729,"src":"Letcombe_ME_9209_000B8BBF-24E8-5EC4-4FCD313DDDFE75F8_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059729.html","width":130,"caption":"Castleoak Care Home, Letcombe Regis","height":85});
															thumbnails[9059728] = clik.newPhoto({"id":9059728,"src":"Lent_Rise_House_ME_2103_000B4C30-24E8-5EC4-4F9360BC4BA2249F_thumb.jpg","galleries_id":331760,"server_id":18,"link":"photo_9059728.html","width":130,"caption":"Castleoak Care Home, Burnham","height":87});
															thumbnails[5976919] = clik.newPhoto({"id":5976919,"src":"Letcombe_aerial_9097_31DE8F4B-24E8-5EC4-4FD3B625EF727ED1_thumb.jpg","galleries_id":329341,"server_id":18,"link":"photo_5976919.html","width":130,"caption":"Castleoak Care Home, Letcombe Regis","height":104});
															thumbnails[5976928] = clik.newPhoto({"id":5976928,"src":"Letcombe_aerial_9098_31E144B3-24E8-5EC4-4F9269CC2E9DCC5E_thumb.jpg","galleries_id":329341,"server_id":18,"link":"photo_5976928.html","width":130,"caption":"Castleoak Care Home, Letcombe Regis","height":87});
															thumbnails[8874064] = clik.newPhoto({"id":8874064,"src":"Lent_Rise_House_aerial_06_thumb.jpg","galleries_id":329341,"server_id":18,"link":"photo_8874064.html","width":130,"caption":"Castleoak Care Home, Burnham","height":103});
															thumbnails[9053732] = clik.newPhoto({"id":9053732,"src":"Picton_aerial_05_A8C84B74-1EC9-D45B-1CAB5085DE9FF751_thumb.jpg","galleries_id":329341,"server_id":18,"link":"photo_9053732.html","width":130,"caption":"Hendre Care Home, Porthcawl","height":98});
															thumbnails[6152057] = clik.newPhoto({"id":6152057,"src":"Crossways_04_31EA6F56-24E8-5EC4-4F084F08F47C5E75_thumb.jpg","galleries_id":329341,"server_id":18,"link":"photo_6152057.html","width":130,"caption":"Country House","height":84});
															thumbnails[6152051] = clik.newPhoto({"id":6152051,"src":"Crossways_Panorama_thumb.jpg","galleries_id":329341,"server_id":18,"link":"photo_6152051.html","width":130,"caption":"Country House-panorama","height":43});
															thumbnails[8874071] = clik.newPhoto({"id":8874071,"src":"Marnel_Lodge_aerial_2_panorama_thumb.jpg","galleries_id":329341,"server_id":18,"link":"photo_8874071.html","width":130,"caption":"Castleoak Care Home, Basingstoke","height":51});
															thumbnails[9053733] = clik.newPhoto({"id":9053733,"src":"Brocastle_Manor_A8C88508-1EC9-D45B-1C88405E1124F382_thumb.jpg","galleries_id":329341,"server_id":18,"link":"photo_9053733.html","width":130,"caption":"Hendre Care Home, Bridgend","height":45});
															thumbnails[8873863] = clik.newPhoto({"id":8873863,"src":"Church_View_aerial_Panorama_thumb.jpg","galleries_id":329341,"server_id":18,"link":"photo_8873863.html","width":130,"caption":"Castleoak Care Home, Stanwell","height":39});
															thumbnails[7288349] = clik.newPhoto({"id":7288349,"src":"Chipping_Norton_aerial_panorama_3108F1F5-24E8-5EC4-4FDD5B5DE2E96664_thumb.jpg","galleries_id":329341,"server_id":18,"link":"photo_7288349.html","width":130,"caption":"Castleoak Care Home, Chipping Norton","height":48});
															thumbnails[6221747] = clik.newPhoto({"id":6221747,"src":"Marlow_aerial_panorama_30F63474-24E8-5EC4-4F1395EEDFCA7360_thumb.jpg","galleries_id":329341,"server_id":18,"link":"photo_6221747.html","width":130,"caption":"Castleoak Care Home, Marlow","height":52});
															thumbnails[9037775] = clik.newPhoto({"id":9037775,"src":"LloydsTSB_03_Panorama_thumb.jpg","galleries_id":329341,"server_id":18,"link":"photo_9037775.html","width":130,"caption":"LloydsTSB, Bridgend","height":46});
															thumbnails[7288351] = clik.newPhoto({"id":7288351,"src":"Windmill_Manor_panorama_1-4_screen_size1_thumb.jpg","galleries_id":329341,"server_id":18,"link":"photo_7288351.html","width":130,"caption":"Castleoak Care Home, Oxted","height":73});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[329341] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Aerial Mast Photography","link":"section394598.html","maxRecords":0.0,"photoIDs":[5976919.0,5976928.0,8874064.0,9053732.0,6152057.0,6152051.0,8874071.0,9053733.0,8873863.0,7288349.0,6221747.0,9037775.0,7288351.0],"skipIndex":0,"section_code":"section394598","featured_images":"9053733,9053732,9037775,8874071,8874064,8873863,7288351,7288349,6221747,6152057","id":329341,"singleSection":true});				  						galleries[331214] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Architecture","link":"section396910.html","maxRecords":0.0,"photoIDs":[9026546.0,9037676.0,6152379.0,6152378.0,9028871.0,6152592.0,6152375.0,9033965.0,9033964.0,9033886.0,9033967.0,9034022.0,9033958.0,9034025.0,9034059.0,9034027.0,9034028.0,9034055.0,9034030.0,9034045.0,9034042.0,9034036.0,9034052.0,9034049.0,9034051.0,9033997.0,9034024.0,9034021.0,9034048.0,9034063.0,9053646.0,9053647.0,9053645.0,9053644.0],"skipIndex":0,"section_code":"section396910","featured_images":"9053647,9053646,9053645,9053644,9037676,9034063,9034059,9034055,9034052,9034051","id":331214,"singleSection":true});				  						galleries[165729] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Castleoak Care Homes","link":"gallery_165729.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":165729,"singleSection":false});				  						galleries[165733] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Celsa Steel UK","link":"gallery_165733.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":165733,"singleSection":false});				  						galleries[132199] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Commercial","link":"gallery_132199.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":132199,"singleSection":false});				  						galleries[273944] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Deckmaster","link":"gallery_273944.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":273944,"singleSection":false});				  						galleries[331760] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Industry","link":"section397608.html","maxRecords":0.0,"photoIDs":[9059712.0,9059713.0,9059718.0,9059719.0,9034035.0,9059723.0,9059725.0,9059722.0,9059724.0,9037773.0,9037771.0,9059727.0,9059721.0,9059720.0,9059726.0,9059717.0,9059716.0,9059729.0,9059728.0],"skipIndex":0,"section_code":"section397608","featured_images":"9059729,9059728,9059727,9059726,9059725,9059724,9059723,9059722,9059721,9059720","id":331760,"singleSection":true});				  						galleries[132198] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Industry_old","link":"gallery_132198.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":132198,"singleSection":false});				  						galleries[165737] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Personal","link":"gallery_165737.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":165737,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9026546,9037676,5976919,8874071,6152379,6152592,9033965,9034022,9033958,9034027,9034028,9034030,9034045,9034042,9034036,9034049,9034051,9034063,9053644,9059712,9059713,9059718,9059722,9059724,9037771,9059726,9059729';
imageSets[3] = '9028871';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/garyandnick/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/garyandnick/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 += 'section396910.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 && 'section396910' != '') {
					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 = 'Business Image: ' + 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>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			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;
	}
}

			

