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[4290547]=new thumbnail(4290547,"172163","","3713165795_7ae5e7428d1_thumb.jpg",130,98,32);thumbnails[4290552]=new thumbnail(4290552,"172163","","3713981288_45e3aea2351_thumb.jpg",130,98,32);thumbnails[4290555]=new thumbnail(4290555,"172163","","3714048610_16eac558ce1_thumb.jpg",130,98,32);thumbnails[3985350]=new thumbnail(3985350,"172163","Famine Ship Masthead","3580336523_608c10ec2f1_thumb.jpg",130,98,32);thumbnails[3985418]=new thumbnail(3985418,"172163","Sunrise Dublin","3580419007_dbc4ae55841_thumb.jpg",130,98,32);thumbnails[4290408]=new thumbnail(4290408,"172163","Green Dragon Homecoming","3713104159_21b070e9101_thumb.jpg",130,98,32);thumbnails[3985355]=new thumbnail(3985355,"172163","Famine Ship","3581151554_60e01937021_thumb.jpg",130,98,32);thumbnails[3244442]=new thumbnail(3244442,"172163","Anchor","2253762198_9532dc8eb8[1]_thumb.jpg",130,98,32);thumbnails[3250969]=new thumbnail(3250969,"172163","Redbay Harbour","2297971211_4195868904[1]_thumb.jpg",130,98,32);thumbnails[3244423]=new thumbnail(3244423,"172163","Strangford","1906197975_a448a471c1[1]_thumb.jpg",130,98,32);thumbnails[2743419]=new thumbnail(2743419,"172163","The Royal Irish Yacht Club","1922676542_d2ae1c3670[1]_thumb.jpg",130,98,32);thumbnails[2743421]=new thumbnail(2743421,"172163","Donaghadee Lighthouse, Donaghadee harbour","2077860919_2830f56fb6[1]_thumb.jpg",130,98,32);thumbnails[2743422]=new thumbnail(2743422,"172163","Gerkin London","2252888799_f8fb15fd36[1]_thumb.jpg",130,98,32);thumbnails[2840122]=new thumbnail(2840122,"172163","Dawn","099_thumb.JPG",130,98,32);thumbnails[2763564]=new thumbnail(2763564,"172163","lighting strike,Killiney Hill,Dublin","2078713230_a797bf01fe[1]_thumb.jpg",130,98,32);thumbnails[2763394]=new thumbnail(2763394,"172163","Yachts at rest ,Dunlaoghaire Marina Dublin","2119050534_9c271dfb57[1]_thumb.jpg",130,98,32);thumbnails[2768951]=new thumbnail(2768951,"172163","Donaghadee Lighthouse, Donaghadee harbour","2850606703_5b8907caed[1]_thumb.jpg",130,98,32);thumbnails[2741985]=new thumbnail(2741985,"172163","Konica Minolta,Round Ireland Yacht Race","1921762001_a21903d8a6[1]_thumb.jpg",130,98,32);thumbnails[2742027]=new thumbnail(2742027,"172163","Bow Riding,Round Ireland Yacht Race","2105438595_c3cba8cb3e[1]_thumb.jpg",130,98,32);thumbnails[2742038]=new thumbnail(2742038,"172163","Viking helmets, Magnus Barelegs Festival","2106230630_62fbc97410[1]_thumb.jpg",130,98,32);thumbnails[2742055]=new thumbnail(2742055,"172163","Konica Minolta ,heeled over","2252882235_ca24fb911c[1]_thumb.jpg",130,98,32);thumbnails[2742062]=new thumbnail(2742062,"172163","Konica Minolta ,full canvas","2253677532_b83e475a5a[1]_thumb.jpg",130,98,32);thumbnails[3948025]=new thumbnail(3948025,"172164","Nesting Blackbird","3558324143_212343820211_thumb.jpg",130,98,32);thumbnails[3948034]=new thumbnail(3948034,"172164","Blackbird eggs","3559133984_0012d89d661_thumb.jpg",130,98,32);thumbnails[3235881]=new thumbnail(3235881,"172164","Swan Broadmeadow ,Eastury","3138071501_72dc327f31[1]_thumb.jpg",130,98,32);thumbnails[3244480]=new thumbnail(3244480,"172164","Swan Broadmeadow","3150347796_2b711dde68[1]_thumb.jpg",130,98,32);thumbnails[3244462]=new thumbnail(3244462,"172164","New Chick","2482746051_6ab6d4b908[1]_thumb.jpg",130,98,32);thumbnails[2743431]=new thumbnail(2743431,"172164","Nesting seabirds,Irelands Eye","2482744085_703a0dbcc4[1]_thumb.jpg",130,98,32);thumbnails[2742072]=new thumbnail(2742072,"172164","Dolphin Pod,Mull of Kyntire,Scotland","1877616409_988316a630[1]_thumb.jpg",130,98,32);thumbnails[3244433]=new thumbnail(3244433,"172164","Bulloch Seal","2077904561_dead3a4cbe[1]_thumb.jpg",130,98,32);thumbnails[2763384]=new thumbnail(2763384,"172164","Cormorants clifftop Irelands Eye","2483584450_ae392111f1[1]_thumb.jpg",130,98,32);thumbnails[2763617]=new thumbnail(2763617,"172164","Nesting chicks","2106220382_5058b32aa6[1]_thumb.jpg",130,98,32);thumbnails[2742076]=new thumbnail(2742076,"172164","Nesting Swallows,Sween Castle","1878953454_4c16b06546[1]_thumb.jpg",130,98,32);thumbnails[2742155]=new thumbnail(2742155,"172164","Cormorants eggs,Irelands Eye","2482735409_88277dbe3c[1]_thumb.jpg",130,98,32);thumbnails[2742082]=new thumbnail(2742082,"172164","Mallard Duck","1921707417_782ce7adc8[1]_thumb.jpg",130,98,32);thumbnails[2742104]=new thumbnail(2742104,"172164","Swan,Malahide Co Dublin","2131330639_5c0cd7eb4d[1]_thumb.jpg",130,98,32);thumbnails[2742119]=new thumbnail(2742119,"172164","Seal and Pup,Lambay Island","1921851559_82e2441cda[1]_thumb.jpg",130,98,32);thumbnails[2742159]=new thumbnail(2742159,"172164","Cormorant ","2482750261_a6bfa186ba[1]_thumb.jpg",130,98,32);thumbnails[2742123]=new thumbnail(2742123,"172164","Squirrel","1922493484_db6c8921c8[1]_thumb.jpg",130,98,32);thumbnails[2742128]=new thumbnail(2742128,"172164","Brood of eggs","1922551618_d1b2feed4a[1]_thumb.jpg",130,98,32);thumbnails[2743423]=new thumbnail(2743423,"172164","Curious Duck","2253694040_b4bf2dbfb8[1]_thumb.jpg",130,98,32);thumbnails[2839949]=new thumbnail(2839949,"172342","Glen Helen,TT 2008","tt isle of mann 176_thumb.JPG",130,98,32);thumbnails[2763730]=new thumbnail(2763730,"172342","Glen Helen Sidecar","2559694400_031cbfcd82[1]_thumb.jpg",130,98,32);thumbnails[2763735]=new thumbnail(2763735,"172342","Glen Helen","2559658158_8e585804cc[1]_thumb.jpg",130,98,32);thumbnails[2844472]=new thumbnail(2844472,"172342","TT 2008","tt isle of mann 221_thumb.JPG",130,98,32);thumbnails[2763396]=new thumbnail(2763396,"172342","Gooseneck","2559574926_cd2d75a6cd[1]_thumb.jpg",130,98,32);thumbnails[3244466]=new thumbnail(3244466,"172342","Glen Helen","2559667190_c4d91d0242[1]_thumb.jpg",130,98,32);thumbnails[2743333]=new thumbnail(2743333,"172342","Gooseneck at the TT","2558768571_097a846976[1]_thumb.jpg",130,98,32);thumbnails[2743336]=new thumbnail(2743336,"172342","Mc Guinness and Anstey Glen Helen","2558834917_a3f820d9f3[1]_thumb.jpg",130,98,32);thumbnails[2743338]=new thumbnail(2743338,"172342","Rounding the bend at Glen Helen","2558840457_e1fdbcd2b6[1]_thumb.jpg",130,98,32);thumbnails[2743339]=new thumbnail(2743339,"172342","Ramsey classic bike show","2559679050_a08f21651d[1]_thumb.jpg",130,98,32);thumbnails[3244456]=new thumbnail(3244456,"174276","Colosseum","2321620281_c90eef72d9[1]_thumb.jpg",130,98,32);thumbnails[2742136]=new thumbnail(2742136,"174276","Fountain de Trevi, Roma","2321775373_114f6b371f[1]_thumb.jpg",130,98,32);thumbnails[2742139]=new thumbnail(2742139,"174276","Angel on a pedestal, Rome","2327160333_6f5eb2ee47[1]_thumb.jpg",130,98,32);thumbnails[2763672]=new thumbnail(2763672,"174276","Saint Peter Rome,Vatican City","2321832907_363ef5db5d[1]_thumb.jpg",130,98,32);thumbnails[2743425]=new thumbnail(2743425,"174276","Piazza Cavour ,Rome","2322233164_fd82e2946b[1]_thumb.jpg",130,98,32);thumbnails[2743429]=new thumbnail(2743429,"174276","St Peters Basicilla,Rome","2327122699_ff62006e86[1]_thumb.jpg",130,98,32);thumbnails[2763724]=new thumbnail(2763724,"174276","Hadrains Pantheon, Rome","2327152539_f783c48b8d[1]_thumb.jpg",130,98,32);thumbnails[2742066]=new thumbnail(2742066,"174276","Roman Forum, Rome Italy","2321741619_4fa69dc893[1]_thumb.jpg",130,98,32);thumbnails[4613152]=new thumbnail(4613152,"174287","Craobh Haven","3808810155_750787646e_b1_thumb.jpg",130,31,32);thumbnails[3250975]=new thumbnail(3250975,"174287","Waterfall Islay","2252873087_03d92713d8[1]_thumb.jpg",130,98,32);thumbnails[2742161]=new thumbnail(2742161,"174287","Sound of Islay, Port Askaig, Scotland","islay sound1_thumb.jpg",130,98,32);thumbnails[3244434]=new thumbnail(3244434,"174287","Whirlpool Corryvreckan Jura Isle","2252952795_3605a1af4a[1]_thumb.jpg",130,98,32);thumbnails[2742164]=new thumbnail(2742164,"174287","Looking towards Tobermory, Oban Scotland","obanbeyond1_thumb.jpg",130,98,32);thumbnails[2741946]=new thumbnail(2741946,"174287","Bridge over the Atlantic, Scotland","1877495649_0745a443cb[1]_thumb.jpg",130,98,32);thumbnails[2741953]=new thumbnail(2741953,"174287","Sunset near Craobh Haven, Scotland","1877522159_938b5a5d74[1]_thumb.jpg",130,98,32);thumbnails[2768954]=new thumbnail(2768954,"174287","Harbour Port Askaig,Isle of Islay","2850609129_fddfc32f3e[1]_thumb.jpg",130,98,32);thumbnails[2768956]=new thumbnail(2768956,"174287","Sound of Islay, Port Askaig","2850614161_e3c8b16ea8[1]_thumb.jpg",130,98,32);thumbnails[2741965]=new thumbnail(2741965,"174287","Castle Sween, Loch Sween, Scotland","1878120121_01cd606ebf[1]_thumb.jpg",130,98,32);thumbnails[2741972]=new thumbnail(2741972,"174287","Cauldrin of Brechain (Corryvreckan Whirlpool),Isle of Jura, Scotland","1878403034_a8046d2268[1]_thumb.jpg",130,98,32);thumbnails[2768960]=new thumbnail(2768960,"174287","Isle of Jura, from Port Askaig Islay","2850616653_59e428e6ca[1]_thumb.jpg",130,98,32);thumbnails[2741978]=new thumbnail(2741978,"174287","Oban Harbour,Scotland","1878601590_c549046ae3[1]_thumb.jpg",130,98,32);thumbnails[2741987]=new thumbnail(2741987,"174287","Trimaran, Small Isles Bay, Craighouse,Isle of Jura,Scotland","1971262428_48a1d3b508[1]_thumb.jpg",130,98,32);thumbnails[2768961]=new thumbnail(2768961,"174287","Fading light Craobh Marina","2850621643_c08ccacf70[1]_thumb.jpg",130,98,32);thumbnails[2742043]=new thumbnail(2742043,"174287","Fading light Craobh Haven,Scotland","2252852395_33be505145[1]_thumb.jpg",130,98,32);thumbnails[2768962]=new thumbnail(2768962,"174287","Cottage  Isle of Gigha","2850626671_8ffc262df0[1]_thumb.jpg",130,98,32);thumbnails[2768963]=new thumbnail(2768963,"174287","Islay Lifeboat,Islay Sound","2851444198_727c345881[1]_thumb.jpg",130,98,32);thumbnails[2769004]=new thumbnail(2769004,"174287","Isle of Jura/Scarba from Lunga","2851451692_4470e3f6fb[1]_thumb.jpg",130,98,32);thumbnails[2769011]=new thumbnail(2769011,"174287","The Paps of Jura,Sound of Jura","2851456798_542a9a744c[1]_thumb.jpg",130,98,32);var galleries=new Object();galleries[174303]=new gallery(174303,"4613152,4290555,4290552,4290547,4290408,3985418,3985355,3985350,3250975,3250969","Places","gallery",[]);galleries[172163]=new gallery(172163,"4290555,4290552,4290547,4290408,3985418,3985355,3985350,3250969,3244442,3244423","Scenery","gallery",[4290547,4290552,4290555,3985350,3985418,4290408,3985355,3244442,3250969,3244423,2743419,2743421,2743422,2840122,2763564,2763394,2768951,2741985,2742027,2742038,2742055,2742062]);galleries[172164]=new gallery(172164,"3948034,3948025,3244480,3244462,3244433,3235881,2763617,2763384,2743431,2743423","Wild","gallery",[3948025,3948034,3235881,3244480,3244462,2743431,2742072,3244433,2763384,2763617,2742076,2742155,2742082,2742104,2742119,2742159,2742123,2742128,2743423]);galleries[172342]=new gallery(172342,"3244466,2844472,2839949,2763735,2763730,2763396,2743339,2743338,2743336,2743333","Fast","gallery",[2839949,2763730,2763735,2844472,2763396,3244466,2743333,2743336,2743338,2743339]);galleries[174276]=new gallery(174276,"3244456,2763724,2763672,2743429,2743425,2742139,2742136,2742066","Rome","gallery",[3244456,2742136,2742139,2763672,2743425,2743429,2763724,2742066]);galleries[174287]=new gallery(174287,"4613152,3250975,3244434,2769011,2769004,2768963,2768962,2768961,2768960,2768956","Scotland","gallery",[4613152,3250975,2742161,3244434,2742164,2741946,2741953,2768954,2768956,2741965,2741972,2768960,2741978,2741987,2768961,2742043,2768962,2768963,2769004,2769011]);var imageSets=new Object();imageSets[1]="4613152,4290555,4290552,4290547,4290408,3985418,3985355,3985350,3948034,3948025,3250975,3250969,3244480,3244466,3244462,3244456,3244442,3244434,3244433,3244423,3235881,2844472,2840122,2839949,2769011,2769004,2768963,2768962,2768961,2768960,2768956,2768954,2768951,2763735,2763730,2763724,2763672,2763617,2763564,2763396,2763394,2763384,2743431,2743429,2743425,2743423,2743422,2743421,2743419,2743339,2743338";imageSets[3]="4613152,4290555,4290552,4290547,4290408,3985418,3985355,3985350,3948034,3948025,3250975,3250969,3244480,3244466,3244462,3244456,3244442,3244434,3244433,3244423,3235881,2844472,2840122,2839949,2769011,2769004,2768963,2768962,2768961,2768960,2768956,2768954,2768951,2763735,2763730,2763724,2763672,2763617,2763564,2763396,2763394,2763384,2743431,2743429,2743425,2743423,2743422,2743421,2743419,2743339,2743338";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 34:b="http://www9.clikpic.com/gavinpower/images";break}switch(a){case 1:b="http://www1.clikpic.com/gavinpower/images";break}switch(a){case 2:b="http://admin.clikpic.com/gavinpower/images";break}switch(a){case 4:b="http://www.clikchurch.com/gavinpower/images";break}switch(a){case 5:b="http://www2.clikpic.com/gavinpower/images";break}switch(a){case 15:b="http://www3.clikpic.com/gavinpower/images";break}switch(a){case 21:b="http://www6.clikpic.com/gavinpower/images";break}switch(a){case 18:b="http://www4.clikpic.com/gavinpower/images";break}switch(a){case 19:b="http://www5.clikpic.com/gavinpower/images";break}switch(a){case 22:b="http://tpc5/clikpic/gavinpower/images";break}switch(a){case 23:b="http://tpc10/clikpic/gavinpower/images";break}switch(a){case 24:b="http://tpc15/clikpic/gavinpower/images";break}switch(a){case 25:b="http://tpc16/clikpic/gavinpower/images";break}switch(a){case 31:b="http://www7.clikpic.com/gavinpower/images";break}switch(a){case 32:b="http://admin2.clikpic.com/gavinpower/images";break}switch(a){case 33:b="http://www8.clikpic.com/gavinpower/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="Gavin Power Images: "+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> 				&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="gavinpower69@hotmail.com">';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="gavinpower69@hotmail.com">';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+'")'})}}};