window.thumbnails = {};
															thumbnails[3493414] = clik.newPhoto({"id":3493414,"src":"RB on Temple_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":107});
															thumbnails[3493488] = clik.newPhoto({"id":3493488,"src":"Tanish2 B&W copy for Web copy_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Tanish","height":87});
															thumbnails[3671182] = clik.newPhoto({"id":3671182,"src":"gear_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":92});
															thumbnails[3918861] = clik.newPhoto({"id":3918861,"src":"Robert_Bailey_Menoweathan_GreySeal_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":87,"caption":"Grey Seal (Halichoerus grypus)","height":130});
															thumbnails[4023097] = clik.newPhoto({"id":4023097,"src":"Robert_Bailey_PoolBaby_2_for_Web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":87});
															thumbnails[4273366] = clik.newPhoto({"id":4273366,"src":"Paula_for_Web_by_Robert_Bailey_thumb.JPG","galleries_id":"","server_id":1,"link":"#","width":106,"caption":"","height":130});
															thumbnails[4979745] = clik.newPhoto({"id":4979745,"src":"Robert_Bailey_copy_for_web__thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":85});
															thumbnails[5896428] = clik.newPhoto({"id":5896428,"src":"Robert_Bailey_Dive_Fest_2010_for_web1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Diver and CuttleFish","height":99});
															thumbnails[5896703] = clik.newPhoto({"id":5896703,"src":"Nudibranch_copy_for_web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Nudibranch","height":87});
															thumbnails[9091707] = clik.newPhoto({"id":9091707,"src":"mdx-D300-front-520_1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":160,"caption":"","height":102});
															thumbnails[9091725] = clik.newPhoto({"id":9091725,"src":"Nikon_D300_3_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":160,"caption":"","height":120});
															thumbnails[9091731] = clik.newPhoto({"id":9091731,"src":"D300_SS_D300_1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":160,"caption":"","height":61});
															thumbnails[9091737] = clik.newPhoto({"id":9091737,"src":"Nikon_D300_1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":160,"caption":"","height":120});
															thumbnails[9091742] = clik.newPhoto({"id":9091742,"src":"allroundview_D300_1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":160,"caption":"","height":134});
															thumbnails[9091763] = clik.newPhoto({"id":9091763,"src":"MDX-D300_1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":160,"caption":"","height":55});
															thumbnails[3087069] = clik.newPhoto({"id":3087069,"src":"yellowmouth 2 for web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Yellow Mouth Moray","height":109});
															thumbnails[1177046] = clik.newPhoto({"id":1177046,"src":"DSC_0069 copy for web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":86,"caption":"Two-Spot Goby ","height":130});
															thumbnails[4837264] = clik.newPhoto({"id":4837264,"src":"Robert_Bailey_Wolf__Eel_Anarrhicthys_ocellatus_copy_for_web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Wolf Eel <br>\r\n<br>\r\n","height":87});
															thumbnails[3512678] = clik.newPhoto({"id":3512678,"src":"_RIB1986 copyfor web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":104,"caption":"Diver on Buoy","height":130});
															thumbnails[3512579] = clik.newPhoto({"id":3512579,"src":"_RB12582-Edit (1) copy for web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":87,"caption":"Wall dive","height":130});
															thumbnails[1423130] = clik.newPhoto({"id":1423130,"src":"sunrise_over_san_juan_island_for_web1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Sunrise over San Juan Island","height":84});
															thumbnails[3513643] = clik.newPhoto({"id":3513643,"src":"SEA MOTH 1 copy for web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Sea Moths","height":74});
															thumbnails[1424251] = clik.newPhoto({"id":1424251,"src":"Beach_at_fort_bragg_for_web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Beach ","height":79});
															thumbnails[1931223] = clik.newPhoto({"id":1931223,"src":"Lundy-for-web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Lundy Island ","height":86});
															thumbnails[8817650] = clik.newPhoto({"id":8817650,"src":"Robert_Bailey_-_Liberty_Wreck_2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":160,"caption":"Surgeon Fish & Schooling Jacks","height":107});
															thumbnails[1472575] = clik.newPhoto({"id":1472575,"src":"mating_pair_shore_crabs_for_web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Shore Crab ","height":87});
															thumbnails[3513375] = clik.newPhoto({"id":3513375,"src":"Blue Spotted Ray copy for web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Blue Spotted Ray","height":84});
															thumbnails[1424134] = clik.newPhoto({"id":1424134,"src":"red_irish_lord_for_web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Red Irish Lord <br>\r\n","height":87});
															thumbnails[1470593] = clik.newPhoto({"id":1470593,"src":"Blue_shark_at_padstow_for_web1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Blue Shark(<em>Prionace glauca<\/em>)","height":95});
															thumbnails[3513925] = clik.newPhoto({"id":3513925,"src":"_RIB0303 copy for web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Pyjama Slug","height":87});
															thumbnails[3513466] = clik.newPhoto({"id":3513466,"src":"Robert Bailey Abstract copy for web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Giant Clam Abstract","height":96});
															thumbnails[1169256] = clik.newPhoto({"id":1169256,"src":"Two Lion Fish for web2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Common lionfish hunting","height":85});
															thumbnails[3512819] = clik.newPhoto({"id":3512819,"src":"Pike_Robert Bailey_copy for web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Pike Hunting","height":97});
															thumbnails[3514308] = clik.newPhoto({"id":3514308,"src":"_RIB0567 copy for web copy_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Blotched Hawk Fish","height":87});
															thumbnails[3512848] = clik.newPhoto({"id":3512848,"src":"Robert_Bailey_Tom_Pot_Blenny copy for web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Tom Pot Blenny","height":87});
															thumbnails[3512885] = clik.newPhoto({"id":3512885,"src":"23e copy for web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Diver with Cuckoo Wrasse","height":95});
															thumbnails[3512918] = clik.newPhoto({"id":3512918,"src":"Fireworks Anenome copy for web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Fireworks Anenome","height":87});
															thumbnails[1206944] = clik.newPhoto({"id":1206944,"src":"Hooded Nudibranch for Web2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Hooded Nudibranch <br>\r\n<br>\r\n","height":84});
															thumbnails[1169178] = clik.newPhoto({"id":1169178,"src":"Spy Hop for Web2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Orca ","height":84});
															thumbnails[1206393] = clik.newPhoto({"id":1206393,"src":"Puget Sounds King Crab for web2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Puget Sound King Crab <br>\r\n","height":85});
															thumbnails[1169198] = clik.newPhoto({"id":1169198,"src":"Wolf eel for web3.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Wolf-Eel ","height":130});
															thumbnails[1423989] = clik.newPhoto({"id":1423989,"src":"bull_kelp_for_web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":83,"caption":"Bull Kelp ","height":130});
															thumbnails[1169431] = clik.newPhoto({"id":1169431,"src":"Pacific White-sided Dolphin for web3_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Pacific White-Sided Dolphin ","height":93});
															thumbnails[5309155] = clik.newPhoto({"id":5309155,"src":"Robert_Bailey_BSOUP_Open_2009_For_Web1_thumb.JPG","galleries_id":214805,"server_id":1,"link":"photo_5309155.html","width":130,"caption":"Runner-up BSOUP Open Portfolio 2009","height":98});
															thumbnails[5309114] = clik.newPhoto({"id":5309114,"src":"Robert_Bailey_BUPG_Open2009_for_web1_thumb.jpg","galleries_id":214805,"server_id":1,"link":"photo_5309114.html","width":130,"caption":"Winning Portfolio - Open Category BUPG","height":98});
															thumbnails[4836923] = clik.newPhoto({"id":4836923,"src":"Robert_Bailey_Tiger_Shark_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_4836923.html","width":130,"caption":"","height":91});
															thumbnails[5124103] = clik.newPhoto({"id":5124103,"src":"Epson_Red_Sea_Portofolio_Submission_Robert_Bailey_thumb.jpg","galleries_id":214805,"server_id":1,"link":"photo_5124103.html","width":130,"caption":"Nominated -- Epson Red Sea World of Underwater Images competition","height":98});
															thumbnails[1377327] = clik.newPhoto({"id":1377327,"src":"dive_boat_off_kapalai_for_web_thumb.jpg","galleries_id":217190,"server_id":1,"link":"photo_1377327.html","width":130,"caption":"Early Dive","height":86});
															thumbnails[1412604] = clik.newPhoto({"id":1412604,"src":"fiets_in_steeg_in_Amsterdam_for_web11_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_1412604.html","width":130,"caption":"Fiets in steeg ","height":81});
															thumbnails[1584618] = clik.newPhoto({"id":1584618,"src":"capo figari 1 copy for web_thumb.jpg","galleries_id":98141,"server_id":1,"link":"photo_1584618.html","width":130,"caption":"Diver in cave entrance at Capo Figari","height":94});
															thumbnails[1878594] = clik.newPhoto({"id":1878594,"src":"Women in Valley of the 10 peaks for web_thumb.jpg","galleries_id":84311,"server_id":1,"link":"photo_1878594.html","width":130,"caption":"Valley of the Ten Peaks","height":81});
															thumbnails[1931217] = clik.newPhoto({"id":1931217,"src":"Warwick-Phone-Booth-for-web_thumb.jpg","galleries_id":84616,"server_id":1,"link":"photo_1931217.html","width":86,"caption":"Phone booth","height":130});
															thumbnails[3500743] = clik.newPhoto({"id":3500743,"src":"05 copy for web_thumb.jpg","galleries_id":84463,"server_id":1,"link":"photo_3500743.html","width":130,"caption":"Cairo","height":84});
															thumbnails[3506720] = clik.newPhoto({"id":3506720,"src":"Pensive2 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506720.html","width":84,"caption":"Pensive Girl","height":130});
															thumbnails[3512359] = clik.newPhoto({"id":3512359,"src":"Best of British A3 300 Robert Bailey Final copy for web_thumb.jpg","galleries_id":214805,"server_id":1,"link":"photo_3512359.html","width":130,"caption":"BSOUP Best of British 2007","height":92});
															thumbnails[3545734] = clik.newPhoto({"id":3545734,"src":"DSC_0323_for_web_thumb.jpg","galleries_id":217184,"server_id":1,"link":"photo_3545734.html","width":101,"caption":"Mother & baby","height":130});
															thumbnails[3545964] = clik.newPhoto({"id":3545964,"src":"012_copy_for_web_thumb.jpg","galleries_id":217191,"server_id":1,"link":"photo_3545964.html","width":130,"caption":"Flame Anthias","height":87});
															thumbnails[3559815] = clik.newPhoto({"id":3559815,"src":"Hawksbill1_copy_for_web_thumb.jpg","galleries_id":217190,"server_id":1,"link":"photo_3559815.html","width":130,"caption":"Hawksbill Turtle","height":79});
															thumbnails[3569394] = clik.newPhoto({"id":3569394,"src":"Black_Tip_1_copy_for_web1_copy_thumb.jpg","galleries_id":217192,"server_id":1,"link":"photo_3569394.html","width":130,"caption":"Black Tip Reef Shark","height":86});
															thumbnails[3657214] = clik.newPhoto({"id":3657214,"src":"_RIB2272_copy_for_web_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_3657214.html","width":130,"caption":"Grey Reef Shark","height":84});
															thumbnails[4907610] = clik.newPhoto({"id":4907610,"src":"Opalescent_Nudibranch_Hermisssenda_crassicornis_Robert_Bailey_for_web_thumb.jpg","galleries_id":84307,"server_id":1,"link":"photo_4907610.html","width":130,"caption":"Opalescent Nudibranch ","height":87});
															thumbnails[7654847] = clik.newPhoto({"id":7654847,"src":"Robert_Bailey_Okenia_elegance_thumb.jpg","galleries_id":84615,"server_id":1,"link":"photo_7654847.html","width":160,"caption":"Elegant Nudibranch","height":107});
															thumbnails[7847142] = clik.newPhoto({"id":7847142,"src":"Robert_Bailey_Pterois_volitans_2_thumb.jpg","galleries_id":84312,"server_id":1,"link":"photo_7847142.html","width":107,"caption":"Common Lion Fish","height":160});
															thumbnails[8814479] = clik.newPhoto({"id":8814479,"src":"Robert_Bailey_Western_Anenome_Fish_Amphiprion_ocellaris_thumb.jpg","galleries_id":463768,"server_id":1,"link":"photo_8814479.html","width":160,"caption":"Western Anenome Fish (<em>Amphiprion ocellaris<\/em>)","height":125});
															thumbnails[1177234] = clik.newPhoto({"id":1177234,"src":"Teepee outside Field BC for web2.jpg","galleries_id":84311,"server_id":1,"link":"photo_1177234.html","width":130,"caption":"Winter teepee","height":86});
															thumbnails[1377330] = clik.newPhoto({"id":1377330,"src":"Sunrise_off_kapalai_for web2_thumb.jpg","galleries_id":217190,"server_id":1,"link":"photo_1377330.html","width":130,"caption":"Kapalai Sunrise","height":86});
															thumbnails[1423006] = clik.newPhoto({"id":1423006,"src":"Amstel_at_dawn_for_web_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_1423006.html","width":130,"caption":"River Amstel at dawn","height":85});
															thumbnails[1931194] = clik.newPhoto({"id":1931194,"src":"Devon-Still-Life-for-web_thumb.jpg","galleries_id":84616,"server_id":1,"link":"photo_1931194.html","width":85,"caption":"Devon Still life","height":130});
															thumbnails[3500657] = clik.newPhoto({"id":3500657,"src":"037 copy for web_thumb.jpg","galleries_id":84463,"server_id":1,"link":"photo_3500657.html","width":130,"caption":"Camels","height":84});
															thumbnails[3506728] = clik.newPhoto({"id":3506728,"src":"Cuba020 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506728.html","width":87,"caption":"The boys","height":130});
															thumbnails[3512544] = clik.newPhoto({"id":3512544,"src":"Robert_Bailey_BSOUP Best of Britsh 2008 copy for web_thumb.jpg","galleries_id":214805,"server_id":1,"link":"photo_3512544.html","width":130,"caption":"BSOUP Best of British 2008","height":98});
															thumbnails[3545746] = clik.newPhoto({"id":3545746,"src":"DSC_0346_copy_for_web_thumb.jpg","galleries_id":217184,"server_id":1,"link":"photo_3545746.html","width":87,"caption":"Hanging Out","height":130});
															thumbnails[3547251] = clik.newPhoto({"id":3547251,"src":"Maldives_Anenome_Fish_for_web_thumb.jpg","galleries_id":217191,"server_id":1,"link":"photo_3547251.html","width":130,"caption":"Maldives Anenome Fish","height":87});
															thumbnails[3569439] = clik.newPhoto({"id":3569439,"src":"DSC_0094_copy_for_web_thumb.jpg","galleries_id":217192,"server_id":1,"link":"photo_3569439.html","width":130,"caption":"Jetty","height":86});
															thumbnails[3657159] = clik.newPhoto({"id":3657159,"src":"Robert_Bailey_Tiger_Shark_on__Surface_for_Web_1_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_3657159.html","width":130,"caption":"Tiger Shark at Surface","height":87});
															thumbnails[4907648] = clik.newPhoto({"id":4907648,"src":"Candy_Stripe_Shrimp_Lebbeus_grandimanus_Robert_Bailey_for_web_thumb.jpg","galleries_id":84307,"server_id":1,"link":"photo_4907648.html","width":130,"caption":"Candy Stripe Shrimp ","height":87});
															thumbnails[5315221] = clik.newPhoto({"id":5315221,"src":"Robert_Bailey_SnakeLock_Anenome_thumb.jpg","galleries_id":84615,"server_id":1,"link":"photo_5315221.html","width":160,"caption":"Snakelock Anenome","height":107});
															thumbnails[7847207] = clik.newPhoto({"id":7847207,"src":"Robert_Bailey_SeaHorse_thumb.jpg","galleries_id":84312,"server_id":1,"link":"photo_7847207.html","width":107,"caption":"Seahorse ","height":160});
															thumbnails[8814526] = clik.newPhoto({"id":8814526,"src":"Robert_Bailey_Flying_Gurnard_Dactyloptena_orientalis_thumb.jpg","galleries_id":463768,"server_id":1,"link":"photo_8814526.html","width":160,"caption":"Flying Gurnard (<em>Dactyloptena orientalis<\/em>)","height":107});
															thumbnails[1412603] = clik.newPhoto({"id":1412603,"src":"Brouwersgracht_in_Amsterdam_for_web2_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_1412603.html","width":130,"caption":"Houseboat ","height":78});
															thumbnails[1424258] = clik.newPhoto({"id":1424258,"src":"Big_horn_ship_outside_banff_for_web_thumb.jpg","galleries_id":84311,"server_id":1,"link":"photo_1424258.html","width":130,"caption":"Big Horn Sheep","height":87});
															thumbnails[1931199] = clik.newPhoto({"id":1931199,"src":"Tree-at-Sudley-Castle for web_thumb.jpg","galleries_id":84616,"server_id":1,"link":"photo_1931199.html","width":86,"caption":"Woman and tree ","height":130});
															thumbnails[3088530] = clik.newPhoto({"id":3088530,"src":"Capo Figari 2 for web_thumb.jpg","galleries_id":98141,"server_id":1,"link":"photo_3088530.html","width":130,"caption":"Diver on Capo Figari ","height":86});
															thumbnails[3088669] = clik.newPhoto({"id":3088669,"src":"Monto Mista copy 1 for web _thumb.jpg","galleries_id":98141,"server_id":1,"link":"photo_3088669.html","width":130,"caption":"Diver and Wrasse","height":86});
															thumbnails[3500795] = clik.newPhoto({"id":3500795,"src":"056 copy for web_thumb.jpg","galleries_id":84463,"server_id":1,"link":"photo_3500795.html","width":130,"caption":"Giza","height":84});
															thumbnails[3506732] = clik.newPhoto({"id":3506732,"src":"img016 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506732.html","width":83,"caption":"El Morro","height":130});
															thumbnails[3546143] = clik.newPhoto({"id":3546143,"src":"Triple_Fin_copyfor_web_thumb.jpg","galleries_id":217191,"server_id":1,"link":"photo_3546143.html","width":130,"caption":"Triple Fin","height":87});
															thumbnails[3569409] = clik.newPhoto({"id":3569409,"src":"DSC_0082_copy_for_web_thumb.jpg","galleries_id":217192,"server_id":1,"link":"photo_3569409.html","width":130,"caption":"Black Tip Reef Shark","height":91});
															thumbnails[3657305] = clik.newPhoto({"id":3657305,"src":"_RIB2389_copy_for_web_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_3657305.html","width":130,"caption":"Lemon Shark","height":87});
															thumbnails[5315721] = clik.newPhoto({"id":5315721,"src":"Robert_Bauiley_Grunt_Sculpin_2_Rhamphocottus_richardsonii_thumb.jpg","galleries_id":84307,"server_id":1,"link":"photo_5315721.html","width":130,"caption":"Grunt Sculpin (<em>Rhamphocottus richardsonii<\/em>)","height":87});
															thumbnails[7654925] = clik.newPhoto({"id":7654925,"src":"Robert_Bailey_Grey_Seal_Halichoerus_grypus_thumb.jpg","galleries_id":84615,"server_id":1,"link":"photo_7654925.html","width":160,"caption":"Grey Seal ","height":106});
															thumbnails[7847124] = clik.newPhoto({"id":7847124,"src":"Robert_Bailey_Pterois_volitans_thumb.jpg","galleries_id":84312,"server_id":1,"link":"photo_7847124.html","width":107,"caption":"Common Lion Fish","height":160});
															thumbnails[8814581] = clik.newPhoto({"id":8814581,"src":"Robert_Bailey_Eastern_Skunk_Anenome_FishAmphiprion_sandaracinos_thumb.jpg","galleries_id":463768,"server_id":1,"link":"photo_8814581.html","width":160,"caption":"Eastern Skunk Anenome Fish (<em>Amphiprion sandaracinos<\/em>)","height":107});
															thumbnails[1169252] = clik.newPhoto({"id":1169252,"src":"Skeleton for web1.jpg","galleries_id":84463,"server_id":1,"link":"photo_1169252.html","width":85,"caption":"Skeleton","height":130});
															thumbnails[1177304] = clik.newPhoto({"id":1177304,"src":"Skunk Clown fish for web2_thumb.jpg","galleries_id":217190,"server_id":1,"link":"photo_1177304.html","width":130,"caption":"Skunk Anemonefish ","height":96});
															thumbnails[1377329] = clik.newPhoto({"id":1377329,"src":"girl_off_sipidan_for_web_thumb.jpg","galleries_id":217190,"server_id":1,"link":"photo_1377329.html","width":86,"caption":"Girl floating off Sipadan Island","height":130});
															thumbnails[1423134] = clik.newPhoto({"id":1423134,"src":"Paula_on_Lankayan_Island1_thumb.jpg","galleries_id":217192,"server_id":1,"link":"photo_1423134.html","width":130,"caption":"Dusk on the beach at Lankayan Island","height":86});
															thumbnails[1424139] = clik.newPhoto({"id":1424139,"src":"tulips_in_keukenhof_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_1424139.html","width":83,"caption":"Tulips in the Keukenhof","height":130});
															thumbnails[1648127] = clik.newPhoto({"id":1648127,"src":"jellyfish_sardegna_for_web_thumb.jpg","galleries_id":98141,"server_id":1,"link":"photo_1648127.html","width":130,"caption":"Jelly Fish ","height":86});
															thumbnails[1879700] = clik.newPhoto({"id":1879700,"src":"Glass-for-web_thumb.jpg","galleries_id":84311,"server_id":1,"link":"photo_1879700.html","width":130,"caption":"Sunset facing east","height":85});
															thumbnails[1931157] = clik.newPhoto({"id":1931157,"src":"Londoner-on-bench1_thumb.jpg","galleries_id":84616,"server_id":1,"link":"photo_1931157.html","width":130,"caption":"Man on bench series, part I","height":84});
															thumbnails[3506749] = clik.newPhoto({"id":3506749,"src":"Cuba027 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506749.html","width":86,"caption":"Cuban Fisherman I","height":130});
															thumbnails[3546030] = clik.newPhoto({"id":3546030,"src":"047_copy_for_web_thumb.jpg","galleries_id":217191,"server_id":1,"link":"photo_3546030.html","width":130,"caption":"Feeding Frenzy","height":84});
															thumbnails[3665542] = clik.newPhoto({"id":3665542,"src":"_RIB2823_copy_for_web_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_3665542.html","width":130,"caption":"Photographer meets tiger shark","height":87});
															thumbnails[4907684] = clik.newPhoto({"id":4907684,"src":"Red-Eye_Medusa_Polyorchis_pencillatus_Robert_Bailey_copy_for_web_thumb.jpg","galleries_id":84307,"server_id":1,"link":"photo_4907684.html","width":82,"caption":"Red-Eye Medusa ","height":130});
															thumbnails[5314019] = clik.newPhoto({"id":5314019,"src":"Robert_Bailey_Pike_Stoney_Cove_thumb.jpg","galleries_id":84615,"server_id":1,"link":"photo_5314019.html","width":160,"caption":"Pike","height":107});
															thumbnails[7847613] = clik.newPhoto({"id":7847613,"src":"Robert_Bailey_Oxycirrhites_typus_thumb.jpg","galleries_id":84312,"server_id":1,"link":"photo_7847613.html","width":160,"caption":"Long Nose Hawkfish","height":107});
															thumbnails[8814727] = clik.newPhoto({"id":8814727,"src":"Robert_Bailey_-_Chromodoris_reticulata_thumb.jpg","galleries_id":463768,"server_id":1,"link":"photo_8814727.html","width":160,"caption":"Chromodoris reticulata","height":113});
															thumbnails[1648081] = clik.newPhoto({"id":1648081,"src":"DSC_00761_thumb.jpg","galleries_id":98141,"server_id":1,"link":"photo_1648081.html","width":130,"caption":"Unidentified","height":95});
															thumbnails[1879604] = clik.newPhoto({"id":1879604,"src":"Long-Beach-Lighthouse_thumb.jpg","galleries_id":84311,"server_id":1,"link":"photo_1879604.html","width":130,"caption":"Long Beach - Tofino","height":84});
															thumbnails[1931165] = clik.newPhoto({"id":1931165,"src":"Londoner-on-bench-2_thumb.jpg","galleries_id":84616,"server_id":1,"link":"photo_1931165.html","width":130,"caption":"Man on bench series - part II","height":84});
															thumbnails[3497100] = clik.newPhoto({"id":3497100,"src":"248 copy web copy_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_3497100.html","width":130,"caption":"Tulips ","height":84});
															thumbnails[3500842] = clik.newPhoto({"id":3500842,"src":"045 copy for web_thumb.jpg","galleries_id":84463,"server_id":1,"link":"photo_3500842.html","width":84,"caption":"Old Cairo","height":130});
															thumbnails[3506750] = clik.newPhoto({"id":3506750,"src":"Cuba031 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506750.html","width":86,"caption":"Cuban Fisherman II","height":130});
															thumbnails[3512809] = clik.newPhoto({"id":3512809,"src":"Robert_Bailey_Stoney_Cove_thumb.jpg","galleries_id":84615,"server_id":1,"link":"photo_3512809.html","width":160,"caption":"Gull","height":107});
															thumbnails[3546025] = clik.newPhoto({"id":3546025,"src":"042_copyfor_web_thumb.jpg","galleries_id":217191,"server_id":1,"link":"photo_3546025.html","width":130,"caption":"Schooling Mantas","height":76});
															thumbnails[3665520] = clik.newPhoto({"id":3665520,"src":"_RIB2339_copy_for_web_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_3665520.html","width":101,"caption":"Grey Reef Shark","height":130});
															thumbnails[4907702] = clik.newPhoto({"id":4907702,"src":"Glove_Sponge_Neoesperiopsis_digitata_Robert_Bailey_copy_for_web_thumb.jpg","galleries_id":84307,"server_id":1,"link":"photo_4907702.html","width":87,"caption":"Glove Sponge ","height":130});
															thumbnails[7847661] = clik.newPhoto({"id":7847661,"src":"Robert_Bailey_Nuweiba_Jetty_thumb.jpg","galleries_id":84312,"server_id":1,"link":"photo_7847661.html","width":160,"caption":"The Jetty at Nuweiba","height":107});
															thumbnails[8814824] = clik.newPhoto({"id":8814824,"src":"Robert_Bailey_-_Phidiana_indica_thumb.jpg","galleries_id":463768,"server_id":1,"link":"photo_8814824.html","width":160,"caption":"Phidiana indica","height":107});
															thumbnails[1377465] = clik.newPhoto({"id":1377465,"src":"005_copy_for_web_thumb.jpg","galleries_id":217191,"server_id":1,"link":"photo_1377465.html","width":130,"caption":"Manta Rays","height":84});
															thumbnails[1423008] = clik.newPhoto({"id":1423008,"src":"man_in_space_leicester_square_London_thumb.jpg","galleries_id":84616,"server_id":1,"link":"photo_1423008.html","width":130,"caption":"Man on bench series, part III","height":83});
															thumbnails[1648113] = clik.newPhoto({"id":1648113,"src":"Nudibranch Flabellinidae for web_thumb.jpg","galleries_id":98141,"server_id":1,"link":"photo_1648113.html","width":130,"caption":"Nudibranch Flabellinidae - Will update","height":86});
															thumbnails[1879276] = clik.newPhoto({"id":1879276,"src":"Blue-Heron-for-Web_thumb.jpg","galleries_id":84311,"server_id":1,"link":"photo_1879276.html","width":130,"caption":"Blue Heron ","height":85});
															thumbnails[3497115] = clik.newPhoto({"id":3497115,"src":"247 for web copy_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_3497115.html","width":84,"caption":"Tulips in Keukenhof","height":130});
															thumbnails[3500810] = clik.newPhoto({"id":3500810,"src":"08 copy for web_thumb.jpg","galleries_id":84463,"server_id":1,"link":"photo_3500810.html","width":84,"caption":"Birds","height":130});
															thumbnails[3506752] = clik.newPhoto({"id":3506752,"src":"Cuba030 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506752.html","width":95,"caption":"Cuban Fisherman III","height":130});
															thumbnails[3559818] = clik.newPhoto({"id":3559818,"src":"Sipadan_Bat_Fish_copy_for_web_thumb.jpg","galleries_id":217190,"server_id":1,"link":"photo_3559818.html","width":130,"caption":"Bat Fish","height":98});
															thumbnails[3665534] = clik.newPhoto({"id":3665534,"src":"Robert_Bailey_Tiger_Shark_for__web_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_3665534.html","width":130,"caption":"Tiger Shark","height":87});
															thumbnails[4907727] = clik.newPhoto({"id":4907727,"src":"Hunt_Rock_-_Open_Pacific_Robert_Bailey_copy_for_web_thumb.jpg","galleries_id":84307,"server_id":1,"link":"photo_4907727.html","width":87,"caption":"Bull Kelp on Hunt Rock","height":130});
															thumbnails[7663763] = clik.newPhoto({"id":7663763,"src":"Robert_Bailey_Rainbow_Trout_thumb.jpg","galleries_id":84615,"server_id":1,"link":"photo_7663763.html","width":160,"caption":"Rainbow Trout ","height":107});
															thumbnails[7847745] = clik.newPhoto({"id":7847745,"src":"Robert_Bailey_Brown-Spotted_Grouper_thumb.jpg","galleries_id":84312,"server_id":1,"link":"photo_7847745.html","width":160,"caption":"Brown-Spotted Grouper & Cleaner Wrasse","height":107});
															thumbnails[8814792] = clik.newPhoto({"id":8814792,"src":"Chromodoris_hintuanensis_thumb.jpg","galleries_id":463768,"server_id":1,"link":"photo_8814792.html","width":160,"caption":"Chromodoris hintuanensis","height":113});
															thumbnails[1169405] = clik.newPhoto({"id":1169405,"src":"Girl_looking_ at_ spinner_dolphin_ for web_thumb.jpg","galleries_id":84463,"server_id":1,"link":"photo_1169405.html","width":130,"caption":"Spinner Dolphin ","height":84});
															thumbnails[1879522] = clik.newPhoto({"id":1879522,"src":"Approaching-storm-for-web_thumb.jpg","galleries_id":84311,"server_id":1,"link":"photo_1879522.html","width":84,"caption":"Approaching storm","height":130});
															thumbnails[3497165] = clik.newPhoto({"id":3497165,"src":"img012 copy for web_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_3497165.html","width":112,"caption":"Walking the Walls","height":130});
															thumbnails[3500615] = clik.newPhoto({"id":3500615,"src":"118 copy for web_thumb.jpg","galleries_id":84463,"server_id":1,"link":"photo_3500615.html","width":130,"caption":"Tin Basher","height":91});
															thumbnails[3506754] = clik.newPhoto({"id":3506754,"src":"Cuba013 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506754.html","width":87,"caption":"Havana","height":130});
															thumbnails[3532251] = clik.newPhoto({"id":3532251,"src":"Scan131__copy_for_web_thumb.jpg","galleries_id":84616,"server_id":1,"link":"photo_3532251.html","width":130,"caption":"Rape Field I","height":84});
															thumbnails[3547457] = clik.newPhoto({"id":3547457,"src":"Bearded_Scorpionfish_for_web_thumb.jpg","galleries_id":217191,"server_id":1,"link":"photo_3547457.html","width":130,"caption":"Bearded Scorpionfish","height":92});
															thumbnails[3671161] = clik.newPhoto({"id":3671161,"src":"DSC_0301_copy_for_web_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_3671161.html","width":130,"caption":"Lemon shark","height":86});
															thumbnails[4907861] = clik.newPhoto({"id":4907861,"src":"Race_Rocks_copy_for_web_robert_Bailey_thumb.jpg","galleries_id":84307,"server_id":1,"link":"photo_4907861.html","width":130,"caption":"Steller Sea Lions on Race Rocks","height":87});
															thumbnails[5314006] = clik.newPhoto({"id":5314006,"src":"Robert_Bailey_James_Eagan_Lane_thumb.jpg","galleries_id":84615,"server_id":1,"link":"photo_5314006.html","width":160,"caption":"Wreck of the James Eagan Lane ","height":107});
															thumbnails[8817476] = clik.newPhoto({"id":8817476,"src":"Robert_Bailey_-_Liberty_Wreck_1_thumb.jpg","galleries_id":463768,"server_id":1,"link":"photo_8817476.html","width":160,"caption":"Diver on Liberty Wreck","height":102});
															thumbnails[1648010] = clik.newPhoto({"id":1648010,"src":"DSC_0044_thumb.jpg","galleries_id":98141,"server_id":1,"link":"photo_1648010.html","width":115,"caption":"Nudibranch family Flabellinadae - will update","height":130});
															thumbnails[1882415] = clik.newPhoto({"id":1882415,"src":"Icicles-for-web_thumb.jpg","galleries_id":84311,"server_id":1,"link":"photo_1882415.html","width":84,"caption":"Icicles","height":130});
															thumbnails[3497175] = clik.newPhoto({"id":3497175,"src":"243 copy for web_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_3497175.html","width":84,"caption":"Cigarette","height":130});
															thumbnails[3500836] = clik.newPhoto({"id":3500836,"src":"Egyptian Market copy for web_thumb.jpg","galleries_id":84463,"server_id":1,"link":"photo_3500836.html","width":130,"caption":"Market","height":86});
															thumbnails[3506762] = clik.newPhoto({"id":3506762,"src":"Cuba009 copyfor web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506762.html","width":130,"caption":"Obligatory Car Shot","height":83});
															thumbnails[3547546] = clik.newPhoto({"id":3547546,"src":"Hawksbill_Turtle_for_web_thumb.jpg","galleries_id":217191,"server_id":1,"link":"photo_3547546.html","width":87,"caption":"Hawksbill Turtle","height":130});
															thumbnails[3677270] = clik.newPhoto({"id":3677270,"src":"Robert_Bailey_Grey_Shark_for_web_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_3677270.html","width":130,"caption":"Grey Reef shark","height":89});
															thumbnails[7703233] = clik.newPhoto({"id":7703233,"src":"Robert_Bailey_Morris1_thumb.jpg","galleries_id":84616,"server_id":1,"link":"photo_7703233.html","width":160,"caption":"Morris","height":107});
															thumbnails[1882433] = clik.newPhoto({"id":1882433,"src":"Port-Hardy-for-web_thumb.jpg","galleries_id":84311,"server_id":1,"link":"photo_1882433.html","width":84,"caption":"Port Hardy","height":130});
															thumbnails[3497311] = clik.newPhoto({"id":3497311,"src":"236 copy for web_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_3497311.html","width":101,"caption":"Wobbly","height":130});
															thumbnails[3506768] = clik.newPhoto({"id":3506768,"src":"Cuba010 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506768.html","width":87,"caption":"Ernesto Che Guevara","height":130});
															thumbnails[3547319] = clik.newPhoto({"id":3547319,"src":"Oriental_Sweetlips_for_web_thumb.jpg","galleries_id":217191,"server_id":1,"link":"photo_3547319.html","width":130,"caption":"Oriental Sweetlips","height":88});
															thumbnails[3671126] = clik.newPhoto({"id":3671126,"src":"_RIB3586_copyfor_web_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_3671126.html","width":130,"caption":"Diver with Compact Camera & Grey Reef Shark","height":87});
															thumbnails[5314073] = clik.newPhoto({"id":5314073,"src":"Robert_Bailey_Corkwing_Wrasse_thumb.jpg","galleries_id":84615,"server_id":1,"link":"photo_5314073.html","width":160,"caption":"Corkwing Wrasse","height":107});
															thumbnails[6711761] = clik.newPhoto({"id":6711761,"src":"Robert_Bailey_Star_Trail1_thumb.jpg","galleries_id":84616,"server_id":1,"link":"photo_6711761.html","width":160,"caption":"Star Trail","height":107});
															thumbnails[7675648] = clik.newPhoto({"id":7675648,"src":"Robert_Bailey_Remote_Sensor1_thumb.jpg","galleries_id":84615,"server_id":1,"link":"photo_7675648.html","width":160,"caption":"Diver in Aircraft","height":107});
															thumbnails[8817693] = clik.newPhoto({"id":8817693,"src":"Diver_on_Lipah_Wreck_thumb.jpg","galleries_id":463768,"server_id":1,"link":"photo_8817693.html","width":160,"caption":"Diver on Japanese Wreck in Lipah Bay","height":113});
															thumbnails[1882445] = clik.newPhoto({"id":1882445,"src":"Deer-on-horizon-for-web_thumb.jpg","galleries_id":84311,"server_id":1,"link":"photo_1882445.html","width":130,"caption":"Deer","height":87});
															thumbnails[3497196] = clik.newPhoto({"id":3497196,"src":"Lone Cyclist copy for web_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_3497196.html","width":87,"caption":"Lone Cyclist","height":130});
															thumbnails[3497308] = clik.newPhoto({"id":3497308,"src":"258 copy for web_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_3497308.html","width":84,"caption":"Joint","height":130});
															thumbnails[3506771] = clik.newPhoto({"id":3506771,"src":"Cuba011 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506771.html","width":130,"caption":"Jack","height":89});
															thumbnails[3532264] = clik.newPhoto({"id":3532264,"src":"Scan130_copy_for_web_thumb.jpg","galleries_id":84616,"server_id":1,"link":"photo_3532264.html","width":130,"caption":"Rape Field II","height":84});
															thumbnails[3677271] = clik.newPhoto({"id":3677271,"src":"Robert_Bailey_Grey_Shark_for_Web1_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_3677271.html","width":130,"caption":"Grey Reef Shark","height":87});
															thumbnails[4907807] = clik.newPhoto({"id":4907807,"src":"Bald_Headed_Eagle_Haliaeetus_lencocephalus_Robert_Bailey_copy_for_web_thumb.jpg","galleries_id":84311,"server_id":1,"link":"photo_4907807.html","width":130,"caption":"Bald Headed Eagle ","height":93});
															thumbnails[4907920] = clik.newPhoto({"id":4907920,"src":"Giant_Octopus_Browning_Wall_copy_for_web_Robert_Bailey_thumb.jpg","galleries_id":84307,"server_id":1,"link":"photo_4907920.html","width":130,"caption":"Giant Pacific Octopus on Browning Wall","height":87});
															thumbnails[7675657] = clik.newPhoto({"id":7675657,"src":"Robert_Bailey_Grey_Seal_thumb.jpg","galleries_id":84615,"server_id":1,"link":"photo_7675657.html","width":107,"caption":"Grey Seal ","height":160});
															thumbnails[1931211] = clik.newPhoto({"id":1931211,"src":"Warwick-Boat-House_thumb.jpg","galleries_id":84616,"server_id":1,"link":"photo_1931211.html","width":130,"caption":"Boat House","height":86});
															thumbnails[3506780] = clik.newPhoto({"id":3506780,"src":"Cuba029 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506780.html","width":86,"caption":"Doorway","height":130});
															thumbnails[3671147] = clik.newPhoto({"id":3671147,"src":"_RIB3412_copy_for_web_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_3671147.html","width":130,"caption":"Photographers & Tiger shark","height":101});
															thumbnails[4907939] = clik.newPhoto({"id":4907939,"src":"China_Rockfish_Sebates_auriculatus_copy_for_web_Robert_Bailey_thumb.jpg","galleries_id":84307,"server_id":1,"link":"photo_4907939.html","width":130,"caption":"China Rockfish ","height":87});
															thumbnails[7062163] = clik.newPhoto({"id":7062163,"src":"Robert_Bailey_Warwickshire_Sunset_thumb.jpg","galleries_id":84616,"server_id":1,"link":"photo_7062163.html","width":130,"caption":"Warwickshire Sunset","height":86});
															thumbnails[7675619] = clik.newPhoto({"id":7675619,"src":"Robert_Bailey_Long_Legged_Spider_Crab_thumb.jpg","galleries_id":84615,"server_id":1,"link":"photo_7675619.html","width":107,"caption":"Long Legged Spider Crab","height":160});
															thumbnails[1882450] = clik.newPhoto({"id":1882450,"src":"girls-talking-on-long-beach_thumb.jpg","galleries_id":84311,"server_id":1,"link":"photo_1882450.html","width":130,"caption":"Girls talking","height":84});
															thumbnails[1882457] = clik.newPhoto({"id":1882457,"src":"field-with-clouds-for-web_thumb.jpg","galleries_id":84311,"server_id":1,"link":"photo_1882457.html","width":130,"caption":"Field with clouds","height":86});
															thumbnails[3497306] = clik.newPhoto({"id":3497306,"src":"240 copy for web_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_3497306.html","width":84,"caption":"Sweepers","height":130});
															thumbnails[3506784] = clik.newPhoto({"id":3506784,"src":"Cuba028 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506784.html","width":130,"caption":"Diver and Jelly Fish","height":85});
															thumbnails[3532168] = clik.newPhoto({"id":3532168,"src":"Oak_Tree_for_web_copy_thumb.jpg","galleries_id":84616,"server_id":1,"link":"photo_3532168.html","width":87,"caption":"Tree","height":130});
															thumbnails[3677273] = clik.newPhoto({"id":3677273,"src":"_RIB2465_copy_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_3677273.html","width":130,"caption":"Lemon shark","height":87});
															thumbnails[4907982] = clik.newPhoto({"id":4907982,"src":"Orange_Sea_Pen_Ptilosarcus_gurneyl_copy_for_web_Robert_Bailey_thumb.jpg","galleries_id":84307,"server_id":1,"link":"photo_4907982.html","width":130,"caption":"Orange Sea Pen","height":87});
															thumbnails[5002647] = clik.newPhoto({"id":5002647,"src":"Diverus_enjoya_Robert_Bailey_for_web_thumb.jpg","galleries_id":84307,"server_id":1,"link":"photo_5002647.html","width":130,"caption":"Diverus enjoya","height":87});
															thumbnails[5315631] = clik.newPhoto({"id":5315631,"src":"Robert_Bailey_Lingcod_1_thumb.jpg","galleries_id":84307,"server_id":1,"link":"photo_5315631.html","width":130,"caption":"Lingcod","height":88});
															thumbnails[7675645] = clik.newPhoto({"id":7675645,"src":"Robert_Bailey_Loch_Long1_thumb.jpg","galleries_id":84615,"server_id":1,"link":"photo_7675645.html","width":107,"caption":"Plumose Anenome","height":160});
															thumbnails[3497354] = clik.newPhoto({"id":3497354,"src":"254 copy for web_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_3497354.html","width":130,"caption":"Gracht","height":84});
															thumbnails[3506794] = clik.newPhoto({"id":3506794,"src":"Cuba032 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506794.html","width":87,"caption":"Book market","height":130});
															thumbnails[3711454] = clik.newPhoto({"id":3711454,"src":"Robert_Bailey_Mount_Rundle_Copy_for_web_thumb.jpg","galleries_id":84311,"server_id":1,"link":"photo_3711454.html","width":130,"caption":"Mount Rundle","height":86});
															thumbnails[3711457] = clik.newPhoto({"id":3711457,"src":"Jeff_Yanover_Copy_for_Web_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_3711457.html","width":130,"caption":"RB & Tiger Shark","height":87});
															thumbnails[4907844] = clik.newPhoto({"id":4907844,"src":"Deer_in_Browning_Pass_copy_for_web_Robert_Bailey_thumb.jpg","galleries_id":84311,"server_id":1,"link":"photo_4907844.html","width":130,"caption":"Costal Black Tail Deer ","height":93});
															thumbnails[3497334] = clik.newPhoto({"id":3497334,"src":"259 copy for web_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_3497334.html","width":130,"caption":"Door","height":84});
															thumbnails[3506802] = clik.newPhoto({"id":3506802,"src":"img017 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506802.html","width":90,"caption":"Model","height":130});
															thumbnails[3711536] = clik.newPhoto({"id":3711536,"src":"Arthur_Kingdon_Copy_for_web_copy_thumb.jpg","galleries_id":223427,"server_id":1,"link":"photo_3711536.html","width":130,"caption":"RB & Tiger Shark","height":98});
															thumbnails[1177170] = clik.newPhoto({"id":1177170,"src":"Wreck in Loch for web1.jpg","galleries_id":84616,"server_id":1,"link":"photo_1177170.html","width":86,"caption":"Wreck on Scottish loch","height":130});
															thumbnails[3497359] = clik.newPhoto({"id":3497359,"src":"255 copy for web_thumb.jpg","galleries_id":96076,"server_id":1,"link":"photo_3497359.html","width":130,"caption":"Queen's Day ","height":82});
															thumbnails[3506806] = clik.newPhoto({"id":3506806,"src":"Cuba035 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506806.html","width":87,"caption":"Pose","height":130});
															thumbnails[3506812] = clik.newPhoto({"id":3506812,"src":"Cuba034 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506812.html","width":86,"caption":"Glasses","height":130});
															thumbnails[3506808] = clik.newPhoto({"id":3506808,"src":"img018 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506808.html","width":86,"caption":"Bored","height":130});
															thumbnails[3506822] = clik.newPhoto({"id":3506822,"src":"Scan76 copy for web_thumb.jpg","galleries_id":96074,"server_id":1,"link":"photo_3506822.html","width":87,"caption":"Woman","height":130});
															thumbnails[1648118] = clik.newPhoto({"id":1648118,"src":"Mediterranean Moray (Muraena helena) for web_thumb.jpg","galleries_id":98141,"server_id":1,"link":"photo_1648118.html","width":86,"caption":"Mediterranean Moray ","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[96076] = clik.newGallery({"parentGallery":84310,"usePopups":false,"title":"Amsterdam","link":"gallery_96076.html","maxRecords":0.0,"photoIDs":[1412604.0,1423006.0,1412603.0,1424139.0,3497100.0,3497115.0,3497165.0,3497175.0,3497311.0,3497196.0,3497308.0,3497306.0,3497354.0,3497334.0,3497359.0],"skipIndex":0,"section_code":"gallery","featured_images":"3497359,3497354,3497334,3497311,3497308,3497306,3497196,3497175,3497165,3497115","id":96076,"singleSection":false});				  						galleries[223427] = clik.newGallery({"parentGallery":84271,"usePopups":false,"title":"Bahamas","link":"gallery_223427.html","maxRecords":0.0,"photoIDs":[4836923.0,3657214.0,3657159.0,3657305.0,3665542.0,3665520.0,3665534.0,3671161.0,3677270.0,3671126.0,3677271.0,3671147.0,3677273.0,3711457.0,3711536.0],"skipIndex":0,"section_code":"gallery","featured_images":"4836923,3711536,3711457,3677273,3677271,3677270,3671161,3671147,3671126,3665542","id":223427,"singleSection":false});				  						galleries[463768] = clik.newGallery({"parentGallery":84271,"usePopups":false,"title":"Bali","link":"gallery_463768.html","maxRecords":0.0,"photoIDs":[8814479.0,8814526.0,8814581.0,8814727.0,8814824.0,8814792.0,8817476.0,8817693.0],"skipIndex":0,"section_code":"gallery","featured_images":"8817693,8817476,8814824,8814792,8814727,8814581,8814526,8814479","id":463768,"singleSection":false});				  						galleries[217184] = clik.newGallery({"parentGallery":84310,"usePopups":false,"title":"Borneo","link":"gallery_217184.html","maxRecords":0.0,"photoIDs":[3545734.0,3545746.0],"skipIndex":0,"section_code":"gallery","featured_images":"3545746,3545734","id":217184,"singleSection":false});				  						galleries[84311] = clik.newGallery({"parentGallery":84310,"usePopups":false,"title":"Canada","link":"gallery_84311.html","maxRecords":0.0,"photoIDs":[1878594.0,1177234.0,1424258.0,1879700.0,1879604.0,1879276.0,1879522.0,1882415.0,1882433.0,1882445.0,4907807.0,1882450.0,1882457.0,3711454.0,4907844.0],"skipIndex":0,"section_code":"gallery","featured_images":1177234.0,"id":84311,"singleSection":false});				  						galleries[84307] = clik.newGallery({"parentGallery":84271,"usePopups":false,"title":"Canada","link":"gallery_84307.html","maxRecords":0.0,"photoIDs":[4907610.0,4907648.0,5315721.0,4907684.0,4907702.0,4907727.0,4907861.0,4907920.0,4907939.0,4907982.0,5002647.0,5315631.0],"skipIndex":0,"section_code":"gallery","featured_images":4907920.0,"id":84307,"singleSection":false});				  						galleries[96074] = clik.newGallery({"parentGallery":84310,"usePopups":false,"title":"Cuba","link":"gallery_96074.html","maxRecords":0.0,"photoIDs":[3506720.0,3506728.0,3506732.0,3506749.0,3506750.0,3506752.0,3506754.0,3506762.0,3506768.0,3506771.0,3506780.0,3506784.0,3506794.0,3506802.0,3506806.0,3506812.0,3506808.0,3506822.0],"skipIndex":0,"section_code":"gallery","featured_images":"3506822,3506812,3506808,3506806,3506802,3506794,3506784,3506780,3506771,3506768","id":96074,"singleSection":false});				  						galleries[84310] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dry Pics","link":"gallery_84310.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"1177234,1177170,1169252","id":84310,"singleSection":false});				  						galleries[84312] = clik.newGallery({"parentGallery":84271,"usePopups":false,"title":"Egypt ","link":"gallery_84312.html","maxRecords":0.0,"photoIDs":[7847142.0,7847207.0,7847124.0,7847613.0,7847661.0,7847745.0],"skipIndex":0,"section_code":"gallery","featured_images":"7847745,7847661,7847613,7847207,7847142,7847124","id":84312,"singleSection":false});				  						galleries[84463] = clik.newGallery({"parentGallery":84310,"usePopups":false,"title":"Egypt - Middle East","link":"gallery_84463.html","maxRecords":0.0,"photoIDs":[3500743.0,3500657.0,3500795.0,1169252.0,3500842.0,3500810.0,1169405.0,3500615.0,3500836.0],"skipIndex":0,"section_code":"gallery","featured_images":1169252.0,"id":84463,"singleSection":false});				  						galleries[217192] = clik.newGallery({"parentGallery":84271,"usePopups":false,"title":"Malaysia, Lankayan Island","link":"gallery_217192.html","maxRecords":0.0,"photoIDs":[3569394.0,3569439.0,3569409.0,1423134.0],"skipIndex":0,"section_code":"gallery","featured_images":"3569439,3569409,3569394,1423134","id":217192,"singleSection":false});				  						galleries[217190] = clik.newGallery({"parentGallery":84271,"usePopups":false,"title":"Malaysia, Sipadan Island ","link":"gallery_217190.html","maxRecords":0.0,"photoIDs":[1377327.0,3559815.0,1377330.0,1177304.0,1377329.0,3559818.0],"skipIndex":0,"section_code":"gallery","featured_images":"3559818,3559815,1377330,1377329,1377327,1177304","id":217190,"singleSection":false});				  						galleries[217191] = clik.newGallery({"parentGallery":84271,"usePopups":false,"title":"Maldives, Baa Atoll","link":"gallery_217191.html","maxRecords":0.0,"photoIDs":[3545964.0,3547251.0,3546143.0,3546030.0,3546025.0,1377465.0,3547457.0,3547546.0,3547319.0],"skipIndex":0,"section_code":"gallery","featured_images":"3547546,3547457,3547319,3547251,3546143,3546030,3546025,3545964,1377465","id":217191,"singleSection":false});				  						galleries[214805] = clik.newGallery({"parentGallery":84271,"usePopups":false,"title":"Portfolios","link":"gallery_214805.html","maxRecords":0.0,"photoIDs":[5309155.0,5309114.0,5124103.0,3512359.0,3512544.0],"skipIndex":0,"section_code":"gallery","featured_images":"5309155,5309114,5124103,3512544,3512359","id":214805,"singleSection":false});				  						galleries[98141] = clik.newGallery({"parentGallery":84271,"usePopups":false,"title":"Sardegna","link":"gallery_98141.html","maxRecords":0.0,"photoIDs":[1584618.0,3088530.0,3088669.0,1648127.0,1648081.0,1648113.0,1648010.0,1648118.0],"skipIndex":0,"section_code":"gallery","featured_images":"3088669,3088530,1648127,1648118,1648113,1648081,1648010,1584618","id":98141,"singleSection":false});				  						galleries[84616] = clik.newGallery({"parentGallery":84310,"usePopups":false,"title":"UK","link":"gallery_84616.html","maxRecords":0.0,"photoIDs":[1931217.0,1931194.0,1931199.0,1931157.0,1931165.0,1423008.0,3532251.0,7703233.0,6711761.0,3532264.0,1931211.0,7062163.0,3532168.0,1177170.0],"skipIndex":0,"section_code":"gallery","featured_images":1177170.0,"id":84616,"singleSection":false});				  						galleries[84615] = clik.newGallery({"parentGallery":84271,"usePopups":false,"title":"UK Waters","link":"gallery_84615.html","maxRecords":0.0,"photoIDs":[7654847.0,5315221.0,7654925.0,5314019.0,3512809.0,7663763.0,5314006.0,5314073.0,7675648.0,7675657.0,7675619.0,7675645.0],"skipIndex":0,"section_code":"gallery","featured_images":"7654847,5314006","id":84615,"singleSection":false});				  						galleries[84271] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wet Pics","link":"gallery_84271.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"7654847,5314006,4907920","id":84271,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '5896428,4836923,8814479,7847142,7654847,3569394,3545734,1584618,1377327,3657159,3500657,8814581,3657305,3500795,7847613,4837264,3665542,1377329,1177046,4907702,3665520,3497115,5314006,3671161,3497165,1423130,1169405,3677270,1424251,6711761,3671126,4907807,3677271,3513925,7062163,3671147,3532168,3514308,1882457,1169256,3711457,3711454,3711536,3497334,1169178';
imageSets[2] = '7654847,1177234,1169252,5314006,4907920,1177170';
imageSets[3] = '1377330';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/mrrbailey/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/mrrbailey/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 = 'Robert Bailey 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="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="MRRBAILEY">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					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;
	}
}

			

