window.thumbnails = {};
															thumbnails[8584699] = clik.newPhoto({"id":8584699,"src":"_MG_8763_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584699.html","width":130,"caption":"","height":195});
															thumbnails[8584636] = clik.newPhoto({"id":8584636,"src":"_MG_87374_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584636.html","width":130,"caption":"","height":87});
															thumbnails[8584687] = clik.newPhoto({"id":8584687,"src":"_MG_8756_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584687.html","width":130,"caption":"","height":195});
															thumbnails[8584692] = clik.newPhoto({"id":8584692,"src":"_MG_8760_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584692.html","width":130,"caption":"","height":195});
															thumbnails[8584694] = clik.newPhoto({"id":8584694,"src":"_MG_8761_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584694.html","width":130,"caption":"","height":196});
															thumbnails[8584702] = clik.newPhoto({"id":8584702,"src":"_MG_8767_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584702.html","width":130,"caption":"","height":195});
															thumbnails[8584703] = clik.newPhoto({"id":8584703,"src":"_MG_8773_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584703.html","width":130,"caption":"","height":195});
															thumbnails[8584708] = clik.newPhoto({"id":8584708,"src":"_MG_8776_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584708.html","width":130,"caption":"","height":195});
															thumbnails[8584768] = clik.newPhoto({"id":8584768,"src":"_MG_8789_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584768.html","width":130,"caption":"","height":195});
															thumbnails[8584772] = clik.newPhoto({"id":8584772,"src":"_MG_8790_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584772.html","width":130,"caption":"","height":195});
															thumbnails[8584775] = clik.newPhoto({"id":8584775,"src":"_MG_8793_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584775.html","width":130,"caption":"","height":195});
															thumbnails[8584782] = clik.newPhoto({"id":8584782,"src":"_MG_8794_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584782.html","width":130,"caption":"","height":195});
															thumbnails[8584787] = clik.newPhoto({"id":8584787,"src":"_MG_8795_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584787.html","width":130,"caption":"","height":195});
															thumbnails[8584793] = clik.newPhoto({"id":8584793,"src":"_MG_8800_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584793.html","width":130,"caption":"","height":195});
															thumbnails[8584796] = clik.newPhoto({"id":8584796,"src":"_MG_8802_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584796.html","width":130,"caption":"","height":195});
															thumbnails[8584797] = clik.newPhoto({"id":8584797,"src":"_MG_8806_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584797.html","width":130,"caption":"","height":195});
															thumbnails[8584799] = clik.newPhoto({"id":8584799,"src":"_MG_8810_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584799.html","width":130,"caption":"","height":195});
															thumbnails[8584806] = clik.newPhoto({"id":8584806,"src":"_MG_8811_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584806.html","width":130,"caption":"","height":195});
															thumbnails[8584808] = clik.newPhoto({"id":8584808,"src":"_MG_8814_thumb.jpg","galleries_id":453892,"server_id":19,"link":"photo_8584808.html","width":130,"caption":"","height":195});
															thumbnails[8096262] = clik.newPhoto({"id":8096262,"src":"_MG_7342_thumb.jpg","galleries_id":417989,"server_id":18,"link":"photo_8096262.html","width":130,"caption":"Hunstanton beach","height":195});
															thumbnails[8026645] = clik.newPhoto({"id":8026645,"src":"_MG_7099_thumb.jpg","galleries_id":417990,"server_id":18,"link":"photo_8026645.html","width":130,"caption":"Muzzle Flash","height":87});
															thumbnails[8026650] = clik.newPhoto({"id":8026650,"src":"_MG_7129_thumb.jpg","galleries_id":417990,"server_id":18,"link":"photo_8026650.html","width":130,"caption":"Hurricane","height":83});
															thumbnails[7884720] = clik.newPhoto({"id":7884720,"src":"_MG_5788_thumb.jpg","galleries_id":396330,"server_id":18,"link":"photo_7884720.html","width":130,"caption":"","height":173});
															thumbnails[7884724] = clik.newPhoto({"id":7884724,"src":"_MG_5861_thumb.jpg","galleries_id":396330,"server_id":18,"link":"photo_7884724.html","width":130,"caption":"","height":195});
															thumbnails[7884727] = clik.newPhoto({"id":7884727,"src":"_MG_5768_thumb.jpg","galleries_id":396330,"server_id":18,"link":"photo_7884727.html","width":130,"caption":"","height":195});
															thumbnails[7974417] = clik.newPhoto({"id":7974417,"src":"Torosay-Oriental-Garden3_thumb.jpg","galleries_id":428895,"server_id":18,"link":"photo_7974417.html","width":130,"caption":"Torosay Oriential Garden","height":108});
															thumbnails[7974434] = clik.newPhoto({"id":7974434,"src":"yellow-flower_thumb.jpg","galleries_id":428895,"server_id":18,"link":"photo_7974434.html","width":130,"caption":"Skunk Cabbage","height":195});
															thumbnails[8103268] = clik.newPhoto({"id":8103268,"src":"buzzard_01_thumb.jpg","galleries_id":428895,"server_id":18,"link":"photo_8103268.html","width":130,"caption":"Buzzard","height":108});
															thumbnails[8103277] = clik.newPhoto({"id":8103277,"src":"_MG_0234_thumb.JPG","galleries_id":428895,"server_id":18,"link":"photo_8103277.html","width":130,"caption":"Waterfall","height":87});
															thumbnails[8103336] = clik.newPhoto({"id":8103336,"src":"147_1_thumb.JPG","galleries_id":428895,"server_id":18,"link":"photo_8103336.html","width":130,"caption":"Mull Rally at Griben","height":92});
															thumbnails[8103383] = clik.newPhoto({"id":8103383,"src":"13-05-2007_012_thumb.jpg","galleries_id":428895,"server_id":18,"link":"photo_8103383.html","width":130,"caption":"stream","height":195});
															thumbnails[8103580] = clik.newPhoto({"id":8103580,"src":"Lynns_Birthday_Holiday_043_thumb.jpg","galleries_id":428895,"server_id":18,"link":"photo_8103580.html","width":130,"caption":"Stained Glass Window","height":173});
															thumbnails[8103663] = clik.newPhoto({"id":8103663,"src":"buzzard___thumb.JPG","galleries_id":428895,"server_id":18,"link":"photo_8103663.html","width":130,"caption":"Buzzard","height":87});
															thumbnails[8103667] = clik.newPhoto({"id":8103667,"src":"_MG_0272_thumb.JPG","galleries_id":428895,"server_id":18,"link":"photo_8103667.html","width":130,"caption":"waterfall","height":195});
															thumbnails[8103670] = clik.newPhoto({"id":8103670,"src":"_MG_0275_thumb.JPG","galleries_id":428895,"server_id":18,"link":"photo_8103670.html","width":130,"caption":"waterfall","height":195});
															thumbnails[8103688] = clik.newPhoto({"id":8103688,"src":"corran_lighthouse1_thumb.jpg","galleries_id":428895,"server_id":18,"link":"photo_8103688.html","width":130,"caption":"Corran Lighthouse","height":195});
															thumbnails[8103708] = clik.newPhoto({"id":8103708,"src":"ride_out_07-04-2007_039_thumb.jpg","galleries_id":428895,"server_id":18,"link":"photo_8103708.html","width":130,"caption":"How did I not see that","height":87});
															thumbnails[8103715] = clik.newPhoto({"id":8103715,"src":"3_lochs_low000008_thumb.JPG","galleries_id":428895,"server_id":18,"link":"photo_8103715.html","width":130,"caption":"3 Lochs, Ishriff, Isle of Mull","height":87});
															thumbnails[8103719] = clik.newPhoto({"id":8103719,"src":"_MG_0208_thumb.JPG","galleries_id":428895,"server_id":18,"link":"photo_8103719.html","width":130,"caption":"Heather","height":87});
															thumbnails[8103758] = clik.newPhoto({"id":8103758,"src":"Skipton_coutyard_thumb.jpg","galleries_id":428895,"server_id":18,"link":"photo_8103758.html","width":130,"caption":"Courtyard at Skipton castle","height":156});
															thumbnails[8103763] = clik.newPhoto({"id":8103763,"src":"Deer_filtered_thumb.jpg","galleries_id":428895,"server_id":18,"link":"photo_8103763.html","width":130,"caption":"Red Deer Stag","height":156});
															thumbnails[8103774] = clik.newPhoto({"id":8103774,"src":"Loch_Buie_001_thumb.jpg","galleries_id":428895,"server_id":18,"link":"photo_8103774.html","width":130,"caption":"Stream at Ardura","height":108});
															thumbnails[8103798] = clik.newPhoto({"id":8103798,"src":"Glen_More000010_thumb.jpg","galleries_id":428895,"server_id":18,"link":"photo_8103798.html","width":130,"caption":"Stream in Glem More","height":156});
															thumbnails[8103844] = clik.newPhoto({"id":8103844,"src":"3_Lochs_BW_thumb.jpg","galleries_id":428895,"server_id":18,"link":"photo_8103844.html","width":130,"caption":"3 Lochs, Ishriff, Isle of Mull","height":108});
															thumbnails[8103925] = clik.newPhoto({"id":8103925,"src":"sailing_boat_thumb.jpg","galleries_id":428895,"server_id":18,"link":"photo_8103925.html","width":130,"caption":"Sailing Boat","height":156});
															thumbnails[8103939] = clik.newPhoto({"id":8103939,"src":"sea_eagle_filtered_thumb.jpg","galleries_id":428895,"server_id":18,"link":"photo_8103939.html","width":130,"caption":"White Tailed Sea Eagle","height":195});
															thumbnails[8103952] = clik.newPhoto({"id":8103952,"src":"torosy_thumb.JPG","galleries_id":428895,"server_id":18,"link":"photo_8103952.html","width":130,"caption":"Torosay Castle","height":87});
															thumbnails[8171708] = clik.newPhoto({"id":8171708,"src":"_MG_0057_thumb.jpg","galleries_id":417989,"server_id":18,"link":"photo_8171708.html","width":130,"caption":"Waterfall","height":87});
															thumbnails[8431406] = clik.newPhoto({"id":8431406,"src":"_MG_7887_thumb.jpg","galleries_id":417989,"server_id":37,"link":"photo_8431406.html","width":130,"caption":"Sunset at Penshaw Monument","height":195});
															thumbnails[7732348] = clik.newPhoto({"id":7732348,"src":"_MG_4996_thumb.jpg","galleries_id":417990,"server_id":18,"link":"photo_7732348.html","width":130,"caption":"","height":195});
															thumbnails[7732390] = clik.newPhoto({"id":7732390,"src":"_MG_5105_thumb.jpg","galleries_id":396330,"server_id":18,"link":"photo_7732390.html","width":130,"caption":"","height":195});
															thumbnails[7732396] = clik.newPhoto({"id":7732396,"src":"_MG_5154bw_thumb.jpg","galleries_id":396330,"server_id":18,"link":"photo_7732396.html","width":130,"caption":"","height":195});
															thumbnails[7732399] = clik.newPhoto({"id":7732399,"src":"_MG_5301_thumb.jpg","galleries_id":417990,"server_id":18,"link":"photo_7732399.html","width":130,"caption":"","height":122});
															thumbnails[7732406] = clik.newPhoto({"id":7732406,"src":"_MG_5345_thumb.jpg","galleries_id":417990,"server_id":18,"link":"photo_7732406.html","width":130,"caption":"","height":195});
															thumbnails[7732415] = clik.newPhoto({"id":7732415,"src":"2_falls_1_thumb.jpg","galleries_id":417989,"server_id":18,"link":"photo_7732415.html","width":130,"caption":"","height":87});
															thumbnails[7732435] = clik.newPhoto({"id":7732435,"src":"Ardvegnish000004_thumb.jpg","galleries_id":417989,"server_id":18,"link":"photo_7732435.html","width":130,"caption":"","height":195});
															thumbnails[7732444] = clik.newPhoto({"id":7732444,"src":"Blackberrys_thumb.jpg","galleries_id":417988,"server_id":18,"link":"photo_7732444.html","width":130,"caption":"","height":195});
															thumbnails[7732445] = clik.newPhoto({"id":7732445,"src":"corran_lighthouse_thumb.jpg","galleries_id":417989,"server_id":18,"link":"photo_7732445.html","width":130,"caption":"","height":195});
															thumbnails[7732451] = clik.newPhoto({"id":7732451,"src":"feet_5_thumb.jpg","galleries_id":396330,"server_id":18,"link":"photo_7732451.html","width":130,"caption":"","height":163});
															thumbnails[7732454] = clik.newPhoto({"id":7732454,"src":"full_bw_thumb.jpg","galleries_id":396330,"server_id":18,"link":"photo_7732454.html","width":130,"caption":"","height":192});
															thumbnails[7732457] = clik.newPhoto({"id":7732457,"src":"heather_1_thumb.jpg","galleries_id":396330,"server_id":18,"link":"photo_7732457.html","width":130,"caption":"","height":195});
															thumbnails[7732472] = clik.newPhoto({"id":7732472,"src":"hollys_dog6_thumb.jpg","galleries_id":396330,"server_id":18,"link":"photo_7732472.html","width":130,"caption":"","height":184});
															thumbnails[7732478] = clik.newPhoto({"id":7732478,"src":"IMG_0001_thumb.jpg","galleries_id":417989,"server_id":18,"link":"photo_7732478.html","width":130,"caption":"","height":87});
															thumbnails[7732482] = clik.newPhoto({"id":7732482,"src":"IMG_0006_thumb.jpg","galleries_id":417989,"server_id":18,"link":"photo_7732482.html","width":130,"caption":"","height":87});
															thumbnails[7732490] = clik.newPhoto({"id":7732490,"src":"IMG_0011_thumb.jpg","galleries_id":417988,"server_id":18,"link":"photo_7732490.html","width":130,"caption":"","height":87});
															thumbnails[7732493] = clik.newPhoto({"id":7732493,"src":"IMG_0037_thumb.jpg","galleries_id":417988,"server_id":18,"link":"photo_7732493.html","width":130,"caption":"","height":195});
															thumbnails[7732496] = clik.newPhoto({"id":7732496,"src":"June_021_thumb.jpg","galleries_id":417988,"server_id":18,"link":"photo_7732496.html","width":130,"caption":"","height":98});
															thumbnails[7732506] = clik.newPhoto({"id":7732506,"src":"ride_out_07-04-2007_015_thumb.jpg","galleries_id":417989,"server_id":18,"link":"photo_7732506.html","width":130,"caption":"","height":87});
															thumbnails[7732517] = clik.newPhoto({"id":7732517,"src":"otters000009_thumb.jpg","galleries_id":417988,"server_id":18,"link":"photo_7732517.html","width":130,"caption":"","height":184});
															thumbnails[7732520] = clik.newPhoto({"id":7732520,"src":"puffinsweb_thumb.jpg","galleries_id":417988,"server_id":18,"link":"photo_7732520.html","width":130,"caption":"","height":92});
															thumbnails[7732523] = clik.newPhoto({"id":7732523,"src":"reddeerstag_thumb.jpg","galleries_id":417988,"server_id":18,"link":"photo_7732523.html","width":130,"caption":"","height":195});
															thumbnails[7326804] = clik.newPhoto({"id":7326804,"src":"lkf4244_thumb.jpg","galleries_id":417987,"server_id":18,"link":"photo_7326804.html","width":130,"caption":"","height":87});
															thumbnails[7326850] = clik.newPhoto({"id":7326850,"src":"lkf4310_thumb.jpg","galleries_id":396330,"server_id":18,"link":"photo_7326850.html","width":130,"caption":"","height":195});
															thumbnails[7326876] = clik.newPhoto({"id":7326876,"src":"lkf4348_thumb.jpg","galleries_id":417987,"server_id":18,"link":"photo_7326876.html","width":130,"caption":"","height":87});
															thumbnails[7722449] = clik.newPhoto({"id":7722449,"src":"_MG_1367_thumb.jpg","galleries_id":417987,"server_id":18,"link":"photo_7722449.html","width":130,"caption":"Isle of Mull Bike Trials","height":184});
															thumbnails[7722467] = clik.newPhoto({"id":7722467,"src":"IMG_1965_thumb.jpg","galleries_id":417987,"server_id":18,"link":"photo_7722467.html","width":130,"caption":"Isle of Mull Bike Trails","height":184});
															thumbnails[7722476] = clik.newPhoto({"id":7722476,"src":"68_2_thumb.jpg","galleries_id":417987,"server_id":18,"link":"photo_7722476.html","width":130,"caption":"Mull Rally","height":92});
															thumbnails[7722489] = clik.newPhoto({"id":7722489,"src":"122_thumb.jpg","galleries_id":417987,"server_id":18,"link":"photo_7722489.html","width":130,"caption":"Mull Rally","height":92});
															thumbnails[7722494] = clik.newPhoto({"id":7722494,"src":"snetterton2866_thumb.jpg","galleries_id":417987,"server_id":18,"link":"photo_7722494.html","width":130,"caption":"Race of Aces","height":104});
															thumbnails[7722504] = clik.newPhoto({"id":7722504,"src":"snetterton3040_thumb.jpg","galleries_id":417987,"server_id":18,"link":"photo_7722504.html","width":130,"caption":"Race of Aces","height":104});
															thumbnails[7731134] = clik.newPhoto({"id":7731134,"src":"_MG_0002_thumb.jpg","galleries_id":396330,"server_id":18,"link":"photo_7731134.html","width":130,"caption":"","height":195});
															thumbnails[7731136] = clik.newPhoto({"id":7731136,"src":"_MG_0034_thumb.jpg","galleries_id":396330,"server_id":18,"link":"photo_7731136.html","width":130,"caption":"","height":87});
															thumbnails[7731139] = clik.newPhoto({"id":7731139,"src":"_MG_0365_thumb.jpg","galleries_id":417990,"server_id":18,"link":"photo_7731139.html","width":130,"caption":"","height":195});
															thumbnails[7731141] = clik.newPhoto({"id":7731141,"src":"_MG_3146_thumb.jpg","galleries_id":417988,"server_id":18,"link":"photo_7731141.html","width":130,"caption":"","height":87});
															thumbnails[7731142] = clik.newPhoto({"id":7731142,"src":"_MG_3465_thumb.jpg","galleries_id":396330,"server_id":18,"link":"photo_7731142.html","width":130,"caption":"","height":195});
															thumbnails[7731164] = clik.newPhoto({"id":7731164,"src":"_MG_3691_thumb.jpg","galleries_id":396330,"server_id":18,"link":"photo_7731164.html","width":130,"caption":"","height":195});
															thumbnails[7731167] = clik.newPhoto({"id":7731167,"src":"_MG_4431_thumb.jpg","galleries_id":417987,"server_id":18,"link":"photo_7731167.html","width":130,"caption":"","height":87});
															thumbnails[7731168] = clik.newPhoto({"id":7731168,"src":"_MG_4472_thumb.jpg","galleries_id":417987,"server_id":18,"link":"photo_7731168.html","width":130,"caption":"","height":87});
															thumbnails[7731182] = clik.newPhoto({"id":7731182,"src":"_MG_4903_thumb.jpg","galleries_id":417989,"server_id":18,"link":"photo_7731182.html","width":130,"caption":"","height":195});
															thumbnails[7731191] = clik.newPhoto({"id":7731191,"src":"_MG_4923_thumb.jpg","galleries_id":417989,"server_id":18,"link":"photo_7731191.html","width":130,"caption":"","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[417990] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Events","link":"gallery_417990.html","maxRecords":0.0,"photoIDs":[8026645.0,8026650.0,7732348.0,7732399.0,7732406.0,7731139.0],"skipIndex":0,"section_code":"gallery","featured_images":"8026650,8026645,7732406,7732399,7732348,7731139","id":417990,"singleSection":false});				  						galleries[428895] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"For Sale","link":"gallery_428895.html","maxRecords":0.0,"photoIDs":[7974417.0,7974434.0,8103268.0,8103277.0,8103336.0,8103383.0,8103580.0,8103663.0,8103667.0,8103670.0,8103688.0,8103708.0,8103715.0,8103719.0,8103758.0,8103763.0,8103774.0,8103798.0,8103844.0,8103925.0,8103939.0,8103952.0],"skipIndex":0,"section_code":"gallery","featured_images":"8103952,8103939,8103925,8103844,8103798,8103774,8103763,8103758,8103719,8103715","id":428895,"singleSection":false});				  						galleries[417989] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscape","link":"gallery_417989.html","maxRecords":0.0,"photoIDs":[8096262.0,8171708.0,8431406.0,7732415.0,7732435.0,7732445.0,7732478.0,7732482.0,7732506.0,7731182.0,7731191.0],"skipIndex":0,"section_code":"gallery","featured_images":"8431406,8171708,8096262,7732506,7732482,7732478,7732445,7732435,7732415,7731191","id":417989,"singleSection":false});				  						galleries[417988] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nature","link":"gallery_417988.html","maxRecords":0.0,"photoIDs":[7732444.0,7732490.0,7732493.0,7732496.0,7732517.0,7732520.0,7732523.0,7731141.0],"skipIndex":0,"section_code":"gallery","featured_images":"7732523,7732520,7732517,7732496,7732493,7732490,7732444,7731141","id":417988,"singleSection":false});				  						galleries[396330] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portrait","link":"gallery_396330.html","maxRecords":0.0,"photoIDs":[7884720.0,7884724.0,7884727.0,7732390.0,7732396.0,7732451.0,7732454.0,7732457.0,7732472.0,7326850.0,7731134.0,7731136.0,7731142.0,7731164.0],"skipIndex":0,"section_code":"gallery","featured_images":"7884727,7884724,7884720,7732472,7732457,7732454,7732451,7732396,7732390,7731164","id":396330,"singleSection":false});				  						galleries[453892] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Shooting","link":"gallery_453892.html","maxRecords":0.0,"photoIDs":[8584699.0,8584636.0,8584687.0,8584692.0,8584694.0,8584702.0,8584703.0,8584708.0,8584768.0,8584772.0,8584775.0,8584782.0,8584787.0,8584793.0,8584796.0,8584797.0,8584799.0,8584806.0,8584808.0],"skipIndex":0,"section_code":"gallery","featured_images":"8584808,8584806,8584799,8584797,8584796,8584793,8584787,8584782,8584775,8584772","id":453892,"singleSection":false});				  						galleries[417987] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sport","link":"gallery_417987.html","maxRecords":0.0,"photoIDs":[7326804.0,7326876.0,7722449.0,7722467.0,7722476.0,7722489.0,7722494.0,7722504.0,7731167.0,7731168.0],"skipIndex":0,"section_code":"gallery","featured_images":7326804.0,"id":417987,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8584808,8584806,8584799,8584797,8584796,8584793,8584787,8584782,8584775,8584772,8584768,8584708,8584703,8584702,8584699,8584694,8584692,8584687,8584636,8431406,8171708,8103952,8103939,8103925,8103844,8103798,8103774,8103763,8103758,8103719,8103715,8103708,8103688,8103670,8103667,8103663,8103580,8103383,8103336,8103277,8103268,8096262,8026650,8026645,7974434,7974417,7884727,7884724,7884720,7732523';
imageSets[2] = '7326804';
imageSets[3] = '8096262,7326804';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/flippa/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/flippa/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/flippa/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/flippa/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/flippa/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/flippa/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/flippa/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Uluvalt Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="FLIPPA">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

