window.thumbnails = {};
															thumbnails[7026325] = clik.newPhoto({"id":7026325,"src":"image_00221_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_7026325.html","width":130,"caption":"CNWL NHS Mental Health Trust","height":95});
															thumbnails[7026342] = clik.newPhoto({"id":7026342,"src":"smoking_0072a_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_7026342.html","width":130,"caption":"NHS Richmond","height":166});
															thumbnails[7026364] = clik.newPhoto({"id":7026364,"src":"MNPA_Jump123_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_7026364.html","width":130,"caption":"","height":171});
															thumbnails[7026472] = clik.newPhoto({"id":7026472,"src":"Alan-Johnson1_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_7026472.html","width":130,"caption":"","height":184});
															thumbnails[7059017] = clik.newPhoto({"id":7059017,"src":"ICM22_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7059017.html","width":130,"caption":"ICM Sevenoaks","height":151});
															thumbnails[7059021] = clik.newPhoto({"id":7059021,"src":"santander1_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7059021.html","width":130,"caption":"Santander","height":135});
															thumbnails[7059033] = clik.newPhoto({"id":7059033,"src":"icm1_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7059033.html","width":130,"caption":"ICM Aston","height":105});
															thumbnails[7059053] = clik.newPhoto({"id":7059053,"src":"susanlaurance_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_7059053.html","width":130,"caption":"Mansell Construction","height":95});
															thumbnails[7059066] = clik.newPhoto({"id":7059066,"src":"orchardschool_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_7059066.html","width":130,"caption":"Mansell Construction","height":175});
															thumbnails[7059499] = clik.newPhoto({"id":7059499,"src":"wandsworth_pct_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_7059499.html","width":130,"caption":"Wandsworth PCT","height":95});
															thumbnails[7059530] = clik.newPhoto({"id":7059530,"src":"push_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_7059530.html","width":130,"caption":"St Georges Hosptial Charity","height":87});
															thumbnails[7059579] = clik.newPhoto({"id":7059579,"src":"tea_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_7059579.html","width":130,"caption":"Wandsworth PCT","height":87});
															thumbnails[7087391] = clik.newPhoto({"id":7087391,"src":"hamilton_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7087391.html","width":130,"caption":"IT Server Scotland","height":90});
															thumbnails[7087400] = clik.newPhoto({"id":7087400,"src":"hausercam_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_7087400.html","width":130,"caption":"Willmott Dixon","height":87});
															thumbnails[7087406] = clik.newPhoto({"id":7087406,"src":"hauserbuild_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_7087406.html","width":130,"caption":"Willmott Dixon","height":92});
															thumbnails[7144774] = clik.newPhoto({"id":7144774,"src":"stdenys_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_7144774.html","width":130,"caption":"Mansell Construction","height":98});
															thumbnails[7144778] = clik.newPhoto({"id":7144778,"src":"sun1_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7144778.html","width":130,"caption":"Sun Microsystems","height":174});
															thumbnails[7145245] = clik.newPhoto({"id":7145245,"src":"Graudian_IT_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7145245.html","width":130,"caption":"Guardian IT","height":79});
															thumbnails[7145246] = clik.newPhoto({"id":7145246,"src":"cnwl_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7145246.html","width":130,"caption":"CNWL NHS Mental Health Trust","height":175});
															thumbnails[7145247] = clik.newPhoto({"id":7145247,"src":"farnborough_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7145247.html","width":130,"caption":"ICM","height":98});
															thumbnails[7145250] = clik.newPhoto({"id":7145250,"src":"natbirth2_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7145250.html","width":130,"caption":"The Natural Birth Company","height":90});
															thumbnails[7145256] = clik.newPhoto({"id":7145256,"src":"RacalGeoSolutions_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7145256.html","width":130,"caption":"Racal Geo","height":172});
															thumbnails[7145263] = clik.newPhoto({"id":7145263,"src":"vodaphone_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7145263.html","width":130,"caption":"Vodaphone","height":100});
															thumbnails[7145272] = clik.newPhoto({"id":7145272,"src":"sunm_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7145272.html","width":130,"caption":"Sun Microsystems","height":100});
															thumbnails[7145315] = clik.newPhoto({"id":7145315,"src":"icmdirectors_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7145315.html","width":130,"caption":"ICM Farnborough","height":111});
															thumbnails[7145423] = clik.newPhoto({"id":7145423,"src":"mnpa01_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7145423.html","width":130,"caption":"MNPA","height":99});
															thumbnails[7145429] = clik.newPhoto({"id":7145429,"src":"mnpa02_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7145429.html","width":130,"caption":"MNPA","height":87});
															thumbnails[7145715] = clik.newPhoto({"id":7145715,"src":"wolverton001_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_7145715.html","width":130,"caption":"Willmott Dixon","height":166});
															thumbnails[7145718] = clik.newPhoto({"id":7145718,"src":"Romford01_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7145718.html","width":130,"caption":"ICM Romford","height":82});
															thumbnails[7145842] = clik.newPhoto({"id":7145842,"src":"truck_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7145842.html","width":130,"caption":"ICM Aston","height":85});
															thumbnails[7173453] = clik.newPhoto({"id":7173453,"src":"ICM31_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7173453.html","width":130,"caption":"ICM Aston","height":87});
															thumbnails[7173455] = clik.newPhoto({"id":7173455,"src":"Romford03_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_7173455.html","width":130,"caption":"ICM Romford","height":100});
															thumbnails[7282717] = clik.newPhoto({"id":7282717,"src":"David-Cameron_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_7282717.html","width":130,"caption":"","height":100});
															thumbnails[7282720] = clik.newPhoto({"id":7282720,"src":"dancer_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_7282720.html","width":130,"caption":"","height":179});
															thumbnails[7282835] = clik.newPhoto({"id":7282835,"src":"deer_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_7282835.html","width":130,"caption":"","height":111});
															thumbnails[7282848] = clik.newPhoto({"id":7282848,"src":"damon_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_7282848.html","width":130,"caption":"","height":189});
															thumbnails[7282850] = clik.newPhoto({"id":7282850,"src":"natasha-1491_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_7282850.html","width":130,"caption":"","height":86});
															thumbnails[7282937] = clik.newPhoto({"id":7282937,"src":"general-election_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_7282937.html","width":130,"caption":"","height":80});
															thumbnails[7282943] = clik.newPhoto({"id":7282943,"src":"John-Suchet_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_7282943.html","width":130,"caption":"","height":131});
															thumbnails[7282958] = clik.newPhoto({"id":7282958,"src":"Princess-Alexandra_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_7282958.html","width":130,"caption":"","height":103});
															thumbnails[7283244] = clik.newPhoto({"id":7283244,"src":"stoke_park_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_7283244.html","width":130,"caption":"Mansell Construction","height":100});
															thumbnails[7283246] = clik.newPhoto({"id":7283246,"src":"pipes_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_7283246.html","width":130,"caption":"Mansell Construction","height":87});
															thumbnails[7283252] = clik.newPhoto({"id":7283252,"src":"mansell_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_7283252.html","width":130,"caption":"Mansell Construction","height":99});
															thumbnails[7312609] = clik.newPhoto({"id":7312609,"src":"image_0014_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_7312609.html","width":130,"caption":"Wandsworth PCT","height":87});
															thumbnails[7312612] = clik.newPhoto({"id":7312612,"src":"image_0018_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_7312612.html","width":130,"caption":"Wandsworth PCT","height":168});
															thumbnails[7312621] = clik.newPhoto({"id":7312621,"src":"image_0028_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_7312621.html","width":130,"caption":"CNWL NHS Mental Health Trust","height":192});
															thumbnails[7554696] = clik.newPhoto({"id":7554696,"src":"waterside021_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_7554696.html","width":130,"caption":"Willmott Dixon","height":156});
															thumbnails[7554766] = clik.newPhoto({"id":7554766,"src":"square002_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_7554766.html","width":130,"caption":"Burling Gap","height":130});
															thumbnails[7554788] = clik.newPhoto({"id":7554788,"src":"square003_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_7554788.html","width":130,"caption":"Haweswater","height":130});
															thumbnails[7554791] = clik.newPhoto({"id":7554791,"src":"square004_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_7554791.html","width":130,"caption":"Harwood House","height":130});
															thumbnails[7554794] = clik.newPhoto({"id":7554794,"src":"square005_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_7554794.html","width":130,"caption":"Waterloo","height":130});
															thumbnails[7554798] = clik.newPhoto({"id":7554798,"src":"square0011_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_7554798.html","width":130,"caption":"Culmstock Beacon","height":130});
															thumbnails[7560761] = clik.newPhoto({"id":7560761,"src":"fulham-palace0023_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_7560761.html","width":130,"caption":"Mansell Construction","height":175});
															thumbnails[7560764] = clik.newPhoto({"id":7560764,"src":"fulham-palace0029_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_7560764.html","width":130,"caption":"Mansell Constuction","height":170});
															thumbnails[7560766] = clik.newPhoto({"id":7560766,"src":"hauser_0221a_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_7560766.html","width":130,"caption":"Willmott Dixon","height":73});
															thumbnails[7560769] = clik.newPhoto({"id":7560769,"src":"hauser_0238a_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_7560769.html","width":130,"caption":"Willmott Dixon","height":87});
															thumbnails[9000097] = clik.newPhoto({"id":9000097,"src":"som-oct-2011_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_9000097.html","width":130,"caption":"","height":89});
															thumbnails[9000112] = clik.newPhoto({"id":9000112,"src":"image_0068_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_9000112.html","width":130,"caption":"CNWL NHS Trust","height":191});
															thumbnails[9000119] = clik.newPhoto({"id":9000119,"src":"som-dec20112_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_9000119.html","width":130,"caption":"","height":88});
															thumbnails[9002898] = clik.newPhoto({"id":9002898,"src":"april_0353_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_9002898.html","width":130,"caption":"","height":80});
															thumbnails[9002904] = clik.newPhoto({"id":9002904,"src":"cnwl_27.02.07_146_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_9002904.html","width":130,"caption":"","height":163});
															thumbnails[9002906] = clik.newPhoto({"id":9002906,"src":"iddyfish_andy001_thumb.jpg","galleries_id":353283,"server_id":5,"link":"photo_9002906.html","width":130,"caption":"Tinyfish","height":89});
															thumbnails[9002907] = clik.newPhoto({"id":9002907,"src":"kingston0021_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_9002907.html","width":130,"caption":"","height":84});
															thumbnails[9002908] = clik.newPhoto({"id":9002908,"src":"manshbase0001_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_9002908.html","width":130,"caption":"Mansell Construction","height":53});
															thumbnails[9002909] = clik.newPhoto({"id":9002909,"src":"nile_st0004_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_9002909.html","width":130,"caption":"Mansell Construction","height":154});
															thumbnails[9002912] = clik.newPhoto({"id":9002912,"src":"OT_005_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_9002912.html","width":130,"caption":"","height":89});
															thumbnails[9004315] = clik.newPhoto({"id":9004315,"src":"Picture_088_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_9004315.html","width":130,"caption":"Mansell Constuction","height":86});
															thumbnails[9004322] = clik.newPhoto({"id":9004322,"src":"port0002_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_9004322.html","width":130,"caption":"Mansell Constuction","height":174});
															thumbnails[9004323] = clik.newPhoto({"id":9004323,"src":"port0015_thumb.jpg","galleries_id":409563,"server_id":5,"link":"photo_9004323.html","width":130,"caption":"","height":172});
															thumbnails[9004326] = clik.newPhoto({"id":9004326,"src":"princess1card_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_9004326.html","width":130,"caption":"","height":127});
															thumbnails[9004329] = clik.newPhoto({"id":9004329,"src":"SOM-Feb-2011_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_9004329.html","width":130,"caption":"","height":118});
															thumbnails[9004332] = clik.newPhoto({"id":9004332,"src":"sommarch11_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_9004332.html","width":130,"caption":"","height":87});
															thumbnails[9004337] = clik.newPhoto({"id":9004337,"src":"somxmas09_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_9004337.html","width":130,"caption":"","height":195});
															thumbnails[9004340] = clik.newPhoto({"id":9004340,"src":"street002_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_9004340.html","width":130,"caption":"Bethnal Green","height":132});
															thumbnails[9004343] = clik.newPhoto({"id":9004343,"src":"street004_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_9004343.html","width":130,"caption":"Canary Wharf","height":132});
															thumbnails[9004346] = clik.newPhoto({"id":9004346,"src":"street007_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_9004346.html","width":130,"caption":"Paddington Dock","height":131});
															thumbnails[9004348] = clik.newPhoto({"id":9004348,"src":"street022_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_9004348.html","width":130,"caption":"","height":131});
															thumbnails[9004350] = clik.newPhoto({"id":9004350,"src":"street028_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_9004350.html","width":130,"caption":"Vauxhall","height":130});
															thumbnails[9004354] = clik.newPhoto({"id":9004354,"src":"REPORT0074_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_9004354.html","width":130,"caption":"","height":158});
															thumbnails[9004356] = clik.newPhoto({"id":9004356,"src":"sam_084_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_9004356.html","width":130,"caption":"","height":166});
															thumbnails[9004358] = clik.newPhoto({"id":9004358,"src":"staff4_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_9004358.html","width":130,"caption":"","height":72});
															thumbnails[9004360] = clik.newPhoto({"id":9004360,"src":"stars_051_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_9004360.html","width":130,"caption":"","height":89});
															thumbnails[9004362] = clik.newPhoto({"id":9004362,"src":"wormwood_060_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_9004362.html","width":130,"caption":"","height":87});
															thumbnails[9004363] = clik.newPhoto({"id":9004363,"src":"wpctl_095_thumb.jpg","galleries_id":353284,"server_id":5,"link":"photo_9004363.html","width":130,"caption":"","height":158});
															thumbnails[9026883] = clik.newPhoto({"id":9026883,"src":"rollie001web_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_9026883.html","width":130,"caption":"East Dean","height":130});
															thumbnails[9026885] = clik.newPhoto({"id":9026885,"src":"rollie002web_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_9026885.html","width":130,"caption":"","height":130});
															thumbnails[9026890] = clik.newPhoto({"id":9026890,"src":"rollie003web_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_9026890.html","width":130,"caption":"River Cam","height":130});
															thumbnails[9026893] = clik.newPhoto({"id":9026893,"src":"rollie004web_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_9026893.html","width":130,"caption":"Borough Market","height":130});
															thumbnails[9026894] = clik.newPhoto({"id":9026894,"src":"rollie005web_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_9026894.html","width":130,"caption":"South Bank","height":130});
															thumbnails[9026897] = clik.newPhoto({"id":9026897,"src":"rollie008web1_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_9026897.html","width":130,"caption":"Beverley Brook","height":130});
															thumbnails[9026900] = clik.newPhoto({"id":9026900,"src":"rollie009web_thumb.jpg","galleries_id":353286,"server_id":5,"link":"photo_9026900.html","width":130,"caption":"Southwold","height":130});
															thumbnails[9047081] = clik.newPhoto({"id":9047081,"src":"somjan2012_thumb.jpg","galleries_id":366541,"server_id":5,"link":"photo_9047081.html","width":130,"caption":"Surrey and Boarders NHS","height":230});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[409563] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Builders and Architects","link":"gallery_409563.html","maxRecords":0.0,"photoIDs":[7059053.0,7059066.0,7087400.0,7087406.0,7144774.0,7145715.0,7283244.0,7283246.0,7283252.0,7554696.0,7560761.0,7560764.0,7560766.0,7560769.0,9002908.0,9002909.0,9004315.0,9004322.0,9004323.0],"skipIndex":0,"section_code":"gallery","featured_images":"9004323,9004322,9004315,9002909,9002908,7560769,7560766,7560764,7560761,7554696","id":409563,"singleSection":false});				  						galleries[353283] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Corporate","link":"gallery_353283.html","maxRecords":0.0,"photoIDs":[7059017.0,7059021.0,7059033.0,7087391.0,7144778.0,7145245.0,7145246.0,7145247.0,7145250.0,7145256.0,7145263.0,7145272.0,7145315.0,7145423.0,7145429.0,7145718.0,7145842.0,7173453.0,7173455.0,9002906.0],"skipIndex":0,"section_code":"gallery","featured_images":"9002906,7173455,7173453,7145842,7145718,7145429,7145423,7145315,7145272,7145263","id":353283,"singleSection":false});				  						galleries[353284] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"NHS","link":"gallery_353284.html","maxRecords":0.0,"photoIDs":[7026325.0,7026342.0,7059499.0,7059530.0,7059579.0,7312609.0,7312612.0,7312621.0,9000112.0,9002904.0,9002907.0,9002912.0,9004354.0,9004356.0,9004358.0,9004360.0,9004362.0,9004363.0],"skipIndex":0,"section_code":"gallery","featured_images":"9004363,9004362,9004360,9004358,9004356,9004354,9002912,9002907,9002904,9000112","id":353284,"singleSection":false});				  						galleries[366541] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Shot of the Month","link":"gallery_366541.html","maxRecords":0.0,"photoIDs":[7026364.0,7026472.0,7282717.0,7282720.0,7282835.0,7282848.0,7282850.0,7282937.0,7282943.0,7282958.0,9000097.0,9000119.0,9002898.0,9004326.0,9004329.0,9004332.0,9004337.0,9047081.0],"skipIndex":0,"section_code":"gallery","featured_images":"9047081,9004337,9004332,9004329,9004326,9002898,9000119,9000097,7282958,7282943","id":366541,"singleSection":false});				  						galleries[353286] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Non Commercial","link":"gallery_353286.html","maxRecords":0.0,"photoIDs":[7554766.0,7554788.0,7554791.0,7554794.0,7554798.0,9004340.0,9004343.0,9004346.0,9004348.0,9004350.0,9026883.0,9026885.0,9026890.0,9026893.0,9026894.0,9026897.0,9026900.0],"skipIndex":0,"section_code":"gallery","featured_images":"9026900,9026897,9026894,9026893,9026890,9026885,9026883,9004350,9004348,9004346","id":353286,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9047081,9026900,9026897,9026894,9026893,9026890,9026885,9026883,9004363,9004362,9004360,9004358,9004356,9004354,9004350,9004348,9004346,9004343,9004340,9004337,9004332,9004329,9004326,9004323,9004322,9004315,9002912,9002909,9002908,9002907,9002906,9002904,9002898,9000119,9000112,9000097,7560769,7560766,7560764,7560761,7554798,7554794,7554791,7554788,7554766,7554696,7312621,7312612,7312609,7283252';
imageSets[3] = '9047081,9026900,9026897,9026894,9026893,9026890,9026885,9026883,9004363,9004362,9004360,9004358,9004356,9004354,9004350,9004348,9004346,9004343,9004340,9004337,9004332,9004329,9004326,9004323,9004322,9004315,9002912,9002909,9002908,9002907,9002906,9002904,9002898,9000119,9000112,9000097,7560769,7560766,7560764,7560761,7554798,7554794,7554791,7554788,7554766,7554696,7312621,7312612,7312609,7283252';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/arcaandy/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/arcaandy/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 = 'Yellowdoorstudio...\'documenting your organization\': ' + 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;
	}
}

			

