window.thumbnails = {};
															thumbnails[3540563] = clik.newPhoto({"id":3540563,"src":"janelewis_fragments_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"FRAGMENTS OF THE SENSES","height":92});
															thumbnails[5404127] = clik.newPhoto({"id":5404127,"src":"janelewis_theageofjazz_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":171});
															thumbnails[5404128] = clik.newPhoto({"id":5404128,"src":"janelewis_birdkeeper_2_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":199});
															thumbnails[7831241] = clik.newPhoto({"id":7831241,"src":"janelewis_janus_detail1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"JANUS detail","height":133});
															thumbnails[7857973] = clik.newPhoto({"id":7857973,"src":"Logo_web1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"LOGO","height":88});
															thumbnails[8403030] = clik.newPhoto({"id":8403030,"src":"janelewis_greenman_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":103});
															thumbnails[3510987] = clik.newPhoto({"id":3510987,"src":"janelewis_singular_vision_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"A SINGULAR VISION","height":184});
															thumbnails[1853133] = clik.newPhoto({"id":1853133,"src":"janelewis_postcard_set_thumb.jpg","galleries_id":123897,"server_id":15,"link":"photo_1853133.html","width":130,"caption":"POSTCARD COLLECTION","height":192});
															thumbnails[1843682] = clik.newPhoto({"id":1843682,"src":"janelewis_biting_my_tongue_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843682.html","width":130,"caption":"BITING MY TONGUE","height":187});
															thumbnails[1843900] = clik.newPhoto({"id":1843900,"src":"janelewis_menagerie_thumb.jpg","galleries_id":123897,"server_id":15,"link":"photo_1843900.html","width":130,"caption":"MENAGERIE","height":88});
															thumbnails[1843694] = clik.newPhoto({"id":1843694,"src":"janelewis_appetites_of_love_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843694.html","width":130,"caption":"APPETITES OF LOVE","height":186});
															thumbnails[1843898] = clik.newPhoto({"id":1843898,"src":"janelewis_missgarnetsangel_thumb.jpg","galleries_id":123897,"server_id":15,"link":"photo_1843898.html","width":130,"caption":"MISS GARNET'S ANGEL","height":173});
															thumbnails[1843696] = clik.newPhoto({"id":1843696,"src":"janelewis_alice_in_wormland_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843696.html","width":130,"caption":"ALICE IN WORMLAND","height":190});
															thumbnails[1843953] = clik.newPhoto({"id":1843953,"src":"janelewis_william_thumb.jpg","galleries_id":123897,"server_id":15,"link":"photo_1843953.html","width":130,"caption":"WILLIAM","height":92});
															thumbnails[1843702] = clik.newPhoto({"id":1843702,"src":"janelewis_bloodaxe_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843702.html","width":130,"caption":"ANGEL","height":183});
															thumbnails[1843929] = clik.newPhoto({"id":1843929,"src":"janelewis_cat_chimera_thumb.jpg","galleries_id":123897,"server_id":15,"link":"photo_1843929.html","width":130,"caption":"CAT CHIMERA","height":84});
															thumbnails[1843708] = clik.newPhoto({"id":1843708,"src":"janelewis_book_of_cats_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843708.html","width":130,"caption":"THE BOOK OF CATS","height":174});
															thumbnails[1843957] = clik.newPhoto({"id":1843957,"src":"janelewis_a_likeness_in_stone_thumb.jpg","galleries_id":123897,"server_id":15,"link":"photo_1843957.html","width":130,"caption":"A LIKENESS IN STONE","height":184});
															thumbnails[1843712] = clik.newPhoto({"id":1843712,"src":"janelewis_bradford_count_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843712.html","width":130,"caption":"THE BRADFORD COUNT","height":192});
															thumbnails[1843895] = clik.newPhoto({"id":1843895,"src":"janelewis_temptation_thumb.jpg","galleries_id":123897,"server_id":15,"link":"photo_1843895.html","width":130,"caption":"TEMPTATION","height":98});
															thumbnails[1843788] = clik.newPhoto({"id":1843788,"src":"janelewis_english_earthquake_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843788.html","width":130,"caption":"THE ENGLISH EARTHQUAKE","height":191});
															thumbnails[1843912] = clik.newPhoto({"id":1843912,"src":"janelewis_tobias_in_venice_thumb.jpg","galleries_id":123897,"server_id":15,"link":"photo_1843912.html","width":130,"caption":"TOBIAS IN VENICE","height":183});
															thumbnails[1843781] = clik.newPhoto({"id":1843781,"src":"janelewis_breathing_spaces_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843781.html","width":130,"caption":"BREATHING SPACES","height":188});
															thumbnails[1843916] = clik.newPhoto({"id":1843916,"src":"janelewis_angel_at_the_window_thumb.jpg","galleries_id":123897,"server_id":15,"link":"photo_1843916.html","width":130,"caption":"ANGEL AT THE WINDOW","height":186});
															thumbnails[1843796] = clik.newPhoto({"id":1843796,"src":"janelewis_double_crossing_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843796.html","width":130,"caption":"DOUBLE CROSSING","height":187});
															thumbnails[1843920] = clik.newPhoto({"id":1843920,"src":"janelewis_tobias_and_the_angel_thumb.jpg","galleries_id":123897,"server_id":15,"link":"photo_1843920.html","width":130,"caption":"TOBIAS AND THE ANGEL","height":182});
															thumbnails[1843799] = clik.newPhoto({"id":1843799,"src":"janelewis_grip_on_thin_air_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843799.html","width":130,"caption":"A GRIP ON THIN AIR","height":195});
															thumbnails[1843947] = clik.newPhoto({"id":1843947,"src":"janelewis_angel_detail_thumb.jpg","galleries_id":123897,"server_id":15,"link":"photo_1843947.html","width":130,"caption":"ANGEL (DETAIL)","height":108});
															thumbnails[1843827] = clik.newPhoto({"id":1843827,"src":"janelewis_icarus_on_earth_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843827.html","width":130,"caption":"ICARUS ON EARTH","height":194});
															thumbnails[1843876] = clik.newPhoto({"id":1843876,"src":"janelewis_red_cherry_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843876.html","width":130,"caption":"A RED CHERRY ON A WHITE TILED FLOOR","height":192});
															thumbnails[4517745] = clik.newPhoto({"id":4517745,"src":"janelewis_2bowls_of_figs_thumb.jpg","galleries_id":275884,"server_id":15,"link":"photo_4517745.html","width":130,"caption":"TWO BOWLS OF FIGS","height":126});
															thumbnails[1843837] = clik.newPhoto({"id":1843837,"src":"janelewis_mersey_goldfish_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843837.html","width":130,"caption":"THE MERSEY GOLDFISH","height":190});
															thumbnails[4517737] = clik.newPhoto({"id":4517737,"src":"janelewis_floating_thumb.jpg","galleries_id":275884,"server_id":15,"link":"photo_4517737.html","width":130,"caption":"FLOATING","height":144});
															thumbnails[1843840] = clik.newPhoto({"id":1843840,"src":"janelewis_mrs_perkins_and_oedipus_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843840.html","width":130,"caption":"MRS PERKINS AND OEDIPUS","height":195});
															thumbnails[5468535] = clik.newPhoto({"id":5468535,"src":"JLewis169_thumb.jpg","galleries_id":275884,"server_id":15,"link":"photo_5468535.html","width":130,"caption":"THE BOX GUITAR","height":194});
															thumbnails[1843842] = clik.newPhoto({"id":1843842,"src":"janelewis_nude_modelling_for_the_afterlife_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843842.html","width":130,"caption":"NUDE MODELLING FOR THE AFTERLIFE","height":195});
															thumbnails[3904476] = clik.newPhoto({"id":3904476,"src":"janelewis_shipoffools_thumb.jpg","galleries_id":275884,"server_id":15,"link":"photo_3904476.html","width":130,"caption":"SHIP OF FOOLS","height":104});
															thumbnails[8402959] = clik.newPhoto({"id":8402959,"src":"janelewis_tygermask_web_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_8402959.html","width":130,"caption":"TYGER MASK","height":179});
															thumbnails[1852193] = clik.newPhoto({"id":1852193,"src":"janelewis_new_women_poets_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1852193.html","width":130,"caption":"NEW WOMEN POETS","height":185});
															thumbnails[5468528] = clik.newPhoto({"id":5468528,"src":"janelewis_banjomandolin_thumb.jpg","galleries_id":275884,"server_id":15,"link":"photo_5468528.html","width":130,"caption":"BANJO-MANDOLIN","height":161});
															thumbnails[8402935] = clik.newPhoto({"id":8402935,"src":"janelewis_tyger_web_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_8402935.html","width":130,"caption":"TYGER","height":132});
															thumbnails[1843878] = clik.newPhoto({"id":1843878,"src":"janelewis_timing_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843878.html","width":130,"caption":"TIMING","height":193});
															thumbnails[8402932] = clik.newPhoto({"id":8402932,"src":"janelewis_greenman_web3_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_8402932.html","width":130,"caption":"GREEN MAN","height":129});
															thumbnails[1843832] = clik.newPhoto({"id":1843832,"src":"janelewis_kiss_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843832.html","width":130,"caption":"KISS","height":189});
															thumbnails[8402933] = clik.newPhoto({"id":8402933,"src":"janelewis_satyr_web_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_8402933.html","width":130,"caption":"SATYR","height":116});
															thumbnails[1843882] = clik.newPhoto({"id":1843882,"src":"janelewis_red_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1843882.html","width":130,"caption":"RED","height":194});
															thumbnails[8402960] = clik.newPhoto({"id":8402960,"src":"janelewis_Unicorn_web_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_8402960.html","width":130,"caption":"UNICORN","height":130});
															thumbnails[1852187] = clik.newPhoto({"id":1852187,"src":"janelewis_two_women_dancing_thumb.jpg","galleries_id":123607,"server_id":15,"link":"photo_1852187.html","width":130,"caption":"TWO WOMEN DANCING","height":182});
															thumbnails[1841868] = clik.newPhoto({"id":1841868,"src":"janelewis_janus7_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_1841868.html","width":130,"caption":"JANUS","height":238});
															thumbnails[1841895] = clik.newPhoto({"id":1841895,"src":"janelewis_craquelure_nude_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_1841895.html","width":130,"caption":"CRAQUELURE NUDE","height":189});
															thumbnails[1843568] = clik.newPhoto({"id":1843568,"src":"janelewis_tarot_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_1843568.html","width":130,"caption":"TAROT","height":142});
															thumbnails[1841906] = clik.newPhoto({"id":1841906,"src":"janelewis_chimera_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_1841906.html","width":130,"caption":"CHIMERA","height":178});
															thumbnails[1841931] = clik.newPhoto({"id":1841931,"src":"janelewis_memento_mori_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_1841931.html","width":130,"caption":"MEMENTO MORI","height":220});
															thumbnails[1841938] = clik.newPhoto({"id":1841938,"src":"janelewis_small_tarot_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_1841938.html","width":130,"caption":"SMALL TAROT","height":130});
															thumbnails[2082383] = clik.newPhoto({"id":2082383,"src":"janelewis_harlequin_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_2082383.html","width":130,"caption":"HARLEQUIN","height":156});
															thumbnails[1843528] = clik.newPhoto({"id":1843528,"src":"janelewis_pan_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_1843528.html","width":130,"caption":"PAN","height":226});
															thumbnails[2026037] = clik.newPhoto({"id":2026037,"src":"janelewis_mandolin_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_2026037.html","width":130,"caption":"MANDOLINIST","height":206});
															thumbnails[1841873] = clik.newPhoto({"id":1841873,"src":"janelewis_masked_angel_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_1841873.html","width":130,"caption":"MASKED ANGEL","height":133});
															thumbnails[1843572] = clik.newPhoto({"id":1843572,"src":"janelewis_girl_in_profile_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_1843572.html","width":130,"caption":"GIRL IN PROFILE","height":130});
															thumbnails[1843521] = clik.newPhoto({"id":1843521,"src":"janelewis_archaic_mask_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_1843521.html","width":130,"caption":"ARCHAIC MASK","height":166});
															thumbnails[2026005] = clik.newPhoto({"id":2026005,"src":"janelewis_japanese_mask3_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_2026005.html","width":130,"caption":"JAPANESE MASK","height":267});
															thumbnails[1843540] = clik.newPhoto({"id":1843540,"src":"janelewis_timepiece_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_1843540.html","width":130,"caption":"TIME PIECE","height":177});
															thumbnails[1843561] = clik.newPhoto({"id":1843561,"src":"janelewis_angel_thumb.jpg","galleries_id":123886,"server_id":15,"link":"photo_1843561.html","width":130,"caption":"ANGEL","height":127});
															thumbnails[3900191] = clik.newPhoto({"id":3900191,"src":"archive_15_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3900191.html","width":130,"caption":"MSLEXIA MAGAZINE ","height":185});
															thumbnails[3900198] = clik.newPhoto({"id":3900198,"src":"archive_16_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3900198.html","width":130,"caption":"MSLEXIA MAGAZINE","height":184});
															thumbnails[3899625] = clik.newPhoto({"id":3899625,"src":"archive_10_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3899625.html","width":130,"caption":"COLLINS GALLERY","height":262});
															thumbnails[3900230] = clik.newPhoto({"id":3900230,"src":"archive_17_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3900230.html","width":130,"caption":"MSLEXIA MAGAZINE","height":183});
															thumbnails[3900207] = clik.newPhoto({"id":3900207,"src":"archive_18_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3900207.html","width":130,"caption":"MSLEXIA MAGAZINE","height":183});
															thumbnails[3900236] = clik.newPhoto({"id":3900236,"src":"archive_08_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3900236.html","width":130,"caption":"NATIONAL PORTRAIT GALLERY","height":244});
															thumbnails[3889876] = clik.newPhoto({"id":3889876,"src":"archive_13_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3889876.html","width":130,"caption":"THE HILL MAGAZINE","height":182});
															thumbnails[3899648] = clik.newPhoto({"id":3899648,"src":"archive_20_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3899648.html","width":130,"caption":"BLOODAXE BOOKS","height":183});
															thumbnails[3889930] = clik.newPhoto({"id":3889930,"src":"archive_19_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3889930.html","width":130,"caption":"THE HILL MAGAZINE","height":185});
															thumbnails[3889927] = clik.newPhoto({"id":3889927,"src":"archive_07_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3889927.html","width":130,"caption":"NATIONAL PORTAIT GALLERY","height":243});
															thumbnails[3899623] = clik.newPhoto({"id":3899623,"src":"archive_21_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3899623.html","width":130,"caption":"POETIC IMAGES","height":183});
															thumbnails[3899624] = clik.newPhoto({"id":3899624,"src":"archive_11_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3899624.html","width":130,"caption":"KENT OPERA","height":184});
															thumbnails[3899626] = clik.newPhoto({"id":3899626,"src":"archive_12_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3899626.html","width":130,"caption":"UNIVERS DES ARTS","height":171});
															thumbnails[3900223] = clik.newPhoto({"id":3900223,"src":"archive_22_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3900223.html","width":130,"caption":"POETIC IMAGES","height":183});
															thumbnails[3903525] = clik.newPhoto({"id":3903525,"src":"archive_14_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3903525.html","width":130,"caption":"SOUTH WEST MAGAZINE","height":181});
															thumbnails[3903560] = clik.newPhoto({"id":3903560,"src":"archive_23_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3903560.html","width":130,"caption":"PORTAL GALLERY","height":187});
															thumbnails[3889924] = clik.newPhoto({"id":3889924,"src":"archive_24_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3889924.html","width":130,"caption":"PORTAL GALLERY","height":194});
															thumbnails[3903547] = clik.newPhoto({"id":3903547,"src":"archive_25_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3903547.html","width":130,"caption":"PORTAL GALLERY","height":181});
															thumbnails[3903551] = clik.newPhoto({"id":3903551,"src":"archive_09_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3903551.html","width":130,"caption":"CARTWRIGHT HALL","height":183});
															thumbnails[3903553] = clik.newPhoto({"id":3903553,"src":"archive_01_thumb.jpg","galleries_id":236814,"server_id":15,"link":"photo_3903553.html","width":130,"caption":"KENT OPERA","height":136});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[123886] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Limited Edition Prints","link":"gallery_123886.html","maxRecords":0.0,"photoIDs":[8402959.0,8402935.0,8402932.0,8402933.0,8402960.0,1841868.0,1841895.0,1843568.0,1841906.0,1841931.0,1841938.0,2082383.0,1843528.0,2026037.0,1841873.0,1843572.0,1843521.0,2026005.0,1843540.0,1843561.0],"skipIndex":0,"section_code":"gallery","featured_images":8402959.0,"id":123886,"singleSection":false});				  						galleries[123607] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Book Covers ","link":"gallery_123607.html","maxRecords":0.0,"photoIDs":[1843682.0,1843694.0,1843696.0,1843702.0,1843708.0,1843712.0,1843788.0,1843781.0,1843796.0,1843799.0,1843827.0,1843876.0,1843837.0,1843840.0,1843842.0,1852193.0,1843878.0,1843832.0,1843882.0,1852187.0],"skipIndex":0,"section_code":"gallery","featured_images":1843682.0,"id":123607,"singleSection":false});				  						galleries[236814] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Archive ","link":"gallery_236814.html","maxRecords":0.0,"photoIDs":[3900191.0,3900198.0,3899625.0,3900230.0,3900207.0,3900236.0,3889876.0,3899648.0,3889930.0,3889927.0,3899623.0,3899624.0,3899626.0,3900223.0,3903525.0,3903560.0,3889924.0,3903547.0,3903551.0,3903553.0],"skipIndex":0,"section_code":"gallery","featured_images":3900198.0,"id":236814,"singleSection":false});				  						galleries[123897] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Postcards","link":"gallery_123897.html","maxRecords":0.0,"photoIDs":[1853133.0,1843900.0,1843898.0,1843953.0,1843929.0,1843957.0,1843895.0,1843912.0,1843916.0,1843920.0,1843947.0],"skipIndex":0,"section_code":"gallery","featured_images":1853133.0,"id":123897,"singleSection":false});				  						galleries[275884] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Reproduction Prints","link":"gallery_275884.html","maxRecords":0.0,"photoIDs":[4517745.0,4517737.0,5468535.0,3904476.0,5468528.0],"skipIndex":0,"section_code":"gallery","featured_images":5468535.0,"id":275884,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8403030';
imageSets[2] = '1853133,1843682,5468535,8402959,3510987,3900198';
imageSets[3] = '8403030,8402960,8402959,8402935,8402933,8402932,7857973,7831241,5468535,5468528,5404128,5404127,4517745,4517737,3904476,3903560,3903553,3903551,3903547,3903525,3900236,3900230,3900223,3900207,3900198,3900191,3899648,3899626,3899625,3899624,3899623,3889930,3889927,3889924,3889876,3540563,3510987,2082383,2026037,2026005,1853133,1852193,1852187,1843957,1843953,1843947,1843929,1843920,1843916,1843912';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/janelewis/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/janelewis/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/janelewis/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/janelewis/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/janelewis/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/janelewis/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/janelewis/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/janelewis/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 = 'Jane Lewis-Art Prints: ' + 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="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="JANELEWIS">';
			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;
	}
}

			

