window.thumbnails = {};
															thumbnails[758831] = clik.newPhoto({"id":758831,"src":"ZY1O3536_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758831.html","width":130,"caption":"Bryce Canyon ","height":87});
															thumbnails[758833] = clik.newPhoto({"id":758833,"src":"ZY1O0798_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758833.html","width":130,"caption":"Grand Canyon ","height":87});
															thumbnails[758836] = clik.newPhoto({"id":758836,"src":"ZY1O0981_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758836.html","width":130,"caption":"Grand Canyon @ sunrise at Mather Point","height":87});
															thumbnails[758843] = clik.newPhoto({"id":758843,"src":"ZY1O1003_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758843.html","width":130,"caption":"Grand Canyon @ sunrise at Mather Point","height":195});
															thumbnails[758846] = clik.newPhoto({"id":758846,"src":"ZY1O1048_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758846.html","width":130,"caption":"Grand Canyon @ sunrise at Mather Point","height":195});
															thumbnails[758848] = clik.newPhoto({"id":758848,"src":"ZY1O1054_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758848.html","width":130,"caption":"Grand Canyon ","height":87});
															thumbnails[758851] = clik.newPhoto({"id":758851,"src":"ZY1O1154_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758851.html","width":130,"caption":"Horse shoe bend near Page Utah","height":87});
															thumbnails[758857] = clik.newPhoto({"id":758857,"src":"ZY1O1229_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758857.html","width":130,"caption":"Coyote Buttes South ","height":195});
															thumbnails[758859] = clik.newPhoto({"id":758859,"src":"ZY1O1238_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758859.html","width":130,"caption":"Coyote Buttes South ","height":87});
															thumbnails[758861] = clik.newPhoto({"id":758861,"src":"ZY1O1288_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758861.html","width":130,"caption":"Coyote Buttes South ","height":87});
															thumbnails[758863] = clik.newPhoto({"id":758863,"src":"ZY1O1298_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758863.html","width":130,"caption":"Coyote Buttes South ","height":195});
															thumbnails[758867] = clik.newPhoto({"id":758867,"src":"ZY1O1401_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758867.html","width":130,"caption":"Coyote Buttes South ","height":195});
															thumbnails[758868] = clik.newPhoto({"id":758868,"src":"ZY1O1410_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758868.html","width":130,"caption":"Coyote Buttes South ","height":87});
															thumbnails[758870] = clik.newPhoto({"id":758870,"src":"ZY1O1491_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758870.html","width":130,"caption":"Coyote Buttes South ","height":87});
															thumbnails[758878] = clik.newPhoto({"id":758878,"src":"ZY1O1405_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758878.html","width":130,"caption":"Coyote Buttes South ","height":195});
															thumbnails[758880] = clik.newPhoto({"id":758880,"src":"ZY1O1573_thumb.jpg","galleries_id":58695,"server_id":15,"link":"photo_758880.html","width":130,"caption":"Antelope Canyon ","height":195});
															thumbnails[1264164] = clik.newPhoto({"id":1264164,"src":"ZY1O5625A_thumb.jpg","galleries_id":15415,"server_id":15,"link":"photo_1264164.html","width":130,"caption":"Autumn Colours Stourhead, Wiltshire (National Trust)","height":89});
															thumbnails[1264256] = clik.newPhoto({"id":1264256,"src":"ZY1O5639A_thumb.jpg","galleries_id":15415,"server_id":15,"link":"photo_1264256.html","width":130,"caption":"Autumn Colours Stourhead, Wiltshire (National Trust)","height":102});
															thumbnails[1264259] = clik.newPhoto({"id":1264259,"src":"ZY1O5625B_thumb.jpg","galleries_id":15415,"server_id":15,"link":"photo_1264259.html","width":130,"caption":"Autumn Colours Stourhead, Wiltshire (National Trust)","height":188});
															thumbnails[7248286] = clik.newPhoto({"id":7248286,"src":"_Y9T5154_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_7248286.html","width":160,"caption":"LEWIS HAMILTON AT MONACO 2009 ","height":240});
															thumbnails[7461886] = clik.newPhoto({"id":7461886,"src":"8Y9T9859_a_thumb.jpg","galleries_id":404621,"server_id":15,"link":"photo_7461886.html","width":160,"caption":"INDONESIAN FARMER","height":240});
															thumbnails[7461946] = clik.newPhoto({"id":7461946,"src":"8Y9T0015_thumb.jpg","galleries_id":404621,"server_id":15,"link":"photo_7461946.html","width":160,"caption":"MOUNT BROMO","height":108});
															thumbnails[7461948] = clik.newPhoto({"id":7461948,"src":"8Y9T0173_thumb.jpg","galleries_id":404621,"server_id":15,"link":"photo_7461948.html","width":160,"caption":"MOUNT BROMO","height":107});
															thumbnails[7462000] = clik.newPhoto({"id":7462000,"src":"8Y9T0620_thumb.jpg","galleries_id":404621,"server_id":15,"link":"photo_7462000.html","width":160,"caption":"INDONESIAN TRAVEL","height":123});
															thumbnails[7462148] = clik.newPhoto({"id":7462148,"src":"8Y9T0614_thumb.jpg","galleries_id":404621,"server_id":15,"link":"photo_7462148.html","width":160,"caption":"INDONESIAN TRAVEL","height":115});
															thumbnails[7462183] = clik.newPhoto({"id":7462183,"src":"_Y1O6289_thumb.jpg","galleries_id":15415,"server_id":15,"link":"photo_7462183.html","width":160,"caption":"WILTSHIRE TREE IN SNOW","height":104});
															thumbnails[8853034] = clik.newPhoto({"id":8853034,"src":"HB3G4973_603A8F17-1E4F-37DC-71808B53E9D0FC2B_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853034.html","width":260,"caption":"LEWIS HAMILTON ","height":186});
															thumbnails[8853330] = clik.newPhoto({"id":8853330,"src":"HB3G0010_61E1D2C2-1E4F-37DC-710906693425A859_thumb.jpg","galleries_id":45096,"server_id":15,"link":"photo_8853330.html","width":260,"caption":"NICKY HAYDEN ","height":186});
															thumbnails[8855134] = clik.newPhoto({"id":8855134,"src":"HB3G0774_6B7198FD-1EC9-DFB6-09A4491EA1446B3F_thumb.jpg","galleries_id":45096,"server_id":15,"link":"photo_8855134.html","width":260,"caption":"MOTO GP SILVERSTONE 2011 ","height":186});
															thumbnails[8871544] = clik.newPhoto({"id":8871544,"src":"HB3G2492_07A1DC2A-1EC9-DFB6-09E2FA817A964E97_thumb.jpg","galleries_id":466538,"server_id":15,"link":"photo_8871544.html","width":260,"caption":"HB3G2492","height":186});
															thumbnails[8872037] = clik.newPhoto({"id":8872037,"src":"_Y1O1580_0B577C4D-24E8-5EC4-4F6C9A9A713CB3F5_thumb.jpg","galleries_id":15415,"server_id":15,"link":"photo_8872037.html","width":260,"caption":" Y1O1580","height":390});
															thumbnails[8887326] = clik.newPhoto({"id":8887326,"src":"HB3G8556_D8370838-1EC9-DFB6-09F070D887BFFF03_thumb.jpg","galleries_id":467409,"server_id":15,"link":"photo_8887326.html","width":260,"caption":"MARK WEBBER ","height":186});
															thumbnails[8853035] = clik.newPhoto({"id":8853035,"src":"HB3G5065_603B0640-1E4F-37DC-7114ED127E66CF25_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853035.html","width":260,"caption":"MICHAEL SCHUMACHER","height":173});
															thumbnails[8853332] = clik.newPhoto({"id":8853332,"src":"HB3G0083_61E23B69-1E4F-37DC-71EC863AD8ABAB74_thumb.jpg","galleries_id":45096,"server_id":15,"link":"photo_8853332.html","width":260,"caption":"JORGE LORENZO ","height":186});
															thumbnails[8855136] = clik.newPhoto({"id":8855136,"src":"HB3G0787_6B720268-1EC9-DFB6-09FFB533325811A6_thumb.jpg","galleries_id":45096,"server_id":15,"link":"photo_8855136.html","width":260,"caption":"MOTO GP SILVERSTONE 2011","height":186});
															thumbnails[8871545] = clik.newPhoto({"id":8871545,"src":"HB3G2527_07A241C4-1EC9-DFB6-09521EA984F78D41_thumb.jpg","galleries_id":466538,"server_id":15,"link":"photo_8871545.html","width":260,"caption":"HB3G2527","height":186});
															thumbnails[8872038] = clik.newPhoto({"id":8872038,"src":"_Y1O2004_0B58069A-24E8-5EC4-4FEBCEBEBB363856_thumb.jpg","galleries_id":15415,"server_id":15,"link":"photo_8872038.html","width":260,"caption":" Y1O2004","height":173});
															thumbnails[8887328] = clik.newPhoto({"id":8887328,"src":"HB3G8557_thumb.jpg","galleries_id":467409,"server_id":15,"link":"photo_8887328.html","width":260,"caption":"MARK WEBBER","height":186});
															thumbnails[8853036] = clik.newPhoto({"id":8853036,"src":"HB3G5117_603B865F-1E4F-37DC-713F31490F4D2F5C_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853036.html","width":260,"caption":"FERNANDO ALONSO","height":186});
															thumbnails[8853334] = clik.newPhoto({"id":8853334,"src":"HB3G0139_61E2A46C-1E4F-37DC-719C41479E84E9F2_thumb.jpg","galleries_id":45096,"server_id":15,"link":"photo_8853334.html","width":260,"caption":"MARCO SIMONCELLI ","height":179});
															thumbnails[8855139] = clik.newPhoto({"id":8855139,"src":"HB3G0808_6B7276A0-1EC9-DFB6-09AC189074CDB973_thumb.jpg","galleries_id":45096,"server_id":15,"link":"photo_8855139.html","width":260,"caption":"STONER LEADING DOVIZIOSO","height":186});
															thumbnails[8871546] = clik.newPhoto({"id":8871546,"src":"HB3G2651_07A2B529-1EC9-DFB6-09B8D7B55E681BD9_thumb.jpg","galleries_id":466538,"server_id":15,"link":"photo_8871546.html","width":260,"caption":"HB3G2651","height":186});
															thumbnails[8872040] = clik.newPhoto({"id":8872040,"src":"_Y1O6026_0B588347-24E8-5EC4-4F62DD63B8DDD158_thumb.jpg","galleries_id":15415,"server_id":15,"link":"photo_8872040.html","width":260,"caption":" Y1O6026","height":173});
															thumbnails[8887329] = clik.newPhoto({"id":8887329,"src":"HB3G8558_D837E9FD-1EC9-DFB6-091080AAE78D7CBC_thumb.jpg","galleries_id":467409,"server_id":15,"link":"photo_8887329.html","width":260,"caption":"MARK WEBBER","height":186});
															thumbnails[8853038] = clik.newPhoto({"id":8853038,"src":"HB3G5129_603BFC0C-1E4F-37DC-7174E57687F3784C_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853038.html","width":260,"caption":"SEBASTIAN VETTEL","height":186});
															thumbnails[8853335] = clik.newPhoto({"id":8853335,"src":"HB3G0225_a_61E306C3-1E4F-37DC-714C19DE37E762C4_thumb.jpg","galleries_id":45096,"server_id":15,"link":"photo_8853335.html","width":260,"caption":"MARCO SIMONCELLI","height":160});
															thumbnails[8855141] = clik.newPhoto({"id":8855141,"src":"HB3G0973_6B72EC50-1EC9-DFB6-090723329FA04E99_thumb.jpg","galleries_id":45096,"server_id":15,"link":"photo_8855141.html","width":260,"caption":"JORGE LORENZO","height":186});
															thumbnails[8871547] = clik.newPhoto({"id":8871547,"src":"HB3G3060_07A314D9-1EC9-DFB6-09FA18E6D7485D29_thumb.jpg","galleries_id":466538,"server_id":15,"link":"photo_8871547.html","width":260,"caption":"HB3G3060","height":186});
															thumbnails[8872041] = clik.newPhoto({"id":8872041,"src":"_Y1O8056_0B58F590-24E8-5EC4-4F299D9C9A455E6D_thumb.jpg","galleries_id":15415,"server_id":15,"link":"photo_8872041.html","width":260,"caption":" Y1O8056","height":173});
															thumbnails[8887333] = clik.newPhoto({"id":8887333,"src":"HB3G8682_D83888B3-1EC9-DFB6-09313DBA48114C1B_thumb.jpg","galleries_id":467409,"server_id":15,"link":"photo_8887333.html","width":260,"caption":"CHRIS PFEIFFER","height":186});
															thumbnails[8853039] = clik.newPhoto({"id":8853039,"src":"HB3G5178_603C5B21-1E4F-37DC-71B6785BAB37089E_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853039.html","width":260,"caption":"JENSON BUTTON","height":186});
															thumbnails[8853336] = clik.newPhoto({"id":8853336,"src":"HB3G0333_61E374D7-1E4F-37DC-7190131A3D66C0C7_thumb.jpg","galleries_id":45096,"server_id":15,"link":"photo_8853336.html","width":260,"caption":"VALENTINO ROSSI","height":173});
															thumbnails[8855144] = clik.newPhoto({"id":8855144,"src":"HB3G0974_6B737BFD-1EC9-DFB6-09D023B98C6E2D85_thumb.jpg","galleries_id":45096,"server_id":15,"link":"photo_8855144.html","width":260,"caption":"JORGE LORENZO","height":186});
															thumbnails[8871548] = clik.newPhoto({"id":8871548,"src":"HB3G3065_07A3833B-1EC9-DFB6-09A797E0B605590A_thumb.jpg","galleries_id":466538,"server_id":15,"link":"photo_8871548.html","width":260,"caption":"HB3G3065","height":186});
															thumbnails[8872042] = clik.newPhoto({"id":8872042,"src":"ZY1O7134_0B595D79-24E8-5EC4-4F0B5390FC2ECFC1_thumb.jpg","galleries_id":15415,"server_id":15,"link":"photo_8872042.html","width":260,"caption":"ZY1O7134","height":174});
															thumbnails[8887335] = clik.newPhoto({"id":8887335,"src":"HB3G8742_D838F729-1EC9-DFB6-092E89E6D44248B5_thumb.jpg","galleries_id":467409,"server_id":15,"link":"photo_8887335.html","width":260,"caption":"SEBASTIAN VETTEL","height":186});
															thumbnails[8853040] = clik.newPhoto({"id":8853040,"src":"HB3G5632_603CCD23-1E4F-37DC-71C16359A7EE8413_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853040.html","width":260,"caption":"SEBASTIAN VETTEL RED BULL","height":186});
															thumbnails[8853337] = clik.newPhoto({"id":8853337,"src":"HB3G0685_61E3D7FD-1E4F-37DC-7146A939B8F83C80_thumb.jpg","galleries_id":45096,"server_id":15,"link":"photo_8853337.html","width":260,"caption":"BRADLEY SMITH","height":186});
															thumbnails[8855147] = clik.newPhoto({"id":8855147,"src":"HB3G0996_6B74427D-1EC9-DFB6-099821A4AADB3532_thumb.jpg","galleries_id":45096,"server_id":15,"link":"photo_8855147.html","width":260,"caption":"JORGE LORENZO","height":186});
															thumbnails[8871549] = clik.newPhoto({"id":8871549,"src":"HB3G3153_07A3E03A-1EC9-DFB6-094C181D716D09BA_thumb.jpg","galleries_id":466538,"server_id":15,"link":"photo_8871549.html","width":260,"caption":"HB3G3153","height":186});
															thumbnails[8887337] = clik.newPhoto({"id":8887337,"src":"HB3G8758_D8397970-1EC9-DFB6-09759961845C34D4_thumb.jpg","galleries_id":467409,"server_id":15,"link":"photo_8887337.html","width":260,"caption":"SEBASTIAN VETTEL","height":186});
															thumbnails[8853042] = clik.newPhoto({"id":8853042,"src":"HB3G5736_603D33EE-1E4F-37DC-710CE80CE9727690_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853042.html","width":260,"caption":"NICO ROSBERG","height":186});
															thumbnails[8855152] = clik.newPhoto({"id":8855152,"src":"HB3G0999_6B74F3E2-1EC9-DFB6-09F86AC77E419874_thumb.jpg","galleries_id":45096,"server_id":15,"link":"photo_8855152.html","width":260,"caption":"JORGE LORENZO","height":186});
															thumbnails[8871550] = clik.newPhoto({"id":8871550,"src":"HB3G3850_07A47A0C-1EC9-DFB6-0984407A398147AF_thumb.jpg","galleries_id":466538,"server_id":15,"link":"photo_8871550.html","width":260,"caption":"HB3G3850","height":186});
															thumbnails[8887338] = clik.newPhoto({"id":8887338,"src":"HB3G8804_D839EF71-1EC9-DFB6-09E42DB81B502742_thumb.jpg","galleries_id":467409,"server_id":15,"link":"photo_8887338.html","width":260,"caption":"SEBASTIAN VETTEL","height":186});
															thumbnails[8853043] = clik.newPhoto({"id":8853043,"src":"HB3G5752_603D999F-1E4F-37DC-7175A5F7842F02F2_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853043.html","width":260,"caption":"MICHAEL SCHUMACHER","height":186});
															thumbnails[8871551] = clik.newPhoto({"id":8871551,"src":"HB3G3924_07A4F00D-1EC9-DFB6-09F462877A96FFA6_thumb.jpg","galleries_id":466538,"server_id":15,"link":"photo_8871551.html","width":260,"caption":"HB3G3924","height":186});
															thumbnails[8853044] = clik.newPhoto({"id":8853044,"src":"HB3G5796_603E076F-1E4F-37DC-717E4ADB901B028A_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853044.html","width":260,"caption":"JENSON BUTTON ","height":186});
															thumbnails[8871553] = clik.newPhoto({"id":8871553,"src":"HB3G3958_07A56A75-1EC9-DFB6-09E35F2B03EBCEA4_thumb.jpg","galleries_id":466538,"server_id":15,"link":"photo_8871553.html","width":260,"caption":"HB3G3958","height":186});
															thumbnails[8853046] = clik.newPhoto({"id":8853046,"src":"HB3G5988_603E7D6D-1E4F-37DC-71D2FFB8A9826BC4_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853046.html","width":260,"caption":"LEWIS HAMILTON","height":186});
															thumbnails[8871554] = clik.newPhoto({"id":8871554,"src":"HB3G3984_07A5E269-1EC9-DFB6-09878BF1847CD5E7_thumb.jpg","galleries_id":466538,"server_id":15,"link":"photo_8871554.html","width":260,"caption":"HB3G3984","height":186});
															thumbnails[8853047] = clik.newPhoto({"id":8853047,"src":"HB3G5992_603EF1E0-1E4F-37DC-7117E3D86249474B_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853047.html","width":260,"caption":"FERNANDO ALONSO ","height":186});
															thumbnails[8853048] = clik.newPhoto({"id":8853048,"src":"HB3G6118_603F6675-1E4F-37DC-719EE55AC844BAE4_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853048.html","width":260,"caption":"HB3G6118","height":186});
															thumbnails[8853049] = clik.newPhoto({"id":8853049,"src":"HB3G6423_603FDA6E-1E4F-37DC-71435856FF0436B2_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853049.html","width":260,"caption":"MARK WEBBER","height":186});
															thumbnails[8853050] = clik.newPhoto({"id":8853050,"src":"HB3G6476_60404824-1E4F-37DC-71B2F6D9257BC688_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853050.html","width":260,"caption":"JENSON BUTTON MONACO 2011","height":186});
															thumbnails[8853052] = clik.newPhoto({"id":8853052,"src":"HB3G6965_6040F041-1E4F-37DC-71CF321E8372EB4F_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853052.html","width":260,"caption":"FERNANDO ALONSO ","height":186});
															thumbnails[8853054] = clik.newPhoto({"id":8853054,"src":"HB3G6984_604170EE-1E4F-37DC-71DF719ED81AF7BA_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853054.html","width":260,"caption":"JENSON BUTTON ","height":173});
															thumbnails[8853055] = clik.newPhoto({"id":8853055,"src":"HB3G7348_A_6041E5A2-1E4F-37DC-71663C531FBA2C7D_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853055.html","width":260,"caption":"FELIPE MASSA","height":186});
															thumbnails[8853056] = clik.newPhoto({"id":8853056,"src":"HB3G8002_6042AFCD-1E4F-37DC-71313D2D9C73BFC1_thumb.jpg","galleries_id":15412,"server_id":15,"link":"photo_8853056.html","width":260,"caption":"MICHAEL SCHUMACHER ","height":174});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[466538] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"BRITISH SUPERBIKES","link":"gallery_466538.html","maxRecords":0.0,"photoIDs":[8871544.0,8871545.0,8871546.0,8871547.0,8871548.0,8871549.0,8871550.0,8871551.0,8871553.0,8871554.0],"skipIndex":0,"section_code":"gallery","featured_images":"8871554,8871553,8871551,8871550,8871549,8871548,8871547,8871546,8871545,8871544","id":466538,"singleSection":false});				  						galleries[45096] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"MOTOGP ","link":"gallery_45096.html","maxRecords":0.0,"photoIDs":[8853330.0,8855134.0,8853332.0,8855136.0,8853334.0,8855139.0,8853335.0,8855141.0,8853336.0,8855144.0,8853337.0,8855147.0,8855152.0],"skipIndex":0,"section_code":"gallery","featured_images":"8855152,8855147,8855144,8855141,8855139,8855136,8855134,8853337,8853336,8853335","id":45096,"singleSection":false});				  						galleries[467409] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"REDBULL MILTON KEYNES DEMO RUN 2011","link":"gallery_467409.html","maxRecords":0.0,"photoIDs":[8887326.0,8887328.0,8887329.0,8887333.0,8887335.0,8887337.0,8887338.0],"skipIndex":0,"section_code":"gallery","featured_images":"8887337,8887329,8887328,8887326","id":467409,"singleSection":false});				  						galleries[404621] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"TRAVEL PHOTOGRAPHY","link":"gallery_404621.html","maxRecords":0.0,"photoIDs":[7461886.0,7461946.0,7461948.0,7462000.0,7462148.0],"skipIndex":0,"section_code":"gallery","featured_images":"7462148,7462000,7461948,7461946,7461886","id":404621,"singleSection":false});				  						galleries[58695] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"USA LANDSCAPES","link":"gallery_58695.html","maxRecords":0.0,"photoIDs":[758831.0,758833.0,758836.0,758843.0,758846.0,758848.0,758851.0,758857.0,758859.0,758861.0,758863.0,758867.0,758868.0,758870.0,758878.0,758880.0],"skipIndex":0,"section_code":"gallery","featured_images":"758880,758878,758870,758868,758867,758863,758861,758859,758857,758851","id":58695,"singleSection":false});				  						galleries[15412] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"FORMULA 1 CARS","link":"gallery_15412.html","maxRecords":0.0,"photoIDs":[7248286.0,8853034.0,8853035.0,8853036.0,8853038.0,8853039.0,8853040.0,8853042.0,8853043.0,8853044.0,8853046.0,8853047.0,8853048.0,8853049.0,8853050.0,8853052.0,8853054.0,8853055.0,8853056.0],"skipIndex":0,"section_code":"gallery","featured_images":"8853056,8853055,8853054,8853052,8853050,8853049,8853048,8853047,8853046,8853044","id":15412,"singleSection":false});				  						galleries[15415] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"LANDSCAPES & FLORA","link":"gallery_15415.html","maxRecords":0.0,"photoIDs":[1264164.0,1264256.0,1264259.0,7462183.0,8872037.0,8872038.0,8872040.0,8872041.0,8872042.0],"skipIndex":0,"section_code":"gallery","featured_images":1264164.0,"id":15415,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '1264164,8887326,8855134,8853330,8853034,8887328,8855136,8853332,8853035,8887329,8855139,8853334,8853036,8855141,8853038,8853039,8887337,8855147,8853040,8855152,8853042,8853044,8853046,8853047,8853049,8853054,8853055';
imageSets[2] = '1264164,8887326,8887328,8887329,8887337';
imageSets[3] = '8887326,8887328,8887329,8887337';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/davestening/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/davestening/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/davestening/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/davestening/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/davestening/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/davestening/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/davestening/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/davestening/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 = 'Dave Stening Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		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" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="dave.stening@blueyonder.co.uk">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="dave.stening@blueyonder.co.uk">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						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;
	}
}

			

