window.thumbnails = {};
															thumbnails[8979047] = clik.newPhoto({"id":8979047,"src":"MEDIA-CITY-BRIDGE-web_thumb.jpg","galleries_id":198387,"server_id":15,"link":"photo_8979047.html","width":130,"caption":"Media City Bridge","height":87});
															thumbnails[7065583] = clik.newPhoto({"id":7065583,"src":"DSC05428_web_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_7065583.html","width":130,"caption":"Fremont Street","height":86});
															thumbnails[7060961] = clik.newPhoto({"id":7060961,"src":"Bryce_DSC04389_edited-1_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_7060961.html","width":130,"caption":"Bryce Canyon","height":87});
															thumbnails[7051829] = clik.newPhoto({"id":7051829,"src":"Light-from-above_web_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_7051829.html","width":130,"caption":"Light from above, Antelope Canyon","height":86});
															thumbnails[7069804] = clik.newPhoto({"id":7069804,"src":"DSC02607a_edited-3_web_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_7069804.html","width":130,"caption":"Through the Window","height":89});
															thumbnails[160039] = clik.newPhoto({"id":160039,"src":"Behind the Times 0002-03_thumb.jpg","galleries_id":19860,"server_id":15,"link":"photo_160039.html","width":130,"caption":"Behind the Times","height":98});
															thumbnails[160040] = clik.newPhoto({"id":160040,"src":"Angel 9913-19_thumb.JPG","galleries_id":19860,"server_id":15,"link":"photo_160040.html","width":130,"caption":"Angel of the North","height":96});
															thumbnails[165494] = clik.newPhoto({"id":165494,"src":"M971833_filtered_thumb.jpg","galleries_id":19860,"server_id":15,"link":"photo_165494.html","width":130,"caption":"Misty Morning","height":98});
															thumbnails[762610] = clik.newPhoto({"id":762610,"src":"PICT0590_edited-1-0702_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_762610.html","width":130,"caption":"Fog at Cape Point","height":86});
															thumbnails[1549930] = clik.newPhoto({"id":1549930,"src":"DSC01752a_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_1549930.html","width":130,"caption":"Torii Avenue at Fushimi Shrine","height":87});
															thumbnails[1549967] = clik.newPhoto({"id":1549967,"src":"DSC00844_edited-1_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_1549967.html","width":130,"caption":"Matsumoto Castle ","height":87});
															thumbnails[1549988] = clik.newPhoto({"id":1549988,"src":"DSC01408web_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_1549988.html","width":130,"caption":"The Golden Pavilion","height":87});
															thumbnails[2308988] = clik.newPhoto({"id":2308988,"src":"PICT0079_edited-1_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_2308988.html","width":130,"caption":"The Great Wall","height":86});
															thumbnails[2309006] = clik.newPhoto({"id":2309006,"src":"19_The Mine_thumb.jpg","galleries_id":19860,"server_id":15,"link":"photo_2309006.html","width":130,"caption":"The Mine","height":173});
															thumbnails[3250966] = clik.newPhoto({"id":3250966,"src":"08-07-26-053_edited-1web_thumb.jpg","galleries_id":198387,"server_id":15,"link":"photo_3250966.html","width":130,"caption":"Plymouth Hoe","height":87});
															thumbnails[3250972] = clik.newPhoto({"id":3250972,"src":"BDC_Rhodesia_Canal_Colin_Br_thumb.jpg","galleries_id":472868,"server_id":15,"link":"photo_3250972.html","width":130,"caption":"Chesterfield Canal","height":87});
															thumbnails[3250976] = clik.newPhoto({"id":3250976,"src":"08-07-21-134-trek_thumb.jpg","galleries_id":198387,"server_id":15,"link":"photo_3250976.html","width":130,"caption":"Cornish Tin Mine","height":87});
															thumbnails[3250980] = clik.newPhoto({"id":3250980,"src":"06-01-08-079bathweb_thumb.jpg","galleries_id":198387,"server_id":15,"link":"photo_3250980.html","width":130,"caption":"The Circus at Bath","height":87});
															thumbnails[3250982] = clik.newPhoto({"id":3250982,"src":"08-09-10-285_web_thumb.jpg","galleries_id":198387,"server_id":15,"link":"photo_3250982.html","width":130,"caption":"Dunnet Head","height":86});
															thumbnails[3256925] = clik.newPhoto({"id":3256925,"src":"2008-03-30-ChestCanal-112we_thumb.jpg","galleries_id":472868,"server_id":15,"link":"photo_3256925.html","width":130,"caption":"Chesterfield Canal","height":87});
															thumbnails[3256926] = clik.newPhoto({"id":3256926,"src":"Nam388w_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_3256926.html","width":130,"caption":"Namibian Desert","height":28});
															thumbnails[3260504] = clik.newPhoto({"id":3260504,"src":"05-24-08-034_edited-1_clik_thumb.jpg","galleries_id":472868,"server_id":15,"link":"photo_3260504.html","width":130,"caption":"Laburnam Arch at Brodsworth Hall","height":87});
															thumbnails[3260505] = clik.newPhoto({"id":3260505,"src":"08-07-21-245_edited-1_clik_thumb.jpg","galleries_id":198387,"server_id":15,"link":"photo_3260505.html","width":130,"caption":"Botallick Mine","height":87});
															thumbnails[3260516] = clik.newPhoto({"id":3260516,"src":"08-07-22-030_porthleven_cli_thumb.jpg","galleries_id":198387,"server_id":15,"link":"photo_3260516.html","width":130,"caption":"Porthleven Harbour","height":87});
															thumbnails[3260520] = clik.newPhoto({"id":3260520,"src":"19_Photoshop_clik_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_3260520.html","width":130,"caption":"Photoshop","height":98});
															thumbnails[3260527] = clik.newPhoto({"id":3260527,"src":"08-09-10-252_clik_thumb.jpg","galleries_id":198387,"server_id":15,"link":"photo_3260527.html","width":130,"caption":"John o'Groats Harbour","height":86});
															thumbnails[3293470] = clik.newPhoto({"id":3293470,"src":"08-09-11-189a-copyweb_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_3293470.html","width":130,"caption":"The Deserted Croft","height":65});
															thumbnails[5499553] = clik.newPhoto({"id":5499553,"src":"DSC00102_bw_clik_thumb.jpg","galleries_id":19860,"server_id":15,"link":"photo_5499553.html","width":130,"caption":"The Pier","height":87});
															thumbnails[5507479] = clik.newPhoto({"id":5507479,"src":"2009-07-03_2284a_edited-1_w_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_5507479.html","width":130,"caption":"Northcape at 71 degrees 10 minutes North","height":86});
															thumbnails[5507484] = clik.newPhoto({"id":5507484,"src":"2009-07-07_Scandinavia_3381_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_5507484.html","width":130,"caption":"Northern Norway","height":86});
															thumbnails[5507491] = clik.newPhoto({"id":5507491,"src":"2009-07-01_Scandinavia_2632_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_5507491.html","width":130,"caption":"The Midnight Sun","height":86});
															thumbnails[5507495] = clik.newPhoto({"id":5507495,"src":"2009-07-08_Scandinavia_3179_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_5507495.html","width":130,"caption":"Still Waters","height":86});
															thumbnails[5507501] = clik.newPhoto({"id":5507501,"src":"2009-06-30_Scandinavia_2783_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_5507501.html","width":130,"caption":"The Cathedral","height":86});
															thumbnails[8979018] = clik.newPhoto({"id":8979018,"src":"Clumber_Park_Colin_Brenchley_thumb.jpg","galleries_id":472868,"server_id":15,"link":"photo_8979018.html","width":130,"caption":"Misty Morning","height":86});
															thumbnails[8979049] = clik.newPhoto({"id":8979049,"src":"DSC01341_edited-1_web_thumb.jpg","galleries_id":198387,"server_id":15,"link":"photo_8979049.html","width":130,"caption":"Giants Causeway","height":88});
															thumbnails[8979051] = clik.newPhoto({"id":8979051,"src":"STEPS_by_Colin_Brenchley_thumb.jpg","galleries_id":19860,"server_id":15,"link":"photo_8979051.html","width":130,"caption":"Steps","height":87});
															thumbnails[8979052] = clik.newPhoto({"id":8979052,"src":"THE_RED_CAR_by_Colin_Brenchley_thumb.jpg","galleries_id":19860,"server_id":15,"link":"photo_8979052.html","width":130,"caption":"The Red Car","height":86});
															thumbnails[8979054] = clik.newPhoto({"id":8979054,"src":"EYES_by_Colin_Brenchley_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_8979054.html","width":130,"caption":"Eyes","height":86});
															thumbnails[158029] = clik.newPhoto({"id":158029,"src":"Nam388 copy_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_158029.html","width":130,"caption":"Montage","height":98});
															thumbnails[219754] = clik.newPhoto({"id":219754,"src":"CH21-0154-copy2-trek_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_219754.html","width":130,"caption":"Whose calling?","height":78});
															thumbnails[785125] = clik.newPhoto({"id":785125,"src":"PICT0062_edited-1-trek-0702_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_785125.html","width":130,"caption":"Walking in the Sand","height":86});
															thumbnails[218735] = clik.newPhoto({"id":218735,"src":"PICT0105-trek-1204_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_218735.html","width":130,"caption":"I love Mickey Mouse","height":86});
															thumbnails[219745] = clik.newPhoto({"id":219745,"src":"Cuba032-trek_thumb.jpg","galleries_id":19860,"server_id":15,"link":"photo_219745.html","width":130,"caption":"Flamenco Dancer","height":98});
															thumbnails[158063] = clik.newPhoto({"id":158063,"src":"Nam364w1_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_158063.html","width":130,"caption":"Dune at Sossusvlei","height":98});
															thumbnails[160041] = clik.newPhoto({"id":160041,"src":"M9606-20 copy_thumb.jpg","galleries_id":19860,"server_id":15,"link":"photo_160041.html","width":130,"caption":"Grafitti Love","height":57});
															thumbnails[183485] = clik.newPhoto({"id":183485,"src":"Norfolk2059-copy-trek_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_183485.html","width":130,"caption":"Patterns at Cromer","height":86});
															thumbnails[158077] = clik.newPhoto({"id":158077,"src":"Misty-Morn-9918-04_filtered_thumb.jpg","galleries_id":19860,"server_id":15,"link":"photo_158077.html","width":130,"caption":"Misty Morning","height":95});
															thumbnails[160042] = clik.newPhoto({"id":160042,"src":"Nam594 copy trek_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_160042.html","width":130,"caption":"Cheetah","height":98});
															thumbnails[192096] = clik.newPhoto({"id":192096,"src":"Cuba239-copy-trek_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_192096.html","width":130,"caption":"Sunrise at Vale of Vinales","height":98});
															thumbnails[158054] = clik.newPhoto({"id":158054,"src":"Cuba232w_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_158054.html","width":130,"caption":"Vale of Vinales","height":98});
															thumbnails[183483] = clik.newPhoto({"id":183483,"src":"Ven154-copy-trek_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_183483.html","width":130,"caption":"Masks of Venice","height":98});
															thumbnails[218752] = clik.newPhoto({"id":218752,"src":"CH06-0129-copy-trek_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_218752.html","width":130,"caption":"The Blue Umbrella","height":86});
															thumbnails[158085] = clik.newPhoto({"id":158085,"src":"In359-copy-trek_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_158085.html","width":130,"caption":"Smile Please","height":98});
															thumbnails[219753] = clik.newPhoto({"id":219753,"src":"CH14-0076-copy_filtered--tr_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_219753.html","width":130,"caption":"Guilin","height":86});
															thumbnails[183480] = clik.newPhoto({"id":183480,"src":"Alg053-trek_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_183480.html","width":130,"caption":"Fishing Pots","height":98});
															thumbnails[192103] = clik.newPhoto({"id":192103,"src":"Nam113-copy-trek_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_192103.html","width":130,"caption":"Patterns","height":98});
															thumbnails[160018] = clik.newPhoto({"id":160018,"src":"Misc005_thumb.JPG","galleries_id":14717,"server_id":15,"link":"photo_160018.html","width":130,"caption":"Rainbow Lily","height":98});
															thumbnails[160043] = clik.newPhoto({"id":160043,"src":"Nam122 copy_filtered_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_160043.html","width":130,"caption":"Desert Tree","height":98});
															thumbnails[160049] = clik.newPhoto({"id":160049,"src":"Nam349 copy_filtered_thumb.jpg","galleries_id":15460,"server_id":15,"link":"photo_160049.html","width":130,"caption":"Dunes","height":98});
															thumbnails[218730] = clik.newPhoto({"id":218730,"src":"G1_043c-trek_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_218730.html","width":130,"caption":"Peacock detail","height":111});
															thumbnails[2308997] = clik.newPhoto({"id":2308997,"src":"19_Stop-on-Red_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_2308997.html","width":130,"caption":"Stop on RED!","height":114});
															thumbnails[3260510] = clik.newPhoto({"id":3260510,"src":"08-07-23-166_edited-1_cube2_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_3260510.html","width":130,"caption":"Lightbox","height":87});
															thumbnails[2309001] = clik.newPhoto({"id":2309001,"src":"19_Ten past Ten_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_2309001.html","width":130,"caption":"10 past 10","height":87});
															thumbnails[160038] = clik.newPhoto({"id":160038,"src":"Misc011_thumb.JPG","galleries_id":14717,"server_id":15,"link":"photo_160038.html","width":130,"caption":"Fossil","height":98});
															thumbnails[158081] = clik.newPhoto({"id":158081,"src":"Alg022-copy-trek187_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_158081.html","width":130,"caption":"Cliff Fisherman","height":98});
															thumbnails[165507] = clik.newPhoto({"id":165507,"src":"sri0089a copy_filtered_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_165507.html","width":130,"caption":"Stilt Fisherman","height":98});
															thumbnails[192102] = clik.newPhoto({"id":192102,"src":"in097_filtered-trek_thumb.jpg","galleries_id":14717,"server_id":15,"link":"photo_192102.html","width":130,"caption":"Budhist Monks","height":98});
															thumbnails[1549920] = clik.newPhoto({"id":1549920,"src":"DSC01864_edited-1web_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_1549920.html","width":130,"caption":"The Floating Torii","height":87});
															thumbnails[158083] = clik.newPhoto({"id":158083,"src":"Bar039-trek_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_158083.html","width":130,"caption":"La Pedrera rooftop","height":98});
															thumbnails[158012] = clik.newPhoto({"id":158012,"src":"PICT0139_edited-2_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_158012.html","width":130,"caption":"Details of The Forbidden City","height":86});
															thumbnails[158071] = clik.newPhoto({"id":158071,"src":"Norfolk2058-copy-trek_thumb.jpg","galleries_id":198387,"server_id":15,"link":"photo_158071.html","width":130,"caption":"Cromer Pier","height":86});
															thumbnails[784099] = clik.newPhoto({"id":784099,"src":"2006-11-17-024-trek_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_784099.html","width":130,"caption":"Red Square","height":86});
															thumbnails[784098] = clik.newPhoto({"id":784098,"src":"2006-11-12-096_edited-1-tre_thumb.jpg","galleries_id":198387,"server_id":15,"link":"photo_784098.html","width":130,"caption":"Bridge to St Paul's","height":86});
															thumbnails[192100] = clik.newPhoto({"id":192100,"src":"Sp0161w_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_192100.html","width":130,"caption":"Plaza d'Espania","height":98});
															thumbnails[165491] = clik.newPhoto({"id":165491,"src":"Ice060_thumb.JPG","galleries_id":15462,"server_id":15,"link":"photo_165491.html","width":130,"caption":"The Blue Lagoon","height":98});
															thumbnails[183479] = clik.newPhoto({"id":183479,"src":"Def04-copy-trek_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_183479.html","width":130,"caption":"La Defense","height":98});
															thumbnails[183478] = clik.newPhoto({"id":183478,"src":"In395_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_183478.html","width":130,"caption":"Reflections of the Taj","height":98});
															thumbnails[183488] = clik.newPhoto({"id":183488,"src":"PICT0090-copy_filtered_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_183488.html","width":130,"caption":"Colossi of Memnon","height":98});
															thumbnails[191926] = clik.newPhoto({"id":191926,"src":"PICT0076_edited-1_thumb.JPG","galleries_id":15462,"server_id":15,"link":"photo_191926.html","width":130,"caption":"Terracotta Warriors","height":86});
															thumbnails[183490] = clik.newPhoto({"id":183490,"src":"PICT0145-trek_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_183490.html","width":130,"caption":"Luxor Temple","height":98});
															thumbnails[165489] = clik.newPhoto({"id":165489,"src":"sam096a_filtered_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_165489.html","width":130,"caption":"Pythagorus' Angle","height":96});
															thumbnails[784104] = clik.newPhoto({"id":784104,"src":"PICT0027-copy-trek-1031_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_784104.html","width":130,"caption":"Brooklyn Bridge","height":86});
															thumbnails[192105] = clik.newPhoto({"id":192105,"src":"PICT0181-trek_thumb.jpg","galleries_id":15462,"server_id":15,"link":"photo_192105.html","width":130,"caption":"Abu Simbel","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[14717] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"IMAGES","link":"gallery_14717.html","maxRecords":0.0,"photoIDs":[7069804.0,3260520.0,8979054.0,158029.0,219754.0,218735.0,183485.0,160042.0,183483.0,218752.0,158085.0,183480.0,160018.0,218730.0,2308997.0,3260510.0,2309001.0,160038.0,158081.0,165507.0,192102.0],"skipIndex":0,"section_code":"gallery","featured_images":"7069804,2309001,2308997,160042,158029","id":14717,"singleSection":false});				  						galleries[472868] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Local Area","link":"gallery_472868.html","maxRecords":0.0,"photoIDs":[3250972.0,3256925.0,3260504.0,8979018.0],"skipIndex":0,"section_code":"gallery","featured_images":"8979018,3260504,3256925,3250972","id":472868,"singleSection":false});				  						galleries[15460] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_15460.html","maxRecords":0.0,"photoIDs":[7060961.0,7051829.0,762610.0,3256926.0,3293470.0,5507484.0,5507491.0,5507495.0,785125.0,158063.0,192096.0,158054.0,219753.0,192103.0,160043.0,160049.0],"skipIndex":0,"section_code":"gallery","featured_images":"7051829,158063,158054","id":15460,"singleSection":false});				  						galleries[15462] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Buildings & Places","link":"gallery_15462.html","maxRecords":0.0,"photoIDs":[7065583.0,1549930.0,1549967.0,1549988.0,2308988.0,5507479.0,5507501.0,1549920.0,158083.0,158012.0,784099.0,192100.0,165491.0,183479.0,183478.0,183488.0,191926.0,183490.0,165489.0,784104.0,192105.0],"skipIndex":0,"section_code":"gallery","featured_images":"1549920,784104,191926,158083","id":15462,"singleSection":false});				  						galleries[198387] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"UK","link":"gallery_198387.html","maxRecords":0.0,"photoIDs":[8979047.0,3250966.0,3250976.0,3250980.0,3250982.0,3260505.0,3260516.0,3260527.0,8979049.0,158071.0,784098.0],"skipIndex":0,"section_code":"gallery","featured_images":"3250980,3250966,784098,158071","id":198387,"singleSection":false});				  						galleries[19860] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"B & W","link":"gallery_19860.html","maxRecords":0.0,"photoIDs":[160039.0,160040.0,165494.0,2309006.0,5499553.0,8979051.0,8979052.0,219745.0,160041.0,158077.0],"skipIndex":0,"section_code":"gallery","featured_images":"160039,158077","id":19860,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7069804,7051829,158029,219754,160049,3260510,2309001,1549920';
imageSets[2] = '7069804,7051829,3250980,3250966,160039,158029,158063,160042,158077,158054,2308997,2309001,1549920,158083,158071,784098,191926,784104';
imageSets[3] = '7051829';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/colinb/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/colinb/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/colinb/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/colinb/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/colinb/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/colinb/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/colinb/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/colinb/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 = 'Colin Brenchley Photography: ' + 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;
	}
}

			

