window.thumbnails = {};
															thumbnails[2290456] = clik.newPhoto({"id":2290456,"src":"suweb2010_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":116,"caption":"Susan","height":130});
															thumbnails[5298631] = clik.newPhoto({"id":5298631,"src":"Follow_the_Spoor-arial_view_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_5298631.html","width":97,"caption":"FOLLOW THE SPOOR","height":130});
															thumbnails[6763792] = clik.newPhoto({"id":6763792,"src":"The_Object_of_Things_Series_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_6763792.html","width":130,"caption":"The Object of Things series","height":92});
															thumbnails[2300898] = clik.newPhoto({"id":2300898,"src":"Mutabilis_thumb.jpg","galleries_id":150254,"server_id":32,"link":"photo_2300898.html","width":91,"caption":"MUTABILIS","height":130});
															thumbnails[2300917] = clik.newPhoto({"id":2300917,"src":"fig1_thumb.jpg","galleries_id":150255,"server_id":32,"link":"photo_2300917.html","width":130,"caption":"FIGURE 1","height":87});
															thumbnails[5298931] = clik.newPhoto({"id":5298931,"src":"Vol1_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_5298931.html","width":92,"caption":"VOL","height":130});
															thumbnails[6763821] = clik.newPhoto({"id":6763821,"src":"Follow_the_Spoor_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_6763821.html","width":97,"caption":"Follow the Spoor","height":130});
															thumbnails[2300920] = clik.newPhoto({"id":2300920,"src":"fig2_thumb.jpg","galleries_id":150255,"server_id":32,"link":"photo_2300920.html","width":87,"caption":"FIGURE 2","height":130});
															thumbnails[5298993] = clik.newPhoto({"id":5298993,"src":"Vol2_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_5298993.html","width":92,"caption":"VOL 2","height":130});
															thumbnails[6675306] = clik.newPhoto({"id":6675306,"src":"webfront2010_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_6675306.html","width":130,"caption":"FOLLOW THE SPOOR- detail","height":92});
															thumbnails[2300921] = clik.newPhoto({"id":2300921,"src":"fig3_thumb.jpg","galleries_id":150255,"server_id":32,"link":"photo_2300921.html","width":89,"caption":"FIGURE 3","height":130});
															thumbnails[5299042] = clik.newPhoto({"id":5299042,"src":"Vol_3_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_5299042.html","width":92,"caption":"VOL 3","height":130});
															thumbnails[2303129] = clik.newPhoto({"id":2303129,"src":"fig5_thumb.jpg","galleries_id":150255,"server_id":32,"link":"photo_2303129.html","width":90,"caption":"FIGURE 5","height":130});
															thumbnails[2290128] = clik.newPhoto({"id":2290128,"src":"NaturesBreeze_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290128.html","width":130,"caption":"NATURES BREEZE","height":91});
															thumbnails[2300906] = clik.newPhoto({"id":2300906,"src":"Mutabilis II_thumb.jpg","galleries_id":150254,"server_id":32,"link":"photo_2300906.html","width":91,"caption":"MUTABILIS II","height":130});
															thumbnails[2290093] = clik.newPhoto({"id":2290093,"src":"ContemplationVisionNaturesBreeze_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290093.html","width":130,"caption":"CONTEMPLATION, <\/br> VISION, <\/br><br>\r\nNATURES BREEZE","height":91});
															thumbnails[5299105] = clik.newPhoto({"id":5299105,"src":"Mutabilis_III_thumb.jpg","galleries_id":150254,"server_id":32,"link":"photo_5299105.html","width":92,"caption":"MUTABILIS III","height":130});
															thumbnails[2290140] = clik.newPhoto({"id":2290140,"src":"Vision_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290140.html","width":130,"caption":"VISION","height":87});
															thumbnails[5299108] = clik.newPhoto({"id":5299108,"src":"Mutabilis_IV_thumb.jpg","galleries_id":150254,"server_id":32,"link":"photo_5299108.html","width":92,"caption":"MUTABILIS IV","height":130});
															thumbnails[2290142] = clik.newPhoto({"id":2290142,"src":"Contemplation_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290142.html","width":130,"caption":"CONTEMPLATION","height":91});
															thumbnails[5299112] = clik.newPhoto({"id":5299112,"src":"Mutabilis_VIII_thumb.jpg","galleries_id":150254,"server_id":32,"link":"photo_5299112.html","width":62,"caption":"MUTABILIS VIII","height":130});
															thumbnails[2300052] = clik.newPhoto({"id":2300052,"src":"State of Ambiguity III_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_2300052.html","width":130,"caption":"STATE OF AMBIGUITY III","height":97});
															thumbnails[5299080] = clik.newPhoto({"id":5299080,"src":"Orm_3_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_5299080.html","width":130,"caption":"ORM 3","height":92});
															thumbnails[2300055] = clik.newPhoto({"id":2300055,"src":"State of Ambiguity V_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_2300055.html","width":130,"caption":"STATE OF AMBIGUITY V","height":97});
															thumbnails[2300056] = clik.newPhoto({"id":2300056,"src":"State of Ambiguity VIII_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_2300056.html","width":93,"caption":"STATE OF AMBIGUITY VIII","height":130});
															thumbnails[2300910] = clik.newPhoto({"id":2300910,"src":"State of AmbiguityVI_thumb.jpg","galleries_id":150254,"server_id":32,"link":"photo_2300910.html","width":77,"caption":"STATE OF AMBIGUITY VI","height":130});
															thumbnails[6719693] = clik.newPhoto({"id":6719693,"src":"Print_A11_thumb.jpg","galleries_id":150255,"server_id":32,"link":"photo_6719693.html","width":65,"caption":"Print #A1<br>\r\n","height":130});
															thumbnails[6719720] = clik.newPhoto({"id":6719720,"src":"Print_A3_thumb.jpg","galleries_id":150255,"server_id":32,"link":"photo_6719720.html","width":83,"caption":"Print#A3<br>\r\n","height":130});
															thumbnails[6719724] = clik.newPhoto({"id":6719724,"src":"Print_A5_thumb.jpg","galleries_id":150255,"server_id":32,"link":"photo_6719724.html","width":51,"caption":"Print #A5<br>\r\n","height":130});
															thumbnails[6719830] = clik.newPhoto({"id":6719830,"src":"Print_A6_thumb.jpg","galleries_id":150255,"server_id":32,"link":"photo_6719830.html","width":48,"caption":"Print #A6<br>\r\n","height":130});
															thumbnails[6719834] = clik.newPhoto({"id":6719834,"src":"Print_L16_thumb.jpg","galleries_id":150255,"server_id":32,"link":"photo_6719834.html","width":49,"caption":"Print #L16<br>\r\n","height":130});
															thumbnails[2300058] = clik.newPhoto({"id":2300058,"src":"State of Ambiguity X_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_2300058.html","width":91,"caption":"STATE OF AMBIGUITY X","height":130});
															thumbnails[2300912] = clik.newPhoto({"id":2300912,"src":"Species_thumb.jpg","galleries_id":150254,"server_id":32,"link":"photo_2300912.html","width":80,"caption":"SPECIES","height":130});
															thumbnails[2290280] = clik.newPhoto({"id":2290280,"src":"Wrotan_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290280.html","width":91,"caption":"WROTAN","height":130});
															thumbnails[2300871] = clik.newPhoto({"id":2300871,"src":"Metamorphic Form_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_2300871.html","width":75,"caption":"METAMORPHIC FORM","height":130});
															thumbnails[2290281] = clik.newPhoto({"id":2290281,"src":"WrotanII_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290281.html","width":91,"caption":"WROTAN II","height":130});
															thumbnails[2300873] = clik.newPhoto({"id":2300873,"src":"Metamorphic FormII_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_2300873.html","width":119,"caption":"METAMORPHIC FORM II","height":130});
															thumbnails[5299082] = clik.newPhoto({"id":5299082,"src":"Hydra1-3_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_5299082.html","width":109,"caption":"HYDRA 1,2,3","height":130});
															thumbnails[2290304] = clik.newPhoto({"id":2290304,"src":"StateofAmbiguity_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290304.html","width":130,"caption":"STATE OF AMBIGUITY","height":97});
															thumbnails[2300875] = clik.newPhoto({"id":2300875,"src":"Repetition 1_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_2300875.html","width":68,"caption":"REPETITION","height":130});
															thumbnails[2300913] = clik.newPhoto({"id":2300913,"src":"Place_thumb.jpg","galleries_id":150254,"server_id":32,"link":"photo_2300913.html","width":130,"caption":"PLACE","height":122});
															thumbnails[5299114] = clik.newPhoto({"id":5299114,"src":"Below_the_Waterline_thumb.jpg","galleries_id":150254,"server_id":32,"link":"photo_5299114.html","width":92,"caption":"BELOW THE WATERLINE","height":130});
															thumbnails[2290311] = clik.newPhoto({"id":2290311,"src":"State of Ambiguity II_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290311.html","width":97,"caption":"STATE OF AMBIGUITY II","height":130});
															thumbnails[2300886] = clik.newPhoto({"id":2300886,"src":"Repetition III_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_2300886.html","width":91,"caption":"REPETITION III","height":130});
															thumbnails[2300916] = clik.newPhoto({"id":2300916,"src":"Wrotan V_thumb.jpg","galleries_id":150254,"server_id":32,"link":"photo_2300916.html","width":91,"caption":"WROTAN V","height":130});
															thumbnails[5299088] = clik.newPhoto({"id":5299088,"src":"Orm_thumb.jpg","galleries_id":150254,"server_id":32,"link":"photo_5299088.html","width":97,"caption":"ORM","height":130});
															thumbnails[5299090] = clik.newPhoto({"id":5299090,"src":"Orm_2_thumb.jpg","galleries_id":150254,"server_id":32,"link":"photo_5299090.html","width":130,"caption":"ORM 2","height":92});
															thumbnails[2290317] = clik.newPhoto({"id":2290317,"src":"State of Ambiguity IV_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290317.html","width":97,"caption":"STATE OF AMBIGUITY IV","height":130});
															thumbnails[2300889] = clik.newPhoto({"id":2300889,"src":"Repetition IV_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_2300889.html","width":130,"caption":"REPETITION IV","height":88});
															thumbnails[2290332] = clik.newPhoto({"id":2290332,"src":"State of Ambiguity VI_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290332.html","width":77,"caption":"STATE OF AMBIGUITY VI","height":130});
															thumbnails[2300879] = clik.newPhoto({"id":2300879,"src":"Palaemon_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_2300879.html","width":77,"caption":"PALAEMON","height":130});
															thumbnails[3909574] = clik.newPhoto({"id":3909574,"src":"Pillars_of_WisdomPatterns_of_Culture_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_3909574.html","width":85,"caption":"PILLARS OF WISDOM, PATTERNS OF CULTURE","height":130});
															thumbnails[2290327] = clik.newPhoto({"id":2290327,"src":"State of Ambiguity VII_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290327.html","width":130,"caption":"STATE OF AMBIGUITY VII","height":130});
															thumbnails[2300882] = clik.newPhoto({"id":2300882,"src":"Momentum_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_2300882.html","width":130,"caption":"MOMENTUM","height":130});
															thumbnails[2290334] = clik.newPhoto({"id":2290334,"src":"Protection_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290334.html","width":92,"caption":"PROTECTION","height":130});
															thumbnails[2300891] = clik.newPhoto({"id":2300891,"src":"Wrotan III_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_2300891.html","width":91,"caption":"WROTAN III","height":130});
															thumbnails[2290337] = clik.newPhoto({"id":2290337,"src":"Fecundus_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290337.html","width":92,"caption":"FECUNDUS","height":130});
															thumbnails[2300893] = clik.newPhoto({"id":2300893,"src":"untitled1_thumb.jpg","galleries_id":150253,"server_id":32,"link":"photo_2300893.html","width":86,"caption":"UNTITLED","height":130});
															thumbnails[2290344] = clik.newPhoto({"id":2290344,"src":"Fecundus II_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290344.html","width":91,"caption":"FECUNDUS II","height":130});
															thumbnails[2290348] = clik.newPhoto({"id":2290348,"src":"Brunanburh Viking_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290348.html","width":130,"caption":"BRUNANBURH VIKING","height":88});
															thumbnails[2290352] = clik.newPhoto({"id":2290352,"src":"Repetition V_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290352.html","width":61,"caption":"REPETITION V","height":130});
															thumbnails[2290355] = clik.newPhoto({"id":2290355,"src":"Untitled_thumb.jpg","galleries_id":149501,"server_id":32,"link":"photo_2290355.html","width":91,"caption":"UNTITLED","height":130});
															thumbnails[7840354] = clik.newPhoto({"id":7840354,"src":"Croatia2011-The_Object_of_Things-Toys_Studio_Valeria2_copy_thumb.jpg","galleries_id":423111,"server_id":32,"link":"photo_7840354.html","width":130,"caption":"THE OBJECT OF THINGS-TOYS- UK","height":92});
															thumbnails[7840470] = clik.newPhoto({"id":7840470,"src":"Croatia_2011-Od_Smeca_Do_Umjetnosti-Loza_Gallery_copy_thumb.jpg","galleries_id":423111,"server_id":32,"link":"photo_7840470.html","width":130,"caption":"LOZA GALLERY RESIDENCY, Medulin, Croatia 2011","height":92});
															thumbnails[6765861] = clik.newPhoto({"id":6765861,"src":"FORTHCOMING_EXHIBS-The_Inbetween_Space_thumb.jpg","galleries_id":367729,"server_id":32,"link":"photo_6765861.html","width":130,"caption":"The Inbetween Space","height":92});
															thumbnails[6690058] = clik.newPhoto({"id":6690058,"src":"Bluecoat_Project_Space_thumb.jpg","galleries_id":365315,"server_id":32,"link":"photo_6690058.html","width":130,"caption":" Bluecoat Project Space 2010","height":92});
															thumbnails[6698089] = clik.newPhoto({"id":6698089,"src":"Salzamt_Residency_Working_Site_Specific1_thumb.jpg","galleries_id":365325,"server_id":32,"link":"photo_6698089.html","width":130,"caption":"SALZAMT RESIDENCY, LINZ, AUSTRIA 2010<br>\r\n<br>\r\nWorking Site Specific","height":92});
															thumbnails[6698084] = clik.newPhoto({"id":6698084,"src":"Maerz__Salzamt_Exhibition_Installation_thumb.jpg","galleries_id":365325,"server_id":32,"link":"photo_6698084.html","width":130,"caption":"MAERZ and SALZAMT GALLERIES EXHIBITION 2010","height":92});
															thumbnails[6698085] = clik.newPhoto({"id":6698085,"src":"Ars_Electronica_thumb.jpg","galleries_id":365325,"server_id":32,"link":"photo_6698085.html","width":130,"caption":"ARS ELECTRONICA RESIDENCY, LINZ, AUSTRIA 2010<br>\r\n","height":92});
															thumbnails[6698090] = clik.newPhoto({"id":6698090,"src":"Postlingberg_2010_thumb.jpg","galleries_id":365325,"server_id":32,"link":"photo_6698090.html","width":130,"caption":"POSTLINGBERG CHURCH & PILGRIMAGE, LINZ","height":92});
															thumbnails[2303049] = clik.newPhoto({"id":2303049,"src":"Wrotan-copper_thumb.jpg","galleries_id":150665,"server_id":32,"link":"photo_2303049.html","width":130,"caption":"Wrotan- copper","height":92});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[149501] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"LARGE SCULPTURES","link":"gallery_149501.html","maxRecords":0.0,"photoIDs":[5298631.0,6763821.0,6675306.0,2290128.0,2290093.0,2290140.0,2290142.0,2290280.0,2290281.0,2290304.0,2290311.0,2290317.0,2290332.0,3909574.0,2290327.0,2290334.0,2290337.0,2290344.0,2290348.0,2290352.0,2290355.0],"skipIndex":0,"section_code":"gallery","featured_images":5298631.0,"id":149501,"singleSection":false});				  						galleries[150253] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"SMALL SCULPTURES","link":"gallery_150253.html","maxRecords":0.0,"photoIDs":[6763792.0,5298931.0,5298993.0,5299042.0,2300052.0,5299080.0,2300055.0,2300056.0,2300058.0,2300871.0,2300873.0,5299082.0,2300875.0,2300886.0,2300889.0,2300879.0,2300882.0,2300891.0,2300893.0],"skipIndex":0,"section_code":"gallery","featured_images":6763792.0,"id":150253,"singleSection":false});				  						galleries[150254] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"WALL BASED SCULPTURES","link":"gallery_150254.html","maxRecords":0.0,"photoIDs":[2300898.0,2300906.0,5299105.0,5299108.0,5299112.0,2300910.0,2300912.0,2300913.0,5299114.0,2300916.0,5299088.0,5299090.0],"skipIndex":0,"section_code":"gallery","featured_images":2300910.0,"id":150254,"singleSection":false});				  						galleries[150255] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"DRAWINGS","link":"gallery_150255.html","maxRecords":0.0,"photoIDs":[2300917.0,2300920.0,2300921.0,2303129.0,6719693.0,6719720.0,6719724.0,6719830.0,6719834.0],"skipIndex":0,"section_code":"gallery","featured_images":6719830.0,"id":150255,"singleSection":false});				  						galleries[367729] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"FORTHCOMING EXHIBITIONS","link":"section192368_367729.html","maxRecords":0.0,"photoIDs":[6765861.0],"skipIndex":0,"section_code":"section192368","featured_images":6765861.0,"id":367729,"singleSection":false});				  						galleries[423111] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"CROATIA","link":"section192368_423111.html","maxRecords":0.0,"photoIDs":[7840354.0,7840470.0],"skipIndex":0,"section_code":"section192368","featured_images":"7840470,7840354","id":423111,"singleSection":false});				  						galleries[365325] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"AUSTRIA","link":"section192368_365325.html","maxRecords":0.0,"photoIDs":[6698089.0,6698084.0,6698085.0,6698090.0],"skipIndex":0,"section_code":"section192368","featured_images":6698084.0,"id":365325,"singleSection":false});				  						galleries[365315] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"U.K.","link":"section192368_365315.html","maxRecords":0.0,"photoIDs":[6690058.0],"skipIndex":0,"section_code":"section192368","featured_images":6690058.0,"id":365315,"singleSection":false});				  						galleries[150665] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"COMMISSION","link":"section192368_150665.html","maxRecords":0.0,"photoIDs":[2303049.0],"skipIndex":0,"section_code":"section192368","featured_images":2303049.0,"id":150665,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6675306';
imageSets[2] = '6763792,6719830,6698084,5298631,2303049,2300910';
imageSets[3] = '7840470,7840354,6765861,6763821,6763792,6719834,6719830,6719724,6719720,6719693,6698090,6698089,6698085,6698084,6690058,6675306,5299114,5299112,5299108,5299105,5299090,5299088,5299082,5299080,5299042,5298993,5298931,5298631,3909574,2303129,2303049,2300921,2300920,2300917,2300916,2300913,2300912,2300910,2300906,2300898,2300893,2300891,2300889,2300886,2300882,2300879,2300875,2300873,2300871,2300058';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Susan/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Susan/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Susan/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Susan/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Susan/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Susan/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Susan/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 = 'Susan Meyerhoff Sharples: ' + 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({					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 += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

