window.thumbnails = {};
															thumbnails[4887852] = clik.newPhoto({"id":4887852,"src":"church_website_harvest_2009_a_thumb.jpg","galleries_id":278739,"server_id":4,"link":"photo_4887852.html","width":130,"caption":"Harvest Service 2009","height":98});
															thumbnails[701396] = clik.newPhoto({"id":701396,"src":"wEBSITE1_thumb.JPG","galleries_id":53878,"server_id":4,"link":"photo_701396.html","width":130,"caption":"The participants of Nativity 2006 all together.","height":93});
															thumbnails[2722410] = clik.newPhoto({"id":2722410,"src":"Church congregation and outing 002small_thumb.jpg","galleries_id":20931,"server_id":4,"link":"photo_2722410.html","width":130,"caption":"We decided to take a new congregation 'family' picture in July 2008.","height":98});
															thumbnails[6186679] = clik.newPhoto({"id":6186679,"src":"one_in_the_park_crowd_streams_in_web_site_thumb.JPG","galleries_id":345533,"server_id":4,"link":"photo_6186679.html","width":130,"caption":"Crowds Stream In.","height":98});
															thumbnails[4887860] = clik.newPhoto({"id":4887860,"src":"church_website_harvest_2009_b_thumb.jpg","galleries_id":278739,"server_id":4,"link":"photo_4887860.html","width":130,"caption":"Harvest Service 2009","height":98});
															thumbnails[701397] = clik.newPhoto({"id":701397,"src":"website2_thumb.JPG","galleries_id":53878,"server_id":4,"link":"photo_701397.html","width":130,"caption":"Everyone from a different angle!","height":98});
															thumbnails[6186684] = clik.newPhoto({"id":6186684,"src":"one_in_the_park_band_get_ready_web_site_thumb.JPG","galleries_id":345533,"server_id":4,"link":"photo_6186684.html","width":130,"caption":"Band get ready.","height":98});
															thumbnails[701401] = clik.newPhoto({"id":701401,"src":"website3_thumb.JPG","galleries_id":53878,"server_id":4,"link":"photo_701401.html","width":130,"caption":"Charlotte, Daniel and Magnus were our wise men.","height":98});
															thumbnails[6186690] = clik.newPhoto({"id":6186690,"src":"one_in_the_park_crowd_thumb.JPG","galleries_id":345533,"server_id":4,"link":"photo_6186690.html","width":130,"caption":"Tent fills up.","height":98});
															thumbnails[701404] = clik.newPhoto({"id":701404,"src":"2007_0101Image0037_thumb.JPG","galleries_id":53878,"server_id":4,"link":"photo_701404.html","width":130,"caption":"Bethany and Katie were our angels, Kirsty and Juan read for us.  And Joel chose to be part of the congregation!","height":173});
															thumbnails[6186749] = clik.newPhoto({"id":6186749,"src":"one_in_the_park_ready_to_sign_web_site_thumb.JPG","galleries_id":345533,"server_id":4,"link":"photo_6186749.html","width":130,"caption":"Preparing to sign the Coventant.","height":98});
															thumbnails[701406] = clik.newPhoto({"id":701406,"src":"websit5_thumb.JPG","galleries_id":53878,"server_id":4,"link":"photo_701406.html","width":130,"caption":"Amber was one of our shepherds - or shepherdesses!","height":173});
															thumbnails[6186750] = clik.newPhoto({"id":6186750,"src":"one_in_the_park_the_covenant_web_site_thumb.JPG","galleries_id":345533,"server_id":4,"link":"photo_6186750.html","width":130,"caption":"The Covenant document","height":173});
															thumbnails[701408] = clik.newPhoto({"id":701408,"src":"websi6_thumb.JPG","galleries_id":53878,"server_id":4,"link":"photo_701408.html","width":130,"caption":"And here is Ealee, the other shepherdess with Katie.","height":173});
															thumbnails[6186754] = clik.newPhoto({"id":6186754,"src":"one_in_the_park_signatures_web_site_thumb.JPG","galleries_id":345533,"server_id":4,"link":"photo_6186754.html","width":130,"caption":"Signatures...","height":98});
															thumbnails[2722396] = clik.newPhoto({"id":2722396,"src":"Ealee and Katie, websized_thumb.jpg","galleries_id":87274,"server_id":4,"link":"photo_2722396.html","width":130,"caption":"Ealee and Katie at the Wildlife Park, Church outing 2008","height":102});
															thumbnails[2500602] = clik.newPhoto({"id":2500602,"src":"Kirsty, small_thumb.jpg","galleries_id":20931,"server_id":4,"link":"photo_2500602.html","width":130,"caption":"Kirsty Quine becomes a Church member in June 2008","height":130});
															thumbnails[2722395] = clik.newPhoto({"id":2722395,"src":"Jackie and lemur websized_thumb.jpg","galleries_id":87274,"server_id":4,"link":"photo_2722395.html","width":130,"caption":"Church secretary continues her recruitment drive...","height":98});
															thumbnails[5935664] = clik.newPhoto({"id":5935664,"src":"1_Vestibule_1_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935664.html","width":130,"caption":"All things Bright & Beautiful - Jill Wilkinson","height":98});
															thumbnails[5936169] = clik.newPhoto({"id":5936169,"src":"Philip_60_thumb.JPG","galleries_id":334959,"server_id":4,"link":"photo_5936169.html","width":130,"caption":"Rev Philip Smith @ 60","height":173});
															thumbnails[872997] = clik.newPhoto({"id":872997,"src":"cake stall day 010 smaller_thumb.jpg","galleries_id":22019,"server_id":4,"link":"photo_872997.html","width":130,"caption":"Magnus and Katie in the book corner.","height":87});
															thumbnails[2722397] = clik.newPhoto({"id":2722397,"src":"wildlife park train websized_thumb.jpg","galleries_id":87274,"server_id":4,"link":"photo_2722397.html","width":130,"caption":"On the train.","height":98});
															thumbnails[5935671] = clik.newPhoto({"id":5935671,"src":"1_Vestibule_2_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935671.html","width":130,"caption":"All Things Bright & Beautiful - Jill Wilkinson","height":173});
															thumbnails[5936171] = clik.newPhoto({"id":5936171,"src":"Philip_60_Cake_thumb.JPG","galleries_id":334959,"server_id":4,"link":"photo_5936171.html","width":130,"caption":"Celebration Cake - 60 - Rev Philip Smith","height":173});
															thumbnails[2722398] = clik.newPhoto({"id":2722398,"src":"Sandy et al, websized_thumb.jpg","galleries_id":87274,"server_id":4,"link":"photo_2722398.html","width":130,"caption":"Sandy et al, Wildlife Park 2008.","height":98});
															thumbnails[5936174] = clik.newPhoto({"id":5936174,"src":"Philip_60_Party_1_thumb.JPG","galleries_id":334959,"server_id":4,"link":"photo_5936174.html","width":130,"caption":"Rev Philip Smith - 60 - Party Time","height":98});
															thumbnails[5936178] = clik.newPhoto({"id":5936178,"src":"Philip_60_Party_2_thumb.JPG","galleries_id":334959,"server_id":4,"link":"photo_5936178.html","width":130,"caption":"Rev Philip Smith - 60 - Party Time","height":173});
															thumbnails[6192794] = clik.newPhoto({"id":6192794,"src":"Jacobs_ladder_-_website_thumb.JPG","galleries_id":22019,"server_id":4,"link":"photo_6192794.html","width":130,"caption":"Jacob's Ladder - in chocolate fingers and gingerbread men...","height":98});
															thumbnails[243908] = clik.newPhoto({"id":243908,"src":"Web Amber Joel and Danny_thumb.jpg","galleries_id":22019,"server_id":4,"link":"photo_243908.html","width":130,"caption":"Learning about our faith is fun.","height":87});
															thumbnails[2722399] = clik.newPhoto({"id":2722399,"src":"Pauline and Ron, websized_thumb.jpg","galleries_id":87274,"server_id":4,"link":"photo_2722399.html","width":130,"caption":"Pauline and Ron.","height":173});
															thumbnails[632740] = clik.newPhoto({"id":632740,"src":"Advent candles1forweb1_thumb.JPG","galleries_id":53878,"server_id":4,"link":"photo_632740.html","width":130,"caption":"Advent Candles 2006.","height":87});
															thumbnails[1759722] = clik.newPhoto({"id":1759722,"src":"Nativity web3_thumb.jpg","galleries_id":53878,"server_id":4,"link":"photo_1759722.html","width":130,"caption":"Nativity 2007","height":87});
															thumbnails[352585] = clik.newPhoto({"id":352585,"src":"webpic1_thumb.jpg","galleries_id":45395,"server_id":4,"link":"photo_352585.html","width":130,"caption":"Many people watch the T.T. races from St. Andrew's grounds.","height":87});
															thumbnails[5935679] = clik.newPhoto({"id":5935679,"src":"2_Window_3_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935679.html","width":130,"caption":"Love & Marriage - Evelyn Walton","height":98});
															thumbnails[5936181] = clik.newPhoto({"id":5936181,"src":"Church_Lit_1_thumb.JPG","galleries_id":334959,"server_id":4,"link":"photo_5936181.html","width":130,"caption":"Celebrating the Life of Jamie Jackson - New Flood Lights","height":98});
															thumbnails[1759723] = clik.newPhoto({"id":1759723,"src":"Nativity web 2_thumb.jpg","galleries_id":53878,"server_id":4,"link":"photo_1759723.html","width":130,"caption":"Nativity 2007","height":87});
															thumbnails[352594] = clik.newPhoto({"id":352594,"src":"webpic2_thumb.jpg","galleries_id":45395,"server_id":4,"link":"photo_352594.html","width":130,"caption":"We sell large numbers of baps, cakes, tea, coffee etc. to these visitors, for Church funds.","height":87});
															thumbnails[5935687] = clik.newPhoto({"id":5935687,"src":"2_Window_2_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935687.html","width":130,"caption":"Love & Marriage - Evelyn Walton ","height":173});
															thumbnails[5936196] = clik.newPhoto({"id":5936196,"src":"Window_11_thumb.JPG","galleries_id":334959,"server_id":4,"link":"photo_5936196.html","width":130,"caption":"Remembering Jamie Jackson - New Flood Lights","height":173});
															thumbnails[352597] = clik.newPhoto({"id":352597,"src":"webpic3_thumb.jpg","galleries_id":45395,"server_id":4,"link":"photo_352597.html","width":130,"caption":"The hot-dog production line!","height":195});
															thumbnails[352603] = clik.newPhoto({"id":352603,"src":"webpic5_thumb.jpg","galleries_id":45395,"server_id":4,"link":"photo_352603.html","width":130,"caption":"Ans just as important - the kitchen crew.","height":87});
															thumbnails[5935694] = clik.newPhoto({"id":5935694,"src":"3_Window_3_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935694.html","width":130,"caption":"Celebtration - Trudi Hudson","height":173});
															thumbnails[5935700] = clik.newPhoto({"id":5935700,"src":"3_Window_2_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935700.html","width":130,"caption":"Celebration - Trudi Hudson","height":173});
															thumbnails[5935708] = clik.newPhoto({"id":5935708,"src":"4_Centre_3_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935708.html","width":130,"caption":"Family - Jill Wilkinson & Rena Buffine","height":98});
															thumbnails[5935717] = clik.newPhoto({"id":5935717,"src":"4_Centre_2_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935717.html","width":130,"caption":"Family - Jill Wilkinson & Rena Buffine","height":173});
															thumbnails[5935722] = clik.newPhoto({"id":5935722,"src":"5_Window_3_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935722.html","width":130,"caption":"Home - Sue Cannell","height":173});
															thumbnails[5935725] = clik.newPhoto({"id":5935725,"src":"5_Window_2_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935725.html","width":130,"caption":"Home - Sue Cannell","height":173});
															thumbnails[6908970] = clik.newPhoto({"id":6908970,"src":"shoe_boxes_2010_small_thumb.JPG","galleries_id":22019,"server_id":4,"link":"photo_6908970.html","width":130,"caption":"98 shoe boxes for Belarus - October 2010.","height":98});
															thumbnails[5935728] = clik.newPhoto({"id":5935728,"src":"6_Window_4_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935728.html","width":130,"caption":"Health & Welfare - Jean Walmsley","height":173});
															thumbnails[5935736] = clik.newPhoto({"id":5935736,"src":"6_Window_2_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935736.html","width":130,"caption":"Health & Welfare - Jean Walmsley","height":173});
															thumbnails[872885] = clik.newPhoto({"id":872885,"src":"cake stall day 007website_thumb.jpg","galleries_id":22019,"server_id":4,"link":"photo_872885.html","width":130,"caption":"In the middle is Gillian - chief cake maker.  Kirsty and Juan also baked for us.","height":87});
															thumbnails[5935740] = clik.newPhoto({"id":5935740,"src":"7_Font_3_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935740.html","width":130,"caption":"Birth & Baptism - Wendy Nelson","height":173});
															thumbnails[5935745] = clik.newPhoto({"id":5935745,"src":"7_Font_2_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935745.html","width":130,"caption":"Birth & Baptism - Wendy Nelson","height":173});
															thumbnails[5935749] = clik.newPhoto({"id":5935749,"src":"8_Side_Table_5_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935749.html","width":130,"caption":"Nature - Trinity Sunday School ","height":173});
															thumbnails[5935752] = clik.newPhoto({"id":5935752,"src":"9_Window_4_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935752.html","width":130,"caption":"Work, Trade & Profession - Joyce Wilson","height":98});
															thumbnails[1218392] = clik.newPhoto({"id":1218392,"src":"church outing july 2007 web 11_thumb.jpg","galleries_id":87274,"server_id":4,"link":"photo_1218392.html","width":130,"caption":"This is all of us, with our tram, on the Church Outing 2007.","height":87});
															thumbnails[1759699] = clik.newPhoto({"id":1759699,"src":"August 4th 2007 004 crop_thumb.jpg","galleries_id":20931,"server_id":4,"link":"photo_1759699.html","width":130,"caption":"Tidying the grounds.  How many Brians does it take to paint a line?","height":85});
															thumbnails[5935754] = clik.newPhoto({"id":5935754,"src":"10_Communion_Table_3_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935754.html","width":130,"caption":"Humility - Margaret Parr","height":98});
															thumbnails[1759705] = clik.newPhoto({"id":1759705,"src":"August 4th 2007 006_thumb.jpg","galleries_id":20931,"server_id":4,"link":"photo_1759705.html","width":130,"caption":"The sweepers.","height":87});
															thumbnails[1759708] = clik.newPhoto({"id":1759708,"src":"August 4th 2007 007_thumb.jpg","galleries_id":20931,"server_id":4,"link":"photo_1759708.html","width":130,"caption":"It is good to see men dressed for the job!","height":195});
															thumbnails[1759714] = clik.newPhoto({"id":1759714,"src":"August 4th 2007 0051_thumb.jpg","galleries_id":20931,"server_id":4,"link":"photo_1759714.html","width":130,"caption":"And they're still painting that line - one to paint, one to supervise....","height":87});
															thumbnails[5935758] = clik.newPhoto({"id":5935758,"src":"11_Chancel_3_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935758.html","width":130,"caption":"Friendship - Trinity Girl Guides","height":98});
															thumbnails[5935763] = clik.newPhoto({"id":5935763,"src":"11_Chancel_2_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935763.html","width":130,"caption":"Friendship - Trinity Girl Guides","height":173});
															thumbnails[5935766] = clik.newPhoto({"id":5935766,"src":"12_Pulpit_3_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935766.html","width":130,"caption":"Salvation - Rena Buffine & Pat Corrin","height":173});
															thumbnails[5935773] = clik.newPhoto({"id":5935773,"src":"13_Window_1_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935773.html","width":130,"caption":"Unity of Creation - Julia Garfield","height":173});
															thumbnails[5935775] = clik.newPhoto({"id":5935775,"src":"13_Window_2_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935775.html","width":130,"caption":"Unity of Creation - Julia Garfield","height":173});
															thumbnails[5935778] = clik.newPhoto({"id":5935778,"src":"14_Window_1_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935778.html","width":130,"caption":"Peace & Tranquility - Sue Webb","height":173});
															thumbnails[5935786] = clik.newPhoto({"id":5935786,"src":"14_Window_2_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935786.html","width":130,"caption":"Peace & Tranquility - Sue Webb","height":173});
															thumbnails[5935789] = clik.newPhoto({"id":5935789,"src":"15_Window_3_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935789.html","width":130,"caption":"Education - Lin Thompson","height":98});
															thumbnails[5935796] = clik.newPhoto({"id":5935796,"src":"16_Window_3_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935796.html","width":130,"caption":"Food & Drink - Wendy Nelson","height":98});
															thumbnails[5935798] = clik.newPhoto({"id":5935798,"src":"17_Window_4_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935798.html","width":130,"caption":"Giving - Anne Corrin & Rosemary Povey","height":98});
															thumbnails[5935807] = clik.newPhoto({"id":5935807,"src":"18_Lift_4_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935807.html","width":130,"caption":"Discovery & Invention - Margaret Cristal","height":98});
															thumbnails[5935813] = clik.newPhoto({"id":5935813,"src":"18_Lift_2_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935813.html","width":130,"caption":"Discovery & Invention - Margaret Cristal","height":173});
															thumbnails[5935819] = clik.newPhoto({"id":5935819,"src":"19_Back_Wall_3_thumb.jpg","galleries_id":334825,"server_id":4,"link":"photo_5935819.html","width":130,"caption":"Music - Carol Christian & Shirley Kneale","height":173});
															thumbnails[5935824] = clik.newPhoto({"id":5935824,"src":"20_Vestibule_1_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935824.html","width":130,"caption":"Eternity - Jill Wilkinson","height":98});
															thumbnails[5935833] = clik.newPhoto({"id":5935833,"src":"20_Vestibule_2_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935833.html","width":130,"caption":"Eternity - Jill Wilkinson","height":173});
															thumbnails[5935835] = clik.newPhoto({"id":5935835,"src":"21_Front_Garden_thumb.JPG","galleries_id":334825,"server_id":4,"link":"photo_5935835.html","width":130,"caption":"Trinity Garden - Gail Swain","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[345533] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"One in The Park, June 2010","link":"gallery_345533.html","maxRecords":0.0,"photoIDs":[6186679.0,6186684.0,6186690.0,6186749.0,6186750.0,6186754.0],"skipIndex":0,"section_code":"gallery","featured_images":"6186754,6186750,6186749,6186690,6186684,6186679","id":345533,"singleSection":false});				  						galleries[20931] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Congregation","link":"gallery_20931.html","maxRecords":0.0,"photoIDs":[2722410.0,2500602.0,1759699.0,1759705.0,1759708.0,1759714.0],"skipIndex":0,"section_code":"gallery","featured_images":"2722410,2500602,1759714,1759708,1759705,1759699","id":20931,"singleSection":false});				  						galleries[22019] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"St. Andrews' Children.","link":"gallery_22019.html","maxRecords":0.0,"photoIDs":[872997.0,6192794.0,243908.0,6908970.0,872885.0],"skipIndex":0,"section_code":"gallery","featured_images":"6908970,6192794,872997,872885,243908","id":22019,"singleSection":false});				  						galleries[87274] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Church outing","link":"gallery_87274.html","maxRecords":0.0,"photoIDs":[2722396.0,2722395.0,2722397.0,2722398.0,2722399.0,1218392.0],"skipIndex":0,"section_code":"gallery","featured_images":"2722399,2722398,2722397,2722396,2722395,1218392","id":87274,"singleSection":false});				  						galleries[45395] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"TT Teas","link":"gallery_45395.html","maxRecords":0.0,"photoIDs":[352585.0,352594.0,352597.0,352603.0],"skipIndex":0,"section_code":"gallery","featured_images":"352603,352597,352594,352585","id":45395,"singleSection":false});				  						galleries[53878] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nativity Pictures.","link":"gallery_53878.html","maxRecords":0.0,"photoIDs":[701396.0,701397.0,701401.0,701404.0,701406.0,701408.0,632740.0,1759722.0,1759723.0],"skipIndex":0,"section_code":"gallery","featured_images":701396.0,"id":53878,"singleSection":false});				  						galleries[278739] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Other occasions.","link":"gallery_278739.html","maxRecords":0.0,"photoIDs":[4887852.0,4887860.0],"skipIndex":0,"section_code":"gallery","featured_images":"4887860,4887852","id":278739,"singleSection":false});				  						galleries[334825] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Trinity _ Flower Festival 2009","link":"gallery_334825.html","maxRecords":0.0,"photoIDs":[5935664.0,5935671.0,5935679.0,5935687.0,5935694.0,5935700.0,5935708.0,5935717.0,5935722.0,5935725.0,5935728.0,5935736.0,5935740.0,5935745.0,5935749.0,5935752.0,5935754.0,5935758.0,5935763.0,5935766.0,5935773.0,5935775.0,5935778.0,5935786.0,5935789.0,5935796.0,5935798.0,5935807.0,5935813.0,5935819.0,5935824.0,5935833.0,5935835.0],"skipIndex":0,"section_code":"gallery","featured_images":"5935835,5935833,5935824,5935819,5935813,5935807,5935798,5935796,5935789,5935786","id":334825,"singleSection":false});				  						galleries[334959] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Trinity - Celebrations","link":"gallery_334959.html","maxRecords":0.0,"photoIDs":[5936169.0,5936171.0,5936174.0,5936178.0,5936181.0,5936196.0],"skipIndex":0,"section_code":"gallery","featured_images":"5936196,5936181,5936178,5936174,5936171,5936169","id":334959,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6908970,6192794,6186754,6186750,6186749,6186690,6186684,6186679,5936196,5936181,5936178,5936174,5936171,5936169,5935835,5935833,5935824,5935819,5935813,5935807,5935798,5935796,5935789,5935786,5935778,5935775,5935773,5935766,5935763,5935758,5935754,5935752,5935749,5935745,5935740,5935736,5935728,5935725,5935722,5935717,5935708,5935700,5935694,5935687,5935679,5935671,5935664,4887860,4887852,2722410';
imageSets[2] = '701396';
imageSets[3] = '6908970,6192794,6186754,6186750,6186749,6186690,6186684,6186679,5936196,5936181,5936178,5936174,5936171,5936169,5935835,5935833,5935824,5935819,5935813,5935807,5935798,5935796,5935789,5935786,5935778,5935775,5935773,5935766,5935763,5935758,5935754,5935752,5935749,5935745,5935740,5935736,5935728,5935725,5935722,5935717,5935708,5935700,5935694,5935687,5935679,5935671,5935664,4887860,4887852,2722410';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/standrews/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/standrews/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/standrews/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/standrews/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/standrews/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/standrews/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/standrews/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/standrews/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 = 'The URC in the Isle of Man.: ' + 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;
	}
}

			

