function thumbnail(g,e,b,f,d,a,c){this.id=g;this.galleries_id=e;this.caption=b;this.src=getServerPath(c)+"/"+f;this.width=d;this.height=a}function gallery(e,c,d,b,a){this.id=e;this.featured_images=c;this.title=d;this.section_code=b;this.photoIDs=a}var thumbnails=new Object();thumbnails[5309155]=new thumbnail(5309155,"214805","Runner-up BSOUP Open Portfolio 2009","Robert_Bailey_BSOUP_Open_2009_For_Web1_thumb.JPG",130,98,1);thumbnails[5309114]=new thumbnail(5309114,"214805","Winning Portfolio - Open Category BUPG","Robert_Bailey_BUPG_Open2009_for_web1_thumb.jpg",130,98,1);thumbnails[3493414]=new thumbnail(3493414,"","","RB on Temple_thumb.jpg",130,107,1);thumbnails[3493488]=new thumbnail(3493488,"","Tanish","Tanish2 B&W copy for Web copy_thumb.jpg",130,87,1);thumbnails[3671182]=new thumbnail(3671182,"","","gear_thumb.jpg",130,92,1);thumbnails[3760746]=new thumbnail(3760746,"","Shore Crab(<em>Carinuc maenas</em>)","Robert_Bailey_Shore_Crab_copy_for_web_thumb.jpg",87,130,1);thumbnails[3918861]=new thumbnail(3918861,"","Grey Seal (Halichoerus grypus)","Robert_Bailey_Menoweathan_GreySeal_thumb.jpg",87,130,1);thumbnails[4023097]=new thumbnail(4023097,"","","Robert_Bailey_PoolBaby_2_for_Web_thumb.jpg",130,87,1);thumbnails[4024392]=new thumbnail(4024392,"","","RobertBaileyEpsonMayEntry1Web_thumb.jpg",130,99,1);thumbnails[4273366]=new thumbnail(4273366,"","","Paula_for_Web_by_Robert_Bailey_thumb.JPG",106,130,1);thumbnails[4836923]=new thumbnail(4836923,"","","Robert_Bailey_Tiger_Shark_thumb.jpg",130,91,1);thumbnails[4979745]=new thumbnail(4979745,"","","Robert_Bailey_copy_for_web__thumb.jpg",130,85,1);thumbnails[5124103]=new thumbnail(5124103,"214805","Nominated -- Epson Red Sea World of Underwater Images competition","Epson_Red_Sea_Portofolio_Submission_Robert_Bailey_thumb.jpg",130,98,1);thumbnails[5896428]=new thumbnail(5896428,"","Diver and CuttleFish","Robert_Bailey_Dive_Fest_2010_for_web1_thumb.jpg",130,99,1);thumbnails[5896703]=new thumbnail(5896703,"","Nudibranch","Nudibranch_copy_for_web_thumb.jpg",130,87,1);thumbnails[1377327]=new thumbnail(1377327,"217190","Early Dive","dive_boat_off_kapalai_for_web_thumb.jpg",130,86,1);thumbnails[1412604]=new thumbnail(1412604,"96076","Fiets in steeg ","fiets_in_steeg_in_Amsterdam_for_web11_thumb.jpg",130,81,1);thumbnails[1584618]=new thumbnail(1584618,"98141","Diver in cave entrance at Capo Figari","capo figari 1 copy for web_thumb.jpg",130,94,1);thumbnails[1878594]=new thumbnail(1878594,"84311","Valley of the Ten Peaks","Women in Valley of the 10 peaks for web_thumb.jpg",130,81,1);thumbnails[1931217]=new thumbnail(1931217,"84616","Phone booth","Warwick-Phone-Booth-for-web_thumb.jpg",86,130,1);thumbnails[3087196]=new thumbnail(3087196,"84312","Diver with Red Sea Anenome Fish","paula and clown fish 1 copy for web_thumb.jpg",104,130,1);thumbnails[3500743]=new thumbnail(3500743,"84463","Cairo","05 copy for web_thumb.jpg",130,84,1);thumbnails[3506720]=new thumbnail(3506720,"96074","Pensive Girl","Pensive2 copy for web_thumb.jpg",84,130,1);thumbnails[3512246]=new thumbnail(3512246,"84615","Grey Seal<br>\r\n<br>\r\n<br>\r\n","Scilly Isles Day 5 - King Cadwallan - Innisvoul  copy for web_thumb.jpg",130,87,1);thumbnails[3512359]=new thumbnail(3512359,"214805","BSOUP Best of British 2007","Best of British A3 300 Robert Bailey Final copy for web_thumb.jpg",130,92,1);thumbnails[3545734]=new thumbnail(3545734,"217184","Mother & baby","DSC_0323_for_web_thumb.jpg",101,130,1);thumbnails[3545964]=new thumbnail(3545964,"217191","Flame Anthias","012_copy_for_web_thumb.jpg",130,87,1);thumbnails[3559815]=new thumbnail(3559815,"217190","Hawksbill Turtle","Hawksbill1_copy_for_web_thumb.jpg",130,79,1);thumbnails[3569394]=new thumbnail(3569394,"217192","Black Tip Reef Shark","Black_Tip_1_copy_for_web1_copy_thumb.jpg",130,86,1);thumbnails[3657214]=new thumbnail(3657214,"223427","Grey Reef Shark","_RIB2272_copy_for_web_thumb.jpg",130,84,1);thumbnails[4907610]=new thumbnail(4907610,"84307","Opalescent Nudibranch ","Opalescent_Nudibranch_Hermisssenda_crassicornis_Robert_Bailey_for_web_thumb.jpg",130,87,1);thumbnails[1177234]=new thumbnail(1177234,"84311","Winter teepee","Teepee outside Field BC for web2.jpg",130,86,1);thumbnails[1377330]=new thumbnail(1377330,"217190","Kapalai Sunrise","Sunrise_off_kapalai_for web2_thumb.jpg",130,86,1);thumbnails[1423006]=new thumbnail(1423006,"96076","River Amstel at dawn","Amstel_at_dawn_for_web_thumb.jpg",130,85,1);thumbnails[1931194]=new thumbnail(1931194,"84616","Devon Still life","Devon-Still-Life-for-web_thumb.jpg",85,130,1);thumbnails[3087069]=new thumbnail(3087069,"84312","Yellow Mouth Moray","yellowmouth 2 for web_thumb.jpg",130,109,1);thumbnails[3500657]=new thumbnail(3500657,"84463","Camels","037 copy for web_thumb.jpg",130,84,1);thumbnails[3506728]=new thumbnail(3506728,"96074","The boys","Cuba020 copy for web_thumb.jpg",87,130,1);thumbnails[3512259]=new thumbnail(3512259,"","Grey Seal (<em>Halichoerus grypus</em>)","Scilly Isles Day 5 - King Cadwallan - Innisvoul (129) copy for web_thumb.jpg",130,87,1);thumbnails[3512544]=new thumbnail(3512544,"214805","BSOUP Best of British 2008","Robert_Bailey_BSOUP Best of Britsh 2008 copy for web_thumb.jpg",130,98,1);thumbnails[3545746]=new thumbnail(3545746,"217184","Hanging Out","DSC_0346_copy_for_web_thumb.jpg",87,130,1);thumbnails[3547251]=new thumbnail(3547251,"217191","Maldives Anenome Fish","Maldives_Anenome_Fish_for_web_thumb.jpg",130,87,1);thumbnails[3569439]=new thumbnail(3569439,"217192","Jetty","DSC_0094_copy_for_web_thumb.jpg",130,86,1);thumbnails[3657159]=new thumbnail(3657159,"223427","Tiger Shark at Surface","Robert_Bailey_Tiger_Shark_on__Surface_for_Web_1_thumb.jpg",130,87,1);thumbnails[4907648]=new thumbnail(4907648,"84307","Candy Stripe Shrimp ","Candy_Stripe_Shrimp_Lebbeus_grandimanus_Robert_Bailey_for_web_thumb.jpg",130,87,1);thumbnails[5315451]=new thumbnail(5315451,"84615","Photographer Trevor Rees with Spiny Spider Crab ","Robert_Bailey_Stackpole_Quay_thumb.jpg",130,87,1);thumbnails[1412603]=new thumbnail(1412603,"96076","Houseboat ","Brouwersgracht_in_Amsterdam_for_web2_thumb.jpg",130,78,1);thumbnails[1424258]=new thumbnail(1424258,"84311","Big Horn Sheep","Big_horn_ship_outside_banff_for_web_thumb.jpg",130,87,1);thumbnails[1931199]=new thumbnail(1931199,"84616","Woman and tree ","Tree-at-Sudley-Castle for web_thumb.jpg",86,130,1);thumbnails[3087032]=new thumbnail(3087032,"84312","Common Lion Fish","lion fish 4 for web_thumb.jpg",113,130,1);thumbnails[3088530]=new thumbnail(3088530,"98141","Diver on Capo Figari ","Capo Figari 2 for web_thumb.jpg",130,86,1);thumbnails[3088669]=new thumbnail(3088669,"98141","Diver and Wrasse","Monto Mista copy 1 for web _thumb.jpg",130,86,1);thumbnails[3500795]=new thumbnail(3500795,"84463","Giza","056 copy for web_thumb.jpg",130,84,1);thumbnails[3506732]=new thumbnail(3506732,"96074","El Morro","img016 copy for web_thumb.jpg",83,130,1);thumbnails[3512271]=new thumbnail(3512271,"84615","RB Filming Grey Seal","_AAK4843small for web_thumb.jpg",130,87,1);thumbnails[3546143]=new thumbnail(3546143,"217191","Triple Fin","Triple_Fin_copyfor_web_thumb.jpg",130,87,1);thumbnails[3569409]=new thumbnail(3569409,"217192","Black Tip Reef Shark","DSC_0082_copy_for_web_thumb.jpg",130,91,1);thumbnails[3657305]=new thumbnail(3657305,"223427","Lemon Shark","_RIB2389_copy_for_web_thumb.jpg",130,87,1);thumbnails[5315721]=new thumbnail(5315721,"84307","Grunt Sculpin (<em>Rhamphocottus richardsonii</em>)","Robert_Bauiley_Grunt_Sculpin_2_Rhamphocottus_richardsonii_thumb.jpg",130,87,1);thumbnails[1169252]=new thumbnail(1169252,"84463","Skeleton","Skeleton for web1.jpg",85,130,1);thumbnails[1177046]=new thumbnail(1177046,"","Two-Spot Goby ","DSC_0069 copy for web_thumb.jpg",86,130,1);thumbnails[1177304]=new thumbnail(1177304,"217190","Skunk Anemonefish ","Skunk Clown fish for web2_thumb.jpg",130,96,1);thumbnails[1377329]=new thumbnail(1377329,"217190","Girl floating off Sipadan Island","girl_off_sipidan_for_web_thumb.jpg",86,130,1);thumbnails[1423134]=new thumbnail(1423134,"217192","Dusk on the beach at Lankayan Island","Paula_on_Lankayan_Island1_thumb.jpg",130,86,1);thumbnails[1424139]=new thumbnail(1424139,"96076","Tulips in the Keukenhof","tulips_in_keukenhof_thumb.jpg",83,130,1);thumbnails[1648127]=new thumbnail(1648127,"98141","Jelly Fish ","jellyfish_sardegna_for_web_thumb.jpg",130,86,1);thumbnails[1879700]=new thumbnail(1879700,"84311","Sunset facing east","Glass-for-web_thumb.jpg",130,85,1);thumbnails[1931157]=new thumbnail(1931157,"84616","Man on bench series, part I","Londoner-on-bench1_thumb.jpg",130,84,1);thumbnails[3506749]=new thumbnail(3506749,"96074","Cuban Fisherman I","Cuba027 copy for web_thumb.jpg",86,130,1);thumbnails[3513185]=new thumbnail(3513185,"84312","Jewel Fairy Basslet","male anthias 1 working  copy for web_thumb.jpg",130,87,1);thumbnails[3546030]=new thumbnail(3546030,"217191","Feeding Frenzy","047_copy_for_web_thumb.jpg",130,84,1);thumbnails[3665542]=new thumbnail(3665542,"223427","Photographer meets tiger shark","_RIB2823_copy_for_web_thumb.jpg",130,87,1);thumbnails[4837264]=new thumbnail(4837264,"","Wolf Eel <br>\r\n<br>\r\n","Robert_Bailey_Wolf__Eel_Anarrhicthys_ocellatus_copy_for_web_thumb.jpg",130,87,1);thumbnails[4907684]=new thumbnail(4907684,"84307","Red-Eye Medusa ","Red-Eye_Medusa_Polyorchis_pencillatus_Robert_Bailey_copy_for_web_thumb.jpg",82,130,1);thumbnails[5313962]=new thumbnail(5313962,"84615","Sea Hare ","Robert_Bailey_Sea_Hare_for_web_thumb.jpg",93,130,1);thumbnails[1648081]=new thumbnail(1648081,"98141","Unidentified","DSC_00761_thumb.jpg",130,95,1);thumbnails[1879604]=new thumbnail(1879604,"84311","Long Beach - Tofino","Long-Beach-Lighthouse_thumb.jpg",130,84,1);thumbnails[1931165]=new thumbnail(1931165,"84616","Man on bench series - part II","Londoner-on-bench-2_thumb.jpg",130,84,1);thumbnails[3087214]=new thumbnail(3087214,"84312","Polychaete Tubeworm","xmas tree worm 1 copy for web_thumb.jpg",118,130,1);thumbnails[3497100]=new thumbnail(3497100,"96076","Tulips ","248 copy web copy_thumb.jpg",130,84,1);thumbnails[3500842]=new thumbnail(3500842,"84463","Old Cairo","045 copy for web_thumb.jpg",84,130,1);thumbnails[3506750]=new thumbnail(3506750,"96074","Cuban Fisherman II","Cuba031 copy for web_thumb.jpg",86,130,1);thumbnails[3512678]=new thumbnail(3512678,"","Diver on Buoy","_RIB1986 copyfor web_thumb.jpg",104,130,1);thumbnails[3546025]=new thumbnail(3546025,"217191","Schooling Mantas","042_copyfor_web_thumb.jpg",130,76,1);thumbnails[3665520]=new thumbnail(3665520,"223427","Grey Reef Shark","_RIB2339_copy_for_web_thumb.jpg",101,130,1);thumbnails[4907702]=new thumbnail(4907702,"84307","Glove Sponge ","Glove_Sponge_Neoesperiopsis_digitata_Robert_Bailey_copy_for_web_thumb.jpg",87,130,1);thumbnails[5314094]=new thumbnail(5314094,"84615","Scilly Isles Underwater","Robert_Bailey_Scilly_Isles_thumb.jpg",98,130,1);thumbnails[1377465]=new thumbnail(1377465,"217191","Manta Rays","005_copy_for_web_thumb.jpg",130,84,1);thumbnails[1423008]=new thumbnail(1423008,"84616","Man on bench series, part III","man_in_space_leicester_square_London_thumb.jpg",130,83,1);thumbnails[1648113]=new thumbnail(1648113,"98141","Nudibranch Flabellinidae - Will update","Nudibranch Flabellinidae for web_thumb.jpg",130,86,1);thumbnails[1879276]=new thumbnail(1879276,"84311","Blue Heron ","Blue-Heron-for-Web_thumb.jpg",130,85,1);thumbnails[3497115]=new thumbnail(3497115,"96076","Tulips in Keukenhof","247 for web copy_thumb.jpg",84,130,1);thumbnails[3500810]=new thumbnail(3500810,"84463","Birds","08 copy for web_thumb.jpg",84,130,1);thumbnails[3506752]=new thumbnail(3506752,"96074","Cuban Fisherman III","Cuba030 copy for web_thumb.jpg",95,130,1);thumbnails[3512579]=new thumbnail(3512579,"","Wall dive","_RB12582-Edit (1) copy for web_thumb.jpg",87,130,1);thumbnails[3513224]=new thumbnail(3513224,"84312","Jewel Fairy Basslet","Female anthias 1 copy for web_thumb.jpg",130,87,1);thumbnails[3559818]=new thumbnail(3559818,"217190","Bat Fish","Sipadan_Bat_Fish_copy_for_web_thumb.jpg",130,98,1);thumbnails[3665534]=new thumbnail(3665534,"223427","Tiger Shark","Robert_Bailey_Tiger_Shark_for__web_thumb.jpg",130,87,1);thumbnails[4907727]=new thumbnail(4907727,"84307","Bull Kelp on Hunt Rock","Hunt_Rock_-_Open_Pacific_Robert_Bailey_copy_for_web_thumb.jpg",87,130,1);thumbnails[5314040]=new thumbnail(5314040,"84615","Shore Crab","Robert_Bailey_Shore_Crab_For_Web_thumb.jpg",87,130,1);thumbnails[1169405]=new thumbnail(1169405,"84463","Spinner Dolphin ","Girl_looking_ at_ spinner_dolphin_ for web_thumb.jpg",130,84,1);thumbnails[1423130]=new thumbnail(1423130,"","Sunrise over San Juan Island","sunrise_over_san_juan_island_for_web1_thumb.jpg",130,84,1);thumbnails[1472561]=new thumbnail(1472561,"84615","Wolf-fish ","Farne Islands Aug 2007-38 copy for _thumb.jpg",130,83,1);thumbnails[1879522]=new thumbnail(1879522,"84311","Approaching storm","Approaching-storm-for-web_thumb.jpg",84,130,1);thumbnails[3497165]=new thumbnail(3497165,"96076","Walking the Walls","img012 copy for web_thumb.jpg",112,130,1);thumbnails[3500615]=new thumbnail(3500615,"84463","Tin Basher","118 copy for web_thumb.jpg",130,91,1);thumbnails[3506754]=new thumbnail(3506754,"96074","Havana","Cuba013 copy for web_thumb.jpg",87,130,1);thumbnails[3513643]=new thumbnail(3513643,"84312","Sea Moths","SEA MOTH 1 copy for web_thumb.jpg",130,74,1);thumbnails[3532251]=new thumbnail(3532251,"84616","Rape Field I","Scan131__copy_for_web_thumb.jpg",130,84,1);thumbnails[3547457]=new thumbnail(3547457,"217191","Bearded Scorpionfish","Bearded_Scorpionfish_for_web_thumb.jpg",130,92,1);thumbnails[3671161]=new thumbnail(3671161,"223427","Lemon shark","DSC_0301_copy_for_web_thumb.jpg",130,86,1);thumbnails[4907861]=new thumbnail(4907861,"84307","Steller Sea Lions on Race Rocks","Race_Rocks_copy_for_web_robert_Bailey_thumb.jpg",130,87,1);thumbnails[1169522]=new thumbnail(1169522,"84312","Giant Clams ","_RB10909 copy for web _thumb.jpg",130,87,1);thumbnails[1424251]=new thumbnail(1424251,"","Beach ","Beach_at_fort_bragg_for_web_thumb.jpg",130,79,1);thumbnails[1648010]=new thumbnail(1648010,"98141","Nudibranch family Flabellinadae - will update","DSC_0044_thumb.jpg",115,130,1);thumbnails[1882415]=new thumbnail(1882415,"84311","Icicles","Icicles-for-web_thumb.jpg",84,130,1);thumbnails[1931223]=new thumbnail(1931223,"84616","Lundy Island ","Lundy-for-web_thumb.jpg",130,86,1);thumbnails[3497175]=new thumbnail(3497175,"96076","Cigarette","243 copy for web_thumb.jpg",84,130,1);thumbnails[3500836]=new thumbnail(3500836,"84463","Market","Egyptian Market copy for web_thumb.jpg",130,86,1);thumbnails[3506762]=new thumbnail(3506762,"96074","Obligatory Car Shot","Cuba009 copyfor web_thumb.jpg",130,83,1);thumbnails[3512642]=new thumbnail(3512642,"84615","Sea Scorpion","SCORPION FISH IN THE FARNES  copy for web_thumb.jpg",130,87,1);thumbnails[3547546]=new thumbnail(3547546,"217191","Hawksbill Turtle","Hawksbill_Turtle_for_web_thumb.jpg",87,130,1);thumbnails[3677270]=new thumbnail(3677270,"223427","Grey Reef shark","Robert_Bailey_Grey_Shark_for_web_thumb.jpg",130,89,1);thumbnails[1472575]=new thumbnail(1472575,"","Shore Crab ","mating_pair_shore_crabs_for_web_thumb.jpg",130,87,1);thumbnails[1882433]=new thumbnail(1882433,"84311","Port Hardy","Port-Hardy-for-web_thumb.jpg",84,130,1);thumbnails[3497311]=new thumbnail(3497311,"96076","Wobbly","236 copy for web_thumb.jpg",101,130,1);thumbnails[3506768]=new thumbnail(3506768,"96074","Ernesto Che Guevara","Cuba010 copy for web_thumb.jpg",87,130,1);thumbnails[3513375]=new thumbnail(3513375,"84312","Blue Spotted Ray","Blue Spotted Ray copy for web_thumb.jpg",130,84,1);thumbnails[3532264]=new thumbnail(3532264,"84616","Rape Field II","Scan130_copy_for_web_thumb.jpg",130,84,1);thumbnails[3547319]=new thumbnail(3547319,"217191","Oriental Sweetlips","Oriental_Sweetlips_for_web_thumb.jpg",130,88,1);thumbnails[3671126]=new thumbnail(3671126,"223427","Diver with Compact Camera & Grey Reef Shark","_RIB3586_copyfor_web_thumb.jpg",130,87,1);thumbnails[5315221]=new thumbnail(5315221,"84615","Snakelock Anenome(<em>Anemonia viridis</em>)","Robert_Bailey_abstract_thumb.jpg",130,87,1);thumbnails[1177170]=new thumbnail(1177170,"84616","Wreck on Scottish loch","Wreck in Loch for web1.jpg",86,130,1);thumbnails[1424134]=new thumbnail(1424134,"","Red Irish Lord <br>\r\n","red_irish_lord_for_web_thumb.jpg",130,87,1);thumbnails[1470593]=new thumbnail(1470593,"","Blue Shark(<em>Prionace glauca</em>)","Blue_shark_at_padstow_for_web1_thumb.jpg",130,95,1);thumbnails[1882445]=new thumbnail(1882445,"84311","Deer","Deer-on-horizon-for-web_thumb.jpg",130,87,1);thumbnails[3497196]=new thumbnail(3497196,"96076","Lone Cyclist","Lone Cyclist copy for web_thumb.jpg",87,130,1);thumbnails[3497308]=new thumbnail(3497308,"96076","Joint","258 copy for web_thumb.jpg",84,130,1);thumbnails[3506771]=new thumbnail(3506771,"96074","Jack","Cuba011 copy for web_thumb.jpg",130,89,1);thumbnails[3512745]=new thumbnail(3512745,"","Pike Mating","Stoney_Cove_Pike_ Robert_Bailey Image 2 copy for web_thumb.jpg",130,94,1);thumbnails[3513925]=new thumbnail(3513925,"84312","Pyjama Slug","_RIB0303 copy for web_thumb.jpg",130,87,1);thumbnails[3677271]=new thumbnail(3677271,"223427","Grey Reef Shark","Robert_Bailey_Grey_Shark_for_Web1_thumb.jpg",130,87,1);thumbnails[4907807]=new thumbnail(4907807,"84311","Bald Headed Eagle ","Bald_Headed_Eagle_Haliaeetus_lencocephalus_Robert_Bailey_copy_for_web_thumb.jpg",130,93,1);thumbnails[4907920]=new thumbnail(4907920,"84307","Giant Pacific Octopus on Browning Wall","Giant_Octopus_Browning_Wall_copy_for_web_Robert_Bailey_thumb.jpg",130,87,1);thumbnails[5314019]=new thumbnail(5314019,"84615","Pike","Robert_Bailey_Pike_Stoney_Cove_thumb.jpg",130,87,1);thumbnails[1931211]=new thumbnail(1931211,"84616","Boat House","Warwick-Boat-House_thumb.jpg",130,86,1);thumbnails[3506780]=new thumbnail(3506780,"96074","Doorway","Cuba029 copy for web_thumb.jpg",86,130,1);thumbnails[3512809]=new thumbnail(3512809,"84615","Gull","_RIB1673 copy for web_thumb.jpg",130,87,1);thumbnails[3513466]=new thumbnail(3513466,"84312","Giant Clam Abstract","Robert Bailey Abstract copy for web_thumb.jpg",130,96,1);thumbnails[3671147]=new thumbnail(3671147,"223427","Photographers & Tiger shark","_RIB3412_copy_for_web_thumb.jpg",130,101,1);thumbnails[4907939]=new thumbnail(4907939,"84307","China Rockfish ","China_Rockfish_Sebates_auriculatus_copy_for_web_Robert_Bailey_thumb.jpg",130,87,1);thumbnails[1169256]=new thumbnail(1169256,"","Common lionfish hunting","Two Lion Fish for web2_thumb.jpg",130,85,1);thumbnails[1882450]=new thumbnail(1882450,"84311","Girls talking","girls-talking-on-long-beach_thumb.jpg",130,84,1);thumbnails[1882457]=new thumbnail(1882457,"84311","Field with clouds","field-with-clouds-for-web_thumb.jpg",130,86,1);thumbnails[3497306]=new thumbnail(3497306,"96076","Sweepers","240 copy for web_thumb.jpg",84,130,1);thumbnails[3506784]=new thumbnail(3506784,"96074","Diver and Jelly Fish","Cuba028 copy for web_thumb.jpg",130,85,1);thumbnails[3512819]=new thumbnail(3512819,"","Pike Hunting","Pike_Robert Bailey_copy for web_thumb.jpg",130,97,1);thumbnails[3514308]=new thumbnail(3514308,"84312","Blotched Hawk Fish","_RIB0567 copy for web copy_thumb.jpg",130,87,1);thumbnails[3532168]=new thumbnail(3532168,"84616","Tree","Oak_Tree_for_web_copy_thumb.jpg",87,130,1);thumbnails[3677273]=new thumbnail(3677273,"223427","Lemon shark","_RIB2465_copy_thumb.jpg",130,87,1);thumbnails[4907982]=new thumbnail(4907982,"84307","Orange Sea Pen","Orange_Sea_Pen_Ptilosarcus_gurneyl_copy_for_web_Robert_Bailey_thumb.jpg",130,87,1);thumbnails[5002647]=new thumbnail(5002647,"84307","Diverus enjoya","Diverus_enjoya_Robert_Bailey_for_web_thumb.jpg",130,87,1);thumbnails[5314073]=new thumbnail(5314073,"84615","Corkwing Wrasse","Robert_Bailey_Corkwing_Wrasse_Copy_for_Web_F04D4538-2219-B5B5-4CC37D41B265E273_thumb.jpg",130,87,1);thumbnails[5315631]=new thumbnail(5315631,"84307","Lingcod","Robert_Bailey_Lingcod_1_thumb.jpg",130,88,1);thumbnails[3497354]=new thumbnail(3497354,"96076","Gracht","254 copy for web_thumb.jpg",130,84,1);thumbnails[3506794]=new thumbnail(3506794,"96074","Book market","Cuba032 copy for web_thumb.jpg",87,130,1);thumbnails[3512848]=new thumbnail(3512848,"","Tom Pot Blenny","Robert_Bailey_Tom_Pot_Blenny copy for web_thumb.jpg",130,87,1);thumbnails[3711454]=new thumbnail(3711454,"84311","Mount Rundle","Robert_Bailey_Mount_Rundle_Copy_for_web_thumb.jpg",130,86,1);thumbnails[3711457]=new thumbnail(3711457,"223427","RB & Tiger Shark","Jeff_Yanover_Copy_for_Web_thumb.jpg",130,87,1);thumbnails[4907844]=new thumbnail(4907844,"84311","Costal Black Tail Deer ","Deer_in_Browning_Pass_copy_for_web_Robert_Bailey_thumb.jpg",130,93,1);thumbnails[5315503]=new thumbnail(5315503,"84615","Lesser spotted dogfish(<em>Scyliorhinus canicula</em>) ","Robert_Bailey_thumb.jpg",130,89,1);thumbnails[3497334]=new thumbnail(3497334,"96076","Door","259 copy for web_thumb.jpg",130,84,1);thumbnails[3506802]=new thumbnail(3506802,"96074","Model","img017 copy for web_thumb.jpg",90,130,1);thumbnails[3512885]=new thumbnail(3512885,"","Diver with Cuckoo Wrasse","23e copy for web_thumb.jpg",130,95,1);thumbnails[3711536]=new thumbnail(3711536,"223427","RB & Tiger Shark","Arthur_Kingdon_Copy_for_web_copy_thumb.jpg",130,98,1);thumbnails[5314006]=new thumbnail(5314006,"84615","Wreck of the James Eagan Lane ","Robert_Bailey_James_Eagan_Lane_for_web_thumb.jpg",130,87,1);thumbnails[3497359]=new thumbnail(3497359,"96076","Queen's Day ","255 copy for web_thumb.jpg",130,82,1);thumbnails[3506806]=new thumbnail(3506806,"96074","Pose","Cuba035 copy for web_thumb.jpg",87,130,1);thumbnails[3512918]=new thumbnail(3512918,"84615","Fireworks Anenome","Fireworks Anenome copy for web_thumb.jpg",130,87,1);thumbnails[3506812]=new thumbnail(3506812,"96074","Glasses","Cuba034 copy for web_thumb.jpg",86,130,1);thumbnails[3506808]=new thumbnail(3506808,"96074","Bored","img018 copy for web_thumb.jpg",86,130,1);thumbnails[3506822]=new thumbnail(3506822,"96074","Woman","Scan76 copy for web_thumb.jpg",87,130,1);thumbnails[1206944]=new thumbnail(1206944,"","Hooded Nudibranch <br>\r\n<br>\r\n","Hooded Nudibranch for Web2_thumb.jpg",130,84,1);thumbnails[1169178]=new thumbnail(1169178,"","Orca ","Spy Hop for Web2_thumb.jpg",130,84,1);thumbnails[1206393]=new thumbnail(1206393,"","Puget Sound King Crab <br>\r\n","Puget Sounds King Crab for web2_thumb.jpg",130,85,1);thumbnails[1648118]=new thumbnail(1648118,"98141","Mediterranean Moray ","Mediterranean Moray (Muraena helena) for web_thumb.jpg",86,130,1);thumbnails[1169198]=new thumbnail(1169198,"","Wolf-Eel ","Wolf eel for web3.jpg",130,130,1);thumbnails[1423989]=new thumbnail(1423989,"","Bull Kelp ","bull_kelp_for_web_thumb.jpg",83,130,1);thumbnails[1169431]=new thumbnail(1169431,"","Pacific White-Sided Dolphin ","Pacific White-sided Dolphin for web3_thumb.jpg",130,93,1);var galleries=new Object();galleries[96076]=new gallery(96076,"3497359,3497354,3497334,3497311,3497308,3497306,3497196,3497175,3497165,3497115","Amsterdam","gallery",[1412604,1423006,1412603,1424139,3497100,3497115,3497165,3497175,3497311,3497196,3497308,3497306,3497354,3497334,3497359]);galleries[223427]=new gallery(223427,"3711536,3711457,3677273,3677271,3677270,3671161,3671147,3671126,3665542,3665534","Bahamas","gallery",[3657214,3657159,3657305,3665542,3665520,3665534,3671161,3677270,3671126,3677271,3671147,3677273,3711457,3711536]);galleries[217184]=new gallery(217184,"3545746,3545734","Borneo","gallery",[3545734,3545746]);galleries[84311]=new gallery(84311,"1177234","Canada","gallery",[1878594,1177234,1424258,1879700,1879604,1879276,1879522,1882415,1882433,1882445,4907807,1882450,1882457,3711454,4907844]);galleries[84307]=new gallery(84307,"4907920","Canada","gallery",[4907610,4907648,5315721,4907684,4907702,4907727,4907861,4907920,4907939,4907982,5002647,5315631]);galleries[96074]=new gallery(96074,"3506822,3506812,3506808,3506806,3506802,3506794,3506784,3506780,3506771,3506768","Cuba","gallery",[3506720,3506728,3506732,3506749,3506750,3506752,3506754,3506762,3506768,3506771,3506780,3506784,3506794,3506802,3506806,3506812,3506808,3506822]);galleries[84310]=new gallery(84310,"1177234,1177170,1169252","Dry Pics","gallery",[]);galleries[84312]=new gallery(84312,"3514308,3513925,3513643,3513466,3513375,3513224,3513185,3087214,3087196,3087069","Egypt ","gallery",[3087196,3087069,3087032,3513185,3087214,3513224,3513643,1169522,3513375,3513925,3513466,3514308]);galleries[84463]=new gallery(84463,"1169252","Egypt - Middle East","gallery",[3500743,3500657,3500795,1169252,3500842,3500810,1169405,3500615,3500836]);galleries[217192]=new gallery(217192,"3569439,3569409,3569394,1423134","Malaysia, Lankayan Island","gallery",[3569394,3569439,3569409,1423134]);galleries[217190]=new gallery(217190,"3559818,3559815,1377330,1377329,1377327,1177304","Malaysia, Sipadan Island ","gallery",[1377327,3559815,1377330,1177304,1377329,3559818]);galleries[217191]=new gallery(217191,"3547546,3547457,3547319,3547251,3546143,3546030,3546025,3545964,1377465","Maldives, Baa Atoll","gallery",[3545964,3547251,3546143,3546030,3546025,1377465,3547457,3547546,3547319]);galleries[214805]=new gallery(214805,"5309155,5309114,5124103,3512544,3512359","Portfolios","gallery",[5309155,5309114,5124103,3512359,3512544]);galleries[98141]=new gallery(98141,"3088669,3088530,1648127,1648118,1648113,1648081,1648010,1584618","Sardegna","gallery",[1584618,3088530,3088669,1648127,1648081,1648113,1648010,1648118]);galleries[84616]=new gallery(84616,"1177170","UK","gallery",[1931217,1931194,1931199,1931157,1931165,1423008,3532251,1931223,3532264,1177170,1931211,3532168]);galleries[84615]=new gallery(84615,"5315503,5315451,5315221,5314094,5314073,5314040,5314019,5314006,5313962,3512918","UK Waters","gallery",[3512246,5315451,3512271,5313962,5314094,5314040,1472561,3512642,5315221,5314019,3512809,5314073,5315503,5314006,3512918]);galleries[84271]=new gallery(84271,"4907920","Wet Pics","gallery",[]);var imageSets=new Object();imageSets[1]="3918861,3760746,3711536,3711457,3711454,3677271,3677270,3671161,3671147,3671126,3665542,3665534,3665520,3657305,3657159,3569394,3547251,3532168,3512246,3500795,3500657,3087196,3087069,3087032,1882457,1584618,1424251,1377327,1177046,1169405,1169178";imageSets[2]="4907920,1177234,1177170,1169252";imageSets[3]="1377330";function randomListVal(a){arrayVals=a.split(",");if(arrayVals.length){pos=Math.round(Math.random()*(arrayVals.length-1));val=arrayVals[pos]}else{val=0}return val}function getServerPath(a){var b=-1;switch(a){case 21:b="http://www6.clikpic.com/mrrbailey/images";break}switch(a){case 1:b="http://www1.clikpic.com/mrrbailey/images";break}switch(a){case 2:b="http://admin.clikpic.com/mrrbailey/images";break}switch(a){case 24:b="http://tpc15/clikpic/mrrbailey/images";break}switch(a){case 4:b="http://www.clikchurch.com/mrrbailey/images";break}switch(a){case 5:b="http://www2.clikpic.com/mrrbailey/images";break}switch(a){case 22:b="http://tpc5/clikpic/mrrbailey/images";break}switch(a){case 23:b="http://tpc10/clikpic/mrrbailey/images";break}switch(a){case 25:b="http://tpc16/clikpic/mrrbailey/images";break}switch(a){case 15:b="http://www3.clikpic.com/mrrbailey/images";break}switch(a){case 18:b="http://www4.clikpic.com/mrrbailey/images";break}switch(a){case 19:b="http://www5.clikpic.com/mrrbailey/images";break}switch(a){case 31:b="http://www7.clikpic.com/mrrbailey/images";break}switch(a){case 32:b="http://admin2.clikpic.com/mrrbailey/images";break}switch(a){case 33:b="http://www8.clikpic.com/mrrbailey/images";break}switch(a){case 34:b="http://www9.clikpic.com/mrrbailey/images";break}switch(a){case 35:b="http://admin3.clikpic.com/mrrbailey/images";break}switch(a){case 37:b="http://admin4.clikpic.com/mrrbailey/images";break}return b}function showHomeImage(a){imageID=randomListVal("");if(!basic){a.src=photos[imageID].src;a.width=photos[imageID].width;a.height=photos[imageID].height}else{newImage=new Image(photos[imageID].width,photos[imageID].height);newImage.src=photos[imageID].src;document.images[a.name]=newImage}}function showHomeImageInline(){html="";imageID=randomListVal(imageSets[1]);if("gallery"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="gallery.html">'}}html+='<img src="'+backgrounds[imageID].src+'" width="'+backgrounds[imageID].width+'" height="'+backgrounds[imageID].height+'" class="mainhomepageimage photo" id="mainSample" name="mainSample" alt="'+escape(backgrounds[imageID].caption)+'" border="0">';if("gallery"!=""){html+="</a>"}$("#homepageimage").html(html)}function getNextId(b,d,a){var c=getArrayPos(d,b);if(a){if(c==0){nextImgPos=d.length-1}else{nextImgPos=c-1}}else{if(c==d.length-1){nextImgPos=0}else{nextImgPos=c+1}}nextImg=d[nextImgPos];return nextImg}function next(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a);if(nextImg!=-1){updateImage(nextImg,d,b)}}function updateImage(f,e,b){if(!basic){document.getElementById("imagePhoto").innerHTML='<img class="mainphoto photo" src="'+photos[f].src+' " id="mainPic" name="mainPic" width="'+photos[f].width+'" height="'+photos[f].height+'" alt="'+photos[f].caption+'">';e.value=photos[f].id;$("#imageTitle").html(photos[f].caption);document.title="Robert Bailey Photography: "+photos[f].caption;if(photos[f].caption==""){document.getElementById("imageTitle").style.display="none"}else{document.getElementById("imageTitle").style.display="block"}var a=fnGetImageDetails(f);if(a==""){document.getElementById("imageDetails").style.display="none";var c=document.getElementById("infoWrap");var d=document.getElementById("photoInfo");if(photos[f].caption==""){if(c!=null){c.className="empty"}if(d!=null){d.className="empty"}}else{if(c!=null){c.className="noinfo"}if(d!=null){d.className="noinfo"}}}else{document.getElementById("imageDetails").style.display="block";var c=document.getElementById("infoWrap");if(c!=null){c.className="normal"}var d=document.getElementById("photoInfo");if(d!=null){d.className="normal"}}document.getElementById("imageDetails").innerHTML=a;toggleAddToCartConfirm()}else{window.location="photo_"+photos[f].id+".html"}}function toggleAddToCartConfirm(){if($("#paymentConfirm").size()){$("#paymentConfirm").hide();$("#paymentAddButton").unbind().click(function(){form=document.getElementById("paymentForm");option_id=0;if(form.item_option.value){option_id=form.item_option.value}if(addItemToBasket(form.item_number.value,photos,form.site.value,parseInt(form.quantity.value,10),option_id)){if($.browser.msie){$("#paymentConfirm").text("Item added to cart").show()}else{$("#paymentConfirm").text("Item added to cart").fadeIn()}}else{$("#paymentConfirm").text("Item not added - check cookies are enabled in your browser.").fadeIn()}})}}function fnGetImageDetails(b){var a="";if(photos[b].description!=""){a=a+'<p id="imageDescription">'+photos[b].description+"</p>"}if(photos[b].photo_ref!=""){a=a+'<p class="imageinfo" id="imageRef"><strong>Ref: </strong>'+photos[b].photo_ref+"</p>"}if(photos[b].takendate!=""){a=a+'<p class="imageinfo" id="imageDate"><strong>Date: </strong>'+photos[b].takendate+"</p>"}if(photos[b].location!=""){a=a+'<p class="imageinfo" id="imageLocation"><strong>Location: </strong>'+photos[b].location+"</p>"}if(photos[b].photographer!=""){a=a+'<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>'+photos[b].photographer+"</p>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+(c.item_price).toFixed(2)+"</p>";var e=c.purchase_instruction;var d=(c.item_price).toFixed(2);var a=0}else{if(c.payment_groups_id!==""){b=b+"<p>Buy this print online:</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<select class="paymentlink" name="payment_options_id" onchange="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';b=b+getPaymentOptions(c.payment_groups_id);b=b+"</select>";b=b+"</form>";var a=paymentGroups[c.payment_groups_id].options[0];if(paymentOptions[a]){var e=paymentOptions[a].payment_option;var d=paymentOptions[a].price}}else{}}if(c.item_price!==""||c.payment_groups_id!==""){b=b+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="MRRBAILEY">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";b=b+'<div class="clearing">&nbsp;</div>'}return b}function previous(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a,1);if(nextImg!=-1){updateImage(nextImg,d,b)}}function showGalleryImage(c,b){imageID=randomListVal(galleries[c].featured_images);if(imageID!=0){b.src=thumbnails[imageID].src;b.width=thumbnails[imageID].width;b.height=thumbnails[imageID].height;if(b.width<130){var f=$("img#gallery"+c);f.parents(".thumbWrap").width(b.width);var a=f.siblings("h3").size()==1?f.siblings("h3"):f.parent(".thumbWrap").siblings("h3");var g=parseInt(a.css("padding-left"))+parseInt(a.css("padding-right"));var d=parseInt(a.css("border-left-width"))+parseInt(a.css("border-right-width"));var e=parseInt(f.parents(".thumbWrap").css("border-left-width"))+parseInt(f.parents(".thumbWrap").css("border-right-width"));a.width(f.outerWidth(true)-g-d+e)}}}function showGalleries(a){if(!basic){temp="";for(i=0;i<galleries.length;i++){if(galleries[i].id!=a){if(temp!=""){temp=temp+" | "}temp=temp+'<a href="gallery_'+galleries[i].id+'.html">'+galleries[i].title+"</a>"}}document.all.galleryLinks.innerHTML="Other galleries: "+temp}}function resizePhotoInfo(n){var b=$.extend({centre:false},n||{});var d=3;$("div#photoPanelOuter").height("auto");$("div#infoWrap").width(200);$("div#photoDetail").css("width","auto");var h=$("div#maincolContent").width();var j=$("div#photoWrap").outerWidth(true);var m=$("div#infoWrap").outerWidth(true);var k=$("div#photoWrap").outerHeight();var f=$("div#infoWrap").outerHeight();var c=$("div#infoWrap").hasClass("empty");floatDrop=0;var g=j;if(!c){if(h<(j+m)){floatDrop=1}if(!floatDrop){var a=$("div#infoWrap").innerWidth();$("div#infoWrap").width(a+(h-j-m-d));m=$("div#infoWrap").outerWidth(true);g=j+m;if(k>f){var e=$("div#photoPanelOuter").height();$("div#photoPanelOuter").height(e+(k-f));var f=$("div#infoWrap").outerHeight()}}else{var l=$("div#photoWrap").outerWidth();$("div#infoWrap").width(l)}}if(b.centre){$("div#photoDetail").width(g);$("div#photoDetail").css("margin-left","auto");$("div#photoDetail").css("margin-right","auto")}else{$("div#photoDetail").css("margin-left","0");$("div#photoDetail").css("margin-right","0")}}function getArrayPos(c,b){for(var a=0;a<c.length;a++){if(c[a]==b){return a}}return -1}function changeBgImg(a,e){var c=randomListVal(imageSets[e]);var d=backgrounds[c].src;var b=$(a);if(b.size()>0){if(/\bimg$/.test(a)){b.attr({src:d})}else{b.css({"background-image":'url("'+d+'")'})}}};