window.thumbnails = {};
															thumbnails[5381211] = clik.newPhoto({"id":5381211,"src":"oslo_fotomesse_modell_2_thumb.jpg","galleries_id":206553,"server_id":15,"link":"photo_5381211.html","width":130,"caption":"Anne Svensson-Myhr (See Links)","height":196});
															thumbnails[3383418] = clik.newPhoto({"id":3383418,"src":"jorde_3SWPP_31_thumb.jpg","galleries_id":206558,"server_id":15,"link":"photo_3383418.html","width":130,"caption":"Barrow and Tower","height":57});
															thumbnails[3383525] = clik.newPhoto({"id":3383525,"src":"blad og kumlokk1_thumb.jpg","galleries_id":206554,"server_id":15,"link":"photo_3383525.html","width":130,"caption":"","height":92});
															thumbnails[3383696] = clik.newPhoto({"id":3383696,"src":"hus6_3_thumb.jpg","galleries_id":206554,"server_id":15,"link":"photo_3383696.html","width":130,"caption":"Roofs","height":92});
															thumbnails[3383728] = clik.newPhoto({"id":3383728,"src":"leaves_thumb.jpg","galleries_id":206554,"server_id":15,"link":"photo_3383728.html","width":130,"caption":"Autumn leaves","height":195});
															thumbnails[3383768] = clik.newPhoto({"id":3383768,"src":"smoke 1_thumb.jpg","galleries_id":206560,"server_id":15,"link":"photo_3383768.html","width":130,"caption":"Smoke 1","height":184});
															thumbnails[3383824] = clik.newPhoto({"id":3383824,"src":"smoke 2_thumb.jpg","galleries_id":206560,"server_id":15,"link":"photo_3383824.html","width":130,"caption":"Smoke 2","height":184});
															thumbnails[3383832] = clik.newPhoto({"id":3383832,"src":"smoke 3_thumb.jpg","galleries_id":206560,"server_id":15,"link":"photo_3383832.html","width":130,"caption":"Holy Smoke!","height":92});
															thumbnails[3383885] = clik.newPhoto({"id":3383885,"src":"smoke 4_thumb.jpg","galleries_id":206560,"server_id":15,"link":"photo_3383885.html","width":130,"caption":"Smoke 4","height":184});
															thumbnails[3383898] = clik.newPhoto({"id":3383898,"src":"smoke 5_thumb.jpg","galleries_id":206560,"server_id":15,"link":"photo_3383898.html","width":130,"caption":"Smoke 5","height":184});
															thumbnails[3383938] = clik.newPhoto({"id":3383938,"src":"Arrival_thumb.jpg","galleries_id":206560,"server_id":15,"link":"photo_3383938.html","width":130,"caption":"Arrival","height":92});
															thumbnails[3383945] = clik.newPhoto({"id":3383945,"src":"And_thumb.jpg","galleries_id":206560,"server_id":15,"link":"photo_3383945.html","width":130,"caption":"And","height":89});
															thumbnails[3383956] = clik.newPhoto({"id":3383956,"src":"Departure_thumb.jpg","galleries_id":206560,"server_id":15,"link":"photo_3383956.html","width":130,"caption":"Departure","height":92});
															thumbnails[3383971] = clik.newPhoto({"id":3383971,"src":"shrine_thumb.jpg","galleries_id":206558,"server_id":15,"link":"photo_3383971.html","width":130,"caption":"Shrine","height":74});
															thumbnails[3383993] = clik.newPhoto({"id":3383993,"src":"waterfall 1_thumb.jpg","galleries_id":206558,"server_id":15,"link":"photo_3383993.html","width":130,"caption":"Waterfall 1","height":77});
															thumbnails[3384001] = clik.newPhoto({"id":3384001,"src":"waterfall 2_thumb.jpg","galleries_id":206558,"server_id":15,"link":"photo_3384001.html","width":130,"caption":"Waterfall 2","height":87});
															thumbnails[3384510] = clik.newPhoto({"id":3384510,"src":"dragonfly 1_thumb.jpg","galleries_id":206559,"server_id":15,"link":"photo_3384510.html","width":130,"caption":"Dragonfly 1","height":82});
															thumbnails[3385791] = clik.newPhoto({"id":3385791,"src":"pictures in rock 1_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3385791.html","width":130,"caption":"Pictures in Rock. Tom Roger and Fin Costello.","height":87});
															thumbnails[3385829] = clik.newPhoto({"id":3385829,"src":"tuka 2_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3385829.html","width":130,"caption":"Onkel Tuka, pre-concert backstage.","height":94});
															thumbnails[3385900] = clik.newPhoto({"id":3385900,"src":"pedal_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3385900.html","width":130,"caption":"Per \"Pedal\" Dahl sings Van Morrison","height":94});
															thumbnails[3412986] = clik.newPhoto({"id":3412986,"src":"mari2b2_thumb.jpg","galleries_id":206559,"server_id":15,"link":"photo_3412986.html","width":130,"caption":"Coccinella septempunctata ","height":114});
															thumbnails[3412999] = clik.newPhoto({"id":3412999,"src":"veps112b_thumb.jpg","galleries_id":206559,"server_id":15,"link":"photo_3412999.html","width":130,"caption":"Rhyssa persuasoria ","height":87});
															thumbnails[3532541] = clik.newPhoto({"id":3532541,"src":"memories_of_a_forgotten_time2_thumb.jpg","galleries_id":216167,"server_id":15,"link":"photo_3532541.html","width":130,"caption":"Memories of a forgotten time","height":159});
															thumbnails[3532542] = clik.newPhoto({"id":3532542,"src":"fragile2_thumb.jpg","galleries_id":216167,"server_id":15,"link":"photo_3532542.html","width":130,"caption":"Fragile","height":182});
															thumbnails[3532544] = clik.newPhoto({"id":3532544,"src":"the_model_and_the_light2_thumb.jpg","galleries_id":216167,"server_id":15,"link":"photo_3532544.html","width":130,"caption":"The model and the light","height":88});
															thumbnails[3532684] = clik.newPhoto({"id":3532684,"src":"nikonmodel_1compr2_thumb.jpg","galleries_id":216167,"server_id":15,"link":"photo_3532684.html","width":130,"caption":"Model 1","height":184});
															thumbnails[3532685] = clik.newPhoto({"id":3532685,"src":"nikonmodel_2compr2_thumb.jpg","galleries_id":216167,"server_id":15,"link":"photo_3532685.html","width":130,"caption":"Model 2","height":180});
															thumbnails[3635908] = clik.newPhoto({"id":3635908,"src":"cobraboxing1b_thumb.jpg","galleries_id":219552,"server_id":15,"link":"photo_3635908.html","width":130,"caption":"Cobra boxing","height":112});
															thumbnails[3635916] = clik.newPhoto({"id":3635916,"src":"cobraportrett3b_thumb.jpg","galleries_id":219552,"server_id":15,"link":"photo_3635916.html","width":130,"caption":"King Cobra","height":119});
															thumbnails[3635919] = clik.newPhoto({"id":3635919,"src":"mann_kysser_cobra1b_thumb.jpg","galleries_id":219552,"server_id":15,"link":"photo_3635919.html","width":130,"caption":"Kissing the Cobra","height":132});
															thumbnails[3635922] = clik.newPhoto({"id":3635922,"src":"tempel_1b_thumb.jpg","galleries_id":222237,"server_id":15,"link":"photo_3635922.html","width":130,"caption":"Khon Kaen","height":85});
															thumbnails[3635941] = clik.newPhoto({"id":3635941,"src":"oskapell_1_a2bhdrb_thumb.jpg","galleries_id":222237,"server_id":15,"link":"photo_3635941.html","width":130,"caption":"Chapel","height":92});
															thumbnails[3709609] = clik.newPhoto({"id":3709609,"src":"Hanene_stelles_mellom_rundene_thumb.jpg","galleries_id":219553,"server_id":15,"link":"photo_3709609.html","width":130,"caption":"Preparations","height":86});
															thumbnails[3709620] = clik.newPhoto({"id":3709620,"src":"Det_gjelder_aa_psyke_ut_motstanderen_thumb.jpg","galleries_id":219553,"server_id":15,"link":"photo_3709620.html","width":130,"caption":"Psychological warfare","height":87});
															thumbnails[3709624] = clik.newPhoto({"id":3709624,"src":"Her_vises_ingen_naade_thumb.jpg","galleries_id":219553,"server_id":15,"link":"photo_3709624.html","width":130,"caption":"No mercy","height":97});
															thumbnails[3709627] = clik.newPhoto({"id":3709627,"src":"Hanene_stelles_mellom_rundene_2_thumb.jpg","galleries_id":219553,"server_id":15,"link":"photo_3709627.html","width":130,"caption":"Getting ready for round 2","height":96});
															thumbnails[3709635] = clik.newPhoto({"id":3709635,"src":"Hanene_faar_oppkvikkende_miksturer_thumb.jpg","galleries_id":219553,"server_id":15,"link":"photo_3709635.html","width":130,"caption":"Refreshments","height":87});
															thumbnails[3709662] = clik.newPhoto({"id":3709662,"src":"Kampen_re_i_gang_2_thumb.jpg","galleries_id":219553,"server_id":15,"link":"photo_3709662.html","width":130,"caption":"Round 2","height":119});
															thumbnails[3709730] = clik.newPhoto({"id":3709730,"src":"Dommeren_foelger_med_thumb.jpg","galleries_id":219553,"server_id":15,"link":"photo_3709730.html","width":130,"caption":"The Judge","height":148});
															thumbnails[3709733] = clik.newPhoto({"id":3709733,"src":"Vedding_foregaar_med_tegn_og_rop_thumb.jpg","galleries_id":219553,"server_id":15,"link":"photo_3709733.html","width":130,"caption":"Place your bets","height":106});
															thumbnails[3709738] = clik.newPhoto({"id":3709738,"src":"Stolt_eier_thumb.jpg","galleries_id":219553,"server_id":15,"link":"photo_3709738.html","width":130,"caption":"The winner","height":87});
															thumbnails[3709755] = clik.newPhoto({"id":3709755,"src":"ung_gutt_med_whiper1_thumb.jpg","galleries_id":219552,"server_id":15,"link":"photo_3709755.html","width":130,"caption":"Young boy with Wiper","height":99});
															thumbnails[3709774] = clik.newPhoto({"id":3709774,"src":"cobraportrett1_thumb.jpg","galleries_id":219552,"server_id":15,"link":"photo_3709774.html","width":130,"caption":"Close enough","height":137});
															thumbnails[3711880] = clik.newPhoto({"id":3711880,"src":"begge_1_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3711880.html","width":130,"caption":"Kristopher Schau and Jon Terje Rovedal","height":87});
															thumbnails[3711883] = clik.newPhoto({"id":3711883,"src":"begge_2_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3711883.html","width":130,"caption":"Kristopher Schau and Jon Terje rovedal 2","height":87});
															thumbnails[3711887] = clik.newPhoto({"id":3711887,"src":"begge_3_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3711887.html","width":130,"caption":"Kristopher Schau and Jon Terje Rovedal 3","height":87});
															thumbnails[3711903] = clik.newPhoto({"id":3711903,"src":"kristopher_1_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3711903.html","width":130,"caption":"Kristopher Schau","height":195});
															thumbnails[3711910] = clik.newPhoto({"id":3711910,"src":"kristopher_2_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3711910.html","width":130,"caption":"Too old to die young","height":195});
															thumbnails[3711913] = clik.newPhoto({"id":3711913,"src":"rovedal_1_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3711913.html","width":130,"caption":"Jon Terje Rovedal","height":195});
															thumbnails[3717650] = clik.newPhoto({"id":3717650,"src":"CC_Adcock_1_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3717650.html","width":130,"caption":"CC Adcock","height":87});
															thumbnails[3717651] = clik.newPhoto({"id":3717651,"src":"CC_Adcock_3_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3717651.html","width":130,"caption":"CC Adcock","height":87});
															thumbnails[3717655] = clik.newPhoto({"id":3717655,"src":"CC_Adcock_4_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3717655.html","width":130,"caption":"CC Adcock","height":108});
															thumbnails[3717656] = clik.newPhoto({"id":3717656,"src":"CC_Adcock_9_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3717656.html","width":130,"caption":"CC Adcock","height":85});
															thumbnails[3717658] = clik.newPhoto({"id":3717658,"src":"Tindersticks9_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3717658.html","width":130,"caption":"Tindersticks","height":87});
															thumbnails[3717660] = clik.newPhoto({"id":3717660,"src":"Tindersticks_4_thumb.jpg","galleries_id":206619,"server_id":15,"link":"photo_3717660.html","width":130,"caption":"Tindersticks","height":101});
															thumbnails[6515902] = clik.newPhoto({"id":6515902,"src":"_DSC1221_utsnitt_pp2web_thumb.jpg","galleries_id":206616,"server_id":15,"link":"photo_6515902.html","width":130,"caption":"","height":172});
															thumbnails[6515905] = clik.newPhoto({"id":6515905,"src":"bryllup_1cweb_thumb.jpg","galleries_id":206616,"server_id":15,"link":"photo_6515905.html","width":130,"caption":"","height":104});
															thumbnails[6515907] = clik.newPhoto({"id":6515907,"src":"D2X9642_far_og_datter_justertweb_thumb.jpg","galleries_id":206616,"server_id":15,"link":"photo_6515907.html","width":130,"caption":"","height":195});
															thumbnails[6515908] = clik.newPhoto({"id":6515908,"src":"D305857_bukett_på_fjelletweb_thumb.jpg","galleries_id":206616,"server_id":15,"link":"photo_6515908.html","width":130,"caption":"","height":87});
															thumbnails[6515914] = clik.newPhoto({"id":6515914,"src":"DSC0059_hender_og_ringerweb_thumb.jpg","galleries_id":206616,"server_id":15,"link":"photo_6515914.html","width":130,"caption":"","height":87});
															thumbnails[6515924] = clik.newPhoto({"id":6515924,"src":"begge1b_D706339_ppweb_thumb.jpg","galleries_id":206616,"server_id":15,"link":"photo_6515924.html","width":130,"caption":"","height":87});
															thumbnails[6515938] = clik.newPhoto({"id":6515938,"src":"i_skogen_phototools_glow_levels_DSC5705_-_Kopiweb_thumb.jpg","galleries_id":206616,"server_id":15,"link":"photo_6515938.html","width":130,"caption":"","height":195});
															thumbnails[6515949] = clik.newPhoto({"id":6515949,"src":"sittende_ved_stryket_crop_ND36688web_thumb.jpg","galleries_id":206616,"server_id":15,"link":"photo_6515949.html","width":130,"caption":"","height":94});
															thumbnails[6515952] = clik.newPhoto({"id":6515952,"src":"sko_bukett_ringer_D706432web_thumb.jpg","galleries_id":206616,"server_id":15,"link":"photo_6515952.html","width":130,"caption":"","height":87});
															thumbnails[6515957] = clik.newPhoto({"id":6515957,"src":"staaende_i_skogen_ND36709web_thumb.jpg","galleries_id":206616,"server_id":15,"link":"photo_6515957.html","width":130,"caption":"","height":195});
															thumbnails[6515958] = clik.newPhoto({"id":6515958,"src":"ved_stryk_graafilter_phototools1_glowDSC5642web_thumb.jpg","galleries_id":206616,"server_id":15,"link":"photo_6515958.html","width":130,"caption":"","height":96});
															thumbnails[3383480] = clik.newPhoto({"id":3383480,"src":"joe leary 2_thumb.jpg","galleries_id":206553,"server_id":15,"link":"photo_3383480.html","width":130,"caption":"Joe Leary, see Links","height":195});
															thumbnails[3709735] = clik.newPhoto({"id":3709735,"src":"Det_gaar_saa_fjoera_fyker_thumb.jpg","galleries_id":219553,"server_id":15,"link":"photo_3709735.html","width":130,"caption":"Action","height":93});
															thumbnails[3383439] = clik.newPhoto({"id":3383439,"src":"leary-wilson 2_ppbw_thumb.jpg","galleries_id":206553,"server_id":15,"link":"photo_3383439.html","width":130,"caption":"Sophie Wilson (See Links) and Joe Leary","height":87});
															thumbnails[3711834] = clik.newPhoto({"id":3711834,"src":"leary_2bw2_thumb.jpg","galleries_id":206553,"server_id":15,"link":"photo_3711834.html","width":130,"caption":"Joe Leary 2","height":155});
															thumbnails[3711843] = clik.newPhoto({"id":3711843,"src":"wilson_leary_2bw2_thumb.jpg","galleries_id":206553,"server_id":15,"link":"photo_3711843.html","width":130,"caption":"Sophie Wilson and Joe Leary","height":93});
															thumbnails[3711849] = clik.newPhoto({"id":3711849,"src":"wilson_leary_4_thumb.jpg","galleries_id":206553,"server_id":15,"link":"photo_3711849.html","width":130,"caption":"Sophie Wilson and Joe Leary","height":87});
															thumbnails[3412956] = clik.newPhoto({"id":3412956,"src":"portrett 3b_pp2_thumb.jpg","galleries_id":206553,"server_id":15,"link":"photo_3412956.html","width":130,"caption":"Portrait","height":168});
															thumbnails[3412929] = clik.newPhoto({"id":3412929,"src":"leia1_thumb.jpg","galleries_id":206553,"server_id":15,"link":"photo_3412929.html","width":130,"caption":"Portrait","height":194});
															thumbnails[3412924] = clik.newPhoto({"id":3412924,"src":"nikki-1_thumb.jpg","galleries_id":206553,"server_id":15,"link":"photo_3412924.html","width":130,"caption":"Portrait","height":145});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[219552] = clik.newGallery({"parentGallery":206620,"usePopups":false,"title":"King Cobra Village","link":"gallery_219552.html","maxRecords":0.0,"photoIDs":[3635908.0,3635916.0,3635919.0,3709755.0,3709774.0],"skipIndex":0,"section_code":"gallery","featured_images":3635908.0,"id":219552,"singleSection":false});				  						galleries[206553] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery_206553.html","maxRecords":0.0,"photoIDs":[5381211.0,3383480.0,3383439.0,3711834.0,3711843.0,3711849.0,3412956.0,3412929.0,3412924.0],"skipIndex":0,"section_code":"gallery","featured_images":3383480.0,"id":206553,"singleSection":false});				  						galleries[219553] = clik.newGallery({"parentGallery":206620,"usePopups":false,"title":"Cock Fighting","link":"gallery_219553.html","maxRecords":0.0,"photoIDs":[3709609.0,3709620.0,3709624.0,3709627.0,3709635.0,3709662.0,3709730.0,3709733.0,3709738.0,3709735.0],"skipIndex":0,"section_code":"gallery","featured_images":3709735.0,"id":219553,"singleSection":false});				  						galleries[206616] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings","link":"gallery_206616.html","maxRecords":0.0,"photoIDs":[6515902.0,6515905.0,6515907.0,6515908.0,6515914.0,6515924.0,6515938.0,6515949.0,6515952.0,6515957.0,6515958.0],"skipIndex":0,"section_code":"gallery","featured_images":6515902.0,"id":206616,"singleSection":false});				  						galleries[206560] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Fine Art","link":"gallery_206560.html","maxRecords":0.0,"photoIDs":[3383768.0,3383824.0,3383832.0,3383885.0,3383898.0,3383938.0,3383945.0,3383956.0],"skipIndex":0,"section_code":"gallery","featured_images":3383768.0,"id":206560,"singleSection":false});				  						galleries[206554] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Pictorial","link":"gallery_206554.html","maxRecords":0.0,"photoIDs":[3383525.0,3383696.0,3383728.0],"skipIndex":0,"section_code":"gallery","featured_images":3383696.0,"id":206554,"singleSection":false});				  						galleries[206559] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nature and Science","link":"gallery_206559.html","maxRecords":0.0,"photoIDs":[3384510.0,3412986.0,3412999.0],"skipIndex":0,"section_code":"gallery","featured_images":"3412999,3412986,3384510","id":206559,"singleSection":false});				  						galleries[206558] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_206558.html","maxRecords":0.0,"photoIDs":[3383418.0,3383971.0,3383993.0,3384001.0],"skipIndex":0,"section_code":"gallery","featured_images":3383418.0,"id":206558,"singleSection":false});				  						galleries[206619] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Conserts","link":"gallery_206619.html","maxRecords":0.0,"photoIDs":[3385791.0,3385829.0,3385900.0,3711880.0,3711883.0,3711887.0,3711903.0,3711910.0,3711913.0,3717650.0,3717651.0,3717655.0,3717656.0,3717658.0,3717660.0],"skipIndex":0,"section_code":"gallery","featured_images":3385791.0,"id":206619,"singleSection":false});				  						galleries[206620] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Travel","link":"gallery_206620.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"3709735,3635908","id":206620,"singleSection":false});				  						galleries[216167] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Photos from SWPP Convention 2009","link":"gallery_216167.html","maxRecords":0.0,"photoIDs":[3532541.0,3532542.0,3532544.0,3532684.0,3532685.0],"skipIndex":0,"section_code":"gallery","featured_images":3532541.0,"id":216167,"singleSection":false});				  						galleries[222237] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Buildings","link":"gallery_222237.html","maxRecords":0.0,"photoIDs":[3635922.0,3635941.0],"skipIndex":0,"section_code":"gallery","featured_images":"3635941,3635922","id":222237,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '3383418';
imageSets[2] = '6515902,3635908,3532541,3385791,3383768,3383696,3383418,3709735,3383480';
imageSets[3] = '6515958,6515957,6515952,6515949,6515938,6515924,6515914,6515908,6515907,6515905,6515902,5381211,3717660,3717658,3717656,3717655,3717651,3717650,3711913,3711910,3711903,3711887,3711883,3711880,3711849,3711843,3711834,3709774,3709755,3709738,3709735,3709733,3709730,3709662,3709635,3709627,3709624,3709620,3709609,3635941,3635922,3635919,3635916,3635908,3532685,3532684,3532544,3532542,3532541,3412999';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/soeystad/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/soeystad/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/soeystad/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/soeystad/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/soeystad/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/soeystad/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/soeystad/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/soeystad/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 = 'Photography @ Steinar: ' + 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;
	}
}

			

