window.thumbnails = {};
															thumbnails[786516] = clik.newPhoto({"id":786516,"src":"Trevelezwinter_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Trevelez in winter","height":98});
															thumbnails[4557736] = clik.newPhoto({"id":4557736,"src":"painting-holiday-2010_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Click here for details of Sketchbook Rambles","height":167});
															thumbnails[791669] = clik.newPhoto({"id":791669,"src":"elchorilloTrevelez_thumb.jpg","galleries_id":61387,"server_id":1,"link":"photo_791669.html","width":130,"caption":"El Chorrillo, Trevélez","height":160});
															thumbnails[791682] = clik.newPhoto({"id":791682,"src":"piedrasblancasSierraNevada_thumb.jpg","galleries_id":61387,"server_id":1,"link":"photo_791682.html","width":130,"caption":"Piedras Blancas, Sierra Nevada","height":159});
															thumbnails[791688] = clik.newPhoto({"id":791688,"src":"penabonsunset_thumb.jpg","galleries_id":61387,"server_id":1,"link":"photo_791688.html","width":130,"caption":"Sunset on Peñabon, Trevélez","height":99});
															thumbnails[791704] = clik.newPhoto({"id":791704,"src":"PiedraVentana_thumb.jpg","galleries_id":61387,"server_id":1,"link":"photo_791704.html","width":130,"caption":"Autumn view of Piedra Ventana, Trevélez","height":109});
															thumbnails[791711] = clik.newPhoto({"id":791711,"src":"AlhambraImage_thumb.jpg","galleries_id":61387,"server_id":1,"link":"photo_791711.html","width":130,"caption":"Spirit of the Alhambra","height":161});
															thumbnails[2522862] = clik.newPhoto({"id":2522862,"src":"from-el-fuerte-web_thumb.jpg","galleries_id":61387,"server_id":1,"link":"photo_2522862.html","width":130,"caption":"View from El Fuerte Juviles","height":193});
															thumbnails[2522874] = clik.newPhoto({"id":2522874,"src":"geranium-shadow-for-web_thumb.jpg","galleries_id":61387,"server_id":1,"link":"photo_2522874.html","width":130,"caption":"Geranium and shadow","height":180});
															thumbnails[2803393] = clik.newPhoto({"id":2803393,"src":"printelchorrillo_thumb.jpg","galleries_id":175297,"server_id":1,"link":"photo_2803393.html","width":130,"caption":"\"El Chorrillo, Trevélez\".","height":160});
															thumbnails[3063080] = clik.newPhoto({"id":3063080,"src":"Granada-callejon_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_3063080.html","width":130,"caption":"Un Callejón del Albaicin, Granada","height":228});
															thumbnails[4824257] = clik.newPhoto({"id":4824257,"src":"contraviesa-linoweb_thumb.jpg","galleries_id":161648,"server_id":1,"link":"photo_4824257.html","width":130,"caption":"Lino print of winter scene on the Contraviesa in the Alpujarra, Granada.","height":103});
															thumbnails[6177670] = clik.newPhoto({"id":6177670,"src":"piedra-vent-1_thumb.jpg","galleries_id":61387,"server_id":1,"link":"photo_6177670.html","width":130,"caption":"Piedra Ventana, Trevelez","height":157});
															thumbnails[7325451] = clik.newPhoto({"id":7325451,"src":"portrait-paula-laslo-web_thumb.jpg","galleries_id":172413,"server_id":1,"link":"photo_7325451.html","width":130,"caption":"Paula y Laslo","height":83});
															thumbnails[789889] = clik.newPhoto({"id":789889,"src":"Trevelezcallejon_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_789889.html","width":130,"caption":"El Callejón, Trevélez","height":184});
															thumbnails[1365540] = clik.newPhoto({"id":1365540,"src":"ruinaweb_thumb.jpg","galleries_id":95457,"server_id":1,"link":"photo_1365540.html","width":130,"caption":"La Ruina","height":176});
															thumbnails[2732778] = clik.newPhoto({"id":2732778,"src":"Capdoorway_thumb.jpg","galleries_id":171769,"server_id":1,"link":"photo_2732778.html","width":130,"caption":"Capileira","height":183});
															thumbnails[2744899] = clik.newPhoto({"id":2744899,"src":"Puriwebsite_thumb.jpg","galleries_id":172413,"server_id":1,"link":"photo_2744899.html","width":130,"caption":"Puri","height":164});
															thumbnails[2803359] = clik.newPhoto({"id":2803359,"src":"cardpaseoporelchorrillo_thumb.jpg","galleries_id":175299,"server_id":1,"link":"photo_2803359.html","width":130,"caption":"\"Paseo por El Chorrillo, Trevélez\"","height":130});
															thumbnails[2803398] = clik.newPhoto({"id":2803398,"src":"printpiedrasblancas_thumb.jpg","galleries_id":175297,"server_id":1,"link":"photo_2803398.html","width":130,"caption":"\"Piedras Blancas, Sierra Nevada, Spain\"","height":158});
															thumbnails[2928980] = clik.newPhoto({"id":2928980,"src":"images-of-alarcon_thumb.jpg","galleries_id":180231,"server_id":1,"link":"photo_2928980.html","width":130,"caption":"Images of Alarcon, Spain","height":172});
															thumbnails[2929052] = clik.newPhoto({"id":2929052,"src":"losberchuleswc1_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_2929052.html","width":130,"caption":"Village of Los Berchules, La Alpujarra Alta.","height":171});
															thumbnails[4413248] = clik.newPhoto({"id":4413248,"src":"collagraphbarrioaltocrop_thumb.jpg","galleries_id":161648,"server_id":1,"link":"photo_4413248.html","width":130,"caption":"Collagraph print of the Barrio Alto, Trevélez, Sierra Nevada, Spain","height":99});
															thumbnails[4824209] = clik.newPhoto({"id":4824209,"src":"portichuelo-pastel-web_thumb.jpg","galleries_id":95457,"server_id":1,"link":"photo_4824209.html","width":130,"caption":"Plein air pastel painting of the valley of Trevelez, Sierra Nevada, Spain","height":156});
															thumbnails[5760740] = clik.newPhoto({"id":5760740,"src":"FondalesFW_thumb.jpg","galleries_id":326341,"server_id":1,"link":"photo_5760740.html","width":130,"caption":"Fondales","height":194});
															thumbnails[1946934] = clik.newPhoto({"id":1946934,"src":"Puri-web_thumb.jpg","galleries_id":95457,"server_id":1,"link":"photo_1946934.html","width":130,"caption":"Puri","height":164});
															thumbnails[2523095] = clik.newPhoto({"id":2523095,"src":"tierrafragil1print-web_thumb.jpg","galleries_id":161648,"server_id":1,"link":"photo_2523095.html","width":130,"caption":"Fragmented rock I","height":180});
															thumbnails[2732785] = clik.newPhoto({"id":2732785,"src":"Bubionwinepress_thumb.jpg","galleries_id":171769,"server_id":1,"link":"photo_2732785.html","width":130,"caption":"Wine press, Casa Alpujarreña, Bubion.","height":179});
															thumbnails[2745622] = clik.newPhoto({"id":2745622,"src":"portraitwatercolour_thumb.jpg","galleries_id":172413,"server_id":1,"link":"photo_2745622.html","width":130,"caption":"Wendy's Grandchildren.","height":196});
															thumbnails[2803364] = clik.newPhoto({"id":2803364,"src":"cardpiedrasblancas_thumb.jpg","galleries_id":175299,"server_id":1,"link":"photo_2803364.html","width":130,"caption":"\"Piedras Blancas, Sierra Nevada, Spain\".","height":131});
															thumbnails[2854122] = clik.newPhoto({"id":2854122,"src":"Sol-y-Sombra,-Bubion_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_2854122.html","width":130,"caption":"Sol y Sombra, Bubión, La Alpujarra.","height":168});
															thumbnails[2909601] = clik.newPhoto({"id":2909601,"src":"chumbera_thumb.jpg","galleries_id":180231,"server_id":1,"link":"photo_2909601.html","width":130,"caption":"Una Chumbera Vieja, La Alpujarra","height":163});
															thumbnails[5760718] = clik.newPhoto({"id":5760718,"src":"sketchbook_19_jan_2010_thumb.jpg","galleries_id":326341,"server_id":1,"link":"photo_5760718.html","width":130,"caption":"Looking across to Berchules","height":88});
															thumbnails[6934250] = clik.newPhoto({"id":6934250,"src":"still-life-web_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_6934250.html","width":130,"caption":"La Cocina Andaluz. 55 x 40 cm","height":181});
															thumbnails[789868] = clik.newPhoto({"id":789868,"src":"ElpuebloTrevelez_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_789868.html","width":130,"caption":"Barrio Medio of Trevélez","height":197});
															thumbnails[1365557] = clik.newPhoto({"id":1365557,"src":"busquistarpoppies2web_thumb.jpg","galleries_id":95457,"server_id":1,"link":"photo_1365557.html","width":130,"caption":"Busquistar in May","height":108});
															thumbnails[2523097] = clik.newPhoto({"id":2523097,"src":"O_thumb.P-frag-rock-2.jpg","galleries_id":161648,"server_id":1,"link":"photo_2523097.html","width":130,"caption":"Fragmented Rock II","height":270});
															thumbnails[2732796] = clik.newPhoto({"id":2732796,"src":"Berchules_thumb.jpg","galleries_id":171769,"server_id":1,"link":"photo_2732796.html","width":130,"caption":"Berchules, La Alpujarra.","height":223});
															thumbnails[2929017] = clik.newPhoto({"id":2929017,"src":"fragmented-rock-1_thumb.jpg","galleries_id":180231,"server_id":1,"link":"photo_2929017.html","width":130,"caption":"Fragmented Rock I","height":162});
															thumbnails[5760693] = clik.newPhoto({"id":5760693,"src":"moleskin-1_thumb.jpg","galleries_id":326341,"server_id":1,"link":"photo_5760693.html","width":130,"caption":" Looking back across the valley to the Barrio Alto of Trevelez","height":383});
															thumbnails[789881] = clik.newPhoto({"id":789881,"src":"juviles_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_789881.html","width":130,"caption":"Village of Juviles, La Alpujarra","height":179});
															thumbnails[2523125] = clik.newPhoto({"id":2523125,"src":"Alhambra-coll-web_thumb.jpg","galleries_id":161648,"server_id":1,"link":"photo_2523125.html","width":130,"caption":"Essence of the Alhambra.","height":145});
															thumbnails[2732814] = clik.newPhoto({"id":2732814,"src":"doorwayBerchules_thumb.jpg","galleries_id":171769,"server_id":1,"link":"photo_2732814.html","width":130,"caption":"Patched door, Berchules.","height":190});
															thumbnails[2760350] = clik.newPhoto({"id":2760350,"src":"settle_thumb.jpg","galleries_id":95457,"server_id":1,"link":"photo_2760350.html","width":130,"caption":"Settle, after a storm","height":102});
															thumbnails[2929025] = clik.newPhoto({"id":2929025,"src":"fragmented-rock-2_thumb.jpg","galleries_id":180231,"server_id":1,"link":"photo_2929025.html","width":130,"caption":"Fragmented Rock II","height":161});
															thumbnails[907906] = clik.newPhoto({"id":907906,"src":"paseo-por-el-chorrillo_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_907906.html","width":130,"caption":"Leaving Trevelez on the GR7 footpath - Paseo por El Chorrillo, Trevélez.","height":88});
															thumbnails[2732816] = clik.newPhoto({"id":2732816,"src":"espartopanniers_thumb.jpg","galleries_id":171769,"server_id":1,"link":"photo_2732816.html","width":130,"caption":"Panniers of Esparto on a mule.","height":126});
															thumbnails[3675260] = clik.newPhoto({"id":3675260,"src":"autumnmonoprint_thumb.jpg","galleries_id":161648,"server_id":1,"link":"photo_3675260.html","width":130,"caption":"Autumn colours, Trevelez. Monotype.","height":94});
															thumbnails[2523136] = clik.newPhoto({"id":2523136,"src":"collalarcon_thumb.jpg","galleries_id":161648,"server_id":1,"link":"photo_2523136.html","width":130,"caption":"Images of Alarcon","height":187});
															thumbnails[2732893] = clik.newPhoto({"id":2732893,"src":"trevelezsepia_thumb.jpg","galleries_id":171769,"server_id":1,"link":"photo_2732893.html","width":130,"caption":"Traditional houses of Trevelez.","height":203});
															thumbnails[2854110] = clik.newPhoto({"id":2854110,"src":"los-chinos,-granada-2_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_2854110.html","width":130,"caption":"Paseo Por Los Chinos, La Alhambra, Granada","height":89});
															thumbnails[789890] = clik.newPhoto({"id":789890,"src":"poppiesalmonds_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_789890.html","width":130,"caption":"Poppies and Almonds","height":97});
															thumbnails[2523144] = clik.newPhoto({"id":2523144,"src":"collsegovia-_thumb.jpg","galleries_id":161648,"server_id":1,"link":"photo_2523144.html","width":130,"caption":"Images of Segovia","height":185});
															thumbnails[2732899] = clik.newPhoto({"id":2732899,"src":"yegensepia_thumb.jpg","galleries_id":171769,"server_id":1,"link":"photo_2732899.html","width":130,"caption":"Yegen.","height":204});
															thumbnails[789894] = clik.newPhoto({"id":789894,"src":"sweetchestnut_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_789894.html","width":130,"caption":"Sweetchestnut tree of Mecina Bombarón","height":93});
															thumbnails[2523159] = clik.newPhoto({"id":2523159,"src":"grief-contained-1w_thumb.jpg","galleries_id":161648,"server_id":1,"link":"photo_2523159.html","width":130,"caption":"Grief contained","height":172});
															thumbnails[2732883] = clik.newPhoto({"id":2732883,"src":"olivepress_thumb.jpg","galleries_id":171769,"server_id":1,"link":"photo_2732883.html","width":130,"caption":"Olive Press, Castaras.","height":94});
															thumbnails[789884] = clik.newPhoto({"id":789884,"src":"mecinafondales_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_789884.html","width":130,"caption":"Mecina in the valley of Trevélez","height":94});
															thumbnails[2523166] = clik.newPhoto({"id":2523166,"src":"patioleones-A4_thumb.jpg","galleries_id":161648,"server_id":1,"link":"photo_2523166.html","width":130,"caption":"Patio de Los Leones La Alhambra","height":170});
															thumbnails[2732873] = clik.newPhoto({"id":2732873,"src":"espartobasket_thumb.jpg","galleries_id":171769,"server_id":1,"link":"photo_2732873.html","width":130,"caption":"Esparto log basket.","height":79});
															thumbnails[789862] = clik.newPhoto({"id":789862,"src":"Trevelezwinter1_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_789862.html","width":130,"caption":"Trevelez in winter","height":98});
															thumbnails[2523171] = clik.newPhoto({"id":2523171,"src":"patioarrayanes_thumb.jpg","galleries_id":161648,"server_id":1,"link":"photo_2523171.html","width":130,"caption":"Patio de Los Arrayanes La Alhambra","height":171});
															thumbnails[907913] = clik.newPhoto({"id":907913,"src":"smoking-chimney_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_907913.html","width":130,"caption":"Smoking chimneys of Trevelez","height":91});
															thumbnails[2523174] = clik.newPhoto({"id":2523174,"src":"semana-santa_thumb.jpg","galleries_id":161648,"server_id":1,"link":"photo_2523174.html","width":130,"caption":"Semana Santa","height":188});
															thumbnails[795358] = clik.newPhoto({"id":795358,"src":"StormoverSettle_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_795358.html","width":130,"caption":"Storm above the village of Settle.<br>\r\nWatercolour and pastel.","height":103});
															thumbnails[4413260] = clik.newPhoto({"id":4413260,"src":"linocapileiracrop_thumb.jpg","galleries_id":161648,"server_id":1,"link":"photo_4413260.html","width":130,"caption":"Reduction lino print of the village of Capileira and the peak of Veleta, Sierra Nevada, Spain","height":82});
															thumbnails[789893] = clik.newPhoto({"id":789893,"src":"laentrada_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_789893.html","width":130,"caption":"La Entrada","height":167});
															thumbnails[2854223] = clik.newPhoto({"id":2854223,"src":"milkthistle_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_2854223.html","width":130,"caption":"Milk Thistle, La Alpujarra.","height":94});
															thumbnails[2854225] = clik.newPhoto({"id":2854225,"src":"wildrose_thumb.jpg","galleries_id":60593,"server_id":1,"link":"photo_2854225.html","width":130,"caption":"Wild Rose, Trevelez, Sierra Nevada.","height":92});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[95457] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Pastels","link":"gallery_95457.html","maxRecords":0.0,"photoIDs":[1365540.0,4824209.0,1946934.0,1365557.0,2760350.0],"skipIndex":0,"section_code":"gallery","featured_images":1365540.0,"id":95457,"singleSection":false});				  						galleries[180231] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Acrylic and Collage","link":"gallery_180231.html","maxRecords":0.0,"photoIDs":[2928980.0,2909601.0,2929017.0,2929025.0],"skipIndex":0,"section_code":"gallery","featured_images":2928980.0,"id":180231,"singleSection":false});				  						galleries[61387] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Oils - Óleos","link":"gallery_61387.html","maxRecords":0.0,"photoIDs":[791669.0,791682.0,791688.0,791704.0,791711.0,2522862.0,2522874.0,6177670.0],"skipIndex":0,"section_code":"gallery","featured_images":"6177670,791669","id":61387,"singleSection":false});				  						galleries[60593] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Watercolours - Acuarelas","link":"gallery_60593.html","maxRecords":0.0,"photoIDs":[3063080.0,789889.0,2929052.0,2854122.0,6934250.0,789868.0,789881.0,907906.0,2854110.0,789890.0,789894.0,789884.0,789862.0,907913.0,795358.0,789893.0,2854223.0,2854225.0],"skipIndex":0,"section_code":"gallery","featured_images":"907906,789889","id":60593,"singleSection":false});				  						galleries[161648] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Original prints","link":"gallery_161648.html","maxRecords":0.0,"photoIDs":[4824257.0,4413248.0,2523095.0,2523097.0,2523125.0,3675260.0,2523136.0,2523144.0,2523159.0,2523166.0,2523171.0,2523174.0,4413260.0],"skipIndex":0,"section_code":"gallery","featured_images":"4413248,2523097","id":161648,"singleSection":false});				  						galleries[171769] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Illustrations ","link":"gallery_171769.html","maxRecords":0.0,"photoIDs":[2732778.0,2732785.0,2732796.0,2732814.0,2732816.0,2732893.0,2732899.0,2732883.0,2732873.0],"skipIndex":0,"section_code":"gallery","featured_images":"2732899,2732893,2732883,2732873,2732816,2732814,2732796,2732785,2732778","id":171769,"singleSection":false});				  						galleries[172413] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Portraits - Retratos","link":"gallery_172413.html","maxRecords":0.0,"photoIDs":[7325451.0,2744899.0,2745622.0],"skipIndex":0,"section_code":"gallery","featured_images":2744899.0,"id":172413,"singleSection":false});				  						galleries[326341] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Sketchbooks","link":"gallery_326341.html","maxRecords":0.0,"photoIDs":[5760740.0,5760718.0,5760693.0],"skipIndex":0,"section_code":"gallery","featured_images":"5760740,5760718,5760693","id":326341,"singleSection":false});				  						galleries[175299] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Cards","link":"gallery_175299.html","maxRecords":0.0,"photoIDs":[2803359.0,2803364.0],"skipIndex":0,"section_code":"gallery","featured_images":2803359.0,"id":175299,"singleSection":false});				  						galleries[175297] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Giclée Prints","link":"gallery_175297.html","maxRecords":0.0,"photoIDs":[2803393.0,2803398.0],"skipIndex":0,"section_code":"gallery","featured_images":2803398.0,"id":175297,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '4413248';
imageSets[2] = '6177670,791669,4413248,2928980,2803398,2803359,2744899,1365540,789889,2523097,907906';
imageSets[3] = '7325451,6934250,6177670,5760740,5760718,5760693,4824257,4824209,4557736,4413260,4413248,3675260,3063080,2929052,2929025,2929017,2928980,2909601,2854225,2854223,2854122,2854110,2803398,2803393,2803364,2803359,2760350,2745622,2744899,2732899,2732893,2732883,2732873,2732816,2732814,2732796,2732785,2732778,2523174,2523171,2523166,2523159,2523144,2523136,2523125,2523097,2523095,2522874,2522862,1946934';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/jenirab/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/jenirab/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/jenirab/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/jenirab/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/jenirab/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/jenirab/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/jenirab/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/jenirab/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 = 'jeni rabjohns painter printmaker illustrator: ' + 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;
	}
}

			

