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[5450020]=new thumbnail(5450020,"308191","Two minutes","01_thumb.JPG",130,87,1);thumbnails[5450022]=new thumbnail(5450022,"308191","Fifty seconds","11_thumb.JPG",130,87,1);thumbnails[5450025]=new thumbnail(5450025,"308191","From a train","06_thumb.JPG",130,130,1);thumbnails[5450026]=new thumbnail(5450026,"308191","Lake view","011_thumb.JPG",130,130,1);thumbnails[5450028]=new thumbnail(5450028,"308191","Train journey","02_thumb.JPG",130,130,1);thumbnails[5450035]=new thumbnail(5450035,"308191","Motion slickness","03_thumb.JPG",130,130,1);thumbnails[5450038]=new thumbnail(5450038,"308191","Station: Tag","061_thumb.JPG",130,73,1);thumbnails[5450039]=new thumbnail(5450039,"308191","Station: Tag","07_thumb.JPG",130,73,1);thumbnails[5450042]=new thumbnail(5450042,"308191","Station: Tag","08_thumb.JPG",130,73,1);thumbnails[5450043]=new thumbnail(5450043,"308191","Station: Feet","12_thumb.JPG",130,73,1);thumbnails[5450050]=new thumbnail(5450050,"308191","Station: Feet","13_thumb.JPG",130,130,1);thumbnails[5450051]=new thumbnail(5450051,"308191","Station: Feet","14_thumb.JPG",130,130,1);thumbnails[5450052]=new thumbnail(5450052,"308191","Station: Feet","15_thumb.JPG",130,87,1);thumbnails[5450054]=new thumbnail(5450054,"308191","Return to Elmley School (Two exposures blended)","16B_thumb.JPG",130,86,1);thumbnails[5450056]=new thumbnail(5450056,"308191","Warning, unheeded.","17_thumb.JPG",87,130,1);thumbnails[5450058]=new thumbnail(5450058,"308191","Window, unglazed.","18_thumb.JPG",87,130,1);thumbnails[5450059]=new thumbnail(5450059,"308191","Window, open.","19_thumb.JPG",87,130,1);thumbnails[5450062]=new thumbnail(5450062,"308191","Portal","20_thumb.JPG",87,130,1);thumbnails[5450065]=new thumbnail(5450065,"308191","The other side","22_thumb.JPG",87,130,1);thumbnails[5450067]=new thumbnail(5450067,"308191","Pipes and window","24_thumb.JPG",87,130,1);thumbnails[5450070]=new thumbnail(5450070,"308191","Untitled","25_thumb.JPG",87,130,1);thumbnails[5450073]=new thumbnail(5450073,"308191","View of a window","26_thumb.JPG",130,87,1);thumbnails[5450077]=new thumbnail(5450077,"308191","Untitled","27_thumb.JPG",130,87,1);thumbnails[4393684]=new thumbnail(4393684,"186533","Untitled","bored_thumb.JPG",87,130,1);thumbnails[4393699]=new thumbnail(4393699,"186533","Ellie","Eleanor_thumb.JPG",130,87,1);thumbnails[4393716]=new thumbnail(4393716,"186533","Tandem superman","familyaffair_thumb.JPG",130,87,1);thumbnails[4393786]=new thumbnail(4393786,"186533","Louise","lou_thumb.JPG",130,103,1);thumbnails[4393824]=new thumbnail(4393824,"186533","Portrait/Landscape","portrait_thumb.JPG",130,87,1);thumbnails[4393842]=new thumbnail(4393842,"186533","Conversation","schloer_thumb.JPG",130,87,1);thumbnails[4393879]=new thumbnail(4393879,"186533","Wedding","wedding2_thumb.JPG",130,87,1);thumbnails[4677866]=new thumbnail(4677866,"186533","Batgirl","batgirl_thumb.JPG",87,130,1);thumbnails[3035494]=new thumbnail(3035494,"186533","Lunch in the barn","grhphotography_lunch_thumb.jpg",130,87,1);thumbnails[4393679]=new thumbnail(4393679,"118292","Beneath","beneath_thumb.JPG",130,73,1);thumbnails[4393694]=new thumbnail(4393694,"118292","Fortifications","derelict_thumb.JPG",130,87,1);thumbnails[4393748]=new thumbnail(4393748,"118292","Cliffe Fort","floodedfort_thumb.JPG",130,87,1);thumbnails[4393883]=new thumbnail(4393883,"118292","Winter morning","wintermorn_thumb.JPG",130,102,1);thumbnails[4727369]=new thumbnail(4727369,"118292","Elmley School, Study 1","elmley1600_thumb.JPG",87,130,1);thumbnails[4727371]=new thumbnail(4727371,"118292","Elmley School, Study 2","elmley2600_thumb.JPG",130,87,1);thumbnails[4587669]=new thumbnail(4587669,"118292","Elmley School, Study 3","school600l_thumb.JPG",130,87,1);thumbnails[2262092]=new thumbnail(2262092,"118292","Heron Quays","BeneathHeronQuays1_thumb.jpg",130,52,1);thumbnails[2264425]=new thumbnail(2264425,"118292","Path and tree","barnack_thumb.jpg",87,130,1);thumbnails[2262194]=new thumbnail(2262194,"118292","Natural History Museum","nhm_1_Greg_hitchcock_thumb.jpg",130,87,1);thumbnails[2262207]=new thumbnail(2262207,"118292","Natural History Museum","nhm_2_Greg_hitchcock_thumb.jpg",130,87,1);thumbnails[2262231]=new thumbnail(2262231,"118292","Trees in Fog","trees_thumb.jpg",130,87,1);thumbnails[2264431]=new thumbnail(2264431,"118292","Tree","Knole2_thumb.jpg",109,130,1);thumbnails[2264437]=new thumbnail(2264437,"118292","Watermint Dawn","watermint_dawn_greg_hitchcock_thumb.jpg",86,130,1);thumbnails[2343565]=new thumbnail(2343565,"118292","The North Transept","Peterborough_cathedral_1_greg_hitchcock_thumb.jpg",87,130,1);thumbnails[2343572]=new thumbnail(2343572,"118292","Peterborough Cathedral","Peterborough_cathedral_2_greg_hitchcock_thumb.jpg",87,130,1);thumbnails[4393801]=new thumbnail(4393801,"274211","Mudbikes","mudbikes_thumb.JPG",87,130,1);thumbnails[4393806]=new thumbnail(4393806,"274211","Creek view","oare_thumb.JPG",130,87,1);thumbnails[4393810]=new thumbnail(4393810,"274211","Oare Creek","Oare1_thumb.JPG",130,87,1);thumbnails[4393838]=new thumbnail(4393838,"274211","Powerplant","power_thumb.JPG",87,130,1);thumbnails[4677940]=new thumbnail(4677940,"274211","See-through windows","window600_thumb.jpg",130,87,1);thumbnails[4677943]=new thumbnail(4677943,"274211","Shacks","shacks600_thumb.JPG",130,87,1);thumbnails[4677946]=new thumbnail(4677946,"274211","Winches (focus stack)","winches600_thumb.jpg",87,130,1);thumbnails[4678176]=new thumbnail(4678176,"274211","after the rain","storm600_thumb.JPG",87,130,1);thumbnails[4747815]=new thumbnail(4747815,"274211","Grain Tower Battery","1GTB_thumb.jpg",84,130,1);thumbnails[4747817]=new thumbnail(4747817,"274211","Fisherman's hut","2fishermanshack_thumb.jpg",85,130,1);thumbnails[4747820]=new thumbnail(4747820,"274211","Boats","6boats_thumb.jpg",130,85,1);thumbnails[4587657]=new thumbnail(4587657,"274211","Rockpool","rockpool600_thumb.JPG",87,130,1);thumbnails[2264427]=new thumbnail(2264427,"274211","Derelict boat","Dungeness_3_Greg_hitchcock_thumb.jpg",87,130,1);thumbnails[2264429]=new thumbnail(2264429,"274211","Fisherman's hut","Dungeness_4_Greg_hitchcock_thumb.jpg",87,130,1);thumbnails[3259684]=new thumbnail(3259684,"274211","Derelict Boat","Dungeness1 web_thumb.jpg",87,130,1);thumbnails[3259748]=new thumbnail(3259748,"274211","VIE","Dungeness8 web_thumb.jpg",87,130,1);thumbnails[4393661]=new thumbnail(4393661,"68401","Bark","barkdetail_thumb.JPG",87,130,1);thumbnails[4393677]=new thumbnail(4393677,"68401","Bee Orchids","beeorchids_thumb.JPG",66,130,1);thumbnails[4393690]=new thumbnail(4393690,"68401","Cowslips","cowslip_thumb.JPG",87,130,1);thumbnails[4393691]=new thumbnail(4393691,"68401","Cuckooflower","Cuckooflower_thumb.JPG",87,130,1);thumbnails[4393698]=new thumbnail(4393698,"68401","Early Purple Orchid","Earlypurple_thumb.JPG",87,130,1);thumbnails[4393776]=new thumbnail(4393776,"68401","Lady Orchid","Lady2_thumb.JPG",87,130,1);thumbnails[4393788]=new thumbnail(4393788,"68401","Maiden Pink","MaidenPink_thumb.JPG",87,130,1);thumbnails[4393791]=new thumbnail(4393791,"68401","Man Orchids","Man_thumb.JPG",87,130,1);thumbnails[4393793]=new thumbnail(4393793,"68401","Man Orchids","men_thumb.JPG",75,130,1);thumbnails[4393796]=new thumbnail(4393796,"68401","Monkey Orchid","monkey_thumb.JPG",87,130,1);thumbnails[4393799]=new thumbnail(4393799,"68401","Monkey Orchid","monkeycl_thumb.JPG",87,130,1);thumbnails[4393865]=new thumbnail(4393865,"68401","Southern Marsh Orchid","SouthernMarsh_thumb.JPG",87,130,1);thumbnails[4393868]=new thumbnail(4393868,"68401","Frosted Teasel","teaselfrost_thumb.JPG",87,130,1);thumbnails[4393872]=new thumbnail(4393872,"68401","Bluebells","wannabes_thumb.JPG",87,130,1);thumbnails[4393881]=new thumbnail(4393881,"68401","White Helleborine","WhiteHelleborine_thumb.JPG",81,130,1);thumbnails[2262119]=new thumbnail(2262119,"68401","Common Spotted Orchids","common_spotted_orchids_greg_hitchcock_thumb.jpg",130,87,1);thumbnails[2264469]=new thumbnail(2264469,"68401","Bee Orchid","bee_orchid_greg_hitchcock_thumb.jpg",87,130,1);thumbnails[3281065]=new thumbnail(3281065,"68401","Brown Birch Bolete","BBB4web_thumb.jpg",87,130,1);thumbnails[2264472]=new thumbnail(2264472,"68401","Common Spotted Orchid","common_spotted_orchid_b_greg_hitchcock_thumb.jpg",87,130,1);thumbnails[2264475]=new thumbnail(2264475,"68401","Cowslip","cowslips_thumb.jpg",87,130,1);thumbnails[2264477]=new thumbnail(2264477,"68401","Early Marsh Orchid","early_marsh_orchid_greg_hitchcock_thumb.jpg",88,130,1);thumbnails[3034752]=new thumbnail(3034752,"68401","Trooping the colour","grhphotography_agarictroop_thumb.jpg",130,60,1);thumbnails[2264479]=new thumbnail(2264479,"68401","Greater Butterfly Orchid","Greater_butterfly_orchid_greg_hitchcock_thumb.jpg",87,130,1);thumbnails[2264480]=new thumbnail(2264480,"68401","Green Winged Orchid","green_winged_greg_hitchcock_thumb.jpg",87,130,1);thumbnails[3034755]=new thumbnail(3034755,"68401","Bracket fungi","grhphotography_bracket_thumb.jpg",87,130,1);thumbnails[2264482]=new thumbnail(2264482,"68401","Lady Orchid","lady_orchid_greg_hitchcock_thumb.jpg",88,130,1);thumbnails[2264485]=new thumbnail(2264485,"68401","Man Orchid","man_orchid_4_greg_hitchcock_thumb.jpg",78,130,1);thumbnails[3034748]=new thumbnail(3034748,"68401","Fly Agaric trio","grhphotograpgy_agaric_thumb.jpg",130,87,1);thumbnails[4393682]=new thumbnail(4393682,"254474","Blue Tit","bluetit_thumb.JPG",130,87,1);thumbnails[4393688]=new thumbnail(4393688,"254474","Common Frog","CommonFrog_thumb.JPG",130,87,1);thumbnails[4393689]=new thumbnail(4393689,"254474","Ribbit","CommonFrog2_thumb.JPG",87,130,1);thumbnails[4393751]=new thumbnail(4393751,"254474","Frog","frog1_thumb.JPG",87,130,1);thumbnails[4393761]=new thumbnail(4393761,"254474","Great Tit","greatit_thumb.JPG",87,130,1);thumbnails[4393874]=new thumbnail(4393874,"254474","Water Vole","WaterVole_thumb.JPG",130,87,1);thumbnails[4393875]=new thumbnail(4393875,"254474","Water Vole","WaterVole2_thumb.JPG",87,130,1);thumbnails[4393876]=new thumbnail(4393876,"254474","Water Vole","WaterVole3_thumb.JPG",130,87,1);thumbnails[4393878]=new thumbnail(4393878,"254474","Water Vole","WaterVole4_thumb.JPG",87,130,1);thumbnails[2261813]=new thumbnail(2261813,"254474","Grass Snake","grass_snake_1_greg_hitchcock_thumb.JPG",130,87,1);thumbnails[3034774]=new thumbnail(3034774,"254474","Let sleeping dogs lie","grhphotography_dog_thumb.jpg",87,130,1);thumbnails[2262147]=new thumbnail(2262147,"254474","Common Frog","frog_1_greg_hitchcock_thumb.jpg",130,83,1);thumbnails[2264421]=new thumbnail(2264421,"254474","Grass Snake","grass_snake_2_greg_hitchcock3_thumb.JPG",87,130,1);thumbnails[2262152]=new thumbnail(2262152,"254474","Common Frog","frog_3_greg_hitchcock_thumb.jpg",130,87,1);thumbnails[3035927]=new thumbnail(3035927,"254474","Konic","grhphotography_konic_thumb.jpg",75,130,1);thumbnails[3035874]=new thumbnail(3035874,"254474","Donkeys","grhphotography_donkey_thumb.jpg",87,130,1);thumbnails[3035899]=new thumbnail(3035899,"254474","Highland Cattle","grhphotography_highlands_thumb.jpg",130,87,1);thumbnails[3035982]=new thumbnail(3035982,"254474","Highland Cattle","grhphotography_highlands2_thumb.jpg",130,74,1);thumbnails[4393667]=new thumbnail(4393667,"186536","Broad-bodied Chaser","BBCf_thumb.JPG",130,87,1);thumbnails[4393670]=new thumbnail(4393670,"186536","Broad-bodied Chaser","BBCf2_thumb.JPG",87,130,1);thumbnails[4393675]=new thumbnail(4393675,"186536","Broad-bodied Chaser","BBCm_thumb.JPG",130,87,1);thumbnails[4393687]=new thumbnail(4393687,"186536","Bumblebee","busybee_thumb.JPG",87,130,1);thumbnails[4393758]=new thumbnail(4393758,"186536","Pond Skater","gerris_thumb.JPG",130,75,1);thumbnails[4393765]=new thumbnail(4393765,"186536","King of the (dung) castle","kingofthecastle_thumb.JPG",87,130,1);thumbnails[4393783]=new thumbnail(4393783,"186536","Spekled Bush Cricket","lepthyphyes_thumb.JPG",87,130,1);thumbnails[4393813]=new thumbnail(4393813,"186536","<i>Pirata piraticus</i>","Pirata_thumb.JPG",130,87,1);thumbnails[4393840]=new thumbnail(4393840,"186536","Snipe fly","Rhagio_thumb.JPG",87,130,1);thumbnails[4393866]=new thumbnail(4393866,"186536","Scaffolder","spiderweb_thumb.JPG",83,130,1);thumbnails[4677869]=new thumbnail(4677869,"186536","Broad-bodied Chaser","CHASER600_thumb.JPG",87,130,1);thumbnails[3036026]=new thumbnail(3036026,"186536","Soldier Beetle","grhphotography_soldier_thumb.jpg",130,87,1);thumbnails[3035522]=new thumbnail(3035522,"186536","Migrant Hawker","grhphotography_dragon_thumb.jpg",130,86,1);thumbnails[2264394]=new thumbnail(2264394,"186536","Azure Damselflies","azure_damselflies_2_greg_hitchcock_thumb.jpg",88,130,1);thumbnails[3034765]=new thumbnail(3034765,"186536","Hairy Crab","grhphotography_crab_thumb.jpg",130,87,1);thumbnails[3034732]=new thumbnail(3034732,"186536","Common Blue Damselfly","grhphotography_blueface_thumb.jpg",92,130,1);thumbnails[2262247]=new thumbnail(2262247,"186536","Wasp Spider","wasp_spider_1_Greg_hitchcock_thumb.jpg",130,87,1);thumbnails[2264405]=new thumbnail(2264405,"186536","Conehead","conehead_greg_hitchcock_thumb.jpg",83,130,1);thumbnails[2261796]=new thumbnail(2261796,"186536","Common Blue Damselfly","common_blue_damselfly_greg_hitchcock1_thumb.JPG",130,87,1);thumbnails[2261798]=new thumbnail(2261798,"186536","Dingy Skipper","Dingy_skipper_greg_hitchcock_thumb.JPG",130,87,1);thumbnails[2264411]=new thumbnail(2264411,"186536","Snipe fly","fly_greg_hitchcock_thumb.JPG",87,130,1);thumbnails[3035523]=new thumbnail(3035523,"186536","Yellow-faced bee","grhphotography_hylaeus_thumb.jpg",130,87,1);thumbnails[2261799]=new thumbnail(2261799,"186536","<i>Andrena haemorrhoa</i>","early_mining_bee_greg_hitchcock_thumb.JPG",130,87,1);thumbnails[2264414]=new thumbnail(2264414,"186536","Supper!","Larinioides_greg_hitchcock_thumb.jpg",87,130,1);thumbnails[2264416]=new thumbnail(2264416,"186536","Long-jawed Orb-weaver","long-jawed_orb-weaver_greg_hitchcock_thumb.JPG",59,130,1);thumbnails[2264444]=new thumbnail(2264444,"186536","Wasp Spider","wasp_spider_2_Greg_hitchcock_thumb.jpg",87,130,1);thumbnails[3034771]=new thumbnail(3034771,"186536","Broad-bodied Chaser","grhphotography_depressa_thumb.jpg",130,87,1);thumbnails[2261846]=new thumbnail(2261846,"186536","Snipe Fly","snipe_fly_2_greg_hitchcock_thumb.JPG",130,87,1);thumbnails[3035932]=new thumbnail(3035932,"186536","Hornet composit","grhphotography_hornets_thumb.jpg",130,97,1);thumbnails[2261872]=new thumbnail(2261872,"186536","Green Tiger Beetle","tiger_beetle_2_greg_hitchcock_thumb.JPG",130,87,1);thumbnails[2262137]=new thumbnail(2262137,"186536","Dingy Skipper","Dingy_skipper_Greg_Hitchcock1_thumb.jpg",130,83,1);thumbnails[2262174]=new thumbnail(2262174,"186536","Grasshopper","grasshopper_greg_hitchcock_thumb.jpg",130,87,1);var galleries=new Object();galleries[308191]=new gallery(308191,"5450070,5450062,5450059","New 02/02/10","gallery",[5450020,5450022,5450025,5450026,5450028,5450035,5450038,5450039,5450042,5450043,5450050,5450051,5450052,5450054,5450056,5450058,5450059,5450062,5450065,5450067,5450070,5450073,5450077]);galleries[186533]=new gallery(186533,"4677866,4393879,4393842,4393824,4393786,4393716,4393699,4393684,3035494","Unguarded Moments","gallery",[4393684,4393699,4393716,4393786,4393824,4393842,4393879,4677866,3035494]);galleries[118292]=new gallery(118292,"2343572,2343565,2264437,2264425","In & Out","gallery",[4393679,4393694,4393748,4393883,4727369,4727371,4587669,2262092,2264425,2262194,2262207,2262231,2264431,2264437,2343565,2343572]);galleries[274211]=new gallery(274211,"4747815,4677946,4587657,4393838,3259684,2264427","The Sea, the Sea","gallery",[4393801,4393806,4393810,4393838,4677940,4677943,4677946,4678176,4747815,4747817,4747820,4587657,2264427,2264429,3259684,3259748]);galleries[68401]=new gallery(68401,"4393881,4393872,4393868,4393799,4393788,4393776,4393691,4393690,3281065,2264480,2264479,2264477,2264475,2264472,2264469","Autotrophs & Saprotrophs","gallery",[4393661,4393677,4393690,4393691,4393698,4393776,4393788,4393791,4393793,4393796,4393799,4393865,4393868,4393872,4393881,2262119,2264469,3281065,2264472,2264475,2264477,3034752,2264479,2264480,3034755,2264482,2264485,3034748]);galleries[254474]=new gallery(254474,"4393751,4393689,3035927,2264421","Tooth & Claw","gallery",[4393682,4393688,4393689,4393751,4393761,4393874,4393875,4393876,4393878,2261813,3034774,2262147,2264421,2262152,3035927,3035874,3035899,3035982]);galleries[186536]=new gallery(186536,"4677869,4393670,2264405,2264394","Shooting Dragons","gallery",[4393667,4393670,4393675,4393687,4393758,4393765,4393783,4393813,4393840,4393866,4677869,3036026,3035522,2264394,3034765,3034732,2262247,2264405,2261796,2261798,2264411,3035523,2261799,2264414,2264416,2264444,3034771,2261846,3035932,2261872,2262137,2262174]);var imageSets=new Object();imageSets[1]="5450062,5450054,5450020,4677946,4677940,4393879,4393806,4393799,4393788,4393716,4393679,3036026,2343565,2264425,2264394";imageSets[2]="5450070,5450062,5450059,4747815,4677946,4677869,4587657,4393881,4393872,4393868,4393838,4393799,4393788,4393776,4393751,4393691,4393690,4393689,4393670,3281065,3259684,3035927,2343572,2343565,2264480,2264479,2264477,2264475,2264472,2264469,2264437,2264427,2264425,2264421,2264405,2264394";imageSets[3]="4393840,4393813,4393758";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/greghitchcock/images";break}switch(a){case 1:b="http://www1.clikpic.com/greghitchcock/images";break}switch(a){case 2:b="http://admin.clikpic.com/greghitchcock/images";break}switch(a){case 24:b="http://tpc15/clikpic/greghitchcock/images";break}switch(a){case 4:b="http://www.clikchurch.com/greghitchcock/images";break}switch(a){case 5:b="http://www2.clikpic.com/greghitchcock/images";break}switch(a){case 22:b="http://tpc5/clikpic/greghitchcock/images";break}switch(a){case 23:b="http://tpc10/clikpic/greghitchcock/images";break}switch(a){case 25:b="http://tpc16/clikpic/greghitchcock/images";break}switch(a){case 15:b="http://www3.clikpic.com/greghitchcock/images";break}switch(a){case 18:b="http://www4.clikpic.com/greghitchcock/images";break}switch(a){case 19:b="http://www5.clikpic.com/greghitchcock/images";break}switch(a){case 31:b="http://www7.clikpic.com/greghitchcock/images";break}switch(a){case 32:b="http://admin2.clikpic.com/greghitchcock/images";break}switch(a){case 33:b="http://www8.clikpic.com/greghitchcock/images";break}switch(a){case 34:b="http://www9.clikpic.com/greghitchcock/images";break}switch(a){case 35:b="http://admin3.clikpic.com/greghitchcock/images";break}switch(a){case 37:b="http://admin4.clikpic.com/greghitchcock/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="'+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="GRH 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].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>"}if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Order this print:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 							"+(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="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';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+'<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+'")'})}}};