window.thumbnails = new Object();
												thumbnails[7642013] = new thumbnail(7642013,'','6 - Copy','6 - Copy_thumb.jpg',130, 195,1,'#');
												thumbnails[7642028] = new thumbnail(7642028,'','Dee & Gordon-246','Dee & Gordon-246_thumb.jpg',130, 195,1,'#');
												thumbnails[7642029] = new thumbnail(7642029,'','Dee & Gordon-247','Dee & Gordon-247_thumb.jpg',130, 124,1,'#');
												thumbnails[7642030] = new thumbnail(7642030,'','Dee & Gordon-256','Dee & Gordon-256_thumb.jpg',130, 201,1,'#');
												thumbnails[7642031] = new thumbnail(7642031,'','Dee & Gordon-39','Dee & Gordon-39_thumb.jpg',130, 195,1,'#');
												thumbnails[7642032] = new thumbnail(7642032,'','Dee & Gordon-462','Dee & Gordon-462_thumb.jpg',130, 195,1,'#');
												thumbnails[7642033] = new thumbnail(7642033,'','Dee & Gordon-66','Dee & Gordon-66_thumb.jpg',130, 195,1,'#');
												thumbnails[3846410] = new thumbnail(3846410,'184112','','9_thumb.jpg',130, 196,1,'photo_3846410.html');
												thumbnails[7343886] = new thumbnail(7343886,'184112','','Dee__Gordon-99_thumb.jpg',130, 209,1,'photo_7343886.html');
												thumbnails[7343893] = new thumbnail(7343893,'184112','','1_D2B22C74-1EC9-D45B-1C8E4BE1D83A1F5C_thumb.jpg',130, 83,1,'photo_7343893.html');
												thumbnails[7343906] = new thumbnail(7343906,'184112','','Dee__Gordon-49_thumb.jpg',130, 196,1,'photo_7343906.html');
												thumbnails[7343907] = new thumbnail(7343907,'184112','','Dee__Gordon-63_thumb.jpg',130, 190,1,'photo_7343907.html');
												thumbnails[7343908] = new thumbnail(7343908,'184112','','Dee__Gordon-74_thumb.jpg',130, 86,1,'photo_7343908.html');
												thumbnails[7343910] = new thumbnail(7343910,'184112','','Dee__Gordon-86_thumb.jpg',130, 119,1,'photo_7343910.html');
												thumbnails[3846289] = new thumbnail(3846289,'184112','','1_thumb.jpg',130, 196,1,'photo_3846289.html');
												thumbnails[6723542] = new thumbnail(6723542,'184112','','Sarah__Wedding-429_thumb.jpg',130, 196,1,'photo_6723542.html');
												thumbnails[6723543] = new thumbnail(6723543,'184112','','Sarah__Wedding-427_thumb.jpg',130, 196,1,'photo_6723543.html');
												thumbnails[6723549] = new thumbnail(6723549,'184112','','Sarah__Wedding-428_thumb.jpg',130, 86,1,'photo_6723549.html');
												thumbnails[7641925] = new thumbnail(7641925,'184112','1 web','1 web_thumb.jpg',130, 195,1,'photo_7641925.html');
												thumbnails[3846290] = new thumbnail(3846290,'184112','','2_thumb.jpg',130, 196,1,'photo_3846290.html');
												thumbnails[6723544] = new thumbnail(6723544,'184112','','Sarah__Wedding-444_thumb.jpg',130, 86,1,'photo_6723544.html');
												thumbnails[6723550] = new thumbnail(6723550,'184112','','Sarah__Wedding-435_thumb.jpg',130, 86,1,'photo_6723550.html');
												thumbnails[7641926] = new thumbnail(7641926,'184112','10 web','10 web_thumb.jpg',130, 195,1,'photo_7641926.html');
												thumbnails[3846291] = new thumbnail(3846291,'184112','','3_thumb.jpg',130, 196,1,'photo_3846291.html');
												thumbnails[6723545] = new thumbnail(6723545,'184112','','Sarah__Wedding-448_thumb.jpg',130, 130,1,'photo_6723545.html');
												thumbnails[6723551] = new thumbnail(6723551,'184112','','Sarah__Wedding-437_thumb.jpg',130, 196,1,'photo_6723551.html');
												thumbnails[7641927] = new thumbnail(7641927,'184112','11 web','11 web_thumb.jpg',130, 186,1,'photo_7641927.html');
												thumbnails[3846292] = new thumbnail(3846292,'184112','','4_thumb.jpg',130, 196,1,'photo_3846292.html');
												thumbnails[6723546] = new thumbnail(6723546,'184112','','Sarah__Wedding-453_thumb.jpg',130, 196,1,'photo_6723546.html');
												thumbnails[6723552] = new thumbnail(6723552,'184112','','Sarah__Wedding-443_thumb.jpg',130, 196,1,'photo_6723552.html');
												thumbnails[7641928] = new thumbnail(7641928,'184112','2 web','2 web_thumb.jpg',130, 86,1,'photo_7641928.html');
												thumbnails[3846294] = new thumbnail(3846294,'184112','','5_thumb.jpg',130, 86,1,'photo_3846294.html');
												thumbnails[7641929] = new thumbnail(7641929,'184112','3 web','3 web_thumb.jpg',130, 130,1,'photo_7641929.html');
												thumbnails[3846295] = new thumbnail(3846295,'184112','','6_thumb.jpg',130, 196,1,'photo_3846295.html');
												thumbnails[7641930] = new thumbnail(7641930,'184112','4 web','4 web_thumb.jpg',130, 195,1,'photo_7641930.html');
												thumbnails[7641931] = new thumbnail(7641931,'184112','6 web','6 web_thumb.jpg',130, 195,1,'photo_7641931.html');
												thumbnails[3846297] = new thumbnail(3846297,'184112','','8_thumb.jpg',130, 196,1,'photo_3846297.html');
												thumbnails[7641932] = new thumbnail(7641932,'184112','7 web','7 web_thumb.jpg',130, 106,1,'photo_7641932.html');
												thumbnails[7641933] = new thumbnail(7641933,'184112','8 web','8 web_thumb.jpg',130, 92,1,'photo_7641933.html');
												thumbnails[7641934] = new thumbnail(7641934,'184112','9 web','9 web_thumb.jpg',130, 127,1,'photo_7641934.html');
												thumbnails[7641987] = new thumbnail(7641987,'184112','117','117_thumb.jpg',130, 195,1,'photo_7641987.html');
												thumbnails[7641988] = new thumbnail(7641988,'184112','217','217_thumb.jpg',130, 195,1,'photo_7641988.html');
												thumbnails[7641989] = new thumbnail(7641989,'184112','235','235_thumb.jpg',130, 195,1,'photo_7641989.html');
												thumbnails[7641990] = new thumbnail(7641990,'184112','3','3_thumb.01-16.jpg',130, 195,1,'photo_7641990.html');
												thumbnails[7641991] = new thumbnail(7641991,'184112','3','3_thumb.02-17.jpg',130, 86,1,'photo_7641991.html');
												thumbnails[7641992] = new thumbnail(7641992,'184112','3','3_thumb.03-18.jpg',130, 195,1,'photo_7641992.html');
												thumbnails[7641993] = new thumbnail(7641993,'184112','3','3_thumb.04-19.jpg',130, 195,1,'photo_7641993.html');
												thumbnails[7641994] = new thumbnail(7641994,'184112','3','3_thumb.05-20.jpg',130, 86,1,'photo_7641994.html');
												thumbnails[7641995] = new thumbnail(7641995,'184112','3','3_thumb.06-21.jpg',130, 195,1,'photo_7641995.html');
												thumbnails[7641996] = new thumbnail(7641996,'184112','3','3_thumb.08-23.jpg',130, 195,1,'photo_7641996.html');
												thumbnails[7641997] = new thumbnail(7641997,'184112','3','3_thumb.09-24.jpg',130, 86,1,'photo_7641997.html');
												thumbnails[7641998] = new thumbnail(7641998,'184112','3','3_thumb.10-25.jpg',130, 195,1,'photo_7641998.html');
												thumbnails[7641999] = new thumbnail(7641999,'184112','3','3_thumb.11-26.jpg',130, 195,1,'photo_7641999.html');
												thumbnails[7642000] = new thumbnail(7642000,'184112','3','3_thumb.12-27.jpg',130, 86,1,'photo_7642000.html');
												thumbnails[7642001] = new thumbnail(7642001,'184112','3','3_thumb.14-29.jpg',130, 195,1,'photo_7642001.html');
												thumbnails[7642003] = new thumbnail(7642003,'184112','3','3_thumb.18-33.jpg',130, 86,1,'photo_7642003.html');
												thumbnails[7642004] = new thumbnail(7642004,'184112','3','3_thumb.21-36.jpg',130, 86,1,'photo_7642004.html');
												thumbnails[7642005] = new thumbnail(7642005,'184112','3','3_thumb.22-37.jpg',130, 130,1,'photo_7642005.html');
												thumbnails[7642006] = new thumbnail(7642006,'184112','3','3_thumb.24-39.jpg',130, 86,1,'photo_7642006.html');
												thumbnails[7642007] = new thumbnail(7642007,'184112','304','304_thumb.jpg',130, 106,1,'photo_7642007.html');
												thumbnails[7642008] = new thumbnail(7642008,'184112','31','31_thumb.jpg',130, 142,1,'photo_7642008.html');
												thumbnails[7642009] = new thumbnail(7642009,'184112','40','40_thumb.jpg',130, 195,1,'photo_7642009.html');
												thumbnails[7642010] = new thumbnail(7642010,'184112','5 web','5 web_thumb.jpg',130, 86,1,'photo_7642010.html');
												thumbnails[7642011] = new thumbnail(7642011,'184112','55','55_thumb.jpg',130, 195,1,'photo_7642011.html');
												thumbnails[7642014] = new thumbnail(7642014,'184112','81','81_thumb.jpg',130, 86,1,'photo_7642014.html');
												thumbnails[7642015] = new thumbnail(7642015,'184112','84','84_thumb.jpg',130, 114,1,'photo_7642015.html');
												thumbnails[7642016] = new thumbnail(7642016,'184112','90','90_thumb.jpg',130, 195,1,'photo_7642016.html');
												thumbnails[7642017] = new thumbnail(7642017,'184112','Alex Tabor-138-40 - Copy','Alex Tabor-138-40 - Copy_thumb.jpg',130, 195,1,'photo_7642017.html');
												thumbnails[7642018] = new thumbnail(7642018,'184112','Alex Tabor-79-41','Alex Tabor-79-41_thumb.jpg',130, 195,1,'photo_7642018.html');
												thumbnails[7642019] = new thumbnail(7642019,'184112','Alex Tabor-80-42','Alex Tabor-80-42_thumb.jpg',130, 195,1,'photo_7642019.html');
												thumbnails[7642021] = new thumbnail(7642021,'184112','Dee & Gordon-110','Dee & Gordon-110_thumb.jpg',130, 188,1,'photo_7642021.html');
												thumbnails[7642022] = new thumbnail(7642022,'184112','Dee & Gordon-114','Dee & Gordon-114_thumb.jpg',130, 86,1,'photo_7642022.html');
												thumbnails[7642023] = new thumbnail(7642023,'184112','Dee & Gordon-128','Dee & Gordon-128_thumb.jpg',130, 170,1,'photo_7642023.html');
												thumbnails[7642024] = new thumbnail(7642024,'184112','Dee & Gordon-141','Dee & Gordon-141_thumb.jpg',130, 195,1,'photo_7642024.html');
												thumbnails[7642025] = new thumbnail(7642025,'184112','Dee & Gordon-146','Dee & Gordon-146_thumb.jpg',130, 92,1,'photo_7642025.html');
												thumbnails[7642026] = new thumbnail(7642026,'184112','Dee & Gordon-168','Dee & Gordon-168_thumb.jpg',130, 99,1,'photo_7642026.html');
												thumbnails[7642027] = new thumbnail(7642027,'184112','Dee & Gordon-175','Dee & Gordon-175_thumb.jpg',130, 195,1,'photo_7642027.html');
												thumbnails[7642055] = new thumbnail(7642055,'184112','Sarah & Andy-114','Sarah & Andy-114_thumb.jpg',130, 186,1,'photo_7642055.html');
												thumbnails[7642056] = new thumbnail(7642056,'184112','Sarah & Andy-24','Sarah & Andy-24_thumb.jpg',130, 127,1,'photo_7642056.html');
												thumbnails[7642057] = new thumbnail(7642057,'184112','Sarah & Andy-32','Sarah & Andy-32_thumb.jpg',130, 115,1,'photo_7642057.html');
												thumbnails[7642058] = new thumbnail(7642058,'184112','Sarah & Andy-52','Sarah & Andy-52_thumb.jpg',130, 86,1,'photo_7642058.html');
												thumbnails[7642059] = new thumbnail(7642059,'184112','Sarah & Wedding-260','Sarah & Wedding-260_thumb.jpg',130, 86,1,'photo_7642059.html');
												thumbnails[7642060] = new thumbnail(7642060,'184112','Sarah & Wedding-315','Sarah & Wedding-315_thumb.jpg',130, 183,1,'photo_7642060.html');
												thumbnails[7642061] = new thumbnail(7642061,'184112','Sarah & Wedding-378','Sarah & Wedding-378_thumb.jpg',130, 130,1,'photo_7642061.html');
												thumbnails[7642062] = new thumbnail(7642062,'184112','Sarah & Wedding-380','Sarah & Wedding-380_thumb.jpg',130, 110,1,'photo_7642062.html');
												thumbnails[7642063] = new thumbnail(7642063,'184112','Sarah & Wedding-399','Sarah & Wedding-399_thumb.jpg',130, 157,1,'photo_7642063.html');
												thumbnails[7642064] = new thumbnail(7642064,'184112','Sarah & Wedding-401','Sarah & Wedding-401_thumb.jpg',130, 195,1,'photo_7642064.html');
												thumbnails[7642065] = new thumbnail(7642065,'184112','Sarah & Wedding-405','Sarah & Wedding-405_thumb.jpg',130, 195,1,'photo_7642065.html');
												thumbnails[7642066] = new thumbnail(7642066,'184112','Sarah & Wedding-418','Sarah & Wedding-418_thumb.jpg',130, 195,1,'photo_7642066.html');
												thumbnails[7642067] = new thumbnail(7642067,'184112','Sarah & Wedding-419','Sarah & Wedding-419_thumb.jpg',130, 195,1,'photo_7642067.html');
												thumbnails[7642068] = new thumbnail(7642068,'184112','Sarah & Wedding-548','Sarah & Wedding-548_thumb.jpg',130, 231,1,'photo_7642068.html');
												thumbnails[7642069] = new thumbnail(7642069,'184112','Wedding car','Wedding car_thumb.jpg',130, 195,1,'photo_7642069.html');
												thumbnails[7642259] = new thumbnail(7642259,'414341','Bellissimo Classico','5335_classico1_thumb.jpg',130, 98,1,'photo_7642259.html');
												thumbnails[7642264] = new thumbnail(7642264,'414341','Bellissimo Classico','5796_classico2_thumb.jpg',130, 98,1,'photo_7642264.html');
												thumbnails[7642286] = new thumbnail(7642286,'414341','Bellissimo Classico','5796_classico3_thumb.jpg',130, 98,1,'photo_7642286.html');
												thumbnails[7642287] = new thumbnail(7642287,'414341','Bellissimo Classico','7056_classico4_thumb.jpg',130, 98,1,'photo_7642287.html');
												thumbnails[7642289] = new thumbnail(7642289,'414341','Proof Book','5335_Untitled-4_thumb.jpg',130, 98,1,'photo_7642289.html');
												thumbnails[7642290] = new thumbnail(7642290,'414341','Proof Book','7056_Untitled-2_thumb.jpg',130, 98,1,'photo_7642290.html');
												thumbnails[7642297] = new thumbnail(7642297,'414341','Presentational Photo Frame','sidebox_thumb.jpg',130, 87,1,'photo_7642297.html');
												thumbnails[7642326] = new thumbnail(7642326,'414341','Presentational Photo Frame','7inchframe_thumb.jpg',130, 147,1,'photo_7642326.html');
												thumbnails[7642367] = new thumbnail(7642367,'414341','Aluminium Wall Prints','alumini-print-thumbnail_thumb.jpg',130, 122,1,'photo_7642367.html');
												thumbnails[7642369] = new thumbnail(7642369,'414341','Box Frame Print','box-frame-thumb_thumb.jpg',130, 122,1,'photo_7642369.html');
												thumbnails[7642370] = new thumbnail(7642370,'414341','Canvas Wrap','canvas-wrap_thumb.jpg',130, 122,1,'photo_7642370.html');
												thumbnails[7642373] = new thumbnail(7642373,'414341','Edge Print','edge-print-thumbnail_thumb.jpg',130, 122,1,'photo_7642373.html');
												thumbnails[1430390] = new thumbnail(1430390,'96237','','Web Pictures-23_thumb.jpg',130, 195,1,'photo_1430390.html');
												thumbnails[1430424] = new thumbnail(1430424,'96237','The Christening ','christ-harr_thumb.jpg',130, 86,1,'photo_1430424.html');
												thumbnails[1479381] = new thumbnail(1479381,'96237','Yellow flower','yellow flower copy_thumb.jpg',130, 195,1,'photo_1479381.html');
												thumbnails[1999803] = new thumbnail(1999803,'96237','With car','(1 of 1)-3_thumb.jpg',130, 195,1,'photo_1999803.html');
												thumbnails[2314625] = new thumbnail(2314625,'96237','Me and my car!','(1 of 1)-21_thumb.jpg',130, 195,1,'photo_2314625.html');
												thumbnails[2314628] = new thumbnail(2314628,'96237','Tree hugging','(1 of 1)1_thumb.jpg',130, 195,1,'photo_2314628.html');
												thumbnails[2414165] = new thumbnail(2414165,'96237','Young Master','-105web_thumb.jpg',130, 195,1,'photo_2414165.html');
												thumbnails[2414169] = new thumbnail(2414169,'96237','Baby Christening','-130 web_thumb.jpg',130, 130,1,'photo_2414169.html');
												thumbnails[2414173] = new thumbnail(2414173,'96237','Enjoying bubbles','-141 web_thumb.jpg',130, 87,1,'photo_2414173.html');
												thumbnails[3861757] = new thumbnail(3861757,'96237','','-1_thumb.jpg',130, 196,1,'photo_3861757.html');
												thumbnails[1379040] = new thumbnail(1379040,'96248','','presentation 1_thumb.jpg',130, 87,1,'photo_1379040.html');
												thumbnails[1430362] = new thumbnail(1430362,'96248','','DSC_0043_thumb.jpg',130, 87,1,'photo_1430362.html');
												thumbnails[1379013] = new thumbnail(1379013,'96244','Lotus Cortina','Web Pictures-86_thumb.jpg',130, 86,1,'photo_1379013.html');
												thumbnails[1430312] = new thumbnail(1430312,'96244','Jaguar MkII','DSC_0006_thumb.jpg',130, 87,1,'photo_1430312.html');
												thumbnails[1549640] = new thumbnail(1549640,'96244','Lotus Exige ','lotus field_thumb.jpg',130, 98,1,'photo_1549640.html');
												thumbnails[1718343] = new thumbnail(1718343,'96244','Karmann Ghia abstract image placed on to canvas','Karmann Ghia 1_thumb.jpg',130, 87,1,'photo_1718343.html');
												thumbnails[1718345] = new thumbnail(1718345,'96244','Karmann Ghia Abstract','Karmann Ghia 2_thumb.jpg',130, 87,1,'photo_1718345.html');
												thumbnails[2314633] = new thumbnail(2314633,'96244','Mini Cooper JCW GP','(16 of 16)_thumb.jpg',130, 87,1,'photo_2314633.html');
												thumbnails[5265955] = new thumbnail(5265955,'96244','Mini Black & White','BW_front_thumb.jpg',130, 83,1,'photo_5265955.html');
												thumbnails[5265958] = new thumbnail(5265958,'96244','Mini Effect','Toy_view_thumb.jpg',130, 95,1,'photo_5265958.html');
												thumbnails[5265960] = new thumbnail(5265960,'96244','VW T25','SOLAR_thumb.JPG',130, 196,1,'photo_5265960.html');

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  					galleries[214436] = new gallery(214436,'','Natalie & Mat Wedding','section228229',[],0, 0, '', 'section228229_214436.html',0,1);
				  					galleries[214647] = new gallery(214647,'','Nicky Newton ','section228230',[],0, 0, '', 'section228230_214647.html',0,1);
				  					galleries[168304] = new gallery(168304,'','Portfolio','section228457',[],0, 0, '', 'section228457_168304.html',0,0);
				  					galleries[414341] = new gallery(414341,'7642373,7642370,7642369,7642367,7642326,7642297,7642290,7642289,7642287,7642286','Wedding Albums','section495818',[7642259,7642264,7642286,7642287,7642289,7642290,7642297,7642326,7642367,7642369,7642370,7642373],0, 0, '', 'section495818.html',0,1);
				  					galleries[184112] = new gallery(184112,'7642063,7641926','Weddings','section228229',[3846410,7343886,7343893,7343906,7343907,7343908,7343910,3846289,6723542,6723543,6723549,7641925,3846290,6723544,6723550,7641926,3846291,6723545,6723551,7641927,3846292,6723546,6723552,7641928,3846294,7641929,3846295,7641930,7641931,3846297,7641932,7641933,7641934,7641987,7641988,7641989,7641990,7641991,7641992,7641993,7641994,7641995,7641996,7641997,7641998,7641999,7642000,7642001,7642003,7642004,7642005,7642006,7642007,7642008,7642009,7642010,7642011,7642014,7642015,7642016,7642017,7642018,7642019,7642021,7642022,7642023,7642024,7642025,7642026,7642027,7642055,7642056,7642057,7642058,7642059,7642060,7642061,7642062,7642063,7642064,7642065,7642066,7642067,7642068,7642069],0, 0, '', 'section228229.html',0,1);
				  					galleries[96237] = new gallery(96237,'3861757,2414173,2414169,2414165,2314628,2314625,1999803,1479381,1430424,1430390','Lifestyle','section228230',[1430390,1430424,1479381,1999803,2314625,2314628,2414165,2414169,2414173,3861757],0, 0, '', 'section228230.html',0,1);
				  					galleries[96248] = new gallery(96248,'1430362,1379040','Your Business','section228231',[1379040,1430362],0, 0, '', 'section228231.html',0,1);
				  					galleries[96244] = new gallery(96244,'1379013','Your Car','section228232',[1379013,1430312,1549640,1718343,1718345,2314633,5265955,5265958,5265960],0, 0, '', 'section228232.html',0,1);
