window.thumbnails = {};
															thumbnails[7270684] = clik.newPhoto({"id":7270684,"src":"Girosculpt_thumb.gif","galleries_id":391380,"server_id":32,"link":"photo_7270684.html","width":130,"caption":"Girosculpt","height":130});
															thumbnails[7241559] = clik.newPhoto({"id":7241559,"src":"IMG_0796_thumb.JPG","galleries_id":391380,"server_id":32,"link":"photo_7241559.html","width":130,"caption":" The Tube ","height":98});
															thumbnails[6954685] = clik.newPhoto({"id":6954685,"src":"back-in-time_thumb.gif","galleries_id":391380,"server_id":32,"link":"photo_6954685.html","width":130,"caption":"Back in Time","height":130});
															thumbnails[6954743] = clik.newPhoto({"id":6954743,"src":"Judaria-Seville_thumb.gif","galleries_id":391380,"server_id":32,"link":"photo_6954743.html","width":130,"caption":"Judaria","height":132});
															thumbnails[6954594] = clik.newPhoto({"id":6954594,"src":"Barra-Santa-Cruz---Seville_thumb.gif","galleries_id":391380,"server_id":32,"link":"photo_6954594.html","width":130,"caption":"Barra Santa Cruz","height":130});
															thumbnails[6954760] = clik.newPhoto({"id":6954760,"src":"Plaza-de-Espania---Seville_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6954760.html","width":130,"caption":"Plaza de Espania","height":130});
															thumbnails[6954854] = clik.newPhoto({"id":6954854,"src":"Riverside-abstract_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_6954854.html","width":130,"caption":"Riverside abstract","height":95});
															thumbnails[6954585] = clik.newPhoto({"id":6954585,"src":"Abandoned-Pool_thumb.gif","galleries_id":391380,"server_id":32,"link":"photo_6954585.html","width":130,"caption":" Pond","height":130});
															thumbnails[6954715] = clik.newPhoto({"id":6954715,"src":"fallen1_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6954715.html","width":130,"caption":"Fallen","height":95});
															thumbnails[6954741] = clik.newPhoto({"id":6954741,"src":"Grapes_thumb.gif","galleries_id":391380,"server_id":32,"link":"photo_6954741.html","width":130,"caption":"Grapes","height":130});
															thumbnails[6954751] = clik.newPhoto({"id":6954751,"src":"pillars_thumb.gif","galleries_id":391380,"server_id":32,"link":"photo_6954751.html","width":130,"caption":"Pillars of Time","height":130});
															thumbnails[6954772] = clik.newPhoto({"id":6954772,"src":"pool_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6954772.html","width":130,"caption":"Pool of Tranquility","height":98});
															thumbnails[7241553] = clik.newPhoto({"id":7241553,"src":"IMG_0250_thumb.JPG","galleries_id":391380,"server_id":32,"link":"photo_7241553.html","width":130,"caption":"Cathedral","height":130});
															thumbnails[6954606] = clik.newPhoto({"id":6954606,"src":"feel-the-glow_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6954606.html","width":130,"caption":"Feel the glow","height":130});
															thumbnails[6954700] = clik.newPhoto({"id":6954700,"src":"cathedral-reflection1_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6954700.html","width":130,"caption":"After the rain...","height":142});
															thumbnails[6954725] = clik.newPhoto({"id":6954725,"src":"Fountain---Seville_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6954725.html","width":130,"caption":"Fountain","height":114});
															thumbnails[6806303] = clik.newPhoto({"id":6806303,"src":"B-for-Bristol-gif_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6806303.html","width":130,"caption":"\"B\" for Bristol","height":173});
															thumbnails[6498779] = clik.newPhoto({"id":6498779,"src":"Reflections_at_Purton_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6498779.html","width":130,"caption":"Reflections at Purton","height":113});
															thumbnails[6316317] = clik.newPhoto({"id":6316317,"src":"Cherry-wine_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6316317.html","width":130,"caption":"Cherry Wine","height":130});
															thumbnails[6316343] = clik.newPhoto({"id":6316343,"src":"in-the-round_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6316343.html","width":130,"caption":"In the Round","height":98});
															thumbnails[6316144] = clik.newPhoto({"id":6316144,"src":"They-came-by-day_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6316144.html","width":130,"caption":"They Came By day","height":98});
															thumbnails[6316215] = clik.newPhoto({"id":6316215,"src":"Surprise-attack_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6316215.html","width":130,"caption":"Surprise Attack!","height":113});
															thumbnails[6316234] = clik.newPhoto({"id":6316234,"src":"Reaching-high_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6316234.html","width":130,"caption":"Reaching High","height":98});
															thumbnails[6316282] = clik.newPhoto({"id":6316282,"src":"Dragonfly_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6316282.html","width":130,"caption":"DragonFly","height":144});
															thumbnails[6316306] = clik.newPhoto({"id":6316306,"src":"Peacock-Harvest-10x10_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_6316306.html","width":130,"caption":"Peacock Crop","height":130});
															thumbnails[7241558] = clik.newPhoto({"id":7241558,"src":"IMG_0210_thumb.JPG","galleries_id":391380,"server_id":32,"link":"photo_7241558.html","width":130,"caption":"Walkway","height":130});
															thumbnails[7241560] = clik.newPhoto({"id":7241560,"src":"IMG_0788_thumb.JPG","galleries_id":391380,"server_id":32,"link":"photo_7241560.html","width":130,"caption":"waiting for the train","height":130});
															thumbnails[7241561] = clik.newPhoto({"id":7241561,"src":"IMG_0717_thumb.JPG","galleries_id":391380,"server_id":32,"link":"photo_7241561.html","width":130,"caption":"Inception","height":173});
															thumbnails[3883306] = clik.newPhoto({"id":3883306,"src":"Brandon_Hill_clikpic_thumb.jpg","galleries_id":236136,"server_id":32,"link":"photo_3883306.html","width":130,"caption":"Brandon Hill","height":93});
															thumbnails[2385291] = clik.newPhoto({"id":2385291,"src":"poseidon_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2385291.html","width":130,"caption":"Poseidon","height":173});
															thumbnails[2385244] = clik.newPhoto({"id":2385244,"src":"enchanted-woods_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2385244.html","width":130,"caption":"Enchanted woods","height":173});
															thumbnails[3888791] = clik.newPhoto({"id":3888791,"src":"island_in_the_sky_clikpic_thumb.jpg","galleries_id":236136,"server_id":32,"link":"photo_3888791.html","width":130,"caption":"Island in the sky","height":94});
															thumbnails[2371908] = clik.newPhoto({"id":2371908,"src":"Show-me-the-way_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2371908.html","width":130,"caption":"Show me the way<br>\r\n<br>\r\n<br>\r\n","height":97});
															thumbnails[3888801] = clik.newPhoto({"id":3888801,"src":"nicole__clikpic_thumb.jpg","galleries_id":236136,"server_id":32,"link":"photo_3888801.html","width":130,"caption":"silhouette<br>\r\n<br>\r\n<br>\r\n","height":134});
															thumbnails[2357753] = clik.newPhoto({"id":2357753,"src":"siamese-cat_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2357753.html","width":130,"caption":"Siamese Cat","height":174});
															thumbnails[3888508] = clik.newPhoto({"id":3888508,"src":"bus_clikpic_thumb.jpg","galleries_id":236136,"server_id":32,"link":"photo_3888508.html","width":130,"caption":"City Reflections<br>\r\n<br>\r\n","height":78});
															thumbnails[2385419] = clik.newPhoto({"id":2385419,"src":"The-cat-is-back_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2385419.html","width":130,"caption":"The Cat is Back<br>\r\n<br>\r\n<br>\r\n","height":182});
															thumbnails[3888824] = clik.newPhoto({"id":3888824,"src":"reflections_clikpic_thumb.jpg","galleries_id":236136,"server_id":32,"link":"photo_3888824.html","width":130,"caption":"reflections of the past","height":216});
															thumbnails[2371842] = clik.newPhoto({"id":2371842,"src":"concorde_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2371842.html","width":130,"caption":"Concorde","height":96});
															thumbnails[3888886] = clik.newPhoto({"id":3888886,"src":"spearhead_clikpic_thumb.jpg","galleries_id":236136,"server_id":32,"link":"photo_3888886.html","width":130,"caption":"Spearhead<br>\r\n<br>\r\n<br>\r\n","height":87});
															thumbnails[2371900] = clik.newPhoto({"id":2371900,"src":"peephole_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2371900.html","width":130,"caption":"Through the Peephole<br>\r\n<br>\r\n<br>\r\n","height":212});
															thumbnails[3888941] = clik.newPhoto({"id":3888941,"src":"starburst_clikpic_thumb.jpg","galleries_id":236136,"server_id":32,"link":"photo_3888941.html","width":130,"caption":"Starburst<br>\r\n<br>\r\n<br>\r\n","height":74});
															thumbnails[2385227] = clik.newPhoto({"id":2385227,"src":"dancing-girl_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2385227.html","width":130,"caption":"Dancing Girl<br>\r\n<br>\r\n","height":163});
															thumbnails[3888975] = clik.newPhoto({"id":3888975,"src":"eagle_clikpic_thumb.jpg","galleries_id":236136,"server_id":32,"link":"photo_3888975.html","width":130,"caption":"Eagle<br>\r\n<br>\r\n<br>\r\n","height":87});
															thumbnails[2385260] = clik.newPhoto({"id":2385260,"src":"mosaic_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2385260.html","width":130,"caption":"Mosaic<br>\r\n<br>\r\n<br>\r\n","height":175});
															thumbnails[3888795] = clik.newPhoto({"id":3888795,"src":"lakeland_wall_clikpic_thumb.jpg","galleries_id":236136,"server_id":32,"link":"photo_3888795.html","width":130,"caption":"Lakeland Wall<br>\r\n<br>\r\n<br>\r\n","height":86});
															thumbnails[2371785] = clik.newPhoto({"id":2371785,"src":"Okapi_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2371785.html","width":130,"caption":"Okapi","height":260});
															thumbnails[3888950] = clik.newPhoto({"id":3888950,"src":"ice_apple__clickpic_thumb.jpg","galleries_id":236136,"server_id":32,"link":"photo_3888950.html","width":130,"caption":"Ice Apples<br>\r\n<br>\r\n<br>\r\n","height":93});
															thumbnails[2371892] = clik.newPhoto({"id":2371892,"src":"reflections_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2371892.html","width":130,"caption":"Reflections","height":175});
															thumbnails[3888946] = clik.newPhoto({"id":3888946,"src":"frozen_apples_clikpic_thumb.jpg","galleries_id":236136,"server_id":32,"link":"photo_3888946.html","width":130,"caption":"Frozen Apples<br>\r\n<br>\r\n","height":130});
															thumbnails[2371911] = clik.newPhoto({"id":2371911,"src":"The-Chariot-Race_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2371911.html","width":130,"caption":"The Chariot Race","height":97});
															thumbnails[2371715] = clik.newPhoto({"id":2371715,"src":"Faultline_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2371715.html","width":130,"caption":"Faultline","height":173});
															thumbnails[4873178] = clik.newPhoto({"id":4873178,"src":"frozen-limes_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_4873178.html","width":130,"caption":"Frozen Limes<br>\r\n","height":94});
															thumbnails[2371958] = clik.newPhoto({"id":2371958,"src":"urban-decay-2_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2371958.html","width":130,"caption":"Urban Decay","height":97});
															thumbnails[4873138] = clik.newPhoto({"id":4873138,"src":"carnival-1_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_4873138.html","width":130,"caption":"Carnival 1","height":130});
															thumbnails[2371822] = clik.newPhoto({"id":2371822,"src":"Heart_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2371822.html","width":130,"caption":"Heart","height":98});
															thumbnails[4873142] = clik.newPhoto({"id":4873142,"src":"carnival-2_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_4873142.html","width":130,"caption":"Carnival 2","height":130});
															thumbnails[2356763] = clik.newPhoto({"id":2356763,"src":"cave-art_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2356763.html","width":130,"caption":"Cave Art","height":173});
															thumbnails[4873143] = clik.newPhoto({"id":4873143,"src":"carnival-3_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_4873143.html","width":130,"caption":"Carnival 3","height":130});
															thumbnails[2356756] = clik.newPhoto({"id":2356756,"src":"Amphora_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2356756.html","width":130,"caption":"Amphora","height":110});
															thumbnails[4873148] = clik.newPhoto({"id":4873148,"src":"relentless-reflection_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_4873148.html","width":130,"caption":"Relentless Reflection<br>\r\n","height":115});
															thumbnails[2371910] = clik.newPhoto({"id":2371910,"src":"tattoo-man_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2371910.html","width":130,"caption":"Tattoo Man","height":97});
															thumbnails[4873149] = clik.newPhoto({"id":4873149,"src":"British-Summertime_thumb.gif","galleries_id":236136,"server_id":32,"link":"photo_4873149.html","width":130,"caption":"British Summertime","height":108});
															thumbnails[2371757] = clik.newPhoto({"id":2371757,"src":"moth_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2371757.html","width":130,"caption":"Moth","height":97});
															thumbnails[3889082] = clik.newPhoto({"id":3889082,"src":"Dont_Jump__clikpic_thumb.jpg","galleries_id":236136,"server_id":32,"link":"photo_3889082.html","width":130,"caption":"Don't Jump!<br>\r\n<br>\r\n<br>\r\n","height":130});
															thumbnails[2371726] = clik.newPhoto({"id":2371726,"src":"Jack-Frost_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2371726.html","width":130,"caption":"Jack Frost","height":96});
															thumbnails[2357750] = clik.newPhoto({"id":2357750,"src":"Cobwebs_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2357750.html","width":130,"caption":"Cobwebs","height":94});
															thumbnails[3889397] = clik.newPhoto({"id":3889397,"src":"windowsill_clikpic_thumb.jpg","galleries_id":236150,"server_id":32,"link":"photo_3889397.html","width":130,"caption":"sunset in the desert","height":309});
															thumbnails[2357746] = clik.newPhoto({"id":2357746,"src":"Autumn-Leaves_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2357746.html","width":130,"caption":"Autumn Leaves","height":97});
															thumbnails[3889273] = clik.newPhoto({"id":3889273,"src":"vintage_wine_clikpic_thumb.jpg","galleries_id":236150,"server_id":32,"link":"photo_3889273.html","width":130,"caption":"vintage wine","height":173});
															thumbnails[3889408] = clik.newPhoto({"id":3889408,"src":"clikpic_crushed_velvet_thumb.jpg","galleries_id":236150,"server_id":32,"link":"photo_3889408.html","width":130,"caption":"crushed velvet","height":156});
															thumbnails[3889209] = clik.newPhoto({"id":3889209,"src":"scrap_metal_clikpic_thumb.jpg","galleries_id":236150,"server_id":32,"link":"photo_3889209.html","width":130,"caption":"scrap metal","height":74});
															thumbnails[3889253] = clik.newPhoto({"id":3889253,"src":"sea_plough_clikpic_thumb.jpg","galleries_id":236150,"server_id":32,"link":"photo_3889253.html","width":130,"caption":"Sea Plough","height":122});
															thumbnails[4873144] = clik.newPhoto({"id":4873144,"src":"light_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_4873144.html","width":130,"caption":"Fireworks","height":130});
															thumbnails[4873147] = clik.newPhoto({"id":4873147,"src":"startled-deer_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_4873147.html","width":130,"caption":"Startled Deer","height":156});
															thumbnails[2371906] = clik.newPhoto({"id":2371906,"src":"roadside-poppys_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2371906.html","width":130,"caption":"Roadside Poppies<br>\r\n<br>\r\n","height":137});
															thumbnails[3889119] = clik.newPhoto({"id":3889119,"src":"Clikpic_circle_of_life_2_thumb.jpg","galleries_id":236150,"server_id":32,"link":"photo_3889119.html","width":130,"caption":"circle of life 2<br>\r\n<br>\r\n<br>\r\n","height":130});
															thumbnails[2385317] = clik.newPhoto({"id":2385317,"src":"sunset-in-the-woods_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2385317.html","width":130,"caption":"Sunset in the woods<br>\r\n<br>\r\n<br>\r\n","height":130});
															thumbnails[3889114] = clik.newPhoto({"id":3889114,"src":"circle_of_life_clickpic_thumb.jpg","galleries_id":236150,"server_id":32,"link":"photo_3889114.html","width":130,"caption":"Circle of Life<br>\r\n<br>\r\n<br>\r\n","height":130});
															thumbnails[2371709] = clik.newPhoto({"id":2371709,"src":"Bolts-n-boltholes_thumb.gif","galleries_id":236150,"server_id":32,"link":"photo_2371709.html","width":130,"caption":"Bolts and Boltholes","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[391380] = clik.newGallery({"parentGallery":"","usePopups":false,"title":" iphone-art","link":"gallery_391380.html","maxRecords":0.0,"photoIDs":[7270684.0,7241559.0,6954685.0,6954743.0,6954594.0,6954585.0,6954741.0,6954751.0,7241553.0,7241558.0,7241560.0,7241561.0],"skipIndex":0,"section_code":"gallery","featured_images":"7270684,7241561,7241560,7241559,7241558,7241553,6954751,6954743,6954741,6954685","id":391380,"singleSection":false});				  						galleries[236136] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"An Unconventional View","link":"gallery_236136.html","maxRecords":0.0,"photoIDs":[6954760.0,6954715.0,6954772.0,6954606.0,6954700.0,6954725.0,6806303.0,6498779.0,6316317.0,6316343.0,6316144.0,6316215.0,6316234.0,6316282.0,6316306.0,3883306.0,3888791.0,3888801.0,3888508.0,3888824.0,3888886.0,3888941.0,3888975.0,3888795.0,3888950.0,3888946.0,4873178.0,4873138.0,4873142.0,4873143.0,4873148.0,4873149.0,3889082.0],"skipIndex":0,"section_code":"gallery","featured_images":3883306.0,"id":236136,"singleSection":false});				  						galleries[236150] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Urban Fragments","link":"gallery_236150.html","maxRecords":0.0,"photoIDs":[6954854.0,2385291.0,2385244.0,2371908.0,2357753.0,2385419.0,2371842.0,2371900.0,2385227.0,2385260.0,2371785.0,2371892.0,2371911.0,2371715.0,2371958.0,2371822.0,2356763.0,2356756.0,2371910.0,2371757.0,2371726.0,2357750.0,3889397.0,2357746.0,3889273.0,3889408.0,3889209.0,3889253.0,4873144.0,4873147.0,2371906.0,3889119.0,2385317.0,3889114.0,2371709.0],"skipIndex":0,"section_code":"gallery","featured_images":"2385227,2371910","id":236150,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6316343';
imageSets[2] = '3883306,2385227,2371910';
imageSets[3] = '6316343,6316317,3883306,2357753,2371785,2371715,2371822,2356763,2356756,2371757,2371726,2357750';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Urbanincidental/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Urbanincidental/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 = 'JADE FRENCH: ' + 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>';
	}
				
	temp += this.fnGetPaymentInfo();
				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>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (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 += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="jadefrnch@yahoo.co.uk">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="jadefrnch@yahoo.co.uk">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						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;
	}
}

			

