window.thumbnails = {};
															thumbnails[533459] = clik.newPhoto({"id":533459,"src":"origjigglythumb.jpg","galleries_id":40788,"server_id":15,"link":"photo_533459.html","width":130,"caption":"'Autumn'","height":87});
															thumbnails[533467] = clik.newPhoto({"id":533467,"src":"decolargethumb1.jpg","galleries_id":40788,"server_id":15,"link":"photo_533467.html","width":130,"caption":"'Summer'","height":89});
															thumbnails[533469] = clik.newPhoto({"id":533469,"src":"origlargethumb.jpg","galleries_id":40788,"server_id":15,"link":"photo_533469.html","width":130,"caption":"'Autumn'","height":85});
															thumbnails[533470] = clik.newPhoto({"id":533470,"src":"largeindiothumb.jpg","galleries_id":40788,"server_id":15,"link":"photo_533470.html","width":130,"caption":"'Sky'","height":89});
															thumbnails[533473] = clik.newPhoto({"id":533473,"src":"deco2large2.jpg","galleries_id":40788,"server_id":15,"link":"photo_533473.html","width":130,"caption":"'Summer'","height":118});
															thumbnails[533513] = clik.newPhoto({"id":533513,"src":"smallbowl6thumb.jpg","galleries_id":41362,"server_id":15,"link":"photo_533513.html","width":115,"caption":"small bowl 6","height":130});
															thumbnails[533514] = clik.newPhoto({"id":533514,"src":"GroupedBowlsthumb.jpg","galleries_id":41362,"server_id":15,"link":"photo_533514.html","width":130,"caption":"grouped bowls","height":97});
															thumbnails[533516] = clik.newPhoto({"id":533516,"src":"Bowl5thumb.jpg","galleries_id":41362,"server_id":15,"link":"photo_533516.html","width":130,"caption":"Bowl 5","height":97});
															thumbnails[533518] = clik.newPhoto({"id":533518,"src":"Bowl4thumb.jpg","galleries_id":41362,"server_id":15,"link":"photo_533518.html","width":130,"caption":"Bowl 4","height":121});
															thumbnails[533520] = clik.newPhoto({"id":533520,"src":"Bowl3thumb.jpg","galleries_id":41362,"server_id":15,"link":"photo_533520.html","width":130,"caption":"Bowl 3","height":111});
															thumbnails[8684342] = clik.newPhoto({"id":8684342,"src":"INDIA__tea-bag_map_4B68DA04-1E4F-37DC-7188C6049D8D76A8_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_8684342.html","width":104,"caption":"INDIA - ceramic tea-bag map.","height":130});
															thumbnails[8684352] = clik.newPhoto({"id":8684352,"src":"CAROUSEL_4B6E49D5-1E4F-37DC-71F3FDA06C106B3B_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_8684352.html","width":130,"caption":"CAROUSEL - ceramic tea-bag mandala","height":123});
															thumbnails[8684401] = clik.newPhoto({"id":8684401,"src":"BUFFETED_4B70DA5F-1E4F-37DC-7162152CFAFE0062_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_8684401.html","width":130,"caption":"BUFFETED- ceramic tea-bags ","height":113});
															thumbnails[5136795] = clik.newPhoto({"id":5136795,"src":"Tea-bag_map_at_CAA_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_5136795.html","width":113,"caption":"TEA - BAG MAP of GREAT BRITAIN  from mixed-media exhibition at Contemporary Applied Arts Gallery(London) Oct. 2009","height":130});
															thumbnails[5136796] = clik.newPhoto({"id":5136796,"src":"Tea_bag_mapat_CAA2_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_5136796.html","width":74,"caption":"TEA - BAG MAP of GREAT BRITAIN  from mixed-media exhibition at Contemporary Applied Arts Gallery(London) Oct. 2009","height":130});
															thumbnails[532606] = clik.newPhoto({"id":532606,"src":"squareneworigthumb2.jpg","galleries_id":40788,"server_id":15,"link":"photo_532606.html","width":130,"caption":"'Autumn'","height":110});
															thumbnails[1669004] = clik.newPhoto({"id":1669004,"src":"dress copy_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_1669004.html","width":130,"caption":"'Impression' - screen-printed image on glass with burnt cloth, fused inside glass layers.","height":127});
															thumbnails[532622] = clik.newPhoto({"id":532622,"src":"squareme dthumb.jpg","galleries_id":40788,"server_id":15,"link":"photo_532622.html","width":130,"caption":"'Mediterranean'","height":87});
															thumbnails[1668481] = clik.newPhoto({"id":1668481,"src":"panel 1_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_1668481.html","width":100,"caption":"'Stream' - glass with inclusions.","height":130});
															thumbnails[8680032] = clik.newPhoto({"id":8680032,"src":"INDIA__tea-bag_map_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_8680032.html","width":104,"caption":"'INDIA'","height":130});
															thumbnails[8680043] = clik.newPhoto({"id":8680043,"src":"detail_of_INDIA_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_8680043.html","width":115,"caption":"detail of 'INDIA'","height":130});
															thumbnails[8680045] = clik.newPhoto({"id":8680045,"src":"detail_2_of_INDIA_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_8680045.html","width":119,"caption":"Detail 2 of 'INDIA'","height":130});
															thumbnails[8680153] = clik.newPhoto({"id":8680153,"src":"CAROUSEL_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_8680153.html","width":130,"caption":"'CAROUSEL'","height":123});
															thumbnails[1669287] = clik.newPhoto({"id":1669287,"src":"exibtion1 copy_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_1669287.html","width":130,"caption":"Glass panels with inclusions - Open Studios","height":85});
															thumbnails[8680155] = clik.newPhoto({"id":8680155,"src":"CAROUSEL_-_detail_1_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_8680155.html","width":130,"caption":"Detail 1 of 'CAROUSEL'","height":98});
															thumbnails[8680156] = clik.newPhoto({"id":8680156,"src":"CAROUSEL_-_detail_2_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_8680156.html","width":130,"caption":"Detail 2 of 'CAROUSEL'","height":98});
															thumbnails[8680158] = clik.newPhoto({"id":8680158,"src":"BUFFETED_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_8680158.html","width":130,"caption":"'BUFFETED'","height":113});
															thumbnails[8680159] = clik.newPhoto({"id":8680159,"src":"Detail_1_of_BUFFETED_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_8680159.html","width":98,"caption":"Detail of 'BUFFETED'","height":130});
															thumbnails[7485107] = clik.newPhoto({"id":7485107,"src":"Earl_Grey_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_7485107.html","width":92,"caption":"'Earl Grey'","height":130});
															thumbnails[7485114] = clik.newPhoto({"id":7485114,"src":"Earl_Grey_-_Front_Detail_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_7485114.html","width":130,"caption":"Detail of 'Earl Grey'","height":73});
															thumbnails[1669289] = clik.newPhoto({"id":1669289,"src":"exibition2 copy_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_1669289.html","width":130,"caption":"Glass panels with inclusions ","height":89});
															thumbnails[7485098] = clik.newPhoto({"id":7485098,"src":"Tutti_Frutti_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_7485098.html","width":101,"caption":"'Tutti Frutti'","height":130});
															thumbnails[7485100] = clik.newPhoto({"id":7485100,"src":"Detail_-_Tutti_Frutti_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_7485100.html","width":98,"caption":"Detail of 'Tutti Frutti'","height":130});
															thumbnails[7485095] = clik.newPhoto({"id":7485095,"src":"Blue_Albion_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_7485095.html","width":109,"caption":"'Blue Albion' ","height":130});
															thumbnails[7485096] = clik.newPhoto({"id":7485096,"src":"Detail_-_Blue_Albion_Tea-bag_Map_of_UK_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_7485096.html","width":130,"caption":"Detail of 'Blue Albion'","height":98});
															thumbnails[7485127] = clik.newPhoto({"id":7485127,"src":"100s__1000s_detail_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_7485127.html","width":130,"caption":"Detail of 'Hundreds and Thousands'","height":73});
															thumbnails[1668482] = clik.newPhoto({"id":1668482,"src":"panel2 copy_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_1668482.html","width":90,"caption":"'Torso' Glass and inclusions","height":130});
															thumbnails[5120158] = clik.newPhoto({"id":5120158,"src":"Tea-bag_map_at_CAA_3144DFAC-2219-B5B5-4CE14D1895115BBB_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_5120158.html","width":113,"caption":"'This Scepter'd Isle'","height":130});
															thumbnails[5120151] = clik.newPhoto({"id":5120151,"src":"all-at-600-dpiAD_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_5120151.html","width":130,"caption":"Detail of 'This Scepter'd Isle'","height":112});
															thumbnails[533554] = clik.newPhoto({"id":533554,"src":"dressresin_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_533554.html","width":96,"caption":"from Contemporary Applied Arts Exhibition","height":121});
															thumbnails[533483] = clik.newPhoto({"id":533483,"src":"chestydressthumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_533483.html","width":92,"caption":"'Proud' - porcelain","height":130});
															thumbnails[533480] = clik.newPhoto({"id":533480,"src":"newdress11.jpg","galleries_id":106120,"server_id":15,"link":"photo_533480.html","width":95,"caption":"'Lily'  - (rear view) porcelain ","height":130});
															thumbnails[533484] = clik.newPhoto({"id":533484,"src":"boweddressthumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_533484.html","width":130,"caption":"'Angel' - porcelain Currently exhibited in MIAO Museum   Turin, Italy","height":87});
															thumbnails[533477] = clik.newPhoto({"id":533477,"src":"uprightdressa2thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_533477.html","width":114,"caption":"'Daisy'- porcelain ","height":130});
															thumbnails[533482] = clik.newPhoto({"id":533482,"src":"colldressthumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_533482.html","width":130,"caption":"'Molly' - porcelain","height":87});
															thumbnails[1668476] = clik.newPhoto({"id":1668476,"src":"barby5_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_1668476.html","width":130,"caption":"","height":83});
															thumbnails[1668470] = clik.newPhoto({"id":1668470,"src":"barby1 copy_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_1668470.html","width":130,"caption":"Exhibition entitled 'Icone' - Valbonne, France  - 2005","height":86});
															thumbnails[1668475] = clik.newPhoto({"id":1668475,"src":"barby4 copy_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_1668475.html","width":90,"caption":"","height":130});
															thumbnails[1668473] = clik.newPhoto({"id":1668473,"src":"barby3 copy_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_1668473.html","width":130,"caption":"'Icone' exhibition - Valbonne, France","height":92});
															thumbnails[533481] = clik.newPhoto({"id":533481,"src":"doubledressthumb1.jpg","galleries_id":106120,"server_id":15,"link":"photo_533481.html","width":87,"caption":"'Twins' - porcelain","height":130});
															thumbnails[533562] = clik.newPhoto({"id":533562,"src":"exhib1_thumb.jpg","galleries_id":112593,"server_id":15,"link":"photo_533562.html","width":103,"caption":"from Contemporary Applied Arts Exhibition","height":130});
															thumbnails[1548446] = clik.newPhoto({"id":1548446,"src":"shoesx5_pairs3.jpg","galleries_id":106120,"server_id":15,"link":"photo_1548446.html","width":87,"caption":"from  Sotheby's Decorative Arts Exhibition ","height":130});
															thumbnails[533478] = clik.newPhoto({"id":533478,"src":"shoesthumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_533478.html","width":130,"caption":"'Shoes' - porcelain","height":87});
															thumbnails[1548956] = clik.newPhoto({"id":1548956,"src":"stillettoes copy.jpg","galleries_id":106120,"server_id":15,"link":"photo_1548956.html","width":130,"caption":"'Heels' -  cast glass","height":124});
															thumbnails[1548371] = clik.newPhoto({"id":1548371,"src":"glasshandbag.jpg","galleries_id":106120,"server_id":15,"link":"photo_1548371.html","width":130,"caption":"'In the bag' - sandcast glass","height":89});
															thumbnails[1558980] = clik.newPhoto({"id":1558980,"src":"stiletto(thumb).jpg","galleries_id":106120,"server_id":15,"link":"photo_1558980.html","width":130,"caption":"Size 6 Stiletto - cast glass","height":107});
															thumbnails[1548375] = clik.newPhoto({"id":1548375,"src":"mother&child.jpg","galleries_id":106120,"server_id":15,"link":"photo_1548375.html","width":130,"caption":"'Madonna and Child' -1st prize winner of 'Terra Piemonte', Castellamonte, Italy ","height":119});
															thumbnails[1548505] = clik.newPhoto({"id":1548505,"src":"3xglass_ceramics4.jpg","galleries_id":106120,"server_id":15,"link":"photo_1548505.html","width":55,"caption":"'Fragments' - glass and porcelain ","height":130});
															thumbnails[1548536] = clik.newPhoto({"id":1548536,"src":"glassceramic.jpg","galleries_id":106120,"server_id":15,"link":"photo_1548536.html","width":97,"caption":"Detail of 'Fragments' - glass and porcelain ","height":130});
															thumbnails[2716112] = clik.newPhoto({"id":2716112,"src":"sexy cup 1(pic)_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_2716112.html","width":130,"caption":"","height":98});
															thumbnails[2716193] = clik.newPhoto({"id":2716193,"src":"sexy cup 2(pic)_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_2716193.html","width":130,"caption":"","height":98});
															thumbnails[2716199] = clik.newPhoto({"id":2716199,"src":"Contemporary Applied Arts Exhibition, LONDON -  July 2008_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_2716199.html","width":130,"caption":"from the 'CUPS' exhibition - Contemporary Applied Arts, London","height":98});
															thumbnails[5120196] = clik.newPhoto({"id":5120196,"src":"all-at-600-dpiAG_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_5120196.html","width":97,"caption":"tea-pot 1","height":130});
															thumbnails[5120200] = clik.newPhoto({"id":5120200,"src":"all-at-600-dpiAH_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_5120200.html","width":130,"caption":"tea-pot 2","height":98});
															thumbnails[5120217] = clik.newPhoto({"id":5120217,"src":"all-at-600-dpiAI_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_5120217.html","width":130,"caption":"tea-pot 3","height":98});
															thumbnails[5166194] = clik.newPhoto({"id":5166194,"src":"all-at-600-dpiE_313622DC-2219-B5B5-4C39EF8C79989A26_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_5166194.html","width":130,"caption":"detail of 'Imprint 1', porcelain","height":98});
															thumbnails[5166165] = clik.newPhoto({"id":5166165,"src":"all-at-600-dpiA_312CFB46-2219-B5B5-4C865044D8906CDB_thumb.jpg","galleries_id":106120,"server_id":15,"link":"photo_5166165.html","width":97,"caption":"'Imprint' 2, porcelain","height":130});
															thumbnails[533525] = clik.newPhoto({"id":533525,"src":"prayingthumb.jpg","galleries_id":41348,"server_id":15,"link":"photo_533525.html","width":130,"caption":"hands study 4","height":85});
															thumbnails[533527] = clik.newPhoto({"id":533527,"src":"hands3thumb.jpg","galleries_id":41348,"server_id":15,"link":"photo_533527.html","width":130,"caption":"Hands study 3","height":84});
															thumbnails[533529] = clik.newPhoto({"id":533529,"src":"hands2thumb.jpg","galleries_id":41348,"server_id":15,"link":"photo_533529.html","width":130,"caption":"Hands study 2","height":86});
															thumbnails[533531] = clik.newPhoto({"id":533531,"src":"hands1thumb.jpg","galleries_id":41348,"server_id":15,"link":"photo_533531.html","width":130,"caption":"hands study 1","height":86});
															thumbnails[533534] = clik.newPhoto({"id":533534,"src":"body1thumb.jpg","galleries_id":41348,"server_id":15,"link":"photo_533534.html","width":130,"caption":"Body  1","height":87});
															thumbnails[533536] = clik.newPhoto({"id":533536,"src":"body2thumb.jpg","galleries_id":41348,"server_id":15,"link":"photo_533536.html","width":130,"caption":"Body 2","height":88});
															thumbnails[533537] = clik.newPhoto({"id":533537,"src":"body3thumb.jpg","galleries_id":41348,"server_id":15,"link":"photo_533537.html","width":130,"caption":"body 3","height":97});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[106120] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"sculpture","link":"gallery_106120.html","maxRecords":0.0,"photoIDs":[8680032.0,8680043.0,8680045.0,8680153.0,8680155.0,8680156.0,8680158.0,8680159.0,7485107.0,7485114.0,7485098.0,7485100.0,7485095.0,7485096.0,7485127.0,5120158.0,5120151.0,533554.0,533483.0,533480.0,533484.0,533477.0,533482.0,533481.0,1548446.0,533478.0,1548956.0,1548371.0,1558980.0,1548375.0,1548505.0,1548536.0,2716112.0,2716193.0,2716199.0,5120196.0,5120200.0,5120217.0,5166194.0,5166165.0],"skipIndex":0,"section_code":"gallery","featured_images":"8680159,8680158,8680153,8680045,8680043,8680032,7485127,7485114,7485107,7485096,7485095,5120151,1558980,1548956,1548536,1548505,1548446,1548375,1548371,533554,533481,533480,533478,533477","id":106120,"singleSection":false});				  						galleries[40788] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"glass","link":"gallery_40788.html","maxRecords":0.0,"photoIDs":[533459.0,533467.0,533469.0,533470.0,533473.0,532606.0,532622.0],"skipIndex":0,"section_code":"gallery","featured_images":"533470,532622,532606","id":40788,"singleSection":false});				  						galleries[41362] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"ceramic bowls","link":"gallery_41362.html","maxRecords":0.0,"photoIDs":[533513.0,533514.0,533516.0,533518.0,533520.0],"skipIndex":0,"section_code":"gallery","featured_images":533518.0,"id":41362,"singleSection":false});				  						galleries[41348] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"photography","link":"gallery_41348.html","maxRecords":0.0,"photoIDs":[533525.0,533527.0,533529.0,533531.0,533534.0,533536.0,533537.0],"skipIndex":0,"section_code":"gallery","featured_images":"533537,533531,533529,533527","id":41348,"singleSection":false});				  						galleries[112593] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"exhibitions","link":"gallery_112593.html","maxRecords":0.0,"photoIDs":[8684342.0,8684352.0,8684401.0,5136795.0,5136796.0,1669004.0,1668481.0,1669287.0,1669289.0,1668482.0,1668476.0,1668470.0,1668475.0,1668473.0,533562.0],"skipIndex":0,"section_code":"gallery","featured_images":1669004.0,"id":112593,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '533518,533514,533470,533459,532622,8680032,8680043,8680045,8680153,8680158,8680159,7485107,7485114,7485095,7485096,7485127,5120151,533554,533483,533480,533477,533482,533481,1548446,533478,1548956,1548371,1558980,1548375,1548505,1548536,2716112,2716193,2716199,533531';
imageSets[2] = '533518,533470,1669004,532606,532622,8680032,8680043,8680045,8680153,8680158,8680159,7485107,7485114,7485095,7485096,7485127,5120151,533554,533480,533477,533481,1548446,533478,1548956,1548371,1558980,1548375,1548505,1548536,533527,533529,533531,533537';
imageSets[3] = '533520,533518,533516,533514,533513,5136795,5136796,1669004,1668481,1669287,7485107,1669289,7485127,5120158,1668482,5120151,533554,533483,533484,1668476,533482,1668470,1668475,1668473,533481,1548446,533562,1548956,1548371,1558980,1548375,1548505,2716112,2716193,2716199,5120196,5120200,5120217,5166194,5166165';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/tizianabb/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/tizianabb/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 = 'tiziana bendall-brunello: ' + 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;
	}
}

			

