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[6289520]=new thumbnail(6289520,"","","DSCN3087a_web_thumb.jpg",130,130,15);thumbnails[6248427]=new thumbnail(6248427,"347560","<b>Foreword</b>","Cover_copy001_thumb.jpg",130,185,15);thumbnails[6248758]=new thumbnail(6248758,"347560","<b>Introduction</b>","Healy_Pass_rushes_thumb.jpg",130,174,15);thumbnails[6248576]=new thumbnail(6248576,"347560","<b>The Hag of Beara</b>","Hag_of_Beara001_thumb.jpg",130,177,15);thumbnails[3534476]=new thumbnail(3534476,"","Dining table","Dining_table_thumb.jpg",130,98,15);thumbnails[6257825]=new thumbnail(6257825,"347560","<b>Coomhola Mountain: The Priest's Leap</b>","Priests_Leap_thumb.jpg",130,188,15);thumbnails[6257840]=new thumbnail(6257840,"347560","Glengarriff: The Eccles Hotel","Eccles_Hotel_thumb.jpg",130,188,15);thumbnails[3534477]=new thumbnail(3534477,"","House view","House_view_thumb.jpg",130,98,15);thumbnails[3534478]=new thumbnail(3534478,"","Room 1","Room_1_thumb.jpg",130,174,15);thumbnails[6289132]=new thumbnail(6289132,"347560","<b>Trafrask</b>","DS0057_Trafrask_boat_thumb.jpg",130,188,15);thumbnails[6289166]=new thumbnail(6289166,"347560","<b>The Mare's Tail</b>","Mares_Tail_thumb.jpg",130,188,15);thumbnails[3534479]=new thumbnail(3534479,"","Room 2","Room_2_thumb.jpg",130,189,15);thumbnails[6310667]=new thumbnail(6310667,"347560","<b>Mill Cove</b>","DS0086_Mill_Cove_moonlight_thumb.jpg",130,188,15);thumbnails[6252714]=new thumbnail(6252714,"347560","Derrymihin East","34_Cashel_Derrymihan_East_P4160537001_thumb.jpg",130,186,15);thumbnails[6252695]=new thumbnail(6252695,"347560","<b>Caheravart</b>","Cahernavart_lazybeds001_thumb.jpg",130,188,15);thumbnails[6252706]=new thumbnail(6252706,"347560","<b>Faunkill</b>","Faunkill_ogham_stone001_thumb.jpg",130,187,15);thumbnails[6263695]=new thumbnail(6263695,"347560","Skellig","Skellig_thumb.jpg",130,173,15);thumbnails[6286040]=new thumbnail(6286040,"347560","<b>Further reading</b>","Book_pile_web_thumb.jpg",130,168,15);thumbnails[6270731]=new thumbnail(6270731,"348503","Ballydahin, County Cork","Ballydahin_C_1__thumb.jpg",130,173,15);thumbnails[6270750]=new thumbnail(6270750,"348503","Ballysimon, County Cork","Ballysimon_C_14__thumb.jpg",130,173,15);thumbnails[6270752]=new thumbnail(6270752,"348503","Ballynakilla, Bere Island","Bere_Island_Ballynakilla_151__thumb.jpg",130,173,15);thumbnails[6270754]=new thumbnail(6270754,"348503","Ballynakilla, Bere Island","Bere_Island_Ballynakilla_181__thumb.jpg",130,173,15);thumbnails[6270758]=new thumbnail(6270758,"348503","Cloughland, Bere Island","Bere_Island_Cloughland_1_13__thumb.jpg",130,173,15);thumbnails[6270761]=new thumbnail(6270761,"348503","Castletownbere, County Cork","Castletownbere2_1C_1__thumb.jpg",130,195,15);thumbnails[6270762]=new thumbnail(6270762,"348503","Castletownbere, County Cork","Castletownbere_3_1C_9__thumb.jpg",130,98,15);thumbnails[6270764]=new thumbnail(6270764,"348503","Caumcarrig, County Cork","Caumcarrig_C_11__thumb.jpg",130,97,15);thumbnails[6270767]=new thumbnail(6270767,"348503","Derrymihin West, County Cork","Derrymihan_West_C_115_thumb.jpg",130,98,15);thumbnails[6270770]=new thumbnail(6270770,"348503","Eyeries, County Cork","Eyeries_C_81__thumb.jpg",130,173,15);thumbnails[6270772]=new thumbnail(6270772,"348503","Glengarriff, County Cork","Glengarriff_C_21_1_thumb.jpg",130,173,15);thumbnails[6270775]=new thumbnail(6270775,"348503","Inchigeelagh, County Cork","Inchigeelagh_C_21__thumb.jpg",130,98,15);thumbnails[6270777]=new thumbnail(6270777,"348503","Kilrane, County Wexford","Kilrane_WX_31__thumb.jpg",130,98,15);thumbnails[6270781]=new thumbnail(6270781,"348503","Macroom, County Cork","Macroom_C_1_12__thumb.jpg",130,98,15);thumbnails[6270784]=new thumbnail(6270784,"348503","Rossmacowen, County Cork","Rossmacowen_1_C_3__thumb.jpg",130,174,15);thumbnails[110454]=new thumbnail(110454,"10140","Jellyfish","Jellyfish_DS0081_thumb.jpg",130,196,15);thumbnails[110532]=new thumbnail(110532,"10140","Decapod","Decapod_DS0112_thumb.jpg",130,192,15);thumbnails[111103]=new thumbnail(111103,"10140","Lobster","Lobster_claw_DS0110_thumb.jpg",130,192,15);thumbnails[111104]=new thumbnail(111104,"10140","Oyster shell with wormcasts","Oyster_with_wormcasts_DS0111_thumb.jpg",130,193,15);thumbnails[110472]=new thumbnail(110472,"10333","An Cheacha, I","AnCheacha_XB0181B01_thumb.jpg",130,128,15);thumbnails[110478]=new thumbnail(110478,"10333","Ringfort, Ardgroom","AdrigoleHillfort_DS0028_thumb.jpg",130,172,15);thumbnails[110486]=new thumbnail(110486,"10333","An Cheacha, II","AnCheaca_XB0181B06_thumb.jpg",130,185,15);thumbnails[110503]=new thumbnail(110503,"10333","Ogham stone, Ballycrovane","Ballycrovane_DS0018_thumb.jpg",130,97,15);thumbnails[110533]=new thumbnail(110533,"10333","Derrynataggart","Derrynataggart_AH000225_thumb.jpg",130,176,15);thumbnails[110534]=new thumbnail(110534,"10333","Dunboy Castle ruins","Dunboy_DS0010_thumb.jpg",130,174,15);thumbnails[110535]=new thumbnail(110535,"10333","Dursey Sound","Dursey_DS0008_thumb.jpg",130,177,15);thumbnails[111583]=new thumbnail(111583,"10333","Glengarriff, Co. Cork","GlengariffMoonlight_DS0090_thumb.jpg",130,193,15);thumbnails[111584]=new thumbnail(111584,"10333","Mill Cove","MillCoveMoonlight_DS0086_thumb.jpg",130,196,15);thumbnails[111585]=new thumbnail(111585,"10333","Ballydonegan","Ballydonegan_DS0078_thumb.jpg",130,172,15);thumbnails[112339]=new thumbnail(112339,"10333","Coolieragh","Coolieragh_DS0107_thumb.jpg",130,171,15);thumbnails[112342]=new thumbnail(112342,"10333","Kilcatherine, I","Kilcatherine_DS0019_thumb.jpg",130,171,15);thumbnails[112343]=new thumbnail(112343,"10333","Kilcatherine, II","Kilcatherine_DS0027_thumb.jpg",130,96,15);thumbnails[112344]=new thumbnail(112344,"10333","Healy Pass","HealyPassDS0030_thumb.jpg",130,94,15);thumbnails[112345]=new thumbnail(112345,"10333","Hungry Hill","HHillSnow_DS0013_thumb.jpg",130,98,15);thumbnails[113420]=new thumbnail(113420,"10333","Kilcascan","Kilcascan_DS0017_thumb.jpg",130,173,15);thumbnails[157591]=new thumbnail(157591,"10333","Adrigole Mountain","DS0141Adrigole_thumb.jpg",130,183,15);thumbnails[158206]=new thumbnail(158206,"10333","The bog road, Healy Pass","P2090437HealyPassBogRoad_thumb.jpg",130,189,15);thumbnails[158208]=new thumbnail(158208,"10333","After Rain: The Healy Pass","DPH0002_HealyPass_ in_ spate_thumb.jpg",130,175,15);thumbnails[709634]=new thumbnail(709634,"10333","Waterfall, Healy Pass","P1141960a Waterfall_thumb.jpg",130,184,15);thumbnails[709638]=new thumbnail(709638,"10333","Mare's Tail, Adrigole","PC081769a Mares Tail photo_thumb.jpg",130,188,15);thumbnails[109928]=new thumbnail(109928,"10334","Puxley's Mansion, Dunboy, no 1","PuxleyMansion_DS0033_thumb.jpg",130,176,15);thumbnails[111106]=new thumbnail(111106,"10334","Puxley's Mansion, Dunboy, no II","PuxleyMansion_DS0043_thumb.jpg",130,173,15);thumbnails[111107]=new thumbnail(111107,"10334","Puxley's Mansion, Dunboy, no III","PuxleyMansion_DS0050_thumb.jpg",130,176,15);thumbnails[111109]=new thumbnail(111109,"10334","Puxley's Mansion, Dunboy, no IV","PuxleyMansion_DS0051_thumb.jpg",130,184,15);thumbnails[119523]=new thumbnail(119523,"10334","Puxley's Mansion, Dunboy, no. V","PuxleyMansion_DS0103_thumb.jpg",130,180,15);thumbnails[112346]=new thumbnail(112346,"10488","Macgillicuddy's Reeks from Moll's Gap, I","MollsGap_DS0024_thumb.jpg",130,83,15);thumbnails[113419]=new thumbnail(113419,"10488","MacGillicuddy's Reeks from Moll's Gap, II","MollsGapII_DS0023_thumb.jpg",130,97,15);thumbnails[114469]=new thumbnail(114469,"10488","Bealdarrig","Bealdarrig_DS0123_thumb.jpg",130,188,15);thumbnails[114470]=new thumbnail(114470,"10488","Killarney: Upper Lake I","KillarneyUpperLakeDS0124_thumb.jpg",130,172,15);thumbnails[114471]=new thumbnail(114471,"10488","Purple Mountain","PurpleMountain_DS0122_thumb.jpg",130,87,15);thumbnails[115177]=new thumbnail(115177,"10488","The old bar, Looscaunagh","WindowLooscaunagh_DS0124_thumb.jpg",130,90,15);thumbnails[157590]=new thumbnail(157590,"10488","Killarney: Colleen Bawn Rock","DS0172ColleenBawn_thumb.jpg",130,192,15);thumbnails[157593]=new thumbnail(157593,"10488","Killarney: by Colleen Bawn Rock","DS0175BeachColleenBawn_thumb.jpg",130,194,15);thumbnails[157594]=new thumbnail(157594,"10488","Gap of Dunloe, I: above Cousaun Lough","DS0176Dunloebridge_thumb.jpg",130,191,15);thumbnails[158204]=new thumbnail(158204,"10488","Killarney: Lough Leane","P2050395TreestumpLoughLeane_thumb.jpg",130,177,15);thumbnails[158215]=new thumbnail(158215,"10488","Gap of Dunloe, II","DS0171Dunloe_thumb.jpg",130,89,15);thumbnails[161142]=new thumbnail(161142,"10488","Gap of Dunloe, III","DS0173Dunloe_thumb.jpg",130,89,15);thumbnails[161143]=new thumbnail(161143,"10488","Killarney: Muckross House","DS0174MuckrossHouse_thumb.jpg",130,93,15);thumbnails[110531]=new thumbnail(110531,"14640","Cobh, Co. Cork","Cobh_DS0003_thumb.jpg",130,77,15);thumbnails[110497]=new thumbnail(110497,"10335","Ballyconneely, Connemara","Ballyconneely_CP012515_thumb.jpg",130,197,15);thumbnails[110527]=new thumbnail(110527,"10335","Cametringane","BoatCTB_DS0061_thumb.jpg",130,173,15);thumbnails[111105]=new thumbnail(111105,"10335","Castletownbere","BoatsCTB_DS00521_thumb.jpg",130,171,15);thumbnails[111586]=new thumbnail(111586,"10335","Trafrask","TrafraskBoat_DS0057_thumb.jpg",130,167,15);thumbnails[112337]=new thumbnail(112337,"10335","Beal Lough, Beara","BealLough_DS0100_thumb.jpg",130,183,15);thumbnails[112340]=new thumbnail(112340,"10335","Ballycrovane, Beara","BoatBallycrovane_DS0102_thumb.jpg",130,192,15);thumbnails[112341]=new thumbnail(112341,"10335","Shannon Estuary","ShannonEstuaryDS0058_thumb.jpg",130,185,15);thumbnails[157592]=new thumbnail(157592,"10335","Bantry","DS0168Boatgraveyard_thumb.jpg",130,191,15);thumbnails[267432]=new thumbnail(267432,"14641","Sea Changes, II","DS0157SeaChangesII_thumb.jpg",130,86,15);thumbnails[267433]=new thumbnail(267433,"14641","Sea Changes, IV","DS0158SeaChangesIV_thumb.jpg",130,84,15);thumbnails[267434]=new thumbnail(267434,"14641","Sea Changes, V","DS0159SeachangesV_thumb.jpg",130,194,15);thumbnails[267435]=new thumbnail(267435,"14641","Sea Changes, VI","DS0160SeachangesVI_thumb.jpg",130,85,15);thumbnails[267436]=new thumbnail(267436,"14641","Sea Changes, VII","DS0169SeachangesVII_thumb.jpg",130,85,15);thumbnails[157588]=new thumbnail(157588,"14641","Sea Changes, VIII","DS0005SeachangesVIII_thumb.jpg",130,192,15);thumbnails[157589]=new thumbnail(157589,"14641","Sea Changes, IX","DS0012SeachangesIX_thumb.jpg",130,96,15);thumbnails[110504]=new thumbnail(110504,"10336","Boolinarig, Co. Offaly, I","Boolinarig_XB006707A_thumb.jpg",130,182,15);thumbnails[110524]=new thumbnail(110524,"10336","Ballydehob, Co.Cork","Ballydehob_DS0109_thumb.jpg",130,183,15);thumbnails[110529]=new thumbnail(110529,"10336","Boolinarig, Co. Offaly,II","Boolinarig_XB018509_thumb.jpg",130,75,15);thumbnails[110536]=new thumbnail(110536,"10336","Errislannan, Connemara, Co. Galway","Errislannan_XB232A14_thumb.jpg",130,179,15);thumbnails[110537]=new thumbnail(110537,"10336","Glenbarrow, Co. Laois, I","Glenbarrow_XB006611_thumb.jpg",130,86,15);thumbnails[112218]=new thumbnail(112218,"10336","Croom Mill, Co. Limerick","CroomMill_DS0071_thumb.jpg",130,172,15);thumbnails[113417]=new thumbnail(113417,"10336","Ballyconneely, Connemara","Ballyconneely_XB232A06001_thumb.jpg",130,130,15);thumbnails[119522]=new thumbnail(119522,"10336","Carriganass, Co. Cork","Carriganass_DS0104_thumb.jpg",130,190,15);thumbnails[158212]=new thumbnail(158212,"10336","Glenbarrow, Co. Laois","GlenbarrowWoods_XB019935_thumb.jpg",130,186,15);thumbnails[110462]=new thumbnail(110462,"10337","West Street, Axbridge, Somerset","WEstStreetAxbridge_XB019314_thumb.jpg",130,202,15);thumbnails[110923]=new thumbnail(110923,"10337","Somerset Levels in flood, I","Somerset_Levels_AB032030_thumb.jpg",130,89,15);thumbnails[111110]=new thumbnail(111110,"10337","The Old Almshouse, Axbridge, Somerset","AxbridgeAlmshouse_XB019308_thumb.jpg",130,202,15);thumbnails[111168]=new thumbnail(111168,"10337","Somerset Levels in flood, II","SomersetLevels_AP032024_thumb.jpg",130,193,15);thumbnails[112338]=new thumbnail(112338,"10337","Blue Anchor Bay, Somerset","BlueAnchorBay_AT000149_thumb.jpg",130,85,15);thumbnails[642850]=new thumbnail(642850,"49035","Lower Sellicks, I","DS0205 LS Spring I_thumb.jpg",130,85,15);thumbnails[642851]=new thumbnail(642851,"49035","Lower Sellicks, II","DS0206 LS Spring II_thumb.jpg",130,194,15);thumbnails[642853]=new thumbnail(642853,"49035","Lower Sellicks, III","DS0207 LS Spring III_thumb.jpg",130,189,15);thumbnails[643132]=new thumbnail(643132,"49035","Lower Sellicks, IV","DS0210  LS Spring IV_thumb.jpg",130,195,15);thumbnails[643133]=new thumbnail(643133,"49035","Lower Sellicks, V","DS0211 LS Spring V_thumb.jpg",130,87,15);thumbnails[643134]=new thumbnail(643134,"49035","Lower Sellicks, VI","DS0212 LS Spring VI_thumb.jpg",130,181,15);thumbnails[643135]=new thumbnail(643135,"49035","Lower Sellicks, VII","DS0213 LS Spring VII_thumb.jpg",130,195,15);thumbnails[643136]=new thumbnail(643136,"49035","Lower Sellicks, VIII","DS0217 LS Spring VIII_thumb.jpg",130,194,15);thumbnails[643137]=new thumbnail(643137,"49035","Cleeve Abbey, I","DS0208 Cleeve Abbey jug_thumb.jpg",130,195,15);thumbnails[643138]=new thumbnail(643138,"49035","Cleeve Abbey, II","DS0209 Cleeve Abbey II_thumb.jpg",130,89,15);thumbnails[643139]=new thumbnail(643139,"49035","Cleeve Abbey, III","DS0215 Cleeve Abbey III_thumb.jpg",130,201,15);thumbnails[643140]=new thumbnail(643140,"49035","Cleeve Abbey, IV","DS0216 Cleeve Abbey IV_thumb.jpg",130,194,15);thumbnails[643141]=new thumbnail(643141,"49035","Cleeve Abbey, V","DS0218 Cleeve Abbey V_thumb.jpg",130,88,15);thumbnails[643142]=new thumbnail(643142,"49035","Cleeve Abbey, VI","DS0220 Cleeve Abbey VI_thumb.jpg",130,86,15);thumbnails[267437]=new thumbnail(267437,"23802","Knowle, X","DS0219 Knowle I copy_thumb.jpg",130,179,15);thumbnails[267438]=new thumbnail(267438,"23802","Knowle, I","DSCN2267 Knowle I copy_thumb.jpg",130,193,15);thumbnails[267439]=new thumbnail(267439,"23802","Knowle, II","DSCN2268 Knowle II_thumb.jpg",130,180,15);thumbnails[110466]=new thumbnail(110466,"10338","Poolside, 6 April 2003","HannahPoolside_XB0231A10_thumb.jpg",130,92,15);thumbnails[110469]=new thumbnail(110469,"10338","Costa del Silencio, Tenerife","Silencio_CP011316_thumb.jpg",130,195,15);thumbnails[110530]=new thumbnail(110530,"10338","Feral cat, supermarket car park, Birr, Co. Offaly","Cat_DS0115_thumb.jpg",130,181,15);thumbnails[113418]=new thumbnail(113418,"10338","Chesil Bank, Dorset","ChesilBank_XB022801_thumb.jpg",130,193,15);var galleries=new Object();galleries[347560]=new gallery(347560,"6248427","A Book of Beara","section414721",[6248427,6248758,6248576,6257825,6257840,6289132,6289166,6310667,6252714,6252695,6252706,6263695,6286040]);galleries[348503]=new gallery(348503,"6270784","Empty Houses of Ireland","section414721",[6270731,6270750,6270752,6270754,6270758,6270761,6270762,6270764,6270767,6270770,6270772,6270775,6270777,6270781,6270784]);galleries[10140]=new gallery(10140,"111104,111103,110532,110454","The Sea Shore","gallery",[110454,110532,111103,111104]);galleries[10333]=new gallery(10333,"709638","Beara","gallery",[110472,110478,110486,110503,110533,110534,110535,111583,111584,111585,112339,112342,112343,112344,112345,113420,157591,158206,158208,709634,709638]);galleries[10334]=new gallery(10334,"119523,111109,111107,111106,109928","Puxley's Mansion","gallery",[109928,111106,111107,111109,119523]);galleries[10488]=new gallery(10488,"157590","Ring of Kerry","gallery",[112346,113419,114469,114470,114471,115177,157590,157593,157594,158204,158215,161142,161143]);galleries[14640]=new gallery(14640,"110531","Cork city and around","gallery",[110531]);galleries[10335]=new gallery(10335,"157592,112341,112340,112337,111586,111105,110527,110497","Boats","gallery",[110497,110527,111105,111586,112337,112340,112341,157592]);galleries[14641]=new gallery(14641,"267436,267435,267434,267433,267432,157589,157588","Sea changes","gallery",[267432,267433,267434,267435,267436,157588,157589]);galleries[10336]=new gallery(10336,"158212,119522,113417,112218,110537,110536,110529,110524,110504","Around Ireland","gallery",[110504,110524,110529,110536,110537,112218,113417,119522,158212]);galleries[10337]=new gallery(10337,"112338,111168,111110,110923,110462","Around England","gallery",[110462,110923,111110,111168,112338]);galleries[49035]=new gallery(49035,"643142,643139,643137,643135","West Somerset and around","gallery",[642850,642851,642853,643132,643133,643134,643135,643136,643137,643138,643139,643140,643141,643142]);galleries[23802]=new gallery(23802,"267439,267438,267437","Suburbanscapes","gallery",[267437,267438,267439]);galleries[10338]=new gallery(10338,"113418,110530,110469,110466","...and a few others","gallery",[110466,110469,110530,113418]);var imageSets=new Object();imageSets[1]="6270784,709638,709634,643142,643139,643137,643134,267437,157591,157590,113420,112346,112342,111105,110531,110524,110469,110462,110454,109928";imageSets[2]="6270784,6248427,709638,643142,643139,643137,643135,157590";imageSets[3]="6310667,6289520,6289166,6289132,6286040,6270784,6270781,6270777,6270775,6270772,6270770,6270767,6270764,6270762,6270761,6270758,6270754,6270752,6270750,6270731,6263695,6257840,6257825,6252714,6252706,6252695,6248758,6248576,6248427,3534479,3534478,3534477,3534476,709638,709634,643142,643141,643140,643139,643138,643137,643136,643135,643134,643133,643132,642853,642851,642850,267439";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/errisbeg/images";break}switch(a){case 1:b="http://www1.clikpic.com/errisbeg/images";break}switch(a){case 2:b="http://admin.clikpic.com/errisbeg/images";break}switch(a){case 24:b="http://tpc15/clikpic/errisbeg/images";break}switch(a){case 4:b="http://www.clikchurch.com/errisbeg/images";break}switch(a){case 5:b="http://www2.clikpic.com/errisbeg/images";break}switch(a){case 22:b="http://tpc5/clikpic/errisbeg/images";break}switch(a){case 23:b="http://tpc10/clikpic/errisbeg/images";break}switch(a){case 25:b="http://tpc16/clikpic/errisbeg/images";break}switch(a){case 15:b="http://www3.clikpic.com/errisbeg/images";break}switch(a){case 18:b="http://www4.clikpic.com/errisbeg/images";break}switch(a){case 19:b="http://www5.clikpic.com/errisbeg/images";break}switch(a){case 31:b="http://www7.clikpic.com/errisbeg/images";break}switch(a){case 32:b="http://admin2.clikpic.com/errisbeg/images";break}switch(a){case 33:b="http://www8.clikpic.com/errisbeg/images";break}switch(a){case 34:b="http://www9.clikpic.com/errisbeg/images";break}switch(a){case 35:b="http://admin3.clikpic.com/errisbeg/images";break}switch(a){case 37:b="http://admin4.clikpic.com/errisbeg/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="JOHN BAYLIS POST <i>prints and photographs</i>: "+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;resizePhotoInfo();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>"}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+'")'})}}};