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[1161637]=new thumbnail(1161637,"84003","Lloyd Taggart of Dark Peak Fell Runners","IMG_8581-e2c400_thumb.jpg",130,173,15);thumbnails[1161564]=new thumbnail(1161564,"84003","Deon McNeilly of Newcastle AC","IMG_0082-e2c400_thumb.jpg",130,173,15);thumbnails[1161678]=new thumbnail(1161678,"84003","Rob Hope of Pudsey & Bamley","IMG_7293-ec400_thumb.jpg",130,173,15);thumbnails[1243212]=new thumbnail(1243212,"84003","Don Travers of Armagh AC","IMG_0625-e400_thumb.jpg",130,98,15);thumbnails[139303]=new thumbnail(139303,"13101","John Brown <br>\r\n","WCC-99-A36-edited-j-clikpic_thumb.jpg",130,182,15);thumbnails[142001]=new thumbnail(142001,"13101","NI Championships","Runner A - CC Snow-2-clikpic_thumb.jpg",130,226,15);thumbnails[142007]=new thumbnail(142007,"13101","Derek Graham","Runner C - CC Snow-clikpic_thumb.jpg",130,281,15);thumbnails[142008]=new thumbnail(142008,"13101","NI Championships","Runner E - CC Snow-2-clikpic_thumb.jpg",130,250,15);thumbnails[142010]=new thumbnail(142010,"13101","Steve Cram","Steve Cram-2a-clikpic_thumb.jpg",130,254,15);thumbnails[143812]=new thumbnail(143812,"13101","Paula Radcliffe","File0064-edited-3-j-clikpic_thumb.jpg",130,93,15);thumbnails[143822]=new thumbnail(143822,"13101","Famous Faces!","File0068-edited-5-j-clikpic_thumb.jpg",130,93,15);thumbnails[143823]=new thumbnail(143823,"13101","WCC at Belfast","WCC-99-A17-edited-j-clikpic_thumb.jpg",130,182,15);thumbnails[143825]=new thumbnail(143825,"13101","WCC Group","WCC-99-A11-edited-j-clikpic_thumb.jpg",130,93,15);thumbnails[153091]=new thumbnail(153091,"13101","Steve Ovett","File0116-edited-3-fix-4-clikpic-250_thumb.jpg",130,182,15);thumbnails[153094]=new thumbnail(153094,"13101","Paul Lawther","File0114-edited-4-clikpic-250_thumb.jpg",130,187,15);thumbnails[142019]=new thumbnail(142019,"12857","Fergus Slattery","Rugby - Fegus slattery-4-clikpic_thumb.jpg",130,182,15);thumbnails[142020]=new thumbnail(142020,"12857","Nigel Carr","Rugby - U v L - Hewitt-3-clikpic_thumb.jpg",130,67,15);thumbnails[142022]=new thumbnail(142022,"12857","One of three?","Rugby U V L Lineout 7-clikpic_thumb.jpg",130,93,15);thumbnails[142023]=new thumbnail(142023,"12857","Trevor Ringland","Rugby U V L TR2-2-clikpic_thumb.jpg",130,182,15);thumbnails[142025]=new thumbnail(142025,"12857","Line-out","Rugby-U v L Lineout 2-j-clikpic_thumb.jpg",130,182,15);thumbnails[148230]=new thumbnail(148230,"12857","Phil Orr","File0132-edited-2-clikpic-3_thumb.jpg",130,182,15);thumbnails[148921]=new thumbnail(148921,"12857","Dark art of the scrum","Rugby - U v L Scrum-edited-5-clikpic_thumb.jpg",130,97,15);thumbnails[142017]=new thumbnail(142017,"12857","Goal kick attempt","Rugby - Australia Kick 4-clikpic_thumb.jpg",130,93,15);thumbnails[142024]=new thumbnail(142024,"12857","Greg Cornelson","Rugby Ulster-Australia-j-clikpic_thumb.jpg",130,87,15);thumbnails[141906]=new thumbnail(141906,"12855","Steve Ovett","Athletice - Steve Ovett 3-clikpic_thumb.jpg",130,182,15);thumbnails[142425]=new thumbnail(142425,"12855","GRE Championships","Athletics - Men Bend 2a-clikpic_thumb.jpg",130,200,15);thumbnails[141909]=new thumbnail(141909,"12855","Triple Jump","Athletics - Long Jump-3-clikpic_thumb.jpg",130,238,15);thumbnails[141908]=new thumbnail(141908,"12855","Close finish!","Athletics - Finish-3-clikpic_thumb.jpg",130,172,15);thumbnails[141912]=new thumbnail(141912,"12855","Trevor Fieldsend (6) & Robert McKimm (12)","Athletics - Hurdles-2-clikpic_thumb.jpg",130,182,15);thumbnails[141917]=new thumbnail(141917,"12855","Joslyn Hoyte-Smith ","athletics - Runner of blocks-2-clikpic_thumb.jpg",130,93,15);thumbnails[141921]=new thumbnail(141921,"12855","Steve Ovett","Athletics - Steve Ovett Autographs 3-clikpic_thumb.jpg",130,96,15);thumbnails[141928]=new thumbnail(141928,"12855","Sharon McPeake","Athletics-SmCP High JUmp 5-3-clikpic_thumb.jpg",130,64,15);thumbnails[141924]=new thumbnail(141924,"12855","Triple Jump","Athletics-Long Jump-3-clikpic_thumb.jpg",130,111,15);thumbnails[141929]=new thumbnail(141929,"12855","Sharon McPeake","Athletics-SmCP hugh Jump 3-3-clikpic_thumb.jpg",130,98,15);thumbnails[142422]=new thumbnail(142422,"12855","Tony Duffy","Athletics-Tony Duffy-2-clikpic_thumb.jpg",130,197,15);thumbnails[143490]=new thumbnail(143490,"12855","Dave Clarke","athletics dave clarke-5000m-4-clikpic_thumb.jpg",130,301,15);thumbnails[143496]=new thumbnail(143496,"12855","Linsey MacDonald ","Athletics-L McD finish-2-clikpic_thumb.jpg",130,93,15);thumbnails[143494]=new thumbnail(143494,"12855","John McLaughlin ","Athletics-Red 14-Jojn McL-3-clikpic_thumb.jpg",130,182,15);thumbnails[143492]=new thumbnail(143492,"12855","Louise Miller","Athletics-Womans-High Jump-3-clikpic_thumb.jpg",130,77,15);thumbnails[154247]=new thumbnail(154247,"12858","Rory McIlroy","IMG_1513_thumb.edited-2-clikpic.jpg",130,73,15);thumbnails[154243]=new thumbnail(154243,"12858","Rory McIlroy","IMG_1477-edited-clikpic_thumb.jpg",130,182,15);thumbnails[154244]=new thumbnail(154244,"12858","Rory McIlroy","IMG_1478-edited-clikpic_thumb.jpg",130,93,15);thumbnails[141872]=new thumbnail(141872,"12858","Bernhard Langer","Golf - Bernhard-clikpic_thumb.jpg",130,280,15);thumbnails[141875]=new thumbnail(141875,"12858","Christy O'Connor Junior","Golf - Christy-2-clikpic_thumb.jpg",130,223,15);thumbnails[141876]=new thumbnail(141876,"12858","Ian Woosman","Golf - Ian w-clikpic_thumb.jpg",130,124,15);thumbnails[141879]=new thumbnail(141879,"12858","Ian Woosman","Golf - Ian Woosnam 2-clikpic_thumb.jpg",130,96,15);thumbnails[141881]=new thumbnail(141881,"12858","Sam Torrance","Golf - Sam 2-clikpic_thumb.jpg",130,67,15);thumbnails[141883]=new thumbnail(141883,"12858","Sam Torrance and Gordon Brand Snr ","Golf - Sam Torrance+1-clikpic_thumb.jpg",130,87,15);thumbnails[141888]=new thumbnail(141888,"12858","Arnold Palmer","Golf-Turnbury-88-AP-2a-clikpic_thumb.jpg",130,229,15);thumbnails[141891]=new thumbnail(141891,"12858","Arnold Palmer","Golf-Turnbury-88-AP-Corrected-clikpic_thumb.jpg",130,51,15);thumbnails[141839]=new thumbnail(141839,"13093","Jumping High","1979-Motocross-airborne 1e-clikpic_thumb.jpg",130,205,15);thumbnails[141845]=new thumbnail(141845,"13093","Motocross","1979-Motocross-Broe of hill 2c-clikpic_thumb.jpg",130,102,15);thumbnails[141847]=new thumbnail(141847,"13093","Motocross","1979-Motocross-Brow of Hill 1c-clikpic_thumb.jpg",130,84,15);thumbnails[141851]=new thumbnail(141851,"13093","OOPS ....","1979-Motocross-Crash-c-clikpic_thumb.jpg",130,77,15);thumbnails[141858]=new thumbnail(141858,"13093","Motocross","1979-Motocross-Hill side 2b-clikpic_thumb.jpg",130,77,15);thumbnails[148240]=new thumbnail(148240,"13726","Joey Dunlop","NW-3-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[148268]=new thumbnail(148268,"13726",'North West "200"',"NW-46-2-edited-clikpic1_thumb.jpg",130,122,15);thumbnails[154703]=new thumbnail(154703,"13726","Joey Dunlop","File0113-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[154708]=new thumbnail(154708,"13726","Joey Dunlop","NW-3 b-edited-ns-clikpic_thumb.jpg",130,93,15);thumbnails[154711]=new thumbnail(154711,"13726",'North West "200"',"NW-7-edited-ns-clikpic_thumb.jpg",130,93,15);thumbnails[154714]=new thumbnail(154714,"13726",'North West "200"',"NW-16-edited-3-clikpic_thumb.jpg",130,76,15);thumbnails[154717]=new thumbnail(154717,"13726",'North West "200"',"NW-67-edited-ns-clikpic_thumb.jpg",130,93,15);thumbnails[154719]=new thumbnail(154719,"13726",'NOrth West "200"',"NW-Bank-edited-ns-2-clikpic_thumb.jpg",130,93,15);thumbnails[154721]=new thumbnail(154721,"13726",'North West "200"',"MW-14-edited-2-clikpic_thumb.jpg",130,110,15);thumbnails[154723]=new thumbnail(154723,"13726",'North West "200"',"MW-17 Ireland-edited-clikpic_thumb.jpg",130,105,15);thumbnails[154726]=new thumbnail(154726,"13726",'North West "200"',"NW-22-edited-2-clikpic_thumb.jpg",130,97,15);thumbnails[155206]=new thumbnail(155206,"13726",'North West "200"',"MW-34-edited-2-clikpic_thumb.jpg",130,184,15);thumbnails[153498]=new thumbnail(153498,"14294","","IMG_2728-edited-clikpic_thumb.jpg",130,93,15);thumbnails[153499]=new thumbnail(153499,"14294","","IMG_2731-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153500]=new thumbnail(153500,"14294","","IMG_2732-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153548]=new thumbnail(153548,"14294","","IMG_2733-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153549]=new thumbnail(153549,"14294","","IMG_2734-edited-2-clipic_thumb.jpg",130,93,15);thumbnails[153551]=new thumbnail(153551,"14294","","IMG_2735-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153554]=new thumbnail(153554,"14294","","IMG_2736-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153557]=new thumbnail(153557,"14294","","IMG_2737-edited-2-clikpic_thumb.jpg",130,91,15);thumbnails[153558]=new thumbnail(153558,"14294","","IMG_2738-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153560]=new thumbnail(153560,"14294","","IMG_2739-edited-2-clikpic_thumb.jpg",130,91,15);thumbnails[153592]=new thumbnail(153592,"14294","","IMG_2742-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153593]=new thumbnail(153593,"14294","","IMG_2752-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153594]=new thumbnail(153594,"14294","","IMG_2753-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153595]=new thumbnail(153595,"14294","","IMG_2760-edited-2-clikpic_thumb.jpg",130,182,15);thumbnails[153596]=new thumbnail(153596,"14294","","IMG_2762-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153597]=new thumbnail(153597,"14294","","IMG_2769-edited-3-clikpic_thumb.jpg",130,182,15);thumbnails[153598]=new thumbnail(153598,"14294","","IMG_2775-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153599]=new thumbnail(153599,"14294","","IMG_2776-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153600]=new thumbnail(153600,"14294","","IMG_2777-edited-2-clikpic_thumb.jpg",130,182,15);thumbnails[153601]=new thumbnail(153601,"14294","","IMG_2780-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153602]=new thumbnail(153602,"14294","","IMG_2781-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153603]=new thumbnail(153603,"14294","","IMG_2782-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153604]=new thumbnail(153604,"14294","","IMG_2784-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153606]=new thumbnail(153606,"14294","","IMG_2786-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153611]=new thumbnail(153611,"14294","","IMG_2787-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153614]=new thumbnail(153614,"14294","","IMG_2793-edited-edited-clikpic_thumb.jpg",130,93,15);thumbnails[153615]=new thumbnail(153615,"14294","","IMG_2798-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153616]=new thumbnail(153616,"14294","","IMG_2800-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153617]=new thumbnail(153617,"14294","","IMG_2802-edited-3-clikpic_thumb.jpg",130,182,15);thumbnails[153618]=new thumbnail(153618,"14294","","IMG_2803-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153619]=new thumbnail(153619,"14294","","IMG_2804-edited-2-clikpic_thumb.jpg",130,93,15);thumbnails[153627]=new thumbnail(153627,"14294","","IMG_2759-edited-2-clikpic_thumb.jpg",130,93,15);var galleries=new Object();galleries[84003]=new gallery(84003,"1243212,1161678,1161637,1161564","Fell Running / Mountain Running","gallery",[1161637,1161564,1161678,1243212]);galleries[13101]=new gallery(13101,"153091,143825,143823,143822,143812,142010,139303","Cross Country","gallery",[139303,142001,142007,142008,142010,143812,143822,143823,143825,153091,153094]);galleries[12857]=new gallery(12857,"148921,148230,142025,142024,142022,142020,142019","Rugby","gallery",[142019,142020,142022,142023,142025,148230,148921,142017,142024]);galleries[12855]=new gallery(12855,"143496,143494,143492,141924,141912,141909,141906","Athletics","gallery",[141906,142425,141909,141908,141912,141917,141921,141928,141924,141929,142422,143490,143496,143494,143492]);galleries[12858]=new gallery(12858,"154247,141881,141875","Golf","gallery",[154247,154243,154244,141872,141875,141876,141879,141881,141883,141888,141891]);galleries[13093]=new gallery(13093,"141858,141851,141847,141845,141839","Motocross","gallery",[141839,141845,141847,141851,141858]);galleries[13726]=new gallery(13726,"148268,148240","Motorcycle Road Racing","gallery",[148240,148268,154703,154708,154711,154714,154717,154719,154721,154723,154726,155206]);galleries[14294]=new gallery(14294,"153618","Schools' Cup ","gallery",[153498,153499,153500,153548,153549,153551,153554,153557,153558,153560,153592,153593,153594,153595,153596,153597,153598,153599,153600,153601,153602,153603,153604,153606,153611,153614,153615,153616,153617,153618,153619,153627]);var imageSets=new Object();imageSets[1]="1243212,1161678,1161637,1161564,154247,153618,148268,148240,148230,143812,143496,143492,141924,141917";imageSets[2]="1243212,1161678,1161637,1161564,154247,153618,153091,148921,148268,148240,148230,143825,143823,143822,143812,143496,143494,143492,142025,142024,142022,142020,142019,142010,141924,141912,141909,141906,141881,141875,139303";imageSets[3]="1243212,1161678,1161637,1161564,155206,154726,154723,154721,154719,154717,154714,154711,154708,154703,154247,154244,154243,153627,153619,153618,153617,153616,153615,153614,153611,153606,153604,153603,153602,153601,153600,153599,153598,153597,153596,153595,153594,153593,153592,153560,153558,153557,153554,153551,153549,153548,153500,153499,153498,153094";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/harrymarcus/images";break}switch(a){case 1:b="http://www1.clikpic.com/harrymarcus/images";break}switch(a){case 2:b="http://admin.clikpic.com/harrymarcus/images";break}switch(a){case 24:b="http://tpc15/clikpic/harrymarcus/images";break}switch(a){case 4:b="http://www.clikchurch.com/harrymarcus/images";break}switch(a){case 5:b="http://www2.clikpic.com/harrymarcus/images";break}switch(a){case 22:b="http://tpc5/clikpic/harrymarcus/images";break}switch(a){case 23:b="http://tpc10/clikpic/harrymarcus/images";break}switch(a){case 25:b="http://tpc16/clikpic/harrymarcus/images";break}switch(a){case 15:b="http://www3.clikpic.com/harrymarcus/images";break}switch(a){case 18:b="http://www4.clikpic.com/harrymarcus/images";break}switch(a){case 19:b="http://www5.clikpic.com/harrymarcus/images";break}switch(a){case 31:b="http://www7.clikpic.com/harrymarcus/images";break}switch(a){case 32:b="http://admin2.clikpic.com/harrymarcus/images";break}switch(a){case 33:b="http://www8.clikpic.com/harrymarcus/images";break}switch(a){case 34:b="http://www9.clikpic.com/harrymarcus/images";break}switch(a){case 35:b="http://admin3.clikpic.com/harrymarcus/images";break}switch(a){case 37:b="http://admin4.clikpic.com/harrymarcus/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="Sporting 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;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+'")'})}}};