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[2418292]=new thumbnail(2418292,"156393","Joe Worsley of London Wasps breaks through the tackle of Luke Narraway of Gloucester","SPT_WASPS_GLOUCESTER_027_thumb.jpg",130,130,15);thumbnails[2417768]=new thumbnail(2417768,"156393","David Seymour of Sale Sharks forces his way through Ugo Monye of Harlequins to score ","RSM_7259_thumb.jpg",130,130,15);thumbnails[2418294]=new thumbnail(2418294,"156393","Stade Francais and Harlequins pack down in the Heineken Cup","SPT_HARLEQUINS_STADE_FRANCAIS_011_thumb.jpg",130,130,15);thumbnails[2417744]=new thumbnail(2417744,"156393","Bryan Habana (South Africa) celebrates his hat trick playing for the Barbarians against England","RSM_7006_-_Version_2_thumb.jpg",130,130,15);thumbnails[2417780]=new thumbnail(2417780,"156393","The old warrior Phil Vickery of London Wasps","RSM_5625_thumb.jpg",130,130,15);thumbnails[2418628]=new thumbnail(2418628,"156393","Ugo Monye of England is tackled by Gonzalo Tiesi of Argentina","RSM_9251_thumb.jpg",130,130,15);thumbnails[2418320]=new thumbnail(2418320,"156393","Rory Lawson of Gloucester Rugby releases his backs ","SPT_WASPS_GLOUCESTER_023_thumb.jpg",130,130,15);thumbnails[2417725]=new thumbnail(2417725,"156393","England's Jamie Noon falls just short of the try line","RSM_8936_thumb.jpg",130,130,15);thumbnails[2417727]=new thumbnail(2417727,"156393","Jonny Wilkinson of England runs into New Zealand's Dan Carter (R) as Brad Thorn (L) prepares to wrap him up ","RSM_9752_thumb.jpg",130,130,15);thumbnails[2417753]=new thumbnail(2417753,"156393","Duncan Bell (L), Steve Thompson (C) and Tim Payne (R) pack down against New Zealand ","RSM_0102_thumb.jpg",130,130,15);thumbnails[2418347]=new thumbnail(2418347,"156393","Harlequins' Nick Easter appears to be the victim of eye gouging by Saracens' Derick Hougaard ","RSM_3231_thumb.jpg",130,130,15);thumbnails[2418449]=new thumbnail(2418449,"156393","Shane Geraghty (Northampton) in action ","RSM_5898_thumb.jpg",130,130,15);thumbnails[2417759]=new thumbnail(2417759,"156393","Frederic Michalak of France","SPT_FRANCE_NAMIBIA_018_thumb.jpg",130,130,15);thumbnails[2418619]=new thumbnail(2418619,"156393","Simon Shaw of England takes an unopposed lineout on the All Blacks line ","RSM_6116_thumb.jpg",130,130,15);thumbnails[2417772]=new thumbnail(2417772,"156393","Ugo Monye of Harlequins in action","RSM_4693_thumb.jpg",130,130,15);thumbnails[2417771]=new thumbnail(2417771,"156393","Sebastian Chabal of France ","SPT_FRANCE_NAMIBIA_029_thumb.jpg",130,130,15);thumbnails[2417737]=new thumbnail(2417737,"156393","Jordan Turner-Hall (C-England) looks shocked as he faces Justin Marshall (New Zealand/Barbarians) ","RSM_9006_-_Version_2_thumb.jpg",130,130,15);thumbnails[2418625]=new thumbnail(2418625,"156393","Peter Hynes (Australia) upends Ugo Monye (England) ","SPT_ENGLAND_AUSTRALIA_054_thumb.jpg",130,130,15);thumbnails[2417764]=new thumbnail(2417764,"156393","Harlequins' Chris Robshaw (L) passes to team mate Jordan Turner-Hall  ","RSM_4512_thumb.jpg",130,130,15);thumbnails[2417747]=new thumbnail(2417747,"156393","Bath Rugby's Ben Skirving at full stretch beats Sergio Parisse (Stade Francais) to the ball ","RSM_6865_thumb.jpg",130,130,15);thumbnails[2417789]=new thumbnail(2417789,"156393","Nick Easter of England surveys the scene","RSM_8956_thumb.jpg",130,130,15);thumbnails[2418636]=new thumbnail(2418636,"156393","Seilala Mapusua (London Irish) scores a dramatic first half try ","SPT_LONDON_IRISH_OSPREYS_002_thumb.jpg",130,130,15);thumbnails[2418639]=new thumbnail(2418639,"156393","Steve Borthwick (Saracens) takes clean lineout ball ","RSM_4890_-_Version_3_thumb.jpg",130,130,15);thumbnails[2417791]=new thumbnail(2417791,"156393","England Manager Martin Johnson shows his frustration ","RSM_8490_thumb.jpg",130,130,15);thumbnails[3248171]=new thumbnail(3248171,"64067","Sir Alex Ferguson concentrates during a tense moment","DSC_0689_thumb.jpg",130,130,15);thumbnails[2419052]=new thumbnail(2419052,"64067","Wayne Rooney (Manchester Utd) jumps over the tackle of Portsmouth's Younes Kaboul as Marc Wilson (L) looks on ","RSM_0388_thumb.jpg",130,130,15);thumbnails[2418833]=new thumbnail(2418833,"64067","Dirk Kuyt (Liverpool) is tackled by Dickson Etuhu (Fulham)","RSM_6680_thumb.jpg",130,130,15);thumbnails[2418987]=new thumbnail(2418987,"64067","Fernando Torres of Liverpool signals to a team mate","RSM_6709_thumb.jpg",130,130,15);thumbnails[5359338]=new thumbnail(5359338,"64067","Jose Bosingwa of Chelsea controls the ball in mid-field ","SPT_JOSE_BOSINGWA_30001_thumb.jpg",130,130,15);thumbnails[2418840]=new thumbnail(2418840,"64067","Clint Dempsey of Fulham tackles Portsmouth's Younes Kaboul ","RSM_1108_thumb.jpg",130,130,15);thumbnails[3248167]=new thumbnail(3248167,"64067","Arsenal's Bacary Sagna keeps his eye on the ball ","RSM_9490_thumb.jpg",130,130,15);thumbnails[3248168]=new thumbnail(3248168,"64067","Wayne Rooney (Manchester United) and Younes Kaboul (Portsmouth) go head to head ","RSM_0511_thumb.jpg",130,130,15);thumbnails[3248169]=new thumbnail(3248169,"64067","Ryan Giggs of Manchester United","RSM_6387_thumb.jpg",130,130,15);thumbnails[2418845]=new thumbnail(2418845,"64067","Rafa Benitez (Liverpool Manager) looks pensive during the game  <br>\r\n","RSM_6613_thumb.jpg",130,130,15);thumbnails[2418842]=new thumbnail(2418842,"64067","Aaron Lennon (L-Tottenham Hotspur) and Ricardo Carvalho (R-Chelsea) ","SPT_CHELSEA_SPURS_043_thumb.jpg",130,130,15);thumbnails[2418848]=new thumbnail(2418848,"64067","Nicolas Anelka of Chelsea looks on during the match","SPT_CHELSEA_SPURS_003_1EDEEF5A-1D09-001F-9992E9E37EB9DCA5_thumb.jpg",130,130,15);thumbnails[2418907]=new thumbnail(2418907,"64067","Portsmouth striker Frederic Piquionne in action","RSM_7613_thumb.jpg",130,130,15);thumbnails[2418960]=new thumbnail(2418960,"64067","Patrice Evra (Manchester United) in action in the rain","RSM_0570_thumb.jpg",130,130,15);thumbnails[2418926]=new thumbnail(2418926,"64067","Chelsea's Frank Lampard (L) celebrates with Didier Drogba ","SPT_PORTSMOUTH_CHELSEA_010_thumb.jpg",130,130,15);thumbnails[2418930]=new thumbnail(2418930,"64067","Long suffering Pompey fan John Portsmouth Football Club Westwood ","RSM_8267_thumb.jpg",130,130,15);thumbnails[2418935]=new thumbnail(2418935,"64067",'Gary O"Neil (Middlesbrough) gets the better of Lassana Diarra (Portsmouth) ',"SPT_PORTSMOUTH_MIDDLESBROUGH_005_thumb.jpg",130,130,15);thumbnails[2418836]=new thumbnail(2418836,"64067","Juliano Belletti of Chelsea scores the opening goal ","SPT_CHELSEA_SPURS_019_1ED48ACC-1D09-001F-992F894DE9EF5AE1_thumb.jpg",130,130,15);thumbnails[2418963]=new thumbnail(2418963,"64067","Xabi Alonso (Liverpool) and Danny Murphy (Fulham) at full stretch ","RSM_6759_thumb.jpg",130,130,15);thumbnails[2418968]=new thumbnail(2418968,"64067","Deco (Chelsea) ","SPT_CHELSEA_SPURS_033_1EE9FF04-1D09-001F-99BDB0BEE4988AA2_thumb.jpg",130,130,15);thumbnails[2418971]=new thumbnail(2418971,"64067","David Nugent shows his immense disappointment","SPT_PORTSMOUTH_CHELSEA_016_thumb.jpg",130,130,15);thumbnails[2418974]=new thumbnail(2418974,"64067","Fulham Manager Roy Hodgson ","RSM_2854_thumb.jpg",130,130,15);thumbnails[2418981]=new thumbnail(2418981,"64067","Cardiff City goalkeeper Peter Enckelman ","SPT_CARDIFF_PORTSMOUTH_087_thumb.jpg",130,130,15);thumbnails[2418985]=new thumbnail(2418985,"64067","Manchester United's Ryan Giggs (L) and Wayne Rooney (R) discuss tactics before a free kick","RSM_0563_thumb.jpg",130,130,15);thumbnails[2418734]=new thumbnail(2418734,"156396","Justine Henin (BEL)","SPT_CLIKPIC_TENNIS_001_thumb.jpg",130,130,15);thumbnails[2418737]=new thumbnail(2418737,"156396","Vera Dushevina of Russia","SPT_CLIKPIC_TENNIS_002_thumb.jpg",130,130,15);thumbnails[2418750]=new thumbnail(2418750,"156396","Katie O'Brien of Great Britain ","SPT_CLIKPIC_TENNIS_005_thumb.jpg",130,130,15);thumbnails[2418745]=new thumbnail(2418745,"156396","Maria Kirilenko (RUS) in action","SPT_CLIKPIC_TENNIS_004_thumb.jpg",130,130,15);thumbnails[2418740]=new thumbnail(2418740,"156396","Amelie Mauresmo","SPT_CLIKPIC_TENNIS_003_thumb.jpg",130,130,15);thumbnails[2418751]=new thumbnail(2418751,"156396","Justine Henin (BEL) returns serve","SPT_CLIKPIC_TENNIS_006_thumb.jpg",130,130,15);thumbnails[2418753]=new thumbnail(2418753,"156396","Maria Kirilenko of Russia","SPT_CLIKPIC_TENNIS_007_thumb.jpg",130,130,15);thumbnails[2418756]=new thumbnail(2418756,"156396","Action from the International Women's Open Eastbourne ","SPT_CLIKPIC_TENNIS_008_thumb.jpg",130,130,15);thumbnails[2418758]=new thumbnail(2418758,"156396","Elena Baltacha (GBR) ","SPT_CLIKPIC_TENNIS_009_thumb.jpg",130,130,15);thumbnails[2418763]=new thumbnail(2418763,"156396","Nicole Vaidisova (CZE) serves at Eastbourne ","SPT_CLIKPIC_TENNIS_010_thumb.jpg",130,130,15);thumbnails[2418772]=new thumbnail(2418772,"156396","Justine Henin of Belgium","SPT_CLIKPIC_TENNIS_011_thumb.jpg",130,130,15);thumbnails[2418776]=new thumbnail(2418776,"156396","The power of Amelie Mauresmo (FRA) ","SPT_CLIKPIC_TENNIS_012_thumb.jpg",130,130,15);thumbnails[2418780]=new thumbnail(2418780,"156396","Amelie Mauresmo (FRA) shows exquisite touch at the net","SPT_CLIKPIC_TENNIS_013_thumb.jpg",130,130,15);thumbnails[2418784]=new thumbnail(2418784,"156396","Justine Henin of Belgium","SPT_CLIKPIC_TENNIS_014_thumb.jpg",130,130,15);thumbnails[2418785]=new thumbnail(2418785,"156396","Alicia Molik (AUS) looking relaxed","SPT_CLIKPIC_TENNIS_015_thumb.jpg",130,130,15);thumbnails[2418793]=new thumbnail(2418793,"156396","Maria Kirilenko (RUS)","SPT_CLIKPIC_TENNIS_016_thumb.jpg",130,130,15);thumbnails[2418795]=new thumbnail(2418795,"156396","Justine Henin's face tells it all","SPT_CLIKPIC_TENNIS_017_thumb.jpg",130,130,15);thumbnails[2418798]=new thumbnail(2418798,"156396","Amelie Mauresmo (FRA) serves ","SPT_CLIKPIC_TENNIS_018_thumb.jpg",130,130,15);thumbnails[2418801]=new thumbnail(2418801,"156396","Nicole Vaidisova (CZE) ","SPT_CLIKPIC_TENNIS_019_thumb.jpg",130,130,15);thumbnails[2418807]=new thumbnail(2418807,"156396","Justine Henin (BEL) wins 2007 International Women's Open at Eastbourne","SPT_CLIKPIC_TENNIS_020_thumb.jpg",130,130,15);thumbnails[366018]=new thumbnail(366018,"48339","Red Bull F1 on fire","Red Bull on Fire tn.jpg",130,135,15);thumbnails[634596]=new thumbnail(634596,"48339","The Subaru Imprezza excels in the forest stage","IMG_1107 tn.jpg",130,130,15);thumbnails[635425]=new thumbnail(635425,"48339","Aston Martin in full flow on a timed run at Goodwood","IMG_1652 Aston Martin racing 3 tn1.jpg",130,130,15);thumbnails[334210]=new thumbnail(334210,"48339","Close up of an off-road demo drive at Goodwood","Red jeep at Fos 2 tn.jpg",130,130,15);thumbnails[635920]=new thumbnail(635920,"48339","Tantalising shapes and curves of the Hulme exhausts","IMG_1322 Hulme tn.jpg",130,130,15);thumbnails[634595]=new thumbnail(634595,"48339","Demonstration drive off-road ","IMG_1028 tn.jpg",130,130,15);thumbnails[635442]=new thumbnail(635442,"48339","Red Bull F1 500","Red Bull F1 tn1.jpg",130,130,15);thumbnails[635923]=new thumbnail(635923,"48339","The Aston Martin DB9 in action","IMG_1179 Aston Martin tn.jpg",130,130,15);thumbnails[633950]=new thumbnail(633950,"48339","Two wheel action at the Goodwood Festival of Speed","IMG_1272 tn.jpg",130,130,15);thumbnails[365911]=new thumbnail(365911,"48339"," Lancia in action in a clearing in the forest ","IMG_1087 Lancia in forest tn.jpg",130,135,15);thumbnails[634598]=new thumbnail(634598,"48339","Close up of Michael Schumacher's Ferrari","IMG_1182 tn.jpg",130,130,15);thumbnails[633949]=new thumbnail(633949,"48339","Detail of the Bugatti Veyron ","IMG_1250 tn.jpg",130,130,15);thumbnails[635441]=new thumbnail(635441,"48339","Mercedes bonnet detail","IMG_1600 Mercedes tn.jpg",130,130,15);thumbnails[634603]=new thumbnail(634603,"48339","Rally car in forest stage","Rally car tn.jpg",130,130,15);thumbnails[333559]=new thumbnail(333559,"48339","Ferrari F1 side panel","Ferrari side panel tn.jpg",130,130,15);thumbnails[333551]=new thumbnail(333551,"48339","Aston Martin on a timed run","Aston racing tn.jpg",130,130,15);var galleries=new Object();galleries[156393]=new gallery(156393,"2418292,2417759,2417727","Rugby","section46222",[2418292,2417768,2418294,2417744,2417780,2418628,2418320,2417725,2417727,2417753,2418347,2418449,2417759,2418619,2417772,2417771,2417737,2418625,2417764,2417747,2417789,2418636,2418639,2417791]);galleries[64067]=new gallery(64067,"3248171,2418833","Football","section46222",[3248171,2419052,2418833,2418987,5359338,2418840,3248167,3248168,3248169,2418845,2418842,2418848,2418907,2418960,2418926,2418930,2418935,2418836,2418963,2418968,2418971,2418974,2418981,2418985]);galleries[156396]=new gallery(156396,"2418798,2418751,2418750","Tennis","section46222",[2418734,2418737,2418750,2418745,2418740,2418751,2418753,2418756,2418758,2418763,2418772,2418776,2418780,2418784,2418785,2418793,2418795,2418798,2418801,2418807]);galleries[48339]=new gallery(48339,"634596,633949,366018,365911","Motorsport","section46222",[366018,634596,635425,334210,635920,634595,635442,635923,633950,365911,634598,633949,635441,634603,333559,333551]);var imageSets=new Object();imageSets[1]="3248171,2418833,2418734,2418294,2418292,2417759,2417727,634596,366018";imageSets[2]="3248171,2418833,2418798,2418751,2418750,2418292,2417759,2417727,634596,633949,366018,365911";imageSets[3]="5359338,3248171,3248169,3248168,3248167,2419052,2418987,2418985,2418981,2418974,2418971,2418968,2418963,2418960,2418935,2418930,2418926,2418907,2418848,2418845,2418842,2418840,2418836,2418833,2418807,2418801,2418798,2418795,2418793,2418785,2418784,2418780,2418776,2418772,2418763,2418758,2418756,2418753,2418751,2418750,2418745,2418740,2418737,2418734,2418639,2418636,2418628,2418625,2418619,2418449";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/robmunro/images";break}switch(a){case 1:b="http://www1.clikpic.com/robmunro/images";break}switch(a){case 2:b="http://admin.clikpic.com/robmunro/images";break}switch(a){case 4:b="http://www.clikchurch.com/robmunro/images";break}switch(a){case 5:b="http://www2.clikpic.com/robmunro/images";break}switch(a){case 15:b="http://www3.clikpic.com/robmunro/images";break}switch(a){case 21:b="http://www6.clikpic.com/robmunro/images";break}switch(a){case 18:b="http://www4.clikpic.com/robmunro/images";break}switch(a){case 19:b="http://www5.clikpic.com/robmunro/images";break}switch(a){case 22:b="http://tpc5/clikpic/robmunro/images";break}switch(a){case 23:b="http://tpc10/clikpic/robmunro/images";break}switch(a){case 24:b="http://tpc15/clikpic/robmunro/images";break}switch(a){case 25:b="http://tpc16/clikpic/robmunro/images";break}switch(a){case 31:b="http://www7.clikpic.com/robmunro/images";break}switch(a){case 32:b="http://admin2.clikpic.com/robmunro/images";break}switch(a){case 33:b="http://www8.clikpic.com/robmunro/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("section46222"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section46222.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("section46222"!=""){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="ROB MUNRO - freelance photographer: "+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> 							"+(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+'")'})}}};