window.thumbnails = {};
															thumbnails[8598915] = clik.newPhoto({"id":8598915,"src":"artplatform_S_thumb.gif","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"ArtPlatform","height":34});
															thumbnails[8984729] = clik.newPhoto({"id":8984729,"src":"THE-BRICK-LANE-GALLERY-LONDONLOGO_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Brick Lane Gallery logo","height":63});
															thumbnails[7581465] = clik.newPhoto({"id":7581465,"src":"Kportrait1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Portrait","height":190});
															thumbnails[7824186] = clik.newPhoto({"id":7824186,"src":"2wipiBILDWOMENINPHOTO_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Women in Photography International","height":87});
															thumbnails[8004725] = clik.newPhoto({"id":8004725,"src":"Three_Graces_4_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Three Graces 3","height":195});
															thumbnails[7873376] = clik.newPhoto({"id":7873376,"src":"K_FagerstromLevring_Connection_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_7873376.html","width":130,"caption":"Connection","height":86});
															thumbnails[7873382] = clik.newPhoto({"id":7873382,"src":"K_FagerstromLevring_Pointed_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_7873382.html","width":130,"caption":"Pointed","height":86});
															thumbnails[7873406] = clik.newPhoto({"id":7873406,"src":"K_FagerstromLevring_Up_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_7873406.html","width":130,"caption":"Up","height":195});
															thumbnails[7873380] = clik.newPhoto({"id":7873380,"src":"K_FagerstromLevring_SomekindOfBeautiful_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_7873380.html","width":130,"caption":"Some kind of Beautiful","height":195});
															thumbnails[7873370] = clik.newPhoto({"id":7873370,"src":"K_FagerstromLevring_WINGS_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_7873370.html","width":130,"caption":"Wings","height":195});
															thumbnails[8004912] = clik.newPhoto({"id":8004912,"src":"winner-Px3-2011-Offcial-Selectioneps_1_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8004912.html","width":130,"caption":"PX3Strelitzia1to6","height":83});
															thumbnails[8004669] = clik.newPhoto({"id":8004669,"src":"Wild_Beauty_1_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8004669.html","width":130,"caption":"Wild Beauty 1","height":87});
															thumbnails[8004829] = clik.newPhoto({"id":8004829,"src":"Wild_Beauty_21_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8004829.html","width":130,"caption":"Wild Beauty 2","height":195});
															thumbnails[8004826] = clik.newPhoto({"id":8004826,"src":"Wild_Beauty_3_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8004826.html","width":130,"caption":"Wild Beauty 3","height":195});
															thumbnails[8004671] = clik.newPhoto({"id":8004671,"src":"Wild_Beauty_4_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8004671.html","width":130,"caption":"Wild Beauty 4","height":87});
															thumbnails[8004676] = clik.newPhoto({"id":8004676,"src":"Wild_Beauty_5_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8004676.html","width":130,"caption":"Wild Beauty 5","height":87});
															thumbnails[8004687] = clik.newPhoto({"id":8004687,"src":"Primadonna_1_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8004687.html","width":130,"caption":"Primadonna 1","height":195});
															thumbnails[8004688] = clik.newPhoto({"id":8004688,"src":"Primadonna_2_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8004688.html","width":130,"caption":"Primadonna 2","height":171});
															thumbnails[8004690] = clik.newPhoto({"id":8004690,"src":"Primadonna_3_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8004690.html","width":130,"caption":"Primadonna 3","height":195});
															thumbnails[8004677] = clik.newPhoto({"id":8004677,"src":"Three_Graces_1_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8004677.html","width":130,"caption":"Three Graces 1","height":87});
															thumbnails[8004720] = clik.newPhoto({"id":8004720,"src":"Three_Graces_21_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8004720.html","width":130,"caption":"Three Graces 2","height":87});
															thumbnails[8004728] = clik.newPhoto({"id":8004728,"src":"Three_Graces_5_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8004728.html","width":130,"caption":"Three Graces 4","height":195});
															thumbnails[8313305] = clik.newPhoto({"id":8313305,"src":"KFagerstromLevring_Strelitzia1_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8313305.html","width":130,"caption":"Strelitzia 1","height":195});
															thumbnails[8313307] = clik.newPhoto({"id":8313307,"src":"KFagerstromLevring_Strelitzia2_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8313307.html","width":130,"caption":"Strelitzia 2","height":195});
															thumbnails[8313308] = clik.newPhoto({"id":8313308,"src":"KFAgerstromLevring_Strelitzia3_thumb.jpg","galleries_id":411420,"server_id":18,"link":"photo_8313308.html","width":130,"caption":"Strelitzia 3","height":87});
															thumbnails[8313493] = clik.newPhoto({"id":8313493,"src":"IPA_2011HonorableMention_D8E438FC-1EC9-D45B-1CECBCCD69DBE804_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_8313493.html","width":130,"caption":"","height":137});
															thumbnails[8313309] = clik.newPhoto({"id":8313309,"src":"Above11_thumb.JPG","galleries_id":411418,"server_id":18,"link":"photo_8313309.html","width":130,"caption":"Above 1","height":195});
															thumbnails[8313310] = clik.newPhoto({"id":8313310,"src":"Above2_thumb.JPG","galleries_id":411418,"server_id":18,"link":"photo_8313310.html","width":130,"caption":"Above 2","height":195});
															thumbnails[8313311] = clik.newPhoto({"id":8313311,"src":"Above3_thumb.JPG","galleries_id":411418,"server_id":18,"link":"photo_8313311.html","width":130,"caption":"Above 3","height":195});
															thumbnails[8313312] = clik.newPhoto({"id":8313312,"src":"Below1_thumb.JPG","galleries_id":411418,"server_id":18,"link":"photo_8313312.html","width":130,"caption":"Below 1","height":195});
															thumbnails[8313314] = clik.newPhoto({"id":8313314,"src":"Below2_thumb.JPG","galleries_id":411418,"server_id":18,"link":"photo_8313314.html","width":130,"caption":"Below 2","height":195});
															thumbnails[8313317] = clik.newPhoto({"id":8313317,"src":"Below4_thumb.JPG","galleries_id":411418,"server_id":18,"link":"photo_8313317.html","width":130,"caption":"Below 4","height":195});
															thumbnails[8313321] = clik.newPhoto({"id":8313321,"src":"Below5_thumb.JPG","galleries_id":411418,"server_id":18,"link":"photo_8313321.html","width":130,"caption":"Below 5","height":195});
															thumbnails[8313323] = clik.newPhoto({"id":8313323,"src":"KFagerstromLevringBudding1_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_8313323.html","width":130,"caption":"Budding 1","height":195});
															thumbnails[8313327] = clik.newPhoto({"id":8313327,"src":"KFagerstromLevringBudding2_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_8313327.html","width":130,"caption":"Budding 2","height":195});
															thumbnails[8313328] = clik.newPhoto({"id":8313328,"src":"KFagerstromLevringBudding3_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_8313328.html","width":130,"caption":"Budding 3","height":195});
															thumbnails[8313329] = clik.newPhoto({"id":8313329,"src":"KFagerstromLevringBudding4_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_8313329.html","width":130,"caption":"Budding 4","height":86});
															thumbnails[7586199] = clik.newPhoto({"id":7586199,"src":"katarina_fagerstrom_levring_2Lips_1_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_7586199.html","width":130,"caption":"2Lips 1","height":87});
															thumbnails[7586200] = clik.newPhoto({"id":7586200,"src":"katarina_fagerstrom_levring_2Lips_2_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_7586200.html","width":130,"caption":"2Lips 2","height":87});
															thumbnails[7586201] = clik.newPhoto({"id":7586201,"src":"katarina_fagerstrom_levring_2Lips_3_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_7586201.html","width":130,"caption":"2Lips 3","height":195});
															thumbnails[7586203] = clik.newPhoto({"id":7586203,"src":"katarina_fagerstrom_levring_2Lips_4_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_7586203.html","width":130,"caption":"2Lips 4","height":195});
															thumbnails[7586206] = clik.newPhoto({"id":7586206,"src":"katarina_fagerstrom_levring_2Lips_5_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_7586206.html","width":130,"caption":"2Lips 5","height":195});
															thumbnails[7586210] = clik.newPhoto({"id":7586210,"src":"katarina_fagerstrom_levring_a_touch_of_tulips_1_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_7586210.html","width":130,"caption":"A touch of tulips 1","height":195});
															thumbnails[7586212] = clik.newPhoto({"id":7586212,"src":"katarina_fagerstrom_levring_a_touch_of_tulips_2_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_7586212.html","width":130,"caption":"A touch of tulips 2","height":87});
															thumbnails[7586215] = clik.newPhoto({"id":7586215,"src":"katarina_fagerstrom_levring_a_touch_of_tulips_3_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_7586215.html","width":130,"caption":"A touch of Tulips 3","height":87});
															thumbnails[7586218] = clik.newPhoto({"id":7586218,"src":"katarina_fagerstrom_levring_a_touch_of_tulips_4_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_7586218.html","width":130,"caption":"A touch of Tulips 5","height":195});
															thumbnails[7586596] = clik.newPhoto({"id":7586596,"src":"katarina_fagerstrom_levring_a_touch_of_tulips_5_thumb.jpg","galleries_id":411418,"server_id":18,"link":"photo_7586596.html","width":130,"caption":"A touch of tulips 4","height":87});
															thumbnails[7587610] = clik.newPhoto({"id":7587610,"src":"katarina_fagerstrom_levring_calla__1_thumb.jpg","galleries_id":411421,"server_id":18,"link":"photo_7587610.html","width":130,"caption":"Calla 1","height":87});
															thumbnails[7581463] = clik.newPhoto({"id":7581463,"src":"PX3-Honors-logo-10_thumb.gif","galleries_id":411008,"server_id":18,"link":"photo_7581463.html","width":130,"caption":"Dancing Iris ","height":82});
															thumbnails[7576539] = clik.newPhoto({"id":7576539,"src":"katarina_fagerstrom_levring_dancing_iris_I_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7576539.html","width":130,"caption":"Dancing Iris","height":195});
															thumbnails[7576565] = clik.newPhoto({"id":7576565,"src":"winnerlogo1_thumb.gif","galleries_id":411008,"server_id":18,"link":"photo_7576565.html","width":130,"caption":"Dancing Iris 1","height":72});
															thumbnails[7576600] = clik.newPhoto({"id":7576600,"src":"katarina_fagerstrom_levring_iris_the_odd_one_I_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7576600.html","width":130,"caption":"The Odd One I","height":87});
															thumbnails[7576603] = clik.newPhoto({"id":7576603,"src":"katarina_fagerstrom_levring_iris_the_odd_one_II_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7576603.html","width":130,"caption":"The Odd One II","height":87});
															thumbnails[7581445] = clik.newPhoto({"id":7581445,"src":"IPA2010HonorableMention_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7581445.html","width":130,"caption":"Iris Solitude I-V","height":137});
															thumbnails[7570903] = clik.newPhoto({"id":7570903,"src":"IrisSolitudeIBLOGG_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7570903.html","width":130,"caption":"Iris Solitude I","height":87});
															thumbnails[7576523] = clik.newPhoto({"id":7576523,"src":"katarina_fagerstrom_levring_iris_solitude_II_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7576523.html","width":130,"caption":"Solitude II","height":195});
															thumbnails[7576532] = clik.newPhoto({"id":7576532,"src":"katarina_fagerstrom_levring_iris_solitude_III_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7576532.html","width":130,"caption":"Solitude III","height":87});
															thumbnails[7581460] = clik.newPhoto({"id":7581460,"src":"katarina_fagerstrom_Levring_iris_solitude_IV_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7581460.html","width":130,"caption":"Solitude IV","height":87});
															thumbnails[7576597] = clik.newPhoto({"id":7576597,"src":"katarina_fagerstrom_levring_iris_still_leaving_I_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7576597.html","width":130,"caption":"Still Leaving I","height":195});
															thumbnails[7576577] = clik.newPhoto({"id":7576577,"src":"katarina_fagerstrom_levring_iris_still_leaving_II_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7576577.html","width":130,"caption":"Still Leaving II","height":87});
															thumbnails[7576598] = clik.newPhoto({"id":7576598,"src":"katarina_fagerstrom_levring_iris_still_leaving_III_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7576598.html","width":130,"caption":"Still Leaving III","height":195});
															thumbnails[7581453] = clik.newPhoto({"id":7581453,"src":"katarina_fagerstrom_levring_iris_light_movement_I_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7581453.html","width":130,"caption":"Light Movement I","height":195});
															thumbnails[7576567] = clik.newPhoto({"id":7576567,"src":"katarina_fagerstrom_levring_iris_light_movement_II_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7576567.html","width":130,"caption":"Light Movement II","height":87});
															thumbnails[7576595] = clik.newPhoto({"id":7576595,"src":"katarina_fagerstrom_levring_Iris_light_movement_III_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7576595.html","width":130,"caption":"Light Movement III","height":195});
															thumbnails[7576568] = clik.newPhoto({"id":7576568,"src":"katarina_fagerstrom_levring_iris_light_movement_IV_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7576568.html","width":130,"caption":"Light Movement IV","height":87});
															thumbnails[7576596] = clik.newPhoto({"id":7576596,"src":"katarina_fagerstrom_levring_iris_light_movement_V_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7576596.html","width":130,"caption":"Light Movement V","height":195});
															thumbnails[7582325] = clik.newPhoto({"id":7582325,"src":"katarina_fagerstrom_levring_iris_light_movement_VI1_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7582325.html","width":130,"caption":"Light Movement VI","height":195});
															thumbnails[7581459] = clik.newPhoto({"id":7581459,"src":"katarina_fagerstrom_levring_iris_light_movement_VIIKFL_thumb.jpg","galleries_id":411008,"server_id":18,"link":"photo_7581459.html","width":130,"caption":"Light Movement VII","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[411420] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Strelitzia","link":"section492007.html","maxRecords":0.0,"photoIDs":[7873376.0,7873382.0,7873406.0,7873380.0,7873370.0,8004912.0,8004669.0,8004829.0,8004826.0,8004671.0,8004676.0,8004687.0,8004688.0,8004690.0,8004677.0,8004720.0,8004728.0,8313305.0,8313307.0,8313308.0],"skipIndex":0,"section_code":"section492007","featured_images":"8004912,7873370","id":411420,"singleSection":true});				  						galleries[411418] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Tulips","link":"section492066.html","maxRecords":0.0,"photoIDs":[8313493.0,8313309.0,8313310.0,8313311.0,8313312.0,8313314.0,8313317.0,8313321.0,8313323.0,8313327.0,8313328.0,8313329.0,7586199.0,7586200.0,7586201.0,7586203.0,7586206.0,7586210.0,7586212.0,7586215.0,7586218.0,7586596.0],"skipIndex":0,"section_code":"section492066","featured_images":"8313493,8313329,8313328,8313327,8313323,8313321,8313317,8313314,8313312,8313311","id":411418,"singleSection":true});				  						galleries[411421] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Calla","link":"section492067.html","maxRecords":0.0,"photoIDs":[7587610.0],"skipIndex":0,"section_code":"section492067","featured_images":7587610.0,"id":411421,"singleSection":true});				  						galleries[411008] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Iris","link":"section492006.html","maxRecords":0.0,"photoIDs":[7581463.0,7576539.0,7576565.0,7576600.0,7576603.0,7581445.0,7570903.0,7576523.0,7576532.0,7581460.0,7576597.0,7576577.0,7576598.0,7581453.0,7576567.0,7576595.0,7576568.0,7576596.0,7582325.0,7581459.0],"skipIndex":0,"section_code":"section492006","featured_images":7576539.0,"id":411008,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8984729,8598915,8313493,8313329,8313328,8313327,8313323,8313321,8313317,8313314,8313312,8313311,8313310,8313309,8313308,8313307,8313305,8004912,8004829,8004826,8004728,8004725,8004720,8004690,8004688,8004687,8004677,8004676,8004671,8004669,7873406,7873382,7873380,7873376,7873370,7824186,7587610,7586596,7586218,7586215,7586212,7586210,7586206,7586203,7586201,7586200,7586199,7582325,7581465,7581463';