/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = new Object();
imageSets[210253] = '6723552,6723551,6723550,6723549,6723546,6723545,6723544,6723543,6723542';
imageSets[1] = '7642063,7642015,7642013,7642010,7641987,7641929,7641927,7641926,1379013';
imageSets[2] = '7642063,7642013,7641926,1430362,1379040,1379013';
imageSets[3] = '7642000,7641996,7641994,7641993,7641992,7641927';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/dgarrett/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/dgarrett/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {

	imageID = randomListVal('');
		if (!basic) {
	img.src = photos[imageID].src;
	img.width = photos[imageID].width;
	img.height = photos[imageID].height;
  img.parentNode.title = img.alt = photos[imageID].caption;
	}
	else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
				
	}
			}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'section228229.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 && 'section228229' != '') {
					href = getHomeImageLink(imageID);
	}
    
  updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
  var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
      op = $.extend({},defaults,options),
      html = '', temp = '',
      photoId = op.nextPhoto.id,
      photoCaption = op.nextPhoto.caption,
      photoSrc = op.nextPhoto.src;
		
		if (!basic) {
    if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
    }
				
    if (op.$photo.length > 0) {
      html = $('<img/>',{
        'class': 'mainphoto photo',
        src: photoSrc,
        id: 'mainPic',
        name: 'mainPic',
        width: op.nextPhoto.width,
        height: op.nextPhoto.height,
        alt: photoCaption,
        css: op.css || {}
      });
      if (op.href) {
      	if (op.href.match(/<a/)) {
      	  html = $(op.href).append(html);
      	} else {
		  html = $('<a/>', {
			href: op.href,
			title: photoCaption
		  }).append(html);
	    }
      } else {
      	html = $('<a/>', {
			title: photoCaption
		  }).append(html);
      }
      if (op.speed == 0) {        op.$photo.html(html);        if (op.onBefore) {          op.onBefore.apply(op.$photo);        }        if (op.onAfter) {          op.onAfter.apply(op.$photo);        }      } else {        op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){            if (op.onAfter) {		    op.onAfter.apply(this);          }		  clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));		  $('body').trigger('clikUpdate');		}, op.onBefore);
      }    }
    	if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'david garrett photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
	    var options = {};	    	      	      resizePhotoInfo(options);
        if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(backgrounds);
  	    } else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
  	      toggleAddToCartConfirm(photos);
  	    }
	    });
    }
        if (!op.speed) {      clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));      $('body').trigger('clikUpdate');    }        
    return html;			}
	else {
				
		window.location = 'photo_' + nextPhoto.id + '.html';
	}
		
}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array){
  if (typeof(array) !== 'object' || array == undefined) {
    array = photos;
  }
	if($('#paymentConfirm').length > 0){
		$('#paymentConfirm').hide();
		$('#paymentAddButton')
		.unbind()
		.click(function(){
						form = document.getElementById('paymentForm');
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm').text('Item added to cart').show();}
				else{
					$('#paymentConfirm').text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm').text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}
/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp = temp +  '<p id="imageDescription">' + this.description + '</p>';
	}
		if (this.photo_ref != '') {
		temp = temp + '<p class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</p>';
	}
		if (this.takendate != '') {
				
		temp = temp + '<p class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</p>';
	}
	
	if (this.location != '') {
				
		temp = temp + '<p class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</p>';
	}
	
	if (this.photographer != '') {
				
		temp = temp + '<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</p>';
	}
					
	temp = temp + this.fnGetPaymentInfo();
				if (temp != '') {
		temp = temp + '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
photo.prototype.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp = temp + '<p>Order this print:</p>';
				temp = temp + '<p class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> AU$' + (this.item_price).toFixed(2) + '</p>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp = temp + '<p>Buy this print online:</p>';
				temp = temp + '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp = temp + '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
				
		temp = temp + getPaymentOptions(this.payment_groups_id);
		temp = temp + '</select>';
		temp = temp + '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
				
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
									temp = temp + '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
	temp = temp + '	<input type="hidden" name="item_option" value="' + item_option + '">';
	temp = temp + '	<input type="hidden" name="site" value="DGARRETT">';
		temp = temp + '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp = temp + '	<input type="hidden" name="quantity" value="1">';
								temp = temp + '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
			temp = temp + '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
	temp = temp + '</form>';
		temp = temp + '<div class="clearing">&nbsp;</div>';
	temp = temp + '<div id="confirmContainer">';
	temp = temp + '<div id="paymentConfirm">Item added to cart</div>';
	temp = temp + '</div>';
			temp = temp + '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
		
	if(img){
	      if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
        imageID = imageID[1];
      } else {
			  imageID = randomListVal(galleries[gallery_id].featured_images);
      }
							
			if (imageID != 0) {
				img.src = thumbnails[imageID].src;
				img.width = thumbnails[imageID].width;
				img.height = thumbnails[imageID].height;
				img.alt = galleries[gallery_id].title;
        if (updateLink) {
          $(img).parent().attr({            href: thumbnails[imageID].fnGalleryLink(gallery_id),            title: galleries[gallery_id].title          });
        }
							}
										}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp = temp + ' | ';
				}
				temp = temp + '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
			}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

