window.thumbnails = {};
															thumbnails[1683228] = clik.newPhoto({"id":1683228,"src":"Meta_Logo_home_page-IBMBlue_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":74});
															thumbnails[6778392] = clik.newPhoto({"id":6778392,"src":"TradLogo-P300-Feb08_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Tradition Logo<a target=","height":28});
															thumbnails[6911592] = clik.newPhoto({"id":6911592,"src":"LoRes_Hall_500_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Long Exec Hall","height":104});
															thumbnails[6911593] = clik.newPhoto({"id":6911593,"src":"LoRes_LongPhoto-Hall_500_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Long Admin Hall","height":102});
															thumbnails[6911594] = clik.newPhoto({"id":6911594,"src":"LoRes_Meeting-Room1_500_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Meeting Room","height":95});
															thumbnails[6911595] = clik.newPhoto({"id":6911595,"src":"LoRes_RedChair_500_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Red Sitting Area","height":79});
															thumbnails[6911596] = clik.newPhoto({"id":6911596,"src":"LoRes_Tradition_500_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Tradition entrance","height":117});
															thumbnails[6911620] = clik.newPhoto({"id":6911620,"src":"LoRes_Atrium_Furn_500_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Atrium_Furn","height":92});
															thumbnails[6911621] = clik.newPhoto({"id":6911621,"src":"LoRes_ExecEntry_500_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Exec Entry","height":79});
															thumbnails[6911622] = clik.newPhoto({"id":6911622,"src":"LoRes_TradingFloor_500_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Trading Floor","height":72});
															thumbnails[6912440] = clik.newPhoto({"id":6912440,"src":"LoRes_IT-Area_500_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"IT Area","height":88});
															thumbnails[7537478] = clik.newPhoto({"id":7537478,"src":"GAF_Stand_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":127});
															thumbnails[7537590] = clik.newPhoto({"id":7537590,"src":"The_Wooden_Flute_Lincolnshire-Limestone_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":121});
															thumbnails[7537592] = clik.newPhoto({"id":7537592,"src":"Two_Heliotropes_FofD_Stone-glass_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":206});
															thumbnails[7537593] = clik.newPhoto({"id":7537593,"src":"Green_Man_1_FofD_Stone_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":159});
															thumbnails[7537594] = clik.newPhoto({"id":7537594,"src":"Pod_and_Leaf_Anacaster_Stone_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":185});
															thumbnails[7537596] = clik.newPhoto({"id":7537596,"src":"Magical_Hare_Forest_of_Dean_Stone_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":114});
															thumbnails[8380533] = clik.newPhoto({"id":8380533,"src":"Meta_Contemporary_PalaceAF_Web_thumb.jpg","galleries_id":"","server_id":35,"link":"#","width":130,"caption":"","height":187});
															thumbnails[7537499] = clik.newPhoto({"id":7537499,"src":"165_Black-Thorns_lo_res_thumb.jpg","galleries_id":408639,"server_id":1,"link":"photo_7537499.html","width":130,"caption":"","height":167});
															thumbnails[7537501] = clik.newPhoto({"id":7537501,"src":"166_Tidy-ThornsII_lo_res_thumb.jpg","galleries_id":408639,"server_id":1,"link":"photo_7537501.html","width":130,"caption":"","height":93});
															thumbnails[7537502] = clik.newPhoto({"id":7537502,"src":"Norway_Maple_lo_res_thumb.jpg","galleries_id":408639,"server_id":1,"link":"photo_7537502.html","width":130,"caption":"","height":333});
															thumbnails[7537504] = clik.newPhoto({"id":7537504,"src":"Acorn_Cups_lo_res_thumb.jpg","galleries_id":408639,"server_id":1,"link":"photo_7537504.html","width":130,"caption":"","height":179});
															thumbnails[8654094] = clik.newPhoto({"id":8654094,"src":"Dray_Walk_Lunch_Crowd_thumb.jpg","galleries_id":457012,"server_id":38,"link":"photo_8654094.html","width":130,"caption":"Dray Walk Lunch Crowd","height":126});
															thumbnails[8654420] = clik.newPhoto({"id":8654420,"src":"Dray_Walk_on_a__Rainy_Day_thumb.jpg","galleries_id":457012,"server_id":38,"link":"photo_8654420.html","width":130,"caption":"Draw Walk on a Rainy Day","height":129});
															thumbnails[8654424] = clik.newPhoto({"id":8654424,"src":"Hackney_Road_Rider_thumb.jpg","galleries_id":457012,"server_id":38,"link":"photo_8654424.html","width":130,"caption":"Hackney Road Rider","height":121});
															thumbnails[8654425] = clik.newPhoto({"id":8654425,"src":"Puma_Court_thumb.jpg","galleries_id":457012,"server_id":38,"link":"photo_8654425.html","width":130,"caption":"Puma Court","height":128});
															thumbnails[8654427] = clik.newPhoto({"id":8654427,"src":"Redchurch_Bethnal_Green_Rd_thumb.jpg","galleries_id":457012,"server_id":38,"link":"photo_8654427.html","width":130,"caption":"Redchurch Bethnal Green","height":131});
															thumbnails[8654428] = clik.newPhoto({"id":8654428,"src":"Roman_Road_thumb.jpg","galleries_id":457012,"server_id":38,"link":"photo_8654428.html","width":130,"caption":"Roman Road","height":126});
															thumbnails[8654430] = clik.newPhoto({"id":8654430,"src":"Shoreditch_High_Street_thumb.jpg","galleries_id":457012,"server_id":38,"link":"photo_8654430.html","width":130,"caption":"Shoreditch High Street","height":129});
															thumbnails[8654431] = clik.newPhoto({"id":8654431,"src":"Spitalfields_Lamb_and_Commercial_thumb.jpg","galleries_id":457012,"server_id":38,"link":"photo_8654431.html","width":130,"caption":"Spitalfields Lamb and Commercial","height":130});
															thumbnails[6879561] = clik.newPhoto({"id":6879561,"src":"Lo_Long-ago-long-ago-on-t_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6879561.html","width":130,"caption":"<b><q>Long ago, long ago, on the waves built a city<\/q><\/b><p>","height":130});
															thumbnails[7537622] = clik.newPhoto({"id":7537622,"src":"La_Dolce_Vita-1-400_thumb.jpg","galleries_id":408644,"server_id":1,"link":"photo_7537622.html","width":130,"caption":"La Dolce Vita","height":130});
															thumbnails[8654479] = clik.newPhoto({"id":8654479,"src":"Barnes_to_Hong_Kong_thumb.jpg","galleries_id":407113,"server_id":38,"link":"photo_8654479.html","width":130,"caption":"Barnes to Hong Kong","height":197});
															thumbnails[6879565] = clik.newPhoto({"id":6879565,"src":"Lo_The-sylphs-and-ondine-_o_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6879565.html","width":130,"caption":"<b>The sylphs and ondines of Venice No 1<\/b>","height":130});
															thumbnails[6879567] = clik.newPhoto({"id":6879567,"src":"Lo_The-sylphs-and-ondines-o_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6879567.html","width":130,"caption":"<b>The sylphs and ondines of Venice No 2<\/b>","height":130});
															thumbnails[6879569] = clik.newPhoto({"id":6879569,"src":"LoA-thousand-years-their-cl_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6879569.html","width":130,"caption":"<b><q>A thousand years their cloudy wings expand<\/q><\/b>","height":161});
															thumbnails[7537623] = clik.newPhoto({"id":7537623,"src":"If_You_Know_TM_thumb.jpg","galleries_id":408644,"server_id":1,"link":"photo_7537623.html","width":130,"caption":"If You Know...","height":131});
															thumbnails[7545246] = clik.newPhoto({"id":7545246,"src":"The_Next_Level_thumb.jpg","galleries_id":407113,"server_id":38,"link":"photo_7545246.html","width":130,"caption":"The Next Level","height":193});
															thumbnails[6879552] = clik.newPhoto({"id":6879552,"src":"Lo_And-music-meets-not-alwa_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6879552.html","width":130,"caption":"<b><q>And music meets not always now the ear<\/q><\/b>","height":104});
															thumbnails[6879560] = clik.newPhoto({"id":6879560,"src":"Lo_Lifting-thy-golden-filam_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6879560.html","width":130,"caption":"<b><q>Lifting thy golden filaments and seeds<\/q><\/b>","height":130});
															thumbnails[6879555] = clik.newPhoto({"id":6879555,"src":"Lo_And-with-a-fresher-growt_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6879555.html","width":130,"caption":"<b><q>And with a fresher growth replenishing the void<\/q><\/b>","height":131});
															thumbnails[6879557] = clik.newPhoto({"id":6879557,"src":"Lo_Had-stampd-her-image-in_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6879557.html","width":130,"caption":"<b><q>Had stamp'd her image in me<\/q><\/b>","height":103});
															thumbnails[1683670] = clik.newPhoto({"id":1683670,"src":"Night Tides 100x100_thumb.jpg","galleries_id":111888,"server_id":1,"link":"photo_1683670.html","width":130,"caption":"<b>Night Tides<\/b>","height":130});
															thumbnails[6879568] = clik.newPhoto({"id":6879568,"src":"Lo_White-swan-of-cities-sl_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6879568.html","width":130,"caption":"<b><q>White swans of cities, slumbering in thy nest<\/q><\/b>","height":132});
															thumbnails[7508310] = clik.newPhoto({"id":7508310,"src":"Dont_Look_Down_thumb.jpg","galleries_id":407113,"server_id":38,"link":"photo_7508310.html","width":130,"caption":"Don't Look Down","height":173});
															thumbnails[7537625] = clik.newPhoto({"id":7537625,"src":"Tuscan_Studio_TM_thumb.jpg","galleries_id":408644,"server_id":1,"link":"photo_7537625.html","width":130,"caption":"Tuscan Studio","height":130});
															thumbnails[6790383] = clik.newPhoto({"id":6790383,"src":"Blackgang_Beyond_thumb.jpg","galleries_id":111888,"server_id":1,"link":"photo_6790383.html","width":130,"caption":"<b>Blackgang, Beyond<\/b>","height":103});
															thumbnails[6790390] = clik.newPhoto({"id":6790390,"src":"Spurn_Head_thumb.jpg","galleries_id":111888,"server_id":1,"link":"photo_6790390.html","width":130,"caption":"<b>Spurn Head<\/b>","height":107});
															thumbnails[6879562] = clik.newPhoto({"id":6879562,"src":"Lo_Rising-like-water-column_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6879562.html","width":130,"caption":"<b><q>Rising like water-columns from the sea<\/q><\/b>","height":131});
															thumbnails[6879564] = clik.newPhoto({"id":6879564,"src":"Lo_So-wonderfully-built-amo_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6879564.html","width":130,"caption":"<b><q>So wonderfully built among the reeds<\/q><\/b>","height":130});
															thumbnails[6790396] = clik.newPhoto({"id":6790396,"src":"SplashPort_thumb.jpg","galleries_id":111888,"server_id":1,"link":"photo_6790396.html","width":130,"caption":"<b>Splash, Port<\/b>","height":162});
															thumbnails[6879558] = clik.newPhoto({"id":6879558,"src":"Lo_Her-palaces-are-crumblin_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6879558.html","width":130,"caption":"<b><q>Her palaces are crumbling to the shore<\/q><\/b>","height":130});
															thumbnails[6790382] = clik.newPhoto({"id":6790382,"src":"He_said_oceans_where_rising_thumb.jpg","galleries_id":111888,"server_id":1,"link":"photo_6790382.html","width":130,"caption":"<b>He Said the Oceans are Rising<\/b>","height":130});
															thumbnails[6790394] = clik.newPhoto({"id":6790394,"src":"Oh_What_A_World_thumb.jpg","galleries_id":111888,"server_id":1,"link":"photo_6790394.html","width":130,"caption":"<b>Oh What a World<\/b>","height":153});
															thumbnails[6790387] = clik.newPhoto({"id":6790387,"src":"WhereIspent_thumb.jpg","galleries_id":111888,"server_id":1,"link":"photo_6790387.html","width":130,"caption":"<b>Where I Spend the Vast Majority of My Time<\/b>","height":157});
															thumbnails[7508424] = clik.newPhoto({"id":7508424,"src":"Motorways_of_Eternity_oil_on_canvas_76cmx100cm_thumb.jpg","galleries_id":407113,"server_id":1,"link":"photo_7508424.html","width":130,"caption":"Motorways of Eternity","height":173});
															thumbnails[7537629] = clik.newPhoto({"id":7537629,"src":"Teatime_Midwinter_thumb.jpg","galleries_id":408644,"server_id":1,"link":"photo_7537629.html","width":130,"caption":"Teatime - Midwinter","height":130});
															thumbnails[6879554] = clik.newPhoto({"id":6879554,"src":"Lo_And-silent-rows-the-song_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6879554.html","width":130,"caption":"<b><q>And silent rows the songless gondolier<\/q><\/b>","height":163});
															thumbnails[1691241] = clik.newPhoto({"id":1691241,"src":"Apocalypto_07-11-07_lo_res_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_1691241.html","width":130,"caption":"<b>Untainted Peace<\/b>","height":130});
															thumbnails[1691242] = clik.newPhoto({"id":1691242,"src":"Apocalypto_11-06-07_lo_res_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_1691242.html","width":130,"caption":"<b>Our Lands were Salvaged<\/b>","height":130});
															thumbnails[1691243] = clik.newPhoto({"id":1691243,"src":"Apocalypto_23-06-07_lo_res_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_1691243.html","width":130,"caption":"<b>To Seek a New Beginning<\/b>","height":165});
															thumbnails[7508427] = clik.newPhoto({"id":7508427,"src":"Where_Shall_We_Go_Today_thumb.jpg","galleries_id":407113,"server_id":38,"link":"photo_7508427.html","width":130,"caption":"Where shall we go today?","height":87});
															thumbnails[7537630] = clik.newPhoto({"id":7537630,"src":"Red_Room_5_thumb.jpg","galleries_id":408644,"server_id":1,"link":"photo_7537630.html","width":130,"caption":"In the Red Room","height":130});
															thumbnails[7508428] = clik.newPhoto({"id":7508428,"src":"The_Smiling_Cobra_thumb.jpg","galleries_id":407113,"server_id":38,"link":"photo_7508428.html","width":130,"caption":"The Smiling Cobra","height":87});
															thumbnails[7537632] = clik.newPhoto({"id":7537632,"src":"DSCN9486_thumb.jpg","galleries_id":408644,"server_id":1,"link":"photo_7537632.html","width":130,"caption":"Sushi for Tea","height":130});
															thumbnails[6795824] = clik.newPhoto({"id":6795824,"src":"On-the-Flank-of-an-Emerald-_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6795824.html","width":130,"caption":"<b>On the Flank of an Emerald Wave II<\/b>","height":175});
															thumbnails[6879974] = clik.newPhoto({"id":6879974,"src":"Lo_To-Rise-Up-into-Life-Aga_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6879974.html","width":130,"caption":"<b>To Rise up into Life Again II<\/b>","height":132});
															thumbnails[6795828] = clik.newPhoto({"id":6795828,"src":"To_Rise_Up_Again_into_Life_II_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6795828.html","width":130,"caption":"<b>To Rise Up Again into Life III<\/b>","height":130});
															thumbnails[6795829] = clik.newPhoto({"id":6795829,"src":"The_Flame_Mounts_Again_II_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6795829.html","width":130,"caption":"<b>The Flame Mounts Again II<\/b>","height":104});
															thumbnails[8654459] = clik.newPhoto({"id":8654459,"src":"The_Sense_of_Foreboding_thumb.jpg","galleries_id":407113,"server_id":38,"link":"photo_8654459.html","width":130,"caption":"The Sense of Foreboding","height":90});
															thumbnails[6795567] = clik.newPhoto({"id":6795567,"src":"Cybernetics_V_29-10-061_thumb.jpg","galleries_id":111881,"server_id":1,"link":"photo_6795567.html","width":130,"caption":"<b>Cybernetics V<\/b>","height":93});
															thumbnails[7545239] = clik.newPhoto({"id":7545239,"src":"Chicago_Gone_Haywire_thumb.jpg","galleries_id":407113,"server_id":38,"link":"photo_7545239.html","width":130,"caption":"Chicago Gone Haywire","height":82});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[111881] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Beecher","link":"gallery_111881.html","maxRecords":0.0,"photoIDs":[6879561.0,6879565.0,6879567.0,6879569.0,6879552.0,6879560.0,6879555.0,6879557.0,6879568.0,6879562.0,6879564.0,6879558.0,6879554.0,1691241.0,1691242.0,1691243.0,6795824.0,6879974.0,6795828.0,6795829.0,6795567.0],"skipIndex":0,"section_code":"gallery","featured_images":6879565.0,"id":111881,"singleSection":false});				  						galleries[408644] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Bella Green","link":"gallery_408644.html","maxRecords":0.0,"photoIDs":[7537622.0,7537623.0,7537625.0,7537629.0,7537630.0,7537632.0],"skipIndex":0,"section_code":"gallery","featured_images":7537622.0,"id":408644,"singleSection":false});				  						galleries[408639] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Max Suffield","link":"gallery_408639.html","maxRecords":0.0,"photoIDs":[7537499.0,7537501.0,7537502.0,7537504.0],"skipIndex":0,"section_code":"gallery","featured_images":7537499.0,"id":408639,"singleSection":false});				  						galleries[407113] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Lindsay Pickett","link":"gallery_407113.html","maxRecords":0.0,"photoIDs":[8654479.0,7545246.0,7508310.0,7508424.0,7508427.0,7508428.0,8654459.0,7545239.0],"skipIndex":0,"section_code":"gallery","featured_images":8654479.0,"id":407113,"singleSection":false});				  						galleries[457012] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Ohla Pryymak","link":"gallery_457012.html","maxRecords":0.0,"photoIDs":[8654094.0,8654420.0,8654424.0,8654425.0,8654427.0,8654428.0,8654430.0,8654431.0],"skipIndex":0,"section_code":"gallery","featured_images":8654094.0,"id":457012,"singleSection":false});				  						galleries[111888] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Tina Mammoser","link":"gallery_111888.html","maxRecords":0.0,"photoIDs":[1683670.0,6790383.0,6790390.0,6790396.0,6790382.0,6790394.0,6790387.0],"skipIndex":0,"section_code":"gallery","featured_images":1683670.0,"id":111888,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '1683228';
imageSets[2] = '8654094,7537592,7537499,8654479,7537622,6879565,1683670';
imageSets[3] = '6790394,6790387';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'www.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/gallerygroupsite/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/gallerygroupsite/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 = ': ' + 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>Purchase this Piece Now</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		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">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="GALLERYGROUPSITE">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

