window.thumbnails = {};
															thumbnails[206961] = clik.newPhoto({"id":206961,"src":"Portfolio1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":46});
															thumbnails[210612] = clik.newPhoto({"id":210612,"src":"VOR1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":86});
															thumbnails[210615] = clik.newPhoto({"id":210615,"src":"Movistar_2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":87});
															thumbnails[708328] = clik.newPhoto({"id":708328,"src":"Xian2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Xian framed print","height":55});
															thumbnails[863142] = clik.newPhoto({"id":863142,"src":"Series_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":184});
															thumbnails[203535] = clik.newPhoto({"id":203535,"src":"Untitled-10_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_203535.html","width":130,"caption":"Tararua 1","height":53});
															thumbnails[203537] = clik.newPhoto({"id":203537,"src":"Untitled-13_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_203537.html","width":130,"caption":"Tararua 2","height":53});
															thumbnails[203538] = clik.newPhoto({"id":203538,"src":"Untitled-14_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_203538.html","width":130,"caption":"Restaurant","height":86});
															thumbnails[203539] = clik.newPhoto({"id":203539,"src":"Untitled-15_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_203539.html","width":130,"caption":"Prospectus","height":169});
															thumbnails[203540] = clik.newPhoto({"id":203540,"src":"Untitled-17_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_203540.html","width":130,"caption":"Gucci","height":185});
															thumbnails[203541] = clik.newPhoto({"id":203541,"src":"Untitled-18_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_203541.html","width":130,"caption":"Scallops","height":93});
															thumbnails[203543] = clik.newPhoto({"id":203543,"src":"Untitled-24_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_203543.html","width":130,"caption":"Martinborough","height":96});
															thumbnails[206070] = clik.newPhoto({"id":206070,"src":"DSC_2996_thumb.jpg","galleries_id":118453,"server_id":1,"link":"photo_206070.html","width":130,"caption":"Vince","height":158});
															thumbnails[206071] = clik.newPhoto({"id":206071,"src":"ETDC5_thumb.CMYK.jpg","galleries_id":18192,"server_id":1,"link":"photo_206071.html","width":130,"caption":"Tararua 3","height":53});
															thumbnails[206072] = clik.newPhoto({"id":206072,"src":"Shearers4_thumb.jpg","galleries_id":118453,"server_id":1,"link":"photo_206072.html","width":130,"caption":"Radha Mitchell","height":200});
															thumbnails[206073] = clik.newPhoto({"id":206073,"src":"Suit_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_206073.html","width":130,"caption":"Suit","height":190});
															thumbnails[292400] = clik.newPhoto({"id":292400,"src":"10000004_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_292400.html","width":130,"caption":"Tate Modern","height":86});
															thumbnails[292401] = clik.newPhoto({"id":292401,"src":"10000006_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_292401.html","width":130,"caption":"Tate Modern 2, London","height":194});
															thumbnails[292404] = clik.newPhoto({"id":292404,"src":"10000014_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_292404.html","width":130,"caption":"Westminster, London","height":86});
															thumbnails[292409] = clik.newPhoto({"id":292409,"src":"10000032_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_292409.html","width":130,"caption":"Taxi, Soho, London","height":86});
															thumbnails[292417] = clik.newPhoto({"id":292417,"src":"10000089_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_292417.html","width":130,"caption":"Eiffel Tower, Paris","height":86});
															thumbnails[292422] = clik.newPhoto({"id":292422,"src":"10000118_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_292422.html","width":130,"caption":"Louvre 2, Paris","height":86});
															thumbnails[292424] = clik.newPhoto({"id":292424,"src":"10000128_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_292424.html","width":130,"caption":"Louvre 4, Paris","height":86});
															thumbnails[292425] = clik.newPhoto({"id":292425,"src":"10000133_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_292425.html","width":130,"caption":"Louvre 5, Paris","height":86});
															thumbnails[292426] = clik.newPhoto({"id":292426,"src":"10000140_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_292426.html","width":130,"caption":"Bourse, Paris","height":86});
															thumbnails[341154] = clik.newPhoto({"id":341154,"src":"colgate_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_341154.html","width":130,"caption":"Colgate","height":169});
															thumbnails[341162] = clik.newPhoto({"id":341162,"src":"larry_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_341162.html","width":130,"caption":"Larry","height":118});
															thumbnails[341164] = clik.newPhoto({"id":341164,"src":"Ballet_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_341164.html","width":130,"caption":"Ballet","height":196});
															thumbnails[596346] = clik.newPhoto({"id":596346,"src":"AG2Cover_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_596346.html","width":130,"caption":"Auckland Guide Magazine Spring 06","height":169});
															thumbnails[700296] = clik.newPhoto({"id":700296,"src":"ChinaF1000015_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_700296.html","width":130,"caption":"China 2","height":89});
															thumbnails[700299] = clik.newPhoto({"id":700299,"src":"ChinaF1020002_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_700299.html","width":130,"caption":"China 5","height":87});
															thumbnails[700302] = clik.newPhoto({"id":700302,"src":"ChinaF1020029_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_700302.html","width":130,"caption":"China 8","height":87});
															thumbnails[700303] = clik.newPhoto({"id":700303,"src":"ChinaF1020032_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_700303.html","width":130,"caption":"China 9","height":94});
															thumbnails[700305] = clik.newPhoto({"id":700305,"src":"ChinaF1040035_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_700305.html","width":130,"caption":"China 12","height":194});
															thumbnails[700306] = clik.newPhoto({"id":700306,"src":"ChinaF1050024_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_700306.html","width":130,"caption":"China 11","height":87});
															thumbnails[863135] = clik.newPhoto({"id":863135,"src":"Henwood_thumb.jpg","galleries_id":118453,"server_id":1,"link":"photo_863135.html","width":130,"caption":"Wellington actor Ray Henwood","height":195});
															thumbnails[863136] = clik.newPhoto({"id":863136,"src":"Kirk_thumb.jpg","galleries_id":118453,"server_id":1,"link":"photo_863136.html","width":130,"caption":"Taranaki painter Graham Kirk","height":186});
															thumbnails[863137] = clik.newPhoto({"id":863137,"src":"Rowles_thumb.jpg","galleries_id":118453,"server_id":1,"link":"photo_863137.html","width":130,"caption":"New Zealand singer John Rowles","height":195});
															thumbnails[1750126] = clik.newPhoto({"id":1750126,"src":"Kidman_thumb.jpg","galleries_id":118453,"server_id":1,"link":"photo_1750126.html","width":130,"caption":"Fiona Kidman","height":164});
															thumbnails[1763278] = clik.newPhoto({"id":1763278,"src":"Bornholdt_site_thumb.jpg","galleries_id":118453,"server_id":1,"link":"photo_1763278.html","width":130,"caption":"Jenny Bornholdt","height":92});
															thumbnails[1763281] = clik.newPhoto({"id":1763281,"src":"Brazier_Site_thumb.jpg","galleries_id":118453,"server_id":1,"link":"photo_1763281.html","width":130,"caption":"Graham Brazier","height":195});
															thumbnails[1763302] = clik.newPhoto({"id":1763302,"src":"ColinMeads_site_thumb.jpg","galleries_id":118453,"server_id":1,"link":"photo_1763302.html","width":130,"caption":"Colin Meades","height":195});
															thumbnails[1782915] = clik.newPhoto({"id":1782915,"src":"GAYLENE_site_thumb.jpg","galleries_id":118453,"server_id":1,"link":"photo_1782915.html","width":130,"caption":"Gaylene Preston","height":196});
															thumbnails[2162211] = clik.newPhoto({"id":2162211,"src":"11_lotr_1_thumb.jpg","galleries_id":379562,"server_id":1,"link":"photo_2162211.html","width":130,"caption":"","height":98});
															thumbnails[2162253] = clik.newPhoto({"id":2162253,"src":"FS_!__thumb.jpg","galleries_id":379562,"server_id":1,"link":"photo_2162253.html","width":130,"caption":"","height":130});
															thumbnails[3678791] = clik.newPhoto({"id":3678791,"src":"005_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678791.html","width":130,"caption":"Cape Egmont Lighthouse, Taranaki","height":46});
															thumbnails[3678794] = clik.newPhoto({"id":3678794,"src":"000011_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678794.html","width":130,"caption":"Warehouse, Rongotai, Wellington","height":47});
															thumbnails[3678796] = clik.newPhoto({"id":3678796,"src":"000012_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678796.html","width":130,"caption":"Rongotai Wall, Wellington","height":50});
															thumbnails[3678797] = clik.newPhoto({"id":3678797,"src":"000006_12_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678797.html","width":130,"caption":"Caravelle Caravan, South Wairarapa Coast","height":57});
															thumbnails[3678798] = clik.newPhoto({"id":3678798,"src":"000030_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678798.html","width":130,"caption":"Barrett's Bouy, Wellington Heads","height":47});
															thumbnails[3678799] = clik.newPhoto({"id":3678799,"src":"60_3_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678799.html","width":130,"caption":"Airport, Chatham Islands, New Zealand","height":46});
															thumbnails[3678802] = clik.newPhoto({"id":3678802,"src":"Akitio_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678802.html","width":130,"caption":"Akitio Beach, Tararua District","height":48});
															thumbnails[3678803] = clik.newPhoto({"id":3678803,"src":"Aratere3_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678803.html","width":130,"caption":"Cook Strait Ferry Aratere passing Point Halswell, Wellington Harbour","height":43});
															thumbnails[3678804] = clik.newPhoto({"id":3678804,"src":"av_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678804.html","width":130,"caption":"Pool, Lake Grassmere Salt Works, Marlborough","height":47});
															thumbnails[3678805] = clik.newPhoto({"id":3678805,"src":"B02_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678805.html","width":130,"caption":"Airshow, Masterton, Wairarapa","height":47});
															thumbnails[3678806] = clik.newPhoto({"id":3678806,"src":"B06a_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678806.html","width":130,"caption":"Airshow, Masterton, Wairarapa","height":47});
															thumbnails[3678807] = clik.newPhoto({"id":3678807,"src":"Birdlings12001_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678807.html","width":130,"caption":"Caravan, Birdlings Flat, Canterbury","height":45});
															thumbnails[3678808] = clik.newPhoto({"id":3678808,"src":"BusPahiatua_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678808.html","width":130,"caption":"Bus, Pahiatua, Tararua District","height":50});
															thumbnails[3678809] = clik.newPhoto({"id":3678809,"src":"C0a1_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678809.html","width":130,"caption":"Birchville Dam near Upper Hutt","height":47});
															thumbnails[3678810] = clik.newPhoto({"id":3678810,"src":"Chathams1_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678810.html","width":130,"caption":"Petre Bay Takeaways, Chatham Islands","height":47});
															thumbnails[3678811] = clik.newPhoto({"id":3678811,"src":"Chathams2_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678811.html","width":130,"caption":"Tommy Solomon's Statue, Chatham Islands","height":47});
															thumbnails[3678812] = clik.newPhoto({"id":3678812,"src":"ChathamsPierv_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678812.html","width":130,"caption":"Kaingaroa, Chatham Islands","height":47});
															thumbnails[3678813] = clik.newPhoto({"id":3678813,"src":"Dannevirke2_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678813.html","width":130,"caption":"Dannevirke Flying School, Tararua District","height":46});
															thumbnails[3678814] = clik.newPhoto({"id":3678814,"src":"Ferrymeadez_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678814.html","width":130,"caption":"Beacon, Ferrymead near Christchurch","height":57});
															thumbnails[3678815] = clik.newPhoto({"id":3678815,"src":"FishingBoatsCI_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678815.html","width":130,"caption":"Abandoned Fishing Boats, Waitangi, Chatham Islands","height":47});
															thumbnails[3678816] = clik.newPhoto({"id":3678816,"src":"gas-stationz_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678816.html","width":130,"caption":"\"Gas\", near Foxton","height":49});
															thumbnails[3678817] = clik.newPhoto({"id":3678817,"src":"img005_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678817.html","width":130,"caption":"Street, Rongotai, Wellington","height":42});
															thumbnails[3678819] = clik.newPhoto({"id":3678819,"src":"img008_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678819.html","width":130,"caption":"Blue Lake, St Bathans, Central Otago","height":45});
															thumbnails[3678821] = clik.newPhoto({"id":3678821,"src":"img013a1_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678821.html","width":130,"caption":"Fishing Boats, Ngawhi, Wairarapa South Coast","height":45});
															thumbnails[3678824] = clik.newPhoto({"id":3678824,"src":"img018_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678824.html","width":130,"caption":"Power Lines, Tiwai Point, Southland","height":44});
															thumbnails[3678825] = clik.newPhoto({"id":3678825,"src":"img020_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678825.html","width":130,"caption":"Wellington Skyline","height":43});
															thumbnails[3678831] = clik.newPhoto({"id":3678831,"src":"img029av_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678831.html","width":130,"caption":"Morgue Building, Old Riverton Hospital","height":44});
															thumbnails[3678834] = clik.newPhoto({"id":3678834,"src":"img035_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678834.html","width":130,"caption":"DC3, Rongotai Airport, Wellington","height":43});
															thumbnails[3678835] = clik.newPhoto({"id":3678835,"src":"img039_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678835.html","width":130,"caption":"Island Bay, Wellington","height":48});
															thumbnails[3678836] = clik.newPhoto({"id":3678836,"src":"img050_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678836.html","width":130,"caption":"Orepuki, Southland","height":46});
															thumbnails[3678837] = clik.newPhoto({"id":3678837,"src":"img058a_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678837.html","width":130,"caption":"Security, Rongotai Airport, Wellington","height":48});
															thumbnails[3678838] = clik.newPhoto({"id":3678838,"src":"img0591_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678838.html","width":130,"caption":"Rail Wagon, Ormonville, Tarurua District","height":49});
															thumbnails[3678841] = clik.newPhoto({"id":3678841,"src":"img072a_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678841.html","width":130,"caption":"Power pylons, Rangipo Desert, Central North Island","height":47});
															thumbnails[3678842] = clik.newPhoto({"id":3678842,"src":"img098_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678842.html","width":130,"caption":"National War Memorial, Wellington","height":45});
															thumbnails[3678843] = clik.newPhoto({"id":3678843,"src":"img111a_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678843.html","width":130,"caption":"Castlepoint, Lighthouse, Wairarapa","height":43});
															thumbnails[3678844] = clik.newPhoto({"id":3678844,"src":"Kaikoura_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678844.html","width":130,"caption":"Crayfish Caravan, Kaikoura","height":48});
															thumbnails[3678845] = clik.newPhoto({"id":3678845,"src":"Kapiti_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678845.html","width":130,"caption":"Kapiti Island from Paraparaumu, Kapiti Coast","height":48});
															thumbnails[3678846] = clik.newPhoto({"id":3678846,"src":"LowerSelwyn_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678846.html","width":130,"caption":"Lower Selwyn Huts, Canterbury","height":55});
															thumbnails[3678847] = clik.newPhoto({"id":3678847,"src":"Napier_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678847.html","width":130,"caption":"Caravan, Napier Foreshore","height":50});
															thumbnails[3678848] = clik.newPhoto({"id":3678848,"src":"NapierAnchor_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678848.html","width":130,"caption":"Anchor, Napier Foreshore","height":49});
															thumbnails[3678849] = clik.newPhoto({"id":3678849,"src":"NapierFountain_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678849.html","width":130,"caption":"Fountain, Napier Foreshore","height":50});
															thumbnails[3678850] = clik.newPhoto({"id":3678850,"src":"Olivo_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678850.html","width":130,"caption":"Olivo, Olive Grove, Martinborough, Wairarapa","height":48});
															thumbnails[3678851] = clik.newPhoto({"id":3678851,"src":"Piha2_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678851.html","width":130,"caption":"Piha, West Auckland Beaches","height":49});
															thumbnails[3678853] = clik.newPhoto({"id":3678853,"src":"Rongotai1_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678853.html","width":130,"caption":"Motel, Rongotai, Wellington","height":48});
															thumbnails[3678854] = clik.newPhoto({"id":3678854,"src":"Rothmans_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678854.html","width":130,"caption":"Rothmans Building, Napier","height":52});
															thumbnails[3678856] = clik.newPhoto({"id":3678856,"src":"ShagPoint2_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678856.html","width":130,"caption":"Batch, Shag Point, Otago","height":48});
															thumbnails[3678857] = clik.newPhoto({"id":3678857,"src":"Untitled-5a_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678857.html","width":130,"caption":"Gulls, Cape Campbell,  Marlborough","height":47});
															thumbnails[3678861] = clik.newPhoto({"id":3678861,"src":"Untitled-16a_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678861.html","width":130,"caption":"Janets, Ohura, King Country","height":48});
															thumbnails[3678862] = clik.newPhoto({"id":3678862,"src":"Untitled-16b_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678862.html","width":130,"caption":"Garage, Ohura, King Country","height":47});
															thumbnails[3678863] = clik.newPhoto({"id":3678863,"src":"Untitled-26a_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678863.html","width":130,"caption":"Freezing Works, Mataura","height":43});
															thumbnails[3678866] = clik.newPhoto({"id":3678866,"src":"Untitled-34a_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678866.html","width":130,"caption":"Cook Strait Ferry Arahura","height":46});
															thumbnails[3678867] = clik.newPhoto({"id":3678867,"src":"Untitled-36_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678867.html","width":130,"caption":"Lounge, Arahura, Cook Strait Ferry","height":44});
															thumbnails[3678868] = clik.newPhoto({"id":3678868,"src":"Untitled-37a_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678868.html","width":130,"caption":"Oreti Beach, Invercargill, Southland","height":44});
															thumbnails[3678869] = clik.newPhoto({"id":3678869,"src":"Untitled-39_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678869.html","width":130,"caption":"Stirling Point Pilot Station, Bluff","height":46});
															thumbnails[3678870] = clik.newPhoto({"id":3678870,"src":"Untitled-40_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678870.html","width":130,"caption":"Bus, Poolburn Reservoir, Central Otago","height":44});
															thumbnails[3678872] = clik.newPhoto({"id":3678872,"src":"Untitled-65a_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678872.html","width":130,"caption":"Rongotai Airport, Wellington","height":46});
															thumbnails[3678873] = clik.newPhoto({"id":3678873,"src":"Untitled-84_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678873.html","width":130,"caption":"Overseas Passenger Terminal,  Wellington Harbour","height":47});
															thumbnails[3678874] = clik.newPhoto({"id":3678874,"src":"Waikanae_River_21_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678874.html","width":130,"caption":"Boat Launching, Waikanae River Mouth, Kapiti Coast","height":45});
															thumbnails[3678905] = clik.newPhoto({"id":3678905,"src":"img031_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678905.html","width":130,"caption":"Old Riverton Hospital, Southland","height":45});
															thumbnails[3678906] = clik.newPhoto({"id":3678906,"src":"Untitled-8_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678906.html","width":130,"caption":"Wharf, Riverton, Southland","height":44});
															thumbnails[3678908] = clik.newPhoto({"id":3678908,"src":"img106_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_3678908.html","width":130,"caption":"Hotel, St George, Queensland Outback","height":51});
															thumbnails[3678919] = clik.newPhoto({"id":3678919,"src":"Outback25_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_3678919.html","width":130,"caption":"Rainbow at Dawn, Windorah, Queensland Outback","height":48});
															thumbnails[3678927] = clik.newPhoto({"id":3678927,"src":"img059a1_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3678927.html","width":130,"caption":"Caravan, Paekakariki, Kapiti Coast","height":48});
															thumbnails[3678929] = clik.newPhoto({"id":3678929,"src":"04cv1_thumb.jpg","galleries_id":53808,"server_id":1,"link":"photo_3678929.html","width":130,"caption":"Red Wall, Beijing","height":47});
															thumbnails[3678930] = clik.newPhoto({"id":3678930,"src":"06c_thumb.jpg","galleries_id":53808,"server_id":1,"link":"photo_3678930.html","width":130,"caption":"Park near the Forbidden City, Beijing","height":47});
															thumbnails[3678931] = clik.newPhoto({"id":3678931,"src":"07c_thumb.jpg","galleries_id":53808,"server_id":1,"link":"photo_3678931.html","width":130,"caption":"Bell Tower Square, Xian","height":49});
															thumbnails[3678932] = clik.newPhoto({"id":3678932,"src":"08c_thumb.jpg","galleries_id":53808,"server_id":1,"link":"photo_3678932.html","width":130,"caption":"Terracotta Warriors, Xian","height":51});
															thumbnails[3678933] = clik.newPhoto({"id":3678933,"src":"12cv_thumb.jpg","galleries_id":53808,"server_id":1,"link":"photo_3678933.html","width":130,"caption":"Summer Palace, Beijing","height":50});
															thumbnails[3678934] = clik.newPhoto({"id":3678934,"src":"13c_thumb.jpg","galleries_id":53808,"server_id":1,"link":"photo_3678934.html","width":130,"caption":"Summer Palace, Beijing","height":48});
															thumbnails[3678935] = clik.newPhoto({"id":3678935,"src":"GtWallc_thumb.jpg","galleries_id":53808,"server_id":1,"link":"photo_3678935.html","width":130,"caption":"Great Wall of China, Near Beijing","height":48});
															thumbnails[3678936] = clik.newPhoto({"id":3678936,"src":"Shanghai1cv_thumb.jpg","galleries_id":53808,"server_id":1,"link":"photo_3678936.html","width":130,"caption":"Shanghai Skyline from The Bund","height":47});
															thumbnails[3678937] = clik.newPhoto({"id":3678937,"src":"Untitled-90_thumb.jpg","galleries_id":53808,"server_id":1,"link":"photo_3678937.html","width":130,"caption":"Tung Chung, Lantau Island, Hong Kong","height":48});
															thumbnails[3678938] = clik.newPhoto({"id":3678938,"src":"img083_thumb.jpg","galleries_id":53808,"server_id":1,"link":"photo_3678938.html","width":130,"caption":"Hong Kong Harbour with Approaching Monsoon Storm","height":49});
															thumbnails[3678939] = clik.newPhoto({"id":3678939,"src":"06_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3678939.html","width":130,"caption":"Millenium Bridge and St Pauls Cathedral, London at night","height":48});
															thumbnails[3678941] = clik.newPhoto({"id":3678941,"src":"07x_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3678941.html","width":130,"caption":"Deck chairs, Beer, Devon","height":47});
															thumbnails[3678944] = clik.newPhoto({"id":3678944,"src":"08a_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3678944.html","width":130,"caption":"Seven Sisters from Birling Gap, UK","height":43});
															thumbnails[3678946] = clik.newPhoto({"id":3678946,"src":"09xv_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3678946.html","width":130,"caption":"Fishing Boats, Beer, Devon","height":47});
															thumbnails[3678948] = clik.newPhoto({"id":3678948,"src":"10x_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3678948.html","width":130,"caption":"Houses, South Coast, UK","height":47});
															thumbnails[3678949] = clik.newPhoto({"id":3678949,"src":"11x_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3678949.html","width":130,"caption":"Bathing Sheds, Newhaven, near Brighton, UK","height":47});
															thumbnails[3678950] = clik.newPhoto({"id":3678950,"src":"12z_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3678950.html","width":130,"caption":"Approaching Storm, Beachy Head, UK","height":47});
															thumbnails[3678972] = clik.newPhoto({"id":3678972,"src":"16_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3678972.html","width":130,"caption":"Eastbourne from the Eastborne Pier, UK","height":46});
															thumbnails[3678973] = clik.newPhoto({"id":3678973,"src":"000016x_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3678973.html","width":130,"caption":"Elgin Marbles, British Museum, London, UK","height":50});
															thumbnails[3678974] = clik.newPhoto({"id":3678974,"src":"000017x_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3678974.html","width":130,"caption":"Telephone Boxes, Covent Garden, London, UK","height":48});
															thumbnails[3679148] = clik.newPhoto({"id":3679148,"src":"17x_thumb.jpg","galleries_id":18191,"server_id":2,"link":"photo_3679148.html","width":130,"caption":"Birch Trees, Tate Modern, London, UK","height":47});
															thumbnails[3679150] = clik.newPhoto({"id":3679150,"src":"17x_1_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679150.html","width":130,"caption":"Thames, London","height":49});
															thumbnails[3679168] = clik.newPhoto({"id":3679168,"src":"49tonedw_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679168.html","width":130,"caption":"Old Portland Light, near Weymouth, UK","height":48});
															thumbnails[3679169] = clik.newPhoto({"id":3679169,"src":"F25a_2z_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679169.html","width":130,"caption":"Battersea Power Station, London, UK","height":53});
															thumbnails[3679171] = clik.newPhoto({"id":3679171,"src":"F25az_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679171.html","width":130,"caption":"Castle Stalker Near Oban, Scottish Highlands","height":49});
															thumbnails[3679173] = clik.newPhoto({"id":3679173,"src":"F25cz1_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679173.html","width":130,"caption":"Eiffel Tower, Paris","height":47});
															thumbnails[3679176] = clik.newPhoto({"id":3679176,"src":"F25d_d1x_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679176.html","width":130,"caption":"Paris Skyline, France","height":48});
															thumbnails[3679178] = clik.newPhoto({"id":3679178,"src":"L06_F_L_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679178.html","width":130,"caption":"St Pauls from the Millennium Bridge, London","height":54});
															thumbnails[3679180] = clik.newPhoto({"id":3679180,"src":"LondonEyev_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679180.html","width":130,"caption":"London Eye, London, UK","height":48});
															thumbnails[3679181] = clik.newPhoto({"id":3679181,"src":"P25d_L_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679181.html","width":130,"caption":"Paris Skyline, Paris France","height":33});
															thumbnails[3679198] = clik.newPhoto({"id":3679198,"src":"Tate1_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679198.html","width":130,"caption":"Tate Modern, London, UK","height":48});
															thumbnails[3679206] = clik.newPhoto({"id":3679206,"src":"UKSouth22v_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679206.html","width":130,"caption":"Birling Gap, near Eastbourne, UK","height":44});
															thumbnails[3679208] = clik.newPhoto({"id":3679208,"src":"UKSouth271_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679208.html","width":130,"caption":"Portland Bill Lighthouse, near Weymouth, UK","height":49});
															thumbnails[3679210] = clik.newPhoto({"id":3679210,"src":"UKSouth31v_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679210.html","width":130,"caption":"Eastbourne Pier, Eastbourne, UK","height":48});
															thumbnails[3679213] = clik.newPhoto({"id":3679213,"src":"UKSouth33v_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679213.html","width":130,"caption":"Donuts, Bognor Regis, UK","height":47});
															thumbnails[3679214] = clik.newPhoto({"id":3679214,"src":"UKSouth34v_thumb.jpg","galleries_id":18191,"server_id":1,"link":"photo_3679214.html","width":130,"caption":"South Coast Beach, Bognor Regis, UK","height":49});
															thumbnails[3688604] = clik.newPhoto({"id":3688604,"src":"img109website_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_3688604.html","width":130,"caption":"Rangitoto Island from Narrow Neck Beach","height":44});
															thumbnails[4460967] = clik.newPhoto({"id":4460967,"src":"poster_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_4460967.html","width":130,"caption":"NZ Library Week advertising poster 2009","height":189});
															thumbnails[4474333] = clik.newPhoto({"id":4474333,"src":"img0282_thumb.jpg","galleries_id":18190,"server_id":1,"link":"photo_4474333.html","width":130,"caption":"Bach, Southland","height":58});
															thumbnails[4902958] = clik.newPhoto({"id":4902958,"src":"Sydney-3_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_4902958.html","width":130,"caption":"Sydney Harbour Bridge from Luna Park","height":44});
															thumbnails[4903029] = clik.newPhoto({"id":4903029,"src":"Jennifer_Souness_thumb.jpg","galleries_id":118453,"server_id":1,"link":"photo_4903029.html","width":130,"caption":"\"Madam\" Jennifer Souness","height":90});
															thumbnails[4960517] = clik.newPhoto({"id":4960517,"src":"StateIns_site_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_4960517.html","width":130,"caption":"State Insurance","height":93});
															thumbnails[4960656] = clik.newPhoto({"id":4960656,"src":"POS0219_Redirections_PP_128x182_HR_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_4960656.html","width":130,"caption":"NZ Post","height":185});
															thumbnails[4960658] = clik.newPhoto({"id":4960658,"src":"C496_Cover_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_4960658.html","width":130,"caption":"","height":170});
															thumbnails[4960778] = clik.newPhoto({"id":4960778,"src":"_CCP6939cover4_thumb.jpg","galleries_id":118453,"server_id":1,"link":"photo_4960778.html","width":130,"caption":"New Zealand dance icon Deirdre Tarrant","height":130});
															thumbnails[5829600] = clik.newPhoto({"id":5829600,"src":"HBC-Poster_thumb.jpg","galleries_id":379562,"server_id":1,"link":"photo_5829600.html","width":130,"caption":"Home By Christmas poster","height":186});
															thumbnails[6624848] = clik.newPhoto({"id":6624848,"src":"Outback4_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624848.html","width":130,"caption":"Unleaded","height":46});
															thumbnails[6624856] = clik.newPhoto({"id":6624856,"src":"Outback31_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624856.html","width":130,"caption":"Emu","height":50});
															thumbnails[6624859] = clik.newPhoto({"id":6624859,"src":"Outback5_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624859.html","width":130,"caption":"Road near Longreach","height":47});
															thumbnails[6624862] = clik.newPhoto({"id":6624862,"src":"Outback7_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624862.html","width":130,"caption":"Near Windorah Qld","height":48});
															thumbnails[6624864] = clik.newPhoto({"id":6624864,"src":"Outback6_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624864.html","width":130,"caption":"Kevin Oates, Windorah","height":48});
															thumbnails[6624897] = clik.newPhoto({"id":6624897,"src":"Outback8_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624897.html","width":130,"caption":"Windorah","height":47});
															thumbnails[6624900] = clik.newPhoto({"id":6624900,"src":"Outback9_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624900.html","width":130,"caption":"Houses, Windorah","height":49});
															thumbnails[6624952] = clik.newPhoto({"id":6624952,"src":"Outback10_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624952.html","width":130,"caption":"Solar Power Station, Windorah","height":47});
															thumbnails[6624955] = clik.newPhoto({"id":6624955,"src":"Outback12_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624955.html","width":130,"caption":"Abandoned car near Birdsville","height":50});
															thumbnails[6624960] = clik.newPhoto({"id":6624960,"src":"Outback111_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624960.html","width":130,"caption":"Cattle on Birdsville Development Road","height":47});
															thumbnails[6624969] = clik.newPhoto({"id":6624969,"src":"Outback13_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624969.html","width":130,"caption":"Desert near Windorah","height":45});
															thumbnails[6624972] = clik.newPhoto({"id":6624972,"src":"Outback14_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624972.html","width":130,"caption":"Abandoned Betoota Pub","height":44});
															thumbnails[6624975] = clik.newPhoto({"id":6624975,"src":"Outback15_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624975.html","width":130,"caption":"Birdsville Racetrack","height":47});
															thumbnails[6624978] = clik.newPhoto({"id":6624978,"src":"Outback16_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624978.html","width":130,"caption":"Birdsville Pub","height":44});
															thumbnails[6624979] = clik.newPhoto({"id":6624979,"src":"Outback18_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624979.html","width":130,"caption":"Road to Bedourie","height":49});
															thumbnails[6624982] = clik.newPhoto({"id":6624982,"src":"Outback21_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6624982.html","width":130,"caption":"","height":47});
															thumbnails[6625077] = clik.newPhoto({"id":6625077,"src":"Outback22_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6625077.html","width":130,"caption":"","height":48});
															thumbnails[6625087] = clik.newPhoto({"id":6625087,"src":"Outback23_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6625087.html","width":130,"caption":"","height":46});
															thumbnails[6625089] = clik.newPhoto({"id":6625089,"src":"Outback24_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6625089.html","width":130,"caption":"Lake Hart, South Australia","height":47});
															thumbnails[6625092] = clik.newPhoto({"id":6625092,"src":"Outback25_BCFD9234-1EC9-D45B-1C89FBA250B7B1B3_thumb.jpg","galleries_id":18189,"server_id":1,"link":"photo_6625092.html","width":130,"caption":"Woomera, South Australia","height":44});
															thumbnails[8306704] = clik.newPhoto({"id":8306704,"src":"Entry2_website_thumb.jpg","galleries_id":18532,"server_id":1,"link":"photo_8306704.html","width":130,"caption":"New York","height":332});
															thumbnails[8387102] = clik.newPhoto({"id":8387102,"src":"_CCP3722_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_8387102.html","width":130,"caption":"Pools and Spas, Lower Hutt","height":86});
															thumbnails[8387103] = clik.newPhoto({"id":8387103,"src":"_CCP5843_thumb.jpg","galleries_id":18192,"server_id":1,"link":"photo_8387103.html","width":130,"caption":"Pools and Spas, Lower Hutt","height":86});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[18190] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"New Zealand Landscapes","link":"gallery_18190.html","maxRecords":0.0,"photoIDs":[3678791.0,3678794.0,3678796.0,3678797.0,3678798.0,3678799.0,3678802.0,3678803.0,3678804.0,3678805.0,3678806.0,3678807.0,3678808.0,3678809.0,3678810.0,3678811.0,3678812.0,3678813.0,3678814.0,3678815.0,3678816.0,3678817.0,3678819.0,3678821.0,3678824.0,3678825.0,3678831.0,3678834.0,3678835.0,3678836.0,3678837.0,3678838.0,3678841.0,3678842.0,3678843.0,3678844.0,3678845.0,3678846.0,3678847.0,3678848.0,3678849.0,3678850.0,3678851.0,3678853.0,3678854.0,3678856.0,3678857.0,3678861.0,3678862.0,3678863.0,3678866.0,3678867.0,3678868.0,3678869.0,3678870.0,3678872.0,3678873.0,3678874.0,3678905.0,3678906.0,3678927.0,3688604.0,4474333.0],"skipIndex":0,"section_code":"gallery","featured_images":"3678906,3678843,3678791","id":18190,"singleSection":false});				  						galleries[18189] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Australian Landscapes","link":"gallery_18189.html","maxRecords":0.0,"photoIDs":[3678908.0,3678919.0,4902958.0,6624848.0,6624856.0,6624859.0,6624862.0,6624864.0,6624897.0,6624900.0,6624952.0,6624955.0,6624960.0,6624969.0,6624972.0,6624975.0,6624978.0,6624979.0,6624982.0,6625077.0,6625087.0,6625089.0,6625092.0],"skipIndex":0,"section_code":"gallery","featured_images":"6625092,6625089,6625087,6625077,6624982,6624979,6624978,6624975,6624972,6624969","id":18189,"singleSection":false});				  						galleries[18191] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"UK and European Landscapes","link":"gallery_18191.html","maxRecords":0.0,"photoIDs":[3678939.0,3678941.0,3678944.0,3678946.0,3678948.0,3678949.0,3678950.0,3678972.0,3678973.0,3678974.0,3679148.0,3679150.0,3679168.0,3679169.0,3679171.0,3679173.0,3679176.0,3679178.0,3679180.0,3679181.0,3679198.0,3679206.0,3679208.0,3679210.0,3679213.0,3679214.0],"skipIndex":0,"section_code":"gallery","featured_images":3679150.0,"id":18191,"singleSection":false});				  						galleries[53808] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"China Landscapes","link":"gallery_53808.html","maxRecords":0.0,"photoIDs":[3678929.0,3678930.0,3678931.0,3678932.0,3678933.0,3678934.0,3678935.0,3678936.0,3678937.0,3678938.0],"skipIndex":0,"section_code":"gallery","featured_images":"3678938,3678937,3678936,3678935,3678934,3678933,3678932,3678931,3678930,3678929","id":53808,"singleSection":false});				  						galleries[118453] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Commissioned Portraits","link":"gallery_118453.html","maxRecords":0.0,"photoIDs":[206070.0,206072.0,863135.0,863136.0,863137.0,1750126.0,1763278.0,1763281.0,1763302.0,1782915.0,4903029.0,4960778.0],"skipIndex":0,"section_code":"gallery","featured_images":"1763281,863135","id":118453,"singleSection":false});				  						galleries[18192] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Other Commissioned Photography","link":"gallery_18192.html","maxRecords":0.0,"photoIDs":[203535.0,203537.0,203538.0,203539.0,203540.0,203541.0,203543.0,206071.0,206073.0,341154.0,341162.0,341164.0,596346.0,4460967.0,4960517.0,4960656.0,4960658.0,8387102.0,8387103.0],"skipIndex":0,"section_code":"gallery","featured_images":"596346,203538,203537,203535","id":18192,"singleSection":false});				  						galleries[18532] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Observations","link":"gallery_18532.html","maxRecords":0.0,"photoIDs":[292400.0,292401.0,292404.0,292409.0,292417.0,292422.0,292424.0,292425.0,292426.0,700296.0,700299.0,700302.0,700303.0,700305.0,700306.0,8306704.0],"skipIndex":0,"section_code":"gallery","featured_images":"8306704,700303,700302","id":18532,"singleSection":false});				  						galleries[379562] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Film Stills","link":"gallery_379562.html","maxRecords":0.0,"photoIDs":[2162211.0,2162253.0,5829600.0],"skipIndex":0,"section_code":"gallery","featured_images":"5829600,2162253,2162211","id":379562,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8306704,3679150,3678906';
imageSets[2] = '8306704,3679150,3678906,3678843,3678791,1763281,863135,700303,700302,596346,203538,203537,203535';
imageSets[3] = '4474333';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/chriscoad/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/chriscoad/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 = 'Chris Coad 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> $' + (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="chrisc@xtra.co.nz">';
					temp += '<input type="hidden" name="currency_code" value="USD">';
					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="chrisc@xtra.co.nz">';
				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;
	}
}

			

