window.thumbnails = {};
															thumbnails[7979198] = clik.newPhoto({"id":7979198,"src":"BESIDETHESEASIDE_thumb.jpg","galleries_id":429108,"server_id":1,"link":"photo_7979198.html","width":130,"caption":"\"Beside The Seaside\" watercolour Image Size: W75 x H56 cm Price: £2,200 framed","height":100});
															thumbnails[8478355] = clik.newPhoto({"id":8478355,"src":"ENTRY_1_-_22THE_ORANGE_CROSS22_thumb.jpg","galleries_id":448469,"server_id":1,"link":"photo_8478355.html","width":130,"caption":"Title:- \"THE ORANGE CROSS Medium:- Watercolour Size:- W45 x H35 cm Price:- £1,200","height":98});
															thumbnails[8508755] = clik.newPhoto({"id":8508755,"src":"RIMG0017NEW1_thumb.JPG","galleries_id":448469,"server_id":1,"link":"photo_8508755.html","width":130,"caption":"Title:- \"SEASIDE COASTAL\" Medium:- watercolour,gouache, oil pastel, oil Image Size:- H43 x W60 cm Price:- £1,650 framed","height":93});
															thumbnails[7979211] = clik.newPhoto({"id":7979211,"src":"HASTINGS_thumb.jpg","galleries_id":429108,"server_id":1,"link":"photo_7979211.html","width":130,"caption":"\"Hastings\" watercolour Image Size: W75 x H56 cm Price: £2,200 - framed","height":91});
															thumbnails[8478362] = clik.newPhoto({"id":8478362,"src":"ENTRY_2_-_22ANTHEM22__thumb.jpg","galleries_id":448469,"server_id":1,"link":"photo_8478362.html","width":130,"caption":"Title:- \"ANTHEM\" Medium:- Watercolour  Size:- W60 x H37 cm Price:- £1,550","height":80});
															thumbnails[4227636] = clik.newPhoto({"id":4227636,"src":"RIMG0022_thumb.JPG","galleries_id":250733,"server_id":1,"link":"photo_4227636.html","width":130,"caption":"\"UPSIDE TOWNE\" Watercolour with chalk pastel and  pencil    Image Size: W47 x H56 cm - £650 mounted\/framed","height":150});
															thumbnails[8478369] = clik.newPhoto({"id":8478369,"src":"ENTRY_3_-_22PERPENDICULAR_PINK22_thumb.jpg","galleries_id":448469,"server_id":1,"link":"photo_8478369.html","width":130,"caption":"Title:- \"PERPENDICULAR PINK\" Medium:- Watercolour\/Gouache\/Pastel\/Pencil Size:- W45.5 x H 40 cm Price:- £1,275","height":112});
															thumbnails[1923782] = clik.newPhoto({"id":1923782,"src":"Rural Abstract - Le Parcq 2_thumb.JPG","galleries_id":85585,"server_id":1,"link":"photo_1923782.html","width":130,"caption":"\"Rural Abstract - Le Parcq No.2\"   Watercolour Image Size: W75 x H56 cm - £995 mounted\/framed","height":94});
															thumbnails[1923789] = clik.newPhoto({"id":1923789,"src":"Rural Abstract - Le Parcq_thumb.JPG","galleries_id":85585,"server_id":1,"link":"photo_1923789.html","width":130,"caption":"\"Rural Abstract - Le Parcq No.1\"  Watercolour with body colour Image Size: W75 x H56 cm - £995 mounted\/framed","height":93});
															thumbnails[1198882] = clik.newPhoto({"id":1198882,"src":"2007-eng+art - 241.jpg","galleries_id":85585,"server_id":1,"link":"photo_1198882.html","width":130,"caption":"\"Garden Light\"  Watercolour Image Size: W75 x H56 cm - £995 mounted\/framed","height":97});
															thumbnails[4227657] = clik.newPhoto({"id":4227657,"src":"RIMG0001_thumb.JPG","galleries_id":250733,"server_id":1,"link":"photo_4227657.html","width":130,"caption":"\"UP KHUN TAN\" Watercolour with chalk pastel Image Size: W45 x H60 cm - £655 mounted\/framed","height":171});
															thumbnails[8478372] = clik.newPhoto({"id":8478372,"src":"ENTRY_4-_22PERPENDICULAR22__thumb.jpg","galleries_id":448469,"server_id":1,"link":"photo_8478372.html","width":130,"caption":"Title:- \"PERPENDICULAR\" Medium:- Watercolour Size:- W50 x H54 cm Price:- £ 1,600","height":141});
															thumbnails[8502939] = clik.newPhoto({"id":8502939,"src":"RIMG0014RAH_thumb.JPG","galleries_id":448469,"server_id":1,"link":"photo_8502939.html","width":130,"caption":"Title:- \"SUGAR-PINK CRESCENDO\" medium:- Watercolour  SOLD","height":105});
															thumbnails[8513934] = clik.newPhoto({"id":8513934,"src":"WORK_3-_22NORTH_DOWN_BLUE22_watercolour_-_2011_thumb.jpg","galleries_id":448469,"server_id":1,"link":"photo_8513934.html","width":130,"caption":"Title:- \"NORTH DOWN BLUE\" Medium:- watercolour with pencil Image Size:- H50 x W69.5 cm Price:- £2,000 framed","height":93});
															thumbnails[2172867] = clik.newPhoto({"id":2172867,"src":"RIMG0056_thumb.JPG","galleries_id":129038,"server_id":1,"link":"photo_2172867.html","width":130,"caption":"\"URBAN ABSTRACT No.13 - LOZENGE\"   Watercolour,Gouache, Acrylic,Oil with Chalk Pastel Image Size: W56 x H75 cm - SOLD","height":175});
															thumbnails[2172881] = clik.newPhoto({"id":2172881,"src":"RIMG0057_thumb.JPG","galleries_id":129038,"server_id":1,"link":"photo_2172881.html","width":130,"caption":"\"URBAN ABSTRACT NO.12 - IZIT\"  Watercolour and Gouache with Chalk Pastel Image Size: W56 x H75 cm - £995 mounted\/framed","height":176});
															thumbnails[2172915] = clik.newPhoto({"id":2172915,"src":"RIMG0059_thumb.JPG","galleries_id":129038,"server_id":1,"link":"photo_2172915.html","width":130,"caption":"\"URBAN ABSTRACT No.4 - ROUGH\"   Watercolour, Gouache, Acrylic with Chalk Pastel £995 mounted\/framed","height":173});
															thumbnails[2000204] = clik.newPhoto({"id":2000204,"src":"Rural Abstract -  Le Parcq 42_thumb.JPG","galleries_id":85585,"server_id":1,"link":"photo_2000204.html","width":130,"caption":"\"Rural Abstract - Le Parcq No.4\"   Watecolour Image Size: W75 x H56 cm - £995 mounted\/framed","height":94});
															thumbnails[2172951] = clik.newPhoto({"id":2172951,"src":"RIMG0062_thumb.JPG","galleries_id":129038,"server_id":1,"link":"photo_2172951.html","width":130,"caption":"\"URBAN ABSTRACT No.7 - GLITZ\"  Watercolour, Gouache, Arcylic swith Chalk Pastel  Image Size: W56 x H750 cm - £995 mounted\/framed","height":173});
															thumbnails[2000214] = clik.newPhoto({"id":2000214,"src":"Rural Abstract - Le Parcq 71_thumb.JPG","galleries_id":85585,"server_id":1,"link":"photo_2000214.html","width":130,"caption":"\"Rural Abstract - Le Parcq No.7\"   Watercolour Image Size: W75 x H56 m - £995 mounted\/framed","height":93});
															thumbnails[2172977] = clik.newPhoto({"id":2172977,"src":"RIMG0064_thumb.JPG","galleries_id":129038,"server_id":1,"link":"photo_2172977.html","width":130,"caption":"\"URBAN ABSTRACT No.25 - GLO\"   Watercolour and Gouache with Chalk Pastel Image Size: W56 x H75 cm - £995 mounted\/framed","height":173});
															thumbnails[2173011] = clik.newPhoto({"id":2173011,"src":"RIMG0070_thumb.JPG","galleries_id":129038,"server_id":1,"link":"photo_2173011.html","width":130,"caption":"\"URBAN ABSTRACT No.57 - MARKS\"  Watercolour and Gouache with Chalk Pastel Image Size: W75 x H56 cm - £995 mounted\/framed","height":98});
															thumbnails[2173180] = clik.newPhoto({"id":2173180,"src":"RIMG0069_thumb.JPG","galleries_id":129038,"server_id":1,"link":"photo_2173180.html","width":130,"caption":"\"URBAN ABSTRACT No.41\"   <br>\r\nWatercolour, Gouache,Metallic Paint, Acrylic with collage and Chalk Pastel. Image Size: W56 x H 76 cm - £999 mounted\/unframed","height":178});
															thumbnails[2255770] = clik.newPhoto({"id":2255770,"src":"Urban Abstract No24 - ZIG_thumb.jpg","galleries_id":129038,"server_id":1,"link":"photo_2255770.html","width":130,"caption":"\"Urban Abstract No. 24 -ZIG\"   Watercolour and Gouache with Chalk Pastel Image Size: W56 x H75 cm - £995 mounted\/framed","height":172});
															thumbnails[2255820] = clik.newPhoto({"id":2255820,"src":"DBL V_thumb.jpg","galleries_id":129038,"server_id":1,"link":"photo_2255820.html","width":130,"caption":"\"Urban Abstract No.23 - DOUBLE 'V' \"   Watercolour and Gouache with Chalk Pastel Image Size: W45 x H50 cm - £550 mounted\/framed","height":141});
															thumbnails[1198889] = clik.newPhoto({"id":1198889,"src":"2007-eng+art - 271.jpg","galleries_id":85585,"server_id":1,"link":"photo_1198889.html","width":130,"caption":"\"Garden View\"  watercolour Image Size: W75 x H56 cm - £995 mounted\/framed","height":95});
															thumbnails[4227621] = clik.newPhoto({"id":4227621,"src":"RIMG0004_thumb.JPG","galleries_id":448469,"server_id":1,"link":"photo_4227621.html","width":130,"caption":"'TRIPLE RED RUN' Watercolour with chalk pastel and pencil  Image Size: W53 x H60 cm - £1,800 mounted\/framed","height":159});
															thumbnails[7979239] = clik.newPhoto({"id":7979239,"src":"BRIGHTONRED_thumb.jpg","galleries_id":429108,"server_id":1,"link":"photo_7979239.html","width":130,"caption":"\"Brighton Red\" watercolour Image Size: W70 x H56 cm Price:£1,950 framed","height":89});
															thumbnails[2255800] = clik.newPhoto({"id":2255800,"src":"Urban Abstract No_thumb.jpg","galleries_id":448469,"server_id":1,"link":"photo_2255800.html","width":130,"caption":"\"Urban Abstract No.8 - PINK\"    Watercolour with Chalk Pastel - SOLD","height":130});
															thumbnails[4227625] = clik.newPhoto({"id":4227625,"src":"RIMG0008_thumb.JPG","galleries_id":448469,"server_id":1,"link":"photo_4227625.html","width":130,"caption":"\"ASCENSION LEVELS\" Watercolour  Image Size: W40 x H60 - £1,550 mounted\/framed","height":173});
															thumbnails[4228205] = clik.newPhoto({"id":4228205,"src":"RIMG0020_thumb.JPG","galleries_id":448469,"server_id":1,"link":"photo_4228205.html","width":130,"caption":"\"CHANG KHIAN GREEN\" Watercolour with Chalk Pastel Image Size: W56 x H75 cm - £2,200 mounted\/framed","height":173});
															thumbnails[7979760] = clik.newPhoto({"id":7979760,"src":"BRIGHTONTIDAL_thumb.jpg","galleries_id":429108,"server_id":1,"link":"photo_7979760.html","width":130,"caption":"\"Brighton Tidal\" watercolour Image Size: W68 x H52 Price: £2,200 framed","height":103});
															thumbnails[7979219] = clik.newPhoto({"id":7979219,"src":"CHARLOTTEPLAGE_thumb.jpg","galleries_id":448469,"server_id":1,"link":"photo_7979219.html","width":130,"caption":"\"Charlotte Plage\" watercolour Image Size: W75 x H56 cm Price: £2,200 framed","height":94});
															thumbnails[7979234] = clik.newPhoto({"id":7979234,"src":"WIMEREUXCOASTAL_thumb.jpg","galleries_id":448469,"server_id":1,"link":"photo_7979234.html","width":130,"caption":"\"Wimereux Coastal\" watercolour Image Size: W75 x H56 cm Price: £2,200 framed","height":93});
															thumbnails[7979244] = clik.newPhoto({"id":7979244,"src":"ONEMORNING_thumb.jpg","galleries_id":448469,"server_id":1,"link":"photo_7979244.html","width":130,"caption":"'One Morning\" watercolour Image Size: W72 x H48cm Price:£1,950 framed","height":90});
															thumbnails[6371324] = clik.newPhoto({"id":6371324,"src":"HEUY_KAEW_BLUE_-_2010_thumb.jpg","galleries_id":352585,"server_id":1,"link":"photo_6371324.html","width":130,"caption":"TITLE: 'HEUY KAEW BLUE' watercolour on sized Sa paper  IMAGE SIZE: W47 x H51 cm PRICE: £695 window mounted\/ framed","height":137});
															thumbnails[6371354] = clik.newPhoto({"id":6371354,"src":"RIMG0035_thumb.JPG","galleries_id":352585,"server_id":1,"link":"photo_6371354.html","width":130,"caption":"TITLE: 'HASTINGS' - 2009 watercolour on sized Khadi paper IMAGE SIZE: W35 x H 27 cm PRICE: £275 mounted\/framed","height":98});
															thumbnails[6371358] = clik.newPhoto({"id":6371358,"src":"RIMG001504_thumb.JPG","galleries_id":352585,"server_id":1,"link":"photo_6371358.html","width":130,"caption":"TITLE: 'BANKSIDE RED' - 2009 watercolour on sized Khadi paper IMAGE SIZE: W32 x H26 cm  PRICE: £275 mounted\/framed","height":100});
															thumbnails[6371446] = clik.newPhoto({"id":6371446,"src":"RIMG002504_thumb.JPG","galleries_id":352585,"server_id":1,"link":"photo_6371446.html","width":130,"caption":"TITLE: 'BANKSIDE NE' - 2009 watercolour on sized Khadi paper IMAGE SIZE: W28 x H 24 cm PRICE: £250 mounted\/framed","height":95});
															thumbnails[6371475] = clik.newPhoto({"id":6371475,"src":"RIMG0037_thumb.JPG","galleries_id":352585,"server_id":1,"link":"photo_6371475.html","width":130,"caption":"TITLE: 'HASTINGS COASTAL 110' watercolour on sized Khadi paper IMAGE SIZE: W28 x H22 cm PRICE: £225 mounted\/framed","height":85});
															thumbnails[6371483] = clik.newPhoto({"id":6371483,"src":"RIMG002204_thumb.JPG","galleries_id":352585,"server_id":1,"link":"photo_6371483.html","width":130,"caption":"TITLE: 'BANKSIDE' - 2009 watercolour on sized Khadi paper IMAGE SIZE: W35 x H27 PRICE: £295 mounted\/framed","height":101});
															thumbnails[6371495] = clik.newPhoto({"id":6371495,"src":"RIMG001104_thumb.JPG","galleries_id":352585,"server_id":1,"link":"photo_6371495.html","width":130,"caption":"TITLE: 'BLACKFRIARS' - 2009 watercolour on sized Khadi paper IMAGE SIZE: W34 x H27cm PRICE: £295 mounted\/ framed","height":107});
															thumbnails[4228224] = clik.newPhoto({"id":4228224,"src":"RIMG0024_thumb.JPG","galleries_id":250733,"server_id":1,"link":"photo_4228224.html","width":130,"caption":"\"GREEN\"<br>\r\nWatercolour with Chalk Pastel<br>\r\nImage Size: W59 x H50 cm - £750 mounted\/unframed","height":111});
															thumbnails[7979254] = clik.newPhoto({"id":7979254,"src":"FOURFIELDPANELWITHORANGE_thumb.jpg","galleries_id":448469,"server_id":1,"link":"photo_7979254.html","width":130,"caption":"\"Four Field Green With Orange\" watercolour Image Size: W54 x H40 cm Price: £1,850 framed","height":92});
															thumbnails[7979275] = clik.newPhoto({"id":7979275,"src":"STREAM_thumb.jpg","galleries_id":429108,"server_id":1,"link":"photo_7979275.html","width":130,"caption":"\"Stream\" watercolour Image Size: W40 x H18 cm Price: £750 framed","height":60});
															thumbnails[7979290] = clik.newPhoto({"id":7979290,"src":"FIELDSLOPEPINK_thumb.jpg","galleries_id":429108,"server_id":1,"link":"photo_7979290.html","width":130,"caption":"Field Slope Pink\" watercolour with body colour Image Size: W34 x H26 cm Price: £550 framed","height":96});
															thumbnails[7979309] = clik.newPhoto({"id":7979309,"src":"DARTMOUTHFIVE_thumb.jpg","galleries_id":429108,"server_id":1,"link":"photo_7979309.html","width":130,"caption":"\"Dartmouth Five\" watercolour Image Size: W30 x H26 cm Price: £550 framed","height":119});
															thumbnails[8513938] = clik.newPhoto({"id":8513938,"src":"RIMG0016NEW2_thumb.JPG","galleries_id":448469,"server_id":1,"link":"photo_8513938.html","width":130,"caption":"Title:- \"RED REPEATER\" Medium:- watercolour with pencil Image Size:- H46.5 x W45.5 cm Price:- £1,600 framed","height":133});
															thumbnails[7979318] = clik.newPhoto({"id":7979318,"src":"SEACLIFFBLUE_thumb.jpg","galleries_id":429108,"server_id":1,"link":"photo_7979318.html","width":130,"caption":"\"Sea Cliff Blue\" watercolour Image Size: W34 x H20 cm Price: £550 framed","height":93});
															thumbnails[4227660] = clik.newPhoto({"id":4227660,"src":"RIMG001919_thumb.jpg","galleries_id":250733,"server_id":1,"link":"photo_4227660.html","width":130,"caption":"\"RED ROW SIX\" Watercolour with chalk pastel Image Size: W56 x H75 cm - in the collection of Mr Russel Chang","height":173});
															thumbnails[7979390] = clik.newPhoto({"id":7979390,"src":"HILLSIDE_thumb.jpg","galleries_id":429108,"server_id":1,"link":"photo_7979390.html","width":130,"caption":"\"Hillside\" watercolour Image Size: W32 x H29 cm Price: £650 framed","height":111});
															thumbnails[7979403] = clik.newPhoto({"id":7979403,"src":"FURROWEDBROWNWITHEGREEN_thumb.jpg","galleries_id":429108,"server_id":1,"link":"photo_7979403.html","width":130,"caption":"\"Furrowed Brown with Green\" watercolour Image Size: W36 x H26 cm Price: £550 framed","height":87});
															thumbnails[7979411] = clik.newPhoto({"id":7979411,"src":"STREAMINGGREEN_thumb.jpg","galleries_id":429108,"server_id":1,"link":"photo_7979411.html","width":130,"caption":"\"Green Stream Black\" watercolour Size Image: W76 x H56 cm Price: £2,200 framed","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[448469] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"MAIN GALLERY","link":"gallery_448469.html","maxRecords":0.0,"photoIDs":[8478355.0,8508755.0,8478362.0,8478369.0,8478372.0,8502939.0,8513934.0,4227621.0,2255800.0,4227625.0,4228205.0,7979219.0,7979234.0,7979244.0,7979254.0,8513938.0],"skipIndex":0,"section_code":"gallery","featured_images":"8513938,8513934,8508755,8502939,8478372,8478369,8478362,8478355,7979254,7979244,7979234,7979219,4228205,4227625,4227621,2255800","id":448469,"singleSection":false});				  						galleries[429108] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2010\/2011 New Work - a selection","link":"gallery_429108.html","maxRecords":0.0,"photoIDs":[7979198.0,7979211.0,7979239.0,7979760.0,7979275.0,7979290.0,7979309.0,7979318.0,7979390.0,7979403.0,7979411.0],"skipIndex":0,"section_code":"gallery","featured_images":"7979760,7979411,7979403,7979390,7979318,7979309,7979290,7979275,7979239,7979211,7979198","id":429108,"singleSection":false});				  						galleries[352585] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"2010 - a selection","link":"gallery_352585.html","maxRecords":0.0,"photoIDs":[6371324.0,6371354.0,6371358.0,6371446.0,6371475.0,6371483.0,6371495.0],"skipIndex":0,"section_code":"gallery","featured_images":"6371358,6371354","id":352585,"singleSection":false});				  						galleries[250733] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Paintings - 2009 - a selection","link":"gallery_250733.html","maxRecords":0.0,"photoIDs":[4227636.0,4227657.0,4228224.0,4227660.0],"skipIndex":0,"section_code":"gallery","featured_images":"4228224,4227660,4227657,4227636","id":250733,"singleSection":false});				  						galleries[129038] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Paintings -  2008 - a selection","link":"gallery_129038.html","maxRecords":0.0,"photoIDs":[2172867.0,2172881.0,2172915.0,2172951.0,2172977.0,2173011.0,2173180.0,2255770.0,2255820.0],"skipIndex":0,"section_code":"gallery","featured_images":2172867.0,"id":129038,"singleSection":false});				  						galleries[85585] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Paintings - 2007 - a selection","link":"gallery_85585.html","maxRecords":0.0,"photoIDs":[1923782.0,1923789.0,1198882.0,2000204.0,2000214.0,1198889.0],"skipIndex":0,"section_code":"gallery","featured_images":"2000214,2000204,1923789,1923782,1198889,1198882","id":85585,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8513938,8513934,8508755,8502939,8478372,8478369,8478362,8478355,7979760,7979309,7979275,7979254,7979244,7979239,7979234,7979219,7979211,7979198,6371358,6371354,4228205,4227625,4227621,2255800';
imageSets[2] = '8513938,8513934,8508755,8502939,8478372,8478369,8478362,8478355,7979760,7979411,7979403,7979390,7979318,7979309,7979290,7979275,7979254,7979244,7979239,7979234,7979219,7979211,7979198,6371358,6371354,4228205,4227625,4227621,2255800,2172867';
imageSets[3] = '8513938,8513934,8508755,8502939,8478372,8478369,8478362,8478355,7979760,7979411,7979403,7979390,7979318,7979309,7979290,7979275,7979254,7979244,7979239,7979234,7979219,7979211,7979198,6371495,6371483,6371475,6371446,6371358,6371354,6371324,4228224,4228205,4227660,4227657,4227636,4227625,4227621,2255820,2255800,2255770,2173180,2173011,2172977,2172951,2172915,2172881,2172867,2000214,2000204,1923789';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/geoffreypimlottarws/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/geoffreypimlottarws/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$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 = 'Geoffrey Pimlott RWS - Painter/Watercolourist: ' + 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.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
			temp += '<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;
	}
}

			

