window.thumbnails = {};
thumbnails[8578218] = clik.newPhoto({"link":"photo_8578218.html","caption":"","height":97,"id":8578218,"server_id":31,"src":"NVHladies_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8578219] = clik.newPhoto({"link":"photo_8578219.html","caption":"","height":142,"id":8578219,"server_id":31,"src":"NVHhurdles_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8578259] = clik.newPhoto({"link":"photo_8578259.html","caption":"","height":98,"id":8578259,"server_id":31,"src":"NVHTom_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8578282] = clik.newPhoto({"link":"photo_8578282.html","caption":"","height":98,"id":8578282,"server_id":31,"src":"NVHtrackrunner_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8578283] = clik.newPhoto({"link":"photo_8578283.html","caption":"","height":98,"id":8578283,"server_id":31,"src":"NVHmensteam_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8640367] = clik.newPhoto({"link":"photo_8640367.html","caption":"","height":170,"id":8640367,"server_id":31,"src":"emma_sutton_park_thumb.jpg","galleries_id":452429,"width":130});
thumbnails[8640370] = clik.newPhoto({"link":"photo_8640370.html","caption":"","height":232,"id":8640370,"server_id":31,"src":"lucas_start_sutton_park_thumb.jpg","galleries_id":452429,"width":130});
thumbnails[8640371] = clik.newPhoto({"link":"photo_8640371.html","caption":"","height":134,"id":8640371,"server_id":31,"src":"lucas_sutton_park_thumb.jpg","galleries_id":452429,"width":130});
thumbnails[8640372] = clik.newPhoto({"link":"photo_8640372.html","caption":"","height":190,"id":8640372,"server_id":31,"src":"oct2011_030_thumb.jpg","galleries_id":452429,"width":130});
thumbnails[8640374] = clik.newPhoto({"link":"photo_8640374.html","caption":"","height":98,"id":8640374,"server_id":31,"src":"oct2011_036_thumb.jpg","galleries_id":452429,"width":130});
thumbnails[8640375] = clik.newPhoto({"link":"photo_8640375.html","caption":"","height":225,"id":8640375,"server_id":31,"src":"ollie_sutton_park_thumb.jpg","galleries_id":452429,"width":130});
thumbnails[8640376] = clik.newPhoto({"link":"photo_8640376.html","caption":"","height":81,"id":8640376,"server_id":31,"src":"start_U13_sutton_park_thumb.jpg","galleries_id":452429,"width":130});
thumbnails[8640377] = clik.newPhoto({"link":"photo_8640377.html","caption":"","height":207,"id":8640377,"server_id":31,"src":"U13_sutton_park_thumb.jpg","galleries_id":452429,"width":130});
thumbnails[8640378] = clik.newPhoto({"link":"photo_8640378.html","caption":"","height":98,"id":8640378,"server_id":31,"src":"U13_team_Sutton_Park_2011_thumb.jpg","galleries_id":452429,"width":130});
thumbnails[8640391] = clik.newPhoto({"link":"photo_8640391.html","caption":"","height":134,"id":8640391,"server_id":31,"src":"Alex_thumb.jpg","galleries_id":456354,"width":130});
thumbnails[8640392] = clik.newPhoto({"link":"photo_8640392.html","caption":"","height":156,"id":8640392,"server_id":31,"src":"Amy_thumb.jpg","galleries_id":456354,"width":130});
thumbnails[8640393] = clik.newPhoto({"link":"photo_8640393.html","caption":"","height":197,"id":8640393,"server_id":31,"src":"Brad_thumb.jpg","galleries_id":456354,"width":130});
thumbnails[8640394] = clik.newPhoto({"link":"photo_8640394.html","caption":"","height":132,"id":8640394,"server_id":31,"src":"Georgia_thumb.jpg","galleries_id":456354,"width":130});
thumbnails[8640395] = clik.newPhoto({"link":"photo_8640395.html","caption":"","height":156,"id":8640395,"server_id":31,"src":"Lucas_thumb.jpg","galleries_id":456354,"width":130});
thumbnails[8640396] = clik.newPhoto({"link":"photo_8640396.html","caption":"","height":126,"id":8640396,"server_id":31,"src":"ollie2_thumb.jpg","galleries_id":456354,"width":130});
thumbnails[8640397] = clik.newPhoto({"link":"photo_8640397.html","caption":"","height":143,"id":8640397,"server_id":31,"src":"theyre_off_thumb.jpg","galleries_id":456354,"width":130});
thumbnails[8640398] = clik.newPhoto({"link":"photo_8640398.html","caption":"","height":252,"id":8640398,"server_id":31,"src":"U13_and_NVH_flag_thumb.jpg","galleries_id":456354,"width":130});
thumbnails[8640399] = clik.newPhoto({"link":"photo_8640399.html","caption":"","height":121,"id":8640399,"server_id":31,"src":"U13_team_thumb.jpg","galleries_id":456354,"width":130});
thumbnails[8640419] = clik.newPhoto({"link":"photo_8640419.html","caption":"","height":164,"id":8640419,"server_id":31,"src":"lucas_1BB72143-24E8-5EC4-4F45E7E887EFAC93_thumb.jpg","galleries_id":456361,"width":130});
thumbnails[8640421] = clik.newPhoto({"link":"photo_8640421.html","caption":"","height":98,"id":8640421,"server_id":31,"src":"oct11_003_thumb.jpg","galleries_id":456361,"width":130});
thumbnails[8640422] = clik.newPhoto({"link":"photo_8640422.html","caption":"","height":98,"id":8640422,"server_id":31,"src":"oct11_008_thumb.jpg","galleries_id":456361,"width":130});
thumbnails[8640430] = clik.newPhoto({"link":"photo_8640430.html","caption":"","height":87,"id":8640430,"server_id":31,"src":"the_start_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8666791] = clik.newPhoto({"link":"photo_8666791.html","caption":"Nene 10 Mikey Chapman","height":195,"id":8666791,"server_id":31,"src":"Nen_10_Mikey_Chapman_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8666855] = clik.newPhoto({"link":"photo_8666855.html","caption":"Nene 10 ","height":87,"id":8666855,"server_id":31,"src":"Nene_10_angry_at_going_the_wrong_way_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8666914] = clik.newPhoto({"link":"photo_8666914.html","caption":"Nene 10 The Finish","height":195,"id":8666914,"server_id":31,"src":"Nene_10_the_finish_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8666951] = clik.newPhoto({"link":"photo_8666951.html","caption":"Nene 10 The Start","height":87,"id":8666951,"server_id":31,"src":"Nene_10_the_start_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8667046] = clik.newPhoto({"link":"photo_8667046.html","caption":"Harrier League I","height":98,"id":8667046,"server_id":31,"src":"Harrier_League_I_thumb.JPG","galleries_id":452428,"width":130});
thumbnails[8667047] = clik.newPhoto({"link":"photo_8667047.html","caption":"Harrier League II","height":98,"id":8667047,"server_id":31,"src":"Harrier_League_II_thumb.JPG","galleries_id":452428,"width":130});
thumbnails[8667048] = clik.newPhoto({"link":"photo_8667048.html","caption":"Harrier League III","height":98,"id":8667048,"server_id":31,"src":"Harrier_League_III_thumb.JPG","galleries_id":452428,"width":130});
thumbnails[8667049] = clik.newPhoto({"link":"photo_8667049.html","caption":"Harrier League IV","height":98,"id":8667049,"server_id":31,"src":"Harrier_League_IV_thumb.JPG","galleries_id":452428,"width":130});
thumbnails[8687444] = clik.newPhoto({"link":"photo_8687444.html","caption":"","height":98,"id":8687444,"server_id":31,"src":"Wells_beach_day_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8746345] = clik.newPhoto({"link":"photo_8746345.html","caption":"Click for more photos","height":196,"id":8746345,"server_id":31,"src":"National_XC_relays_2011_opt_thumb.jpg","galleries_id":460795,"width":130});
thumbnails[8788803] = clik.newPhoto({"link":"photo_8788803.html","caption":"","height":181,"id":8788803,"server_id":31,"src":"Cranwell_thumb.jpg","galleries_id":462738,"width":130});
thumbnails[8788811] = clik.newPhoto({"link":"photo_8788811.html","caption":"","height":217,"id":8788811,"server_id":31,"src":"Picture2_thumb.jpg","galleries_id":462738,"width":130});
thumbnails[8788812] = clik.newPhoto({"link":"photo_8788812.html","caption":"","height":148,"id":8788812,"server_id":31,"src":"Picture3_thumb.jpg","galleries_id":462738,"width":130});
thumbnails[8788813] = clik.newPhoto({"link":"photo_8788813.html","caption":"","height":230,"id":8788813,"server_id":31,"src":"Picture4_thumb.jpg","galleries_id":462738,"width":130});
thumbnails[8788814] = clik.newPhoto({"link":"photo_8788814.html","caption":"","height":112,"id":8788814,"server_id":31,"src":"Picture5_thumb.jpg","galleries_id":462738,"width":130});
thumbnails[8788815] = clik.newPhoto({"link":"photo_8788815.html","caption":"","height":98,"id":8788815,"server_id":31,"src":"Picture6_thumb.jpg","galleries_id":462738,"width":130});
thumbnails[8788816] = clik.newPhoto({"link":"photo_8788816.html","caption":"","height":98,"id":8788816,"server_id":31,"src":"Picture7_thumb.jpg","galleries_id":462738,"width":130});
thumbnails[8788817] = clik.newPhoto({"link":"photo_8788817.html","caption":"","height":98,"id":8788817,"server_id":31,"src":"Picture8_thumb.jpg","galleries_id":462738,"width":130});
thumbnails[8788818] = clik.newPhoto({"link":"photo_8788818.html","caption":"","height":98,"id":8788818,"server_id":31,"src":"Picture9_thumb.jpg","galleries_id":462738,"width":130});
thumbnails[8806181] = clik.newPhoto({"link":"photo_8806181.html","caption":"","height":98,"id":8806181,"server_id":31,"src":"oct2011_038_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8806183] = clik.newPhoto({"link":"photo_8806183.html","caption":"","height":98,"id":8806183,"server_id":31,"src":"oct11_009_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8806185] = clik.newPhoto({"link":"photo_8806185.html","caption":"","height":98,"id":8806185,"server_id":31,"src":"oct11_010_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8806186] = clik.newPhoto({"link":"photo_8806186.html","caption":"","height":98,"id":8806186,"server_id":31,"src":"oct11_011_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8806212] = clik.newPhoto({"link":"photo_8806212.html","caption":"","height":87,"id":8806212,"server_id":31,"src":"DSC_0938_800x536_thumb.jpg","galleries_id":463581,"width":130});
thumbnails[8806216] = clik.newPhoto({"link":"photo_8806216.html","caption":"","height":87,"id":8806216,"server_id":31,"src":"DSC_0942_800x536_thumb.jpg","galleries_id":463581,"width":130});
thumbnails[8861190] = clik.newPhoto({"link":"photo_8861190.html","caption":"","height":196,"id":8861190,"server_id":31,"src":"NVH10_thumb.jpg","galleries_id":465939,"width":130});
thumbnails[8914081] = clik.newPhoto({"link":"photo_8914081.html","caption":"To view John Pryzbyl's gallery of images from this year's Parlouf, click on the link above. ","height":196,"id":8914081,"server_id":31,"src":"Optimized-parlouf_thumb.jpg","galleries_id":468911,"width":130});
thumbnails[8988526] = clik.newPhoto({"link":"photo_8988526.html","caption":"To view John's images from the County Champs, follow the link at the top of this page (just below the main menu)","height":86,"id":8988526,"server_id":31,"src":"CountyChamps2012_thumb.jpg","galleries_id":473368,"width":130});
thumbnails[9016975] = clik.newPhoto({"link":"photo_9016975.html","caption":"","height":87,"id":9016975,"server_id":31,"src":"DSC_0051_thumb.JPG","galleries_id":475239,"width":130});
thumbnails[9016992] = clik.newPhoto({"link":"photo_9016992.html","caption":"","height":87,"id":9016992,"server_id":31,"src":"Optimized-DSC_0056_thumb.JPG","galleries_id":475239,"width":130});
thumbnails[9016994] = clik.newPhoto({"link":"photo_9016994.html","caption":"","height":87,"id":9016994,"server_id":31,"src":"Optimized-DSC_0057_thumb.JPG","galleries_id":475239,"width":130});
thumbnails[9027006] = clik.newPhoto({"link":"photo_9027006.html","caption":"Part of the route for the Radar Challenge 10k race","height":87,"id":9027006,"server_id":31,"src":"Cloot_Drove_-_geograph.org_thumb.jpg","galleries_id":452428,"width":130});
thumbnails[8661861] = clik.newPhoto({"link":"photo_8661861.html","caption":"Ray Church - Club Secretary","height":86,"id":8661861,"server_id":31,"src":"ray_c_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661869] = clik.newPhoto({"link":"photo_8661869.html","caption":"Ken Maggs - Treasurer & Junior Sprints Coach ","height":86,"id":8661869,"server_id":31,"src":"ken_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661872] = clik.newPhoto({"link":"photo_8661872.html","caption":"Andrea Chapman - Subs Secretary","height":86,"id":8661872,"server_id":31,"src":"andrea_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661880] = clik.newPhoto({"link":"photo_8661880.html","caption":"Russ Prosser - XC Secretary & Junior Endurance Coach","height":98,"id":8661880,"server_id":31,"src":"oct11_0091_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661887] = clik.newPhoto({"link":"photo_8661887.html","caption":"Lance Hemmings - Road Race Secretary","height":82,"id":8661887,"server_id":31,"src":"NVH-Logo_web1_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661892] = clik.newPhoto({"link":"photo_8661892.html","caption":"Paddy Ivens - Promotions","height":86,"id":8661892,"server_id":31,"src":"paddy_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661895] = clik.newPhoto({"link":"photo_8661895.html","caption":"Jackie Read - Child Protection Officer","height":86,"id":8661895,"server_id":31,"src":"jackie_r_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661905] = clik.newPhoto({"link":"photo_8661905.html","caption":"Arthur Simmonds - Lead Coach (Spalding)","height":86,"id":8661905,"server_id":31,"src":"arthur_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661909] = clik.newPhoto({"link":"photo_8661909.html","caption":"Judith Jacobs - Asst Junior Coach & Social Committee","height":86,"id":8661909,"server_id":31,"src":"judith_j_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661913] = clik.newPhoto({"link":"photo_8661913.html","caption":"Mike Prosser - Lead Coach (Bourne)","height":86,"id":8661913,"server_id":31,"src":"mike_p_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661915] = clik.newPhoto({"link":"photo_8661915.html","caption":"Mike Hornsby - Junior Hurdles & Jumps Coach","height":86,"id":8661915,"server_id":31,"src":"mike_h_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661924] = clik.newPhoto({"link":"photo_8661924.html","caption":"Tim Needham - Coach & Men's British League Team Manager","height":86,"id":8661924,"server_id":31,"src":"tim_n_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661931] = clik.newPhoto({"link":"photo_8661931.html","caption":"Kate Hampson - Coaching & Officials Liaison Officer","height":86,"id":8661931,"server_id":31,"src":"kate_h_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661937] = clik.newPhoto({"link":"photo_8661937.html","caption":"Ruth Jones - Women's Track Team Manager","height":82,"id":8661937,"server_id":31,"src":"NVH-Logo_web_3ED2D3B2-1E4F-37DC-719C608E9562E441_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661943] = clik.newPhoto({"link":"photo_8661943.html","caption":"Emma Randall - Women's Team Captain","height":86,"id":8661943,"server_id":31,"src":"emma_r_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661947] = clik.newPhoto({"link":"photo_8661947.html","caption":"Dave Brown - Men's Team Captain","height":82,"id":8661947,"server_id":31,"src":"NVH-Logo_web2_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661955] = clik.newPhoto({"link":"photo_8661955.html","caption":"Sharon Pryzbyl - Social Committee & Minutes Secretary","height":86,"id":8661955,"server_id":31,"src":"sharon_p_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661963] = clik.newPhoto({"link":"photo_8661963.html","caption":"Anne-Marie Wilson - Social Committee","height":86,"id":8661963,"server_id":31,"src":"anne_marie_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661965] = clik.newPhoto({"link":"photo_8661965.html","caption":"Tony Harker - Committee Member","height":82,"id":8661965,"server_id":31,"src":"NVH-Logo_web3_thumb.jpg","galleries_id":457341,"width":130});
thumbnails[8661970] = clik.newPhoto({"link":"photo_8661970.html","caption":"John Pryzbyl - Chief Photographer","height":86,"id":8661970,"server_id":31,"src":"john_p_thumb.jpg","galleries_id":457341,"width":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
galleries[475239] = clik.newGallery({"photoIDs":[9016975,9016992,9016994],"link":"gallery_475239.html","skipIndex":0,"section_code":"gallery","id":475239,"parentGallery":"","featured_images":9016975,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"North Mids League, Nottingham 14.01.12"});galleries[473368] = clik.newGallery({"photoIDs":[8988526],"link":"gallery_473368.html","skipIndex":0,"section_code":"gallery","id":473368,"parentGallery":"","featured_images":8988526,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Cambs County Champs 08.01.12"});galleries[468911] = clik.newGallery({"photoIDs":[8914081],"link":"gallery_468911.html","skipIndex":0,"section_code":"gallery","id":468911,"parentGallery":"","featured_images":8914081,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"NVH Christmas Parlouf 15.12.11"});galleries[465939] = clik.newGallery({"photoIDs":[8861190],"link":"gallery_465939.html","skipIndex":0,"section_code":"gallery","id":465939,"parentGallery":"","featured_images":8861190,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"NVH 10   04.12.11"});galleries[463581] = clik.newGallery({"photoIDs":[8806212,8806216],"link":"gallery_463581.html","skipIndex":0,"section_code":"gallery","id":463581,"parentGallery":"","featured_images":"8806216,8806212","maxRecords":0,"usePopups":false,"singleSection":false,"title":" North Mids Corby 12.11.11"});galleries[462738] = clik.newGallery({"photoIDs":[8788803,8788811,8788812,8788813,8788814,8788815,8788816,8788817,8788818],"link":"gallery_462738.html","skipIndex":0,"section_code":"gallery","id":462738,"parentGallery":"","featured_images":8788816,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"Lincs League RAF Cranwell 20.11.11"});galleries[460795] = clik.newGallery({"photoIDs":[8746345],"link":"gallery_460795.html","skipIndex":0,"section_code":"gallery","id":460795,"parentGallery":"","featured_images":8746345,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"National XC Relays, Mansfield, 05.11.11"});galleries[452429] = clik.newGallery({"photoIDs":[8640367,8640370,8640371,8640372,8640374,8640375,8640376,8640377,8640378],"link":"gallery_452429.html","skipIndex":0,"section_code":"gallery","id":452429,"parentGallery":"","featured_images":8640376,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"National 6 & 4 Stage Relay, 16.10.11"});galleries[456354] = clik.newGallery({"photoIDs":[8640391,8640392,8640393,8640394,8640395,8640396,8640397,8640398,8640399],"link":"gallery_456354.html","skipIndex":0,"section_code":"gallery","id":456354,"parentGallery":"","featured_images":8640397,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"North Mids League, Derby 08.10.11"});galleries[456361] = clik.newGallery({"photoIDs":[8640419,8640421,8640422],"link":"gallery_456361.html","skipIndex":0,"section_code":"gallery","id":456361,"parentGallery":"","featured_images":8640421,"maxRecords":0,"usePopups":false,"singleSection":false,"title":"South XC Relays, Biggleswade, 01.10.11"});galleries[452428] = clik.newGallery({"photoIDs":[8578218,8578219,8578259,8578282,8578283,8640430,8666791,8666855,8666914,8666951,8667046,8667047,8667048,8667049,8687444,8806181,8806183,8806185,8806186,9027006],"link":"gallery_452428.html","skipIndex":0,"section_code":"gallery","id":452428,"parentGallery":"","featured_images":"9027006,8806186,8806185,8806183,8806181,8687444,8667049,8667048,8667047,8667046","maxRecords":0,"usePopups":false,"singleSection":false,"title":"General photos"});galleries[457341] = clik.newGallery({"photoIDs":[8661861,8661869,8661872,8661880,8661887,8661892,8661895,8661905,8661909,8661913,8661915,8661924,8661931,8661937,8661943,8661947,8661955,8661963,8661965,8661970],"link":"gallery_457341.html","skipIndex":0,"section_code":"gallery","id":457341,"parentGallery":"","featured_images":"8661970,8661965,8661963,8661955,8661947,8661943,8661937,8661931,8661924,8661915","maxRecords":0,"usePopups":false,"singleSection":false,"title":"Committee members - who does what"});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[3] = '9027006,9016994,9016992,9016975,8988526,8914081,8861190,8806216,8806212,8806186,8806185,8806183,8806181,8788818,8788817,8788816,8788815,8788814,8788813,8788812,8788811,8788803,8746345,8687444,8667049,8667048,8667047,8667046,8666951,8666914,8666855,8666791,8661970,8661965,8661963,8661955,8661947,8661943,8661937,8661931,8661924,8661915,8661913,8661909,8661905,8661895,8661892,8661887,8661880,8661872';
imageSets[2] = '9016975,8988526,8914081,8861190,8788816,8746345,8640421,8640397,8640376';
imageSets[1] = '8806186,8640397,8640394,8578283,8578259,8578218';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/NVH/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/NVH/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/NVH/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/NVH/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/NVH/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/NVH/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/NVH/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/NVH/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 = 'Nene Valley Harriers: ' + 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;
	}
}

		