imageSets[2] = '7576539,7873370,8004912';
imageSets[3] = '8984729,8598915,8313493,8313329,8313328,8313327,8313323,8313321,8313317,8313314,8313312,8313311,8313310,8313309,8313308,8313307,8313305,8004912,8004829,8004826,8004728,8004725,8004720,8004690,8004688,8004687,8004677,8004676,8004671,8004669,7873406,7873382,7873380,7873376,7873370,7824186,7587610,7586596,7586218,7586215,7586212,7586210,7586206,7586203,7586201,7586200,7586199,7582325,7581465,7581463';
imageSets[244262] = '8313493,8313305,8313307,8313308';
imageSets[240974] = '7581453,7576567,7576595,7576568,7576596,7582325,7581459';
imageSets[244260] = '8313493,8313312,8313314,8313317,8313321';
imageSets[240976] = '7581445,7570903,7576523,7576532,7581460';
imageSets[244259] = '8313493,8313309,8313310,8313311';
imageSets[240978] = '7576539,7576565';
imageSets[240979] = '8313493,8313309,8313310,8313311,8313312,8313314,8313317,8313321,8313323,8313327,8313328,8313329,8313305,8313307';
imageSets[241000] = '7586199,7586200,7586201,7586203,7586206';
imageSets[241001] = '7586210,7586212,7586215,7586218,7586596';
imageSets[240975] = '7576600,7576603';
imageSets[244270] = '8313493,8313309,8313312,8313323,8313305,8313307';
imageSets[240977] = '7576597,7576577,7576598';
imageSets[243010] = '8004687,8004688,8004690';
imageSets[243011] = '8004677,8004720,8004728,8004725';
imageSets[243012] = '8004829,8004826';
imageSets[244261] = '8313493,8313323,8313327,8313328,8313329';
imageSets[240980] = '7581463,7576565';
imageSets[244263] = '7581463,7581445,7570903,7576523,7576532,7581460,8004912';
imageSets[243019] = '7873376,7873382,7873406,7873370';
imageSets[242120] = '8598915,7824186';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/KatarinaFL/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/KatarinaFL/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 += 'section492007.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 && 'section492007' != '') {
					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 = 'Katarina Fagerstrom Levring: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

