window.thumbnails = {};
															thumbnails[7450431] = clik.newPhoto({"id":7450431,"src":"Journey_into_Dawn_copy_thumb.jpg","galleries_id":307656,"server_id":5,"link":"photo_7450431.html","width":71,"caption":"Journey into Dawn","height":100});
															thumbnails[8312288] = clik.newPhoto({"id":8312288,"src":"First_Snow1_thumb.jpg","galleries_id":307656,"server_id":37,"link":"photo_8312288.html","width":100,"caption":"First Snow","height":97});
															thumbnails[8312304] = clik.newPhoto({"id":8312304,"src":"Night_Owl_thumb.jpg","galleries_id":307656,"server_id":37,"link":"photo_8312304.html","width":66,"caption":"Night Owl","height":100});
															thumbnails[8312314] = clik.newPhoto({"id":8312314,"src":"Together_under_Moonlit_Tree_thumb.jpg","galleries_id":307656,"server_id":37,"link":"photo_8312314.html","width":71,"caption":"Together Under Moonlit Tree","height":100});
															thumbnails[5450408] = clik.newPhoto({"id":5450408,"src":"Thicket-Avenue-Railway-Brid_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_5450408.html","width":130,"caption":"Thicket Avenue Railway Bridge","height":98});
															thumbnails[5458989] = clik.newPhoto({"id":5458989,"src":"Into-the-Moon_thumb.jpg","galleries_id":307655,"server_id":5,"link":"photo_5458989.html","width":130,"caption":"Into the Moon","height":109});
															thumbnails[5557105] = clik.newPhoto({"id":5557105,"src":"Village-in-the-Sky_thumb.jpg","galleries_id":307661,"server_id":5,"link":"photo_5557105.html","width":77,"caption":"Village in the Sky","height":100});
															thumbnails[5557183] = clik.newPhoto({"id":5557183,"src":"Church-on-the-Hill_thumb.jpg","galleries_id":307661,"server_id":5,"link":"photo_5557183.html","width":100,"caption":"Church on the Hill","height":98});
															thumbnails[5682935] = clik.newPhoto({"id":5682935,"src":"Clifton_Rock_thumb.jpg","galleries_id":307656,"server_id":5,"link":"photo_5682935.html","width":61,"caption":"Clifton Rock","height":100});
															thumbnails[5858549] = clik.newPhoto({"id":5858549,"src":"Harbour_Railway_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_5858549.html","width":40,"caption":"Harbour Railway","height":100});
															thumbnails[5858568] = clik.newPhoto({"id":5858568,"src":"Clifton_Tiers_thumb.jpg","galleries_id":307656,"server_id":5,"link":"photo_5858568.html","width":51,"caption":"Clifton Tiers","height":100});
															thumbnails[5861291] = clik.newPhoto({"id":5861291,"src":"Weeping_Night_Sky_thumb.jpg","galleries_id":307661,"server_id":5,"link":"photo_5861291.html","width":43,"caption":"Weeping Night Sky","height":100});
															thumbnails[5876232] = clik.newPhoto({"id":5876232,"src":"The_Big_House_thumb.jpg","galleries_id":307661,"server_id":5,"link":"photo_5876232.html","width":100,"caption":"The Big House","height":95});
															thumbnails[5876238] = clik.newPhoto({"id":5876238,"src":"Gentle_Earth_thumb.jpg","galleries_id":307661,"server_id":5,"link":"photo_5876238.html","width":100,"caption":"Gentle Earth","height":97});
															thumbnails[5876242] = clik.newPhoto({"id":5876242,"src":"Land_of_Point_thumb.jpg","galleries_id":307655,"server_id":5,"link":"photo_5876242.html","width":100,"caption":"Land of Point","height":98});
															thumbnails[5876252] = clik.newPhoto({"id":5876252,"src":"Bristol_Lights_thumb.jpg","galleries_id":307655,"server_id":5,"link":"photo_5876252.html","width":51,"caption":"Bristol Lights","height":100});
															thumbnails[5880599] = clik.newPhoto({"id":5880599,"src":"Light_in_Barren_Land_thumb.jpg","galleries_id":307661,"server_id":5,"link":"photo_5880599.html","width":80,"caption":"Light in Barren Land","height":100});
															thumbnails[5880603] = clik.newPhoto({"id":5880603,"src":"Three_in_a_Row_thumb.jpg","galleries_id":307661,"server_id":5,"link":"photo_5880603.html","width":79,"caption":"Three in a Row","height":100});
															thumbnails[6085061] = clik.newPhoto({"id":6085061,"src":"Cluster_thumb.jpg","galleries_id":307656,"server_id":5,"link":"photo_6085061.html","width":100,"caption":"Cluster","height":78});
															thumbnails[6177262] = clik.newPhoto({"id":6177262,"src":"Beachcombers_1_thumb.jpg","galleries_id":307656,"server_id":5,"link":"photo_6177262.html","width":100,"caption":"Beachcombers","height":94});
															thumbnails[6681233] = clik.newPhoto({"id":6681233,"src":"Awakening_thumb.jpg","galleries_id":307656,"server_id":5,"link":"photo_6681233.html","width":61,"caption":"Awakening","height":100});
															thumbnails[6681235] = clik.newPhoto({"id":6681235,"src":"Pointe_de_Trevignon_thumb.jpg","galleries_id":307656,"server_id":5,"link":"photo_6681235.html","width":64,"caption":"Pointe de Trevignon","height":100});
															thumbnails[6894701] = clik.newPhoto({"id":6894701,"src":"Crossroads_thumb.jpg","galleries_id":307656,"server_id":5,"link":"photo_6894701.html","width":70,"caption":"Crossroads","height":100});
															thumbnails[7291886] = clik.newPhoto({"id":7291886,"src":"Winter_Walk1_thumb.jpg","galleries_id":307656,"server_id":5,"link":"photo_7291886.html","width":68,"caption":"Winter Walk","height":100});
															thumbnails[7291981] = clik.newPhoto({"id":7291981,"src":"Hay_Bales_copy_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_7291981.html","width":100,"caption":"Hay Bales","height":77});
															thumbnails[7291990] = clik.newPhoto({"id":7291990,"src":"Under_Moonlit_Tree1_thumb.jpg","galleries_id":307656,"server_id":5,"link":"photo_7291990.html","width":69,"caption":"Under Moonlit Tree","height":100});
															thumbnails[5440369] = clik.newPhoto({"id":5440369,"src":"alongthetracks_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_5440369.html","width":130,"caption":"Along the Tracks","height":183});
															thumbnails[5440397] = clik.newPhoto({"id":5440397,"src":"avongorge_thumb.jpg","galleries_id":307656,"server_id":5,"link":"photo_5440397.html","width":130,"caption":"Avon Gorge","height":251});
															thumbnails[5440505] = clik.newPhoto({"id":5440505,"src":"cityinslumber_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_5440505.html","width":130,"caption":"City in Slumber","height":216});
															thumbnails[5440526] = clik.newPhoto({"id":5440526,"src":"dusk_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_5440526.html","width":130,"caption":"Dusk","height":164});
															thumbnails[5446870] = clik.newPhoto({"id":5446870,"src":"Arms-Outstretched_thumb.jpg","galleries_id":307664,"server_id":5,"link":"photo_5446870.html","width":130,"caption":"Arms Outstretched","height":186});
															thumbnails[5446883] = clik.newPhoto({"id":5446883,"src":"Bending_thumb.jpg","galleries_id":307664,"server_id":5,"link":"photo_5446883.html","width":130,"caption":"Bending","height":222});
															thumbnails[5446908] = clik.newPhoto({"id":5446908,"src":"Contemplation_thumb.jpg","galleries_id":307664,"server_id":5,"link":"photo_5446908.html","width":130,"caption":"Contemplation","height":181});
															thumbnails[5446915] = clik.newPhoto({"id":5446915,"src":"Despair_thumb.jpg","galleries_id":307664,"server_id":5,"link":"photo_5446915.html","width":130,"caption":"Despair","height":261});
															thumbnails[5446942] = clik.newPhoto({"id":5446942,"src":"Dreaming_thumb.jpg","galleries_id":307664,"server_id":5,"link":"photo_5446942.html","width":130,"caption":"Dreaming","height":213});
															thumbnails[5446951] = clik.newPhoto({"id":5446951,"src":"Leaning-Back_thumb.jpg","galleries_id":307664,"server_id":5,"link":"photo_5446951.html","width":130,"caption":"Leaning Back","height":182});
															thumbnails[5446954] = clik.newPhoto({"id":5446954,"src":"Quiet-Repose_thumb.jpg","galleries_id":307664,"server_id":5,"link":"photo_5446954.html","width":130,"caption":"Quiet Repose","height":165});
															thumbnails[5446959] = clik.newPhoto({"id":5446959,"src":"Sorrow_thumb.jpg","galleries_id":307664,"server_id":5,"link":"photo_5446959.html","width":130,"caption":"Sorrow","height":164});
															thumbnails[5446966] = clik.newPhoto({"id":5446966,"src":"Standing-Woman_thumb.jpg","galleries_id":307664,"server_id":5,"link":"photo_5446966.html","width":130,"caption":"Standing Woman","height":315});
															thumbnails[5446972] = clik.newPhoto({"id":5446972,"src":"Standin-Man_thumb.jpg","galleries_id":307664,"server_id":5,"link":"photo_5446972.html","width":130,"caption":"Standing Man","height":339});
															thumbnails[5446976] = clik.newPhoto({"id":5446976,"src":"Twisting_thumb.jpg","galleries_id":307664,"server_id":5,"link":"photo_5446976.html","width":130,"caption":"Twisting","height":241});
															thumbnails[5447046] = clik.newPhoto({"id":5447046,"src":"Asleep_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447046.html","width":130,"caption":"Asleep","height":165});
															thumbnails[5447058] = clik.newPhoto({"id":5447058,"src":"Clutching-Leg_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447058.html","width":130,"caption":"Clutching Legs","height":194});
															thumbnails[5447063] = clik.newPhoto({"id":5447063,"src":"Crouching-Man_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447063.html","width":130,"caption":"Crouching Man","height":183});
															thumbnails[5447066] = clik.newPhoto({"id":5447066,"src":"Dancing_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447066.html","width":130,"caption":"Dancing","height":197});
															thumbnails[5447073] = clik.newPhoto({"id":5447073,"src":"Half-Kneeling-Pose_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447073.html","width":130,"caption":"Leg Stretch","height":211});
															thumbnails[5447101] = clik.newPhoto({"id":5447101,"src":"Hiding-Away_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447101.html","width":130,"caption":"Hiding Away","height":173});
															thumbnails[5447118] = clik.newPhoto({"id":5447118,"src":"Orange-Woman_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447118.html","width":130,"caption":"Gazing","height":203});
															thumbnails[5447131] = clik.newPhoto({"id":5447131,"src":"Rising_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447131.html","width":130,"caption":"Rising","height":81});
															thumbnails[5447135] = clik.newPhoto({"id":5447135,"src":"Sleeping_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447135.html","width":130,"caption":"Sleeping","height":142});
															thumbnails[5447151] = clik.newPhoto({"id":5447151,"src":"Stretching_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447151.html","width":130,"caption":"Stretching","height":163});
															thumbnails[5447156] = clik.newPhoto({"id":5447156,"src":"Thinking_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447156.html","width":130,"caption":"Thinking","height":180});
															thumbnails[5447166] = clik.newPhoto({"id":5447166,"src":"Turned-Away_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447166.html","width":130,"caption":"Turned Away","height":195});
															thumbnails[5447170] = clik.newPhoto({"id":5447170,"src":"Woman-from-Behind_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447170.html","width":130,"caption":"Lounging on Blue Blanket","height":162});
															thumbnails[5447171] = clik.newPhoto({"id":5447171,"src":"Woman-Lying_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447171.html","width":130,"caption":"Woman Lying","height":81});
															thumbnails[5447175] = clik.newPhoto({"id":5447175,"src":"Woman-Sitting_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447175.html","width":130,"caption":"Woman Sitting","height":157});
															thumbnails[5447178] = clik.newPhoto({"id":5447178,"src":"Kneeling-on-Stool_thumb.jpg","galleries_id":307664,"server_id":5,"link":"photo_5447178.html","width":130,"caption":"Kneeling on Stool","height":246});
															thumbnails[5447180] = clik.newPhoto({"id":5447180,"src":"Woman-Against-Red-Backgroun_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447180.html","width":130,"caption":"Red Background","height":79});
															thumbnails[5447248] = clik.newPhoto({"id":5447248,"src":"Hotwells-Houses_thumb.jpg","galleries_id":307656,"server_id":5,"link":"photo_5447248.html","width":130,"caption":"Hotwells Houses","height":109});
															thumbnails[5447301] = clik.newPhoto({"id":5447301,"src":"Winter-Garden_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_5447301.html","width":130,"caption":"Winter Garden","height":178});
															thumbnails[5447320] = clik.newPhoto({"id":5447320,"src":"A-Dream_thumb.jpg","galleries_id":307661,"server_id":5,"link":"photo_5447320.html","width":130,"caption":"A Dream","height":195});
															thumbnails[5447344] = clik.newPhoto({"id":5447344,"src":"Oudegracht_thumb.jpg","galleries_id":307661,"server_id":5,"link":"photo_5447344.html","width":130,"caption":"Oudegracht","height":149});
															thumbnails[5447350] = clik.newPhoto({"id":5447350,"src":"The-End-of-the-World_thumb.jpg","galleries_id":307661,"server_id":5,"link":"photo_5447350.html","width":130,"caption":"The End of the World","height":154});
															thumbnails[5447736] = clik.newPhoto({"id":5447736,"src":"Clifton-Wood_thumb.jpg","galleries_id":307661,"server_id":5,"link":"photo_5447736.html","width":130,"caption":"Clifton Wood","height":102});
															thumbnails[5447745] = clik.newPhoto({"id":5447745,"src":"Over-the-Avon_thumb.jpg","galleries_id":307661,"server_id":5,"link":"photo_5447745.html","width":130,"caption":"Over the Avon","height":108});
															thumbnails[5440623] = clik.newPhoto({"id":5440623,"src":"lookingthrough_thumb.jpg","galleries_id":307656,"server_id":5,"link":"photo_5440623.html","width":130,"caption":"","height":163});
															thumbnails[5440495] = clik.newPhoto({"id":5440495,"src":"chewmagnalake_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_5440495.html","width":130,"caption":"Chew Magna Lake","height":180});
															thumbnails[5447730] = clik.newPhoto({"id":5447730,"src":"Love-Birds_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_5447730.html","width":130,"caption":"Love Birds","height":134});
															thumbnails[5440464] = clik.newPhoto({"id":5440464,"src":"Beynac_thumb.jpg","galleries_id":307655,"server_id":5,"link":"photo_5440464.html","width":130,"caption":"Beynac","height":241});
															thumbnails[5440513] = clik.newPhoto({"id":5440513,"src":"Clifton_Suspension_Bridge_thumb.jpg","galleries_id":307655,"server_id":5,"link":"photo_5440513.html","width":130,"caption":"Clifton Suspension Bridge","height":195});
															thumbnails[5440518] = clik.newPhoto({"id":5440518,"src":"cumberlandbasin_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_5440518.html","width":130,"caption":"Cumberland Basin","height":42});
															thumbnails[5447266] = clik.newPhoto({"id":5447266,"src":"Suspension-Bridge_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_5447266.html","width":130,"caption":"Suspension Bridge","height":41});
															thumbnails[5447279] = clik.newPhoto({"id":5447279,"src":"Towards-Clifton-Wood_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_5447279.html","width":130,"caption":"Towards Clifton Wood","height":183});
															thumbnails[5440632] = clik.newPhoto({"id":5440632,"src":"magicmountain_thumb.jpg","galleries_id":307655,"server_id":5,"link":"photo_5440632.html","width":130,"caption":"Magic Mountain","height":107});
															thumbnails[5440636] = clik.newPhoto({"id":5440636,"src":"sandbay_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_5440636.html","width":130,"caption":"Sand Bay","height":336});
															thumbnails[5447108] = clik.newPhoto({"id":5447108,"src":"Kneeling_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447108.html","width":130,"caption":"Kneeling","height":196});
															thumbnails[5447123] = clik.newPhoto({"id":5447123,"src":"Reclining-Man_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447123.html","width":130,"caption":"Reclining Man","height":98});
															thumbnails[5447262] = clik.newPhoto({"id":5447262,"src":"Mother_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_5447262.html","width":130,"caption":"Mother","height":182});
															thumbnails[5447294] = clik.newPhoto({"id":5447294,"src":"Utrecht_thumb.jpg","galleries_id":307655,"server_id":5,"link":"photo_5447294.html","width":130,"caption":"Utrecht","height":209});
															thumbnails[5447685] = clik.newPhoto({"id":5447685,"src":"ilederaguenez_thumb.jpg","galleries_id":307663,"server_id":5,"link":"photo_5447685.html","width":130,"caption":"Ile de Raguenez","height":83});
															thumbnails[5447693] = clik.newPhoto({"id":5447693,"src":"frenchbridge_thumb.jpg","galleries_id":307663,"server_id":5,"link":"photo_5447693.html","width":130,"caption":"French Bridge","height":176});
															thumbnails[5447189] = clik.newPhoto({"id":5447189,"src":"Cradling-the-Unborn_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447189.html","width":130,"caption":"Cradling the Unborn","height":125});
															thumbnails[5447193] = clik.newPhoto({"id":5447193,"src":"Naked-Torso_thumb.jpg","galleries_id":307665,"server_id":5,"link":"photo_5447193.html","width":130,"caption":"Naked Torso","height":117});
															thumbnails[5440620] = clik.newPhoto({"id":5440620,"src":"hotwells_thumb.jpg","galleries_id":307658,"server_id":5,"link":"photo_5440620.html","width":130,"caption":"Hotwells","height":95});
															thumbnails[5447254] = clik.newPhoto({"id":5447254,"src":"Lake-Creatures_thumb.jpg","galleries_id":307655,"server_id":5,"link":"photo_5447254.html","width":130,"caption":"Lake Creatures","height":118});
															thumbnails[5440670] = clik.newPhoto({"id":5440670,"src":"Tentsmuir_thumb.jpg","galleries_id":307655,"server_id":5,"link":"photo_5440670.html","width":130,"caption":"Tentsmuir","height":41});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[307655] = clik.newGallery({"parentGallery":307659,"usePopups":true,"title":"Etchings","link":"gallery_307655.html","maxRecords":0.0,"photoIDs":[5458989.0,5876242.0,5876252.0,5440464.0,5440513.0,5440632.0,5447294.0,5447254.0,5440670.0],"skipIndex":0,"section_code":"gallery","featured_images":"5876252,5876242,5458989,5447294,5447254,5440670,5440632,5440513,5440464","id":307655,"singleSection":false});				  						galleries[307663] = clik.newGallery({"parentGallery":307662,"usePopups":true,"title":"Landsape Paintings","link":"gallery_307663.html","maxRecords":0.0,"photoIDs":[5447685.0,5447693.0],"skipIndex":0,"section_code":"gallery","featured_images":"5447693,5447685","id":307663,"singleSection":false});				  						galleries[307664] = clik.newGallery({"parentGallery":307662,"usePopups":true,"title":"Life Drawings","link":"gallery_307664.html","maxRecords":0.0,"photoIDs":[5446870.0,5446883.0,5446908.0,5446915.0,5446942.0,5446951.0,5446954.0,5446959.0,5446966.0,5446972.0,5446976.0,5447178.0],"skipIndex":0,"section_code":"gallery","featured_images":"5447178,5446976,5446972,5446966,5446959,5446954,5446951,5446942,5446915,5446908","id":307664,"singleSection":false});				  						galleries[307665] = clik.newGallery({"parentGallery":307662,"usePopups":true,"title":"Life Paintings","link":"gallery_307665.html","maxRecords":0.0,"photoIDs":[5447046.0,5447058.0,5447063.0,5447066.0,5447073.0,5447101.0,5447118.0,5447131.0,5447135.0,5447151.0,5447156.0,5447166.0,5447170.0,5447171.0,5447175.0,5447180.0,5447108.0,5447123.0,5447189.0,5447193.0],"skipIndex":0,"section_code":"gallery","featured_images":"5447193,5447189,5447180,5447175,5447171,5447170,5447166,5447156,5447151,5447135","id":307665,"singleSection":false});				  						galleries[307661] = clik.newGallery({"parentGallery":307659,"usePopups":true,"title":"Mixed Media Prints","link":"gallery_307661.html","maxRecords":0.0,"photoIDs":[5557105.0,5557183.0,5861291.0,5876232.0,5876238.0,5880599.0,5880603.0,5447320.0,5447344.0,5447350.0,5447736.0,5447745.0],"skipIndex":0,"section_code":"gallery","featured_images":"5880603,5880599,5876238,5876232,5861291,5557183,5557105,5447745,5447736,5447350","id":307661,"singleSection":false});				  						galleries[307662] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Paintings & Drawings","link":"gallery_307662.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"5447693,5447685,5447193,5447189,5447180,5447178,5447175,5447171,5447170,5447166","id":307662,"singleSection":false});				  						galleries[307659] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Prints","link":"gallery_307659.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"8312314,8312304,8312288,7450431,7291990,7291981,7291886,6894701,6681235,6681233","id":307659,"singleSection":false});				  						galleries[307658] = clik.newGallery({"parentGallery":307659,"usePopups":true,"title":"Relief Prints","link":"gallery_307658.html","maxRecords":0.0,"photoIDs":[5450408.0,5858549.0,7291981.0,5440369.0,5440505.0,5440526.0,5447301.0,5440495.0,5447730.0,5440518.0,5447266.0,5447279.0,5440636.0,5447262.0,5440620.0],"skipIndex":0,"section_code":"gallery","featured_images":"7291981,5858549,5450408,5447730,5447301,5447279,5447266,5447262,5440636,5440620","id":307658,"singleSection":false});				  						galleries[307656] = clik.newGallery({"parentGallery":307659,"usePopups":true,"title":"Screen Prints","link":"gallery_307656.html","maxRecords":0.0,"photoIDs":[7450431.0,8312288.0,8312304.0,8312314.0,5682935.0,5858568.0,6085061.0,6177262.0,6681233.0,6681235.0,6894701.0,7291886.0,7291990.0,5440397.0,5447248.0,5440623.0],"skipIndex":0,"section_code":"gallery","featured_images":"8312314,8312304,8312288,7450431,7291990,7291886,6894701,6681235,6681233,6177262","id":307656,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8312314,8312304,8312288,7450431,7291990,7291981,7291886,6894701,6681235,6681233,6177262,6085061,5880603,5880599,5876252,5876242,5876238,5876232,5861291,5858568,5858549,5682935,5557183,5557105,5458989,5450408,5447745,5447736,5447730,5447693,5447685,5447350,5447344,5447320,5447301,5447294,5447279,5447266,5447262,5447254,5447248,5447193,5447189,5447180,5447178,5447175,5447171,5447170,5447166,5447156';
imageSets[3] = '8312314,8312304,8312288,7450431,7291990,7291981,7291886,6894701,6681235,6681233,6177262,6085061,5880603,5880599,5876252,5876242,5876238,5876232,5861291,5858568,5858549,5682935,5557183,5557105,5458989,5450408,5447745,5447736,5447730,5447693,5447685,5447350,5447344,5447320,5447301,5447294,5447279,5447266,5447262,5447254,5447248,5447193,5447189,5447180,5447178,5447175,5447171,5447170,5447166,5447156';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/zcarterbeedie/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/zcarterbeedie/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 = 'Zoe Carter Beedie Art: ' + 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="ZCARTERBEEDIE">';
			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({					href: thumbnails[imageID].fnGalleryLink(gallery_id),					title: galleries[gallery_id].title				});
			}
		}
	}
}

/***************************************************************************
* 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;
	}
}

			

