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[5960430]=new thumbnail(5960430,"319045","Reed Warbler (Acrocephalus scirpaceus)","reedwarbler2_thumb.jpg",130,93,5);thumbnails[5960461]=new thumbnail(5960461,"319045","Yellow Wagtail (Motacilla flava)","4591768989_43cde46184_o_thumb.jpg",130,93,5);thumbnails[5960513]=new thumbnail(5960513,"319045","Sedge Warbler (Acrocephalus schoenobaenus)","sedgebest_thumb.jpg",130,93,5);thumbnails[5960536]=new thumbnail(5960536,"319045","Red-necked Phalarope (Phalaropus lobatus)","website_thumb.jpg",130,93,5);thumbnails[5960543]=new thumbnail(5960543,"319045","Razorbill (Alca torda)","razorbill2_thumb.jpg",130,93,5);thumbnails[5960576]=new thumbnail(5960576,"319045","Puffin (Fratercula arctica)","4548619951_4ee9e0c6ec_b_thumb.jpg",130,93,5);thumbnails[6122762]=new thumbnail(6122762,"319045","Eurasian Hobby (Falco subbuteo)","hobby_2_thumb.jpg",130,93,5);thumbnails[5965418]=new thumbnail(5965418,"319045","Gannet (Morus bassanus)","DSC_0505_thumb.jpg",130,93,5);thumbnails[5965622]=new thumbnail(5965622,"319045","Gannet (Morus bassanus)","DSC_0611_thumb.jpg",130,93,5);thumbnails[5965721]=new thumbnail(5965721,"319045","Spoonbill (Platalea leucorodia)","spoonbill4_thumb.jpg",130,93,5);thumbnails[5957818]=new thumbnail(5957818,"285636","Great Shearwater (Puffinus gravis)","great_thumb.jpg",130,93,5);thumbnails[5957838]=new thumbnail(5957838,"285636","European Storm Petrel (Hydrobates pelagicus)","3844578835_30f19fb93f_b_thumb.jpg",130,93,5);thumbnails[5957896]=new thumbnail(5957896,"285636","Puffin (Fratercula arctica)","DSC_0918_thumb.jpg",130,93,5);thumbnails[5957901]=new thumbnail(5957901,"285636","Iceland Gull (Larus glaucoides)","4430025586_9ae7bc94ec_b_thumb.jpg",130,93,5);thumbnails[6040618]=new thumbnail(6040618,"285636","Gannet (Morus bassanus)","4551438426_8f79400d6f_b_thumb.jpg",130,182,5);thumbnails[5958011]=new thumbnail(5958011,"285636","Gannet (Morus bassanus)","4563081539_5f68f3af53_o_thumb.jpg",130,182,5);thumbnails[5958036]=new thumbnail(5958036,"285636","Mediterranean gull (Larus melanocephalus)","3732585871_e771fa5b81_b_thumb.jpg",130,182,5);thumbnails[5958051]=new thumbnail(5958051,"285636","Great Shearwater (Puffinus gravis)","3830300965_cdb662c343_b_thumb.jpg",130,182,5);thumbnails[5958155]=new thumbnail(5958155,"285636","Sabine's Gull (Xema sabini)","3856912516_3ba60b1f75_o_thumb.jpg",130,98,5);thumbnails[5958173]=new thumbnail(5958173,"285636","Puffin (Fratercula arctica)","4572488864_9eb7b88b99_b_thumb.jpg",130,93,5);thumbnails[5958186]=new thumbnail(5958186,"285636","Mediterranean gull (Larus melanocephalus) ","4215803159_a437e4974c_b_thumb.jpg",130,93,5);thumbnails[5958191]=new thumbnail(5958191,"285636","Gannet (Morus bassanus)","3702225192_8b40279afa_b_thumb.jpg",130,93,5);thumbnails[5958228]=new thumbnail(5958228,"285636","Sabine's Gull (Xema sabini)","4039915011_b5edf790d2_b_thumb.jpg",130,182,5);thumbnails[5958241]=new thumbnail(5958241,"285636","Puffin (Fratercula arctica)","2768231068_9027fc030b_b_thumb.jpg",130,182,5);thumbnails[5958329]=new thumbnail(5958329,"285636","Common Guillemot (Uria aalge)","guillemot_thumb.jpg",130,182,5);thumbnails[5958762]=new thumbnail(5958762,"285636","Razorbill (Alca torda)","razor_thumb.jpg",130,182,5);thumbnails[5959451]=new thumbnail(5959451,"285674","Dunlin (Calidris alpina) ","4545922817_7373cf1f81_b_thumb.jpg",130,93,5);thumbnails[5959461]=new thumbnail(5959461,"285674","Bar-tailed Godwit (Limosa lapponica)","3904975628_57c0c899d7_b_thumb.jpg",130,93,5);thumbnails[5959468]=new thumbnail(5959468,"285674","Ringed Plover (Charadrius hiaticula)","3767133596_28c9f586b6_b_thumb.jpg",130,93,5);thumbnails[5959496]=new thumbnail(5959496,"285674","Turnstone (Arenaria interpres)","4337895980_9396277d1d_b_thumb.jpg",130,93,5);thumbnails[5959504]=new thumbnail(5959504,"285674","Dunlin (Calidris alpina)","3366595958_ffa7bf1ab3_b_thumb.jpg",130,93,5);thumbnails[5959647]=new thumbnail(5959647,"285674","Lesser Yellowlegs (Tringa flavipes)","DSC_0414_thumb.jpg",130,93,5);thumbnails[5959736]=new thumbnail(5959736,"285674","Turnstone (Arenaria interpres)","DSC_1018_thumb.jpg",130,93,5);thumbnails[5959761]=new thumbnail(5959761,"285674","Purple Sandpipers Malin Head","2739699586_d2854fceb7_b_thumb.jpg",130,93,5);thumbnails[5960195]=new thumbnail(5960195,"285674","Little Egret (Egretta garzetta)","3636212841_cf1a57259c_b_thumb.jpg",130,93,5);thumbnails[5960201]=new thumbnail(5960201,"285674","Black-tailed Godwit (Limosa limosa)","black_tail_godwit_thumb.jpg",130,93,5);thumbnails[5960218]=new thumbnail(5960218,"285674","Bar-tailed Godwit (Limosa lapponica)","DSC_0085_thumb.jpg",130,93,5);thumbnails[5960223]=new thumbnail(5960223,"285674","Sanderling (Calidris alba)","3878315137_3f556d4384_b_thumb.jpg",130,93,5);thumbnails[6123081]=new thumbnail(6123081,"285674","Garganey (Anas querquedula)","garganeybest2_filtered_thumb.jpg",130,93,5);thumbnails[6123084]=new thumbnail(6123084,"285674","Pochard (Aythya ferina)","pochardflickr_thumb.jpg",130,93,5);thumbnails[6123086]=new thumbnail(6123086,"285674","Shoveler  (Anas clypeata)","shoveler_2_filtered_thumb.jpg",130,93,5);thumbnails[6123089]=new thumbnail(6123089,"285674","Tufted Duck (Aythya fuligula)","tufted_filtered_thumb.jpg",130,93,5);thumbnails[5955692]=new thumbnail(5955692,"285675","Ivory Gull (Pagophila eburnea)","ivory_thumb.jpg",130,93,5);thumbnails[5955716]=new thumbnail(5955716,"285675","Ring-billed gull (Larus delawarensis)","4332134111_3f185dbbe7_b_thumb.jpg",130,93,5);thumbnails[5955795]=new thumbnail(5955795,"285675","Swainson's thrush (Catharus ustulatus)","Swainsons_thumb.jpg",130,93,5);thumbnails[5956336]=new thumbnail(5956336,"285675","Black Brant (Branta bernicla nigricans)","4136877502_d984bdf227_b_thumb.jpg",130,93,5);thumbnails[5956348]=new thumbnail(5956348,"285675","Hoopoe (Upupa epops)","4484852393_0397fc5600_o_thumb.jpg",130,93,5);thumbnails[5956360]=new thumbnail(5956360,"285675","Short-toed Lark (Calandrella brachydactyla)","4588993909_0be298cddc_o_thumb.jpg",130,93,5);thumbnails[5956370]=new thumbnail(5956370,"285675","Woodchat Shrike (Lanius senator)","4568163266_59e3093113_o_filtered_thumb.jpg",130,93,5);thumbnails[5956378]=new thumbnail(5956378,"285675","Little blue heron (Egretta caerulea)","littleblue4_filtered_3_thumb.jpg",130,93,5);thumbnails[5956389]=new thumbnail(5956389,"285675","Red throated pipit (Anthus cervinus)","red_t_pipit2_thumb.jpg",130,93,5);thumbnails[5956904]=new thumbnail(5956904,"285675","Bluethroat (Luscinia svecica) ","DSC_0047_2_thumb.jpg",130,93,5);thumbnails[5956914]=new thumbnail(5956914,"285675","Pied-billed Grebe (Podilymbus podiceps)","4419728509_a05f76dfe6_o_thumb.jpg",130,93,5);thumbnails[5956925]=new thumbnail(5956925,"285675","Whiskered Tern (Chlidonias hybrida)","3438144245_cc09a19bf8_o_thumb.jpg",130,93,5);thumbnails[5957438]=new thumbnail(5957438,"285675","Twite (Carduelis flavirostris)","twite2_filtered_thumb.jpg",130,93,5);thumbnails[5957568]=new thumbnail(5957568,"285675","Arctic Warbler (Phylloscopus borealis)","_DSC0014_thumb.jpg",130,93,5);thumbnails[5957598]=new thumbnail(5957598,"285675","Little Bunting (Emberiza pusilla)","little_thumb.jpg",130,93,5);thumbnails[5957693]=new thumbnail(5957693,"285675","Lesser Yellowlegs (Tringa flavipes)","yellow2_filtered_thumb.jpg",130,93,5);thumbnails[5960443]=new thumbnail(5960443,"285675","Short-toed Lark (Calandrella brachydactyla)","shorttoedlarkballycotton_thumb.jpg",130,93,5);thumbnails[5960452]=new thumbnail(5960452,"285675","Red-footed Falcon (Falco vespertinus)","Red_footed_falcon_tac1_thumb.jpg",130,93,5);thumbnails[5964273]=new thumbnail(5964273,"285918","Common Whitethroat (Sylvia communis)","whitethroat_thumb.jpg",130,93,5);thumbnails[5958959]=new thumbnail(5958959,"285918","Wheatear (Oenanthe oenanthe ) ","wheatearflickr_thumb.jpg",130,93,5);thumbnails[5958962]=new thumbnail(5958962,"285918","Redwing (Turdus iliacus ) ","4476950256_3cb29c8e03_b_thumb.jpg",130,93,5);thumbnails[5958970]=new thumbnail(5958970,"285918","Goldfinch (Carduelis carduelis)","4098680009_105c19af77_b_thumb.jpg",130,93,5);thumbnails[5958973]=new thumbnail(5958973,"285918","Robin (Erithacus rubecula)","4005597159_7fe7b4161e_b_thumb.jpg",130,93,5);thumbnails[5958978]=new thumbnail(5958978,"285918","Yellowhammer (Emberiza citrinella)","3626154978_871c425f62_b_thumb.jpg",130,93,5);thumbnails[5958981]=new thumbnail(5958981,"285918","House Sparrow (Passer domesticus)","3602497077_082f2cc819_b_thumb.jpg",130,93,5);thumbnails[5958997]=new thumbnail(5958997,"285918","Goldcrest (Regulus regulus)","3560238954_43fb67521d_b_thumb.jpg",130,93,5);thumbnails[5959007]=new thumbnail(5959007,"285918","Sedge Warbler (Acrocephalus schoenobaenus)","3509879235_39617fa0e9_b_thumb.jpg",130,93,5);thumbnails[5959026]=new thumbnail(5959026,"285918","linnet (Carduelis cannabina)","3486319559_2671d1f856_b_thumb.jpg",130,93,5);thumbnails[5959065]=new thumbnail(5959065,"285918","Stonechat (Saxicola torquata)","DSC_0171_thumb.jpg",130,93,5);thumbnails[5959271]=new thumbnail(5959271,"285918","Meadow Pipit (Anthus pratensis)","4498340352_9da415344e_b_thumb.jpg",130,93,5);thumbnails[5959281]=new thumbnail(5959281,"285918","long tailed tit (Aegithalos caudatus)","3510685430_136a697018_b_thumb.jpg",130,93,5);thumbnails[5959310]=new thumbnail(5959310,"285918","Rock Pipit (Anthus petrosus)","4106440575_d3276c4cc8_b_thumb.jpg",130,93,5);thumbnails[5959314]=new thumbnail(5959314,"285918","Greenfinch (Carduelis chloris)","3455869948_97b00a4280_b_thumb.jpg",130,93,5);thumbnails[6024065]=new thumbnail(6024065,"285918","Spotted Flycatcher (Muscicapa striata)","flybest_CC1F0FA9-1EC9-D45B-1CAD91830F3E3A35_thumb.jpg",130,93,5);thumbnails[5959142]=new thumbnail(5959142,"338811","Buzzard (Buteo buteo)","DSC_6564_thumb.jpg",130,93,5);thumbnails[6023406]=new thumbnail(6023406,"338811","Short-eared owl (Asio flammeus) ","shortytwitter_thumb.jpg",130,93,5);thumbnails[6023414]=new thumbnail(6023414,"338811","Buzzard (Buteo buteo)","buzzard_thumb.jpg",130,93,5);thumbnails[6023744]=new thumbnail(6023744,"338811","Peregrine (Falco peregrinus)","peregrine_thumb.jpg",130,93,5);thumbnails[6023777]=new thumbnail(6023777,"338811","Kestrel (Falco tinnunculus) ","kestrel2_thumb.jpg",130,93,5);thumbnails[6023791]=new thumbnail(6023791,"338811","Kestrel (Falco tinnunculus)","kestrel4_thumb.jpg",130,93,5);thumbnails[6023861]=new thumbnail(6023861,"338811","Kestrel (Falco tinnunculus)","kestrel_thumb.jpg",130,93,5);thumbnails[6023873]=new thumbnail(6023873,"338811","Buzzard (Buteo buteo)","buzzard8_thumb.jpg",130,93,5);thumbnails[6024259]=new thumbnail(6024259,"338811","Short-eared owl (Asio flammeus)","shortearedowl_thumb.jpg",130,182,5);thumbnails[6024273]=new thumbnail(6024273,"338811","Buzzard (Buteo buteo)","buzzard2_thumb.jpg",130,182,5);thumbnails[6024297]=new thumbnail(6024297,"338811","Buzzard (Buteo Buteo)","buzzard7_thumb.jpg",130,182,5);thumbnails[6024502]=new thumbnail(6024502,"338811","Kestrel (Falco tinnunculus)","kestrelbest_thumb.jpg",130,182,5);thumbnails[5959774]=new thumbnail(5959774,"285919","Irish Hare (Lepus timidus hibernicus)","3608573476_b3fff0c1d1_b_thumb.jpg",130,93,5);thumbnails[5959786]=new thumbnail(5959786,"285919","Common Dolphin (Delphinus delphis) ","4359779565_09e61d7d73_b_thumb.jpg",130,93,5);thumbnails[5959797]=new thumbnail(5959797,"285919","Common Dolphin (Delphinus delphis)","4462508831_653b796d3b_b_thumb.jpg",130,93,5);thumbnails[5960242]=new thumbnail(5960242,"285919","Common Dolphin","2739947868_9b094db5cd_b_thumb.jpg",130,93,5);thumbnails[5959325]=new thumbnail(5959325,"286361","Banbas Crown Malin Head Co. Donegal","3598161521_26573a4e07_b_thumb.jpg",130,182,5);thumbnails[5959332]=new thumbnail(5959332,"286361","Cionn Mhálanna (Malin Head)","3589131797_5340820228_b_thumb.jpg",130,182,5);thumbnails[5959348]=new thumbnail(5959348,"286361","Sunset at Malin Head","2768132360_7d8b0929ae_b_thumb.jpg",130,182,5);thumbnails[5959343]=new thumbnail(5959343,"286361","Glenevin Waterfall, Inis Eoghain","3349265817_6a1d574951_b_thumb.jpg",130,182,5);thumbnails[5991938]=new thumbnail(5991938,"286361","The Beach, Malin Head","shore2_thumb.jpg",130,93,5);thumbnails[5991940]=new thumbnail(5991940,"286361","The Sands of Time.","The_Beach_thumb.jpg",130,93,5);thumbnails[5992135]=new thumbnail(5992135,"286361","Thrift (Armreia maritime)","thrift_thumb.jpg",130,93,5);thumbnails[5992152]=new thumbnail(5992152,"286361","Malin Head, Co. Donegal","3691524990_f8015a3737_b_thumb.jpg",130,93,5);var galleries=new Object();galleries[319045]=new gallery(319045,"5965721,5965622,5965418,5960536,5960430","Recent photos","gallery",[5960430,5960461,5960513,5960536,5960543,5960576,6122762,5965418,5965622,5965721]);galleries[285635]=new gallery(285635,"6123089,6123086,6123084,6123081,6024273,6024065,6023777,6023744,6023406,5960452,5960443,5959142,5957896","Irish birds","gallery",[]);galleries[285636]=new gallery(285636,"5957896","Irish seabirds","gallery",[5957818,5957838,5957896,5957901,6040618,5958011,5958036,5958051,5958155,5958173,5958186,5958191,5958228,5958241,5958329,5958762]);galleries[285674]=new gallery(285674,"6123089,6123086,6123084,6123081","Irish waders and Wildfowl","gallery",[5959451,5959461,5959468,5959496,5959504,5959647,5959736,5959761,5960195,5960201,5960218,5960223,6123081,6123084,6123086,6123089]);galleries[285675]=new gallery(285675,"5960452,5960443","Irish Scarce and Rare birds","gallery",[5955692,5955716,5955795,5956336,5956348,5956360,5956370,5956378,5956389,5956904,5956914,5956925,5957438,5957568,5957598,5957693,5960443,5960452]);galleries[285918]=new gallery(285918,"6024065","Common Irish birds","gallery",[5964273,5958959,5958962,5958970,5958973,5958978,5958981,5958997,5959007,5959026,5959065,5959271,5959281,5959310,5959314,6024065]);galleries[338811]=new gallery(338811,"6024273,6023777,6023744,6023406,5959142","Irish Birds of Prey","gallery",[5959142,6023406,6023414,6023744,6023777,6023791,6023861,6023873,6024259,6024273,6024297,6024502]);galleries[285919]=new gallery(285919,"5960242,5959797,5959786,5959774","Irish Mammals, Sealife and other wildlife","gallery",[5959774,5959786,5959797,5960242]);galleries[286361]=new gallery(286361,"5992152,5991938","landscapes","gallery",[5959325,5959332,5959348,5959343,5991938,5991940,5992135,5992152]);var imageSets=new Object();imageSets[1]="6123089,6123086,6123084,6123081,5991940,5965721,5965622,5965418,5960536,5960242,5960195,5959797,5959774,5959468,5959461,5959451,5959310,5959271,5959142,5959065,5959007,5958981,5958978,5958973,5958962,5958959,5958191,5958186,5957901,5957896,5957693,5956378,5955716";imageSets[2]="6123089,6123086,6123084,6123081,6024273,6024065,6023777,6023744,6023406,5992152,5991938,5965721,5965622,5965418,5960536,5960452,5960443,5960430,5959142,5957896";imageSets[3]="6123089,6123086,6123084,6123081,6122762,6040618,6024502,6024297,6024273,6024259,6024065,6023873,6023861,6023791,6023777,6023744,6023414,6023406,5992152,5992135,5991940,5991938,5965721,5965622,5965418,5964273,5960576,5960543,5960536,5960513,5960461,5960452,5960443,5960430,5960242,5960223,5960218,5960201,5960195,5959797,5959786,5959774,5959761,5959736,5959647,5959504,5959496,5959468,5959461,5959451";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/rpmclaughlin/images";break}switch(a){case 1:b="http://www1.clikpic.com/rpmclaughlin/images";break}switch(a){case 2:b="http://admin.clikpic.com/rpmclaughlin/images";break}switch(a){case 24:b="http://tpc15/clikpic/rpmclaughlin/images";break}switch(a){case 4:b="http://www.clikchurch.com/rpmclaughlin/images";break}switch(a){case 5:b="http://www2.clikpic.com/rpmclaughlin/images";break}switch(a){case 22:b="http://tpc5/clikpic/rpmclaughlin/images";break}switch(a){case 23:b="http://tpc10/clikpic/rpmclaughlin/images";break}switch(a){case 25:b="http://tpc16/clikpic/rpmclaughlin/images";break}switch(a){case 15:b="http://www3.clikpic.com/rpmclaughlin/images";break}switch(a){case 18:b="http://www4.clikpic.com/rpmclaughlin/images";break}switch(a){case 19:b="http://www5.clikpic.com/rpmclaughlin/images";break}switch(a){case 31:b="http://www7.clikpic.com/rpmclaughlin/images";break}switch(a){case 32:b="http://admin2.clikpic.com/rpmclaughlin/images";break}switch(a){case 33:b="http://www8.clikpic.com/rpmclaughlin/images";break}switch(a){case 34:b="http://www9.clikpic.com/rpmclaughlin/images";break}switch(a){case 35:b="http://admin3.clikpic.com/rpmclaughlin/images";break}switch(a){case 37:b="http://admin4.clikpic.com/rpmclaughlin/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="Rónán McLaughlin Wildlife 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>"}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> 				&euro;"+(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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="rpmclaughlin@eircom.net">';b=b+'<input type="hidden" name="currency_code" value="EUR">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="rpmclaughlin@eircom.net">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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+'")'})}}};