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[5913177]=new thumbnail(5913177,"","Calumet Photo Sponsors of the BIPP Scottish Region 2010 Image Awards","calumetimaging1_thumb.jpg",130,65,1);thumbnails[5913178]=new thumbnail(5913178,"","Colorworld Imaging, Sponsors of the 2010 BIPP Scottish Region Image Aawrds","colorworldimaging_thumb.jpg",130,33,1);thumbnails[6037475]=new thumbnail(6037475,"338986","Herbalinelife - Winner - Industrial, Commercial, Advertising and Architecture Category","ICM_Herbelinlife_thumb.jpg",130,173,1);thumbnails[6038008]=new thumbnail(6038008,"338986","Morning Gallop - Winner - Pictorial & Illustrative Category","PIL-MORNING_GALLOP_thumb.jpg",130,48,1);thumbnails[6038026]=new thumbnail(6038026,"338986","Castlerig - Winner - Landscape Category","LAN-CASTLERIG_thumb.jpg",130,45,1);thumbnails[6038051]=new thumbnail(6038051,"338986","My Brother the Singer - Winner - Wedding Category","WED_mybrotherthesinger_thumb.jpg",130,89,1);thumbnails[6038074]=new thumbnail(6038074,"338986","Road Closed - Winner - Press & PR Category","PPR_RoadClosed_thumb.jpg",130,173,1);thumbnails[6038189]=new thumbnail(6038189,"338986","Skyscraper - Winner - Portraiture Category","POR-skyscaper_thumb.jpg",130,194,1);thumbnails[6038268]=new thumbnail(6038268,"338986","Mary & Jesus - Overall Winner- Student Category","STDb_maryandjesus_thumb.jpg",130,130,1);thumbnails[6040461]=new thumbnail(6040461,"338986","GoldDigger - Winner - Social & Portraiture - Student Category","STDa_GoldDigger_thumb.jpg",130,85,1);thumbnails[6040736]=new thumbnail(6040736,"338986","Mary & Jesus - Winner - Advertising & Fashion - Student Category","STDb_maryandjesus1_thumb.jpg",130,130,1);thumbnails[6040787]=new thumbnail(6040787,"338986","Birnieseyes - Winner - Photo-Journalism - Student Category","STDc_birnieseyes_thumb.jpg",130,83,1);thumbnails[6037482]=new thumbnail(6037482,"338987","Ceramic - 2nd Place - Industrial, Commercial, Advertising and Architecture Category","ICM_ceramic_thumb.jpg",130,95,1);thumbnails[6037483]=new thumbnail(6037483,"338987","Diamondspider - 3rd Place - Industrial, Commercial, Advertising and Architecture Category","ICM_diamondspider_thumb.jpg",130,173,1);thumbnails[6038006]=new thumbnail(6038006,"338987","Amazonian Sunset - 2nd Place Pictorial & Illustrative Category","PIL-AMAZONIAN-SUNSET_thumb.jpg",130,70,1);thumbnails[6038007]=new thumbnail(6038007,"338987","Convoy - 3rd Place - Pictorial & Illustrative Category","PIL-CONVOY_thumb.jpg",130,52,1);thumbnails[6038025]=new thumbnail(6038025,"338987","Kyle of Tongue - 2nd Place Landscape Category","LAN_Kyle-of-Tongue_thumb.jpg",130,86,1);thumbnails[6038057]=new thumbnail(6038057,"338987","Embraced - 2nd Place - Wedding Category","WED-EMBRACED_thumb.jpg",130,173,1);thumbnails[6038058]=new thumbnail(6038058,"338987","Emma - 3rd Place - Wedding Category","WED-Emma_thumb.jpg",130,130,1);thumbnails[6038072]=new thumbnail(6038072,"338987","Bliss and Mud - 2nd Place - Press & PR Category","PPR_Bliss-and-Mud_thumb.jpg",130,93,1);thumbnails[6038078]=new thumbnail(6038078,"338987","Sami! - 3rd Place - Press & PR Category","PPR_Sami_thumb.jpg",130,87,1);thumbnails[6038087]=new thumbnail(6038087,"338987","Girl in Leather - 2nd Place - Portraiture Category","POR_GirlinLeather_thumb.jpg",130,138,1);thumbnails[6038119]=new thumbnail(6038119,"338987","Just Kayla  - 3rd Place - Portraiture Category","POR-Just-Kyla_thumb.jpg",130,98,1);thumbnails[6040449]=new thumbnail(6040449,"338987","Evie - 2nd Place,  Social & Portrait - Student Category","STDa_Evie_thumb.jpg",130,81,1);thumbnails[6040457]=new thumbnail(6040457,"338987","Forbidden - 3rd Place - Social & Portraiture - Student Category","STDa_Forbidden_thumb.jpg",130,86,1);thumbnails[6040608]=new thumbnail(6040608,"338987","Beauty4 - 2nd Place - Advertising & Fashion - Student Category","STDb_beauty4_thumb.jpg",130,89,1);thumbnails[6040729]=new thumbnail(6040729,"338987","Madness - 3rd Place Advertising & Fashion - Student Category","STDb_Madness_thumb.jpg",130,92,1);thumbnails[6044171]=new thumbnail(6044171,"338987","Tough Times - 2nd Place - Advertsing & Fashion - Student Category","STDc_Tough-Times_thumb.jpg",130,196,1);thumbnails[6044174]=new thumbnail(6044174,"338987","Running - 3rd Place Photo-Journalism - Student Category","STDc_running_thumb.jpg",130,196,1);thumbnails[6037479]=new thumbnail(6037479,"338988","Blackthorns - Finalist - Industrial, Commercial, Advertising and Architecture Category","ICM_blackthorns_thumb.jpg",130,173,1);thumbnails[6037481]=new thumbnail(6037481,"338988","Bullets -  Finalist - Industrial, Commercial, Advertising and Architecture Category","ICM_bullets_thumb.jpg",130,98,1);thumbnails[6037485]=new thumbnail(6037485,"338988","Heartstone - Finalist - Industrial, Commercial, Advertising and Architecture Category","ICM_heartstones_thumb.jpg",130,98,1);thumbnails[6037487]=new thumbnail(6037487,"338988","Herbalinefemale - Finalist - Industrial, Commercial, Advertising and Architecture Category","ICM_Herbelinfemale_thumb.jpg",130,173,1);thumbnails[6037490]=new thumbnail(6037490,"338988","Justifiedsinner  Finalist - Industrial, Commercial, Advertising and Architecture Category","ICM_justified_sinner_thumb.jpg",130,173,1);thumbnails[6037492]=new thumbnail(6037492,"338988","Pearcut - Finalist - Industrial, Commercial, Advertising and Architecture Category","ICM_pearcut_thumb.jpg",130,173,1);thumbnails[6037493]=new thumbnail(6037493,"338988","Innes 1 - Finalist - Industrial, Commercial, Advertising and Architecture Category","icm_innes_1_thumb.jpg",130,64,1);thumbnails[6037980]=new thumbnail(6037980,"338988","Atlantic Puffin - Finalist - Pictorial & Illustrative Category","PIL_atlanticpuffin_thumb.jpg",130,163,1);thumbnails[6037984]=new thumbnail(6037984,"338988","Falcon Bathing - Finalist - Pictorial & Illustrative Category","PIL_Falcon-bathing_thumb.jpg",130,78,1);thumbnails[6037986]=new thumbnail(6037986,"338988","Red Fox  - Finalist - Pictorial & Illustrative Category","PIL_redfox_thumb.jpg",130,163,1);thumbnails[6038009]=new thumbnail(6038009,"338988","Turbines  - Finalist - Pictorial & Illustrative Category","PIL-turbines_thumb.jpg",130,63,1);thumbnails[6038015]=new thumbnail(6038015,"338988","Evening Approaches  - Finalist - Landscape Category","LAN_evening_approaches_thumb.jpg",130,61,1);thumbnails[6038050]=new thumbnail(6038050,"338988","Katie and Chris - Finalist - Wedding Category","WED_katie-and-chris_thumb.jpg",130,77,1);thumbnails[6038053]=new thumbnail(6038053,"338988","Candlelight - Finalist - Wedding Category","WED-candlelight_thumb.jpg",130,87,1);thumbnails[6038055]=new thumbnail(6038055,"338988","Classic Lighting - Finalist - Wedding Category","WED-CLASSIC-LIGHTING-_thumb.jpg",130,173,1);thumbnails[6038056]=new thumbnail(6038056,"338988","Contre-jour - Finalist - Wedding Category","WED-CONTRE-JOUR_thumb.jpg",130,173,1);thumbnails[6038059]=new thumbnail(6038059,"338988","JE 129 - Finalist - Wedding Category","WED-JE129_thumb.jpg",130,195,1);thumbnails[6038060]=new thumbnail(6038060,"338988","Watch Over Me - Finalist - Wedding Category","WED-WATCH-OVER-ME_thumb.jpg",130,163,1);thumbnails[6038063]=new thumbnail(6038063,"338988","Windswept - Finalist - Wedding Category","WED-windswept_thumb.jpg",130,195,1);thumbnails[6038069]=new thumbnail(6038069,"338988","Ainsley Bunny - Press & PR Category","PPR_Ainsley-bunny_thumb.jpg",130,65,1);thumbnails[6038079]=new thumbnail(6038079,"338988","Valhalla - Press & PR Category","PPR_Valhalla_thumb.jpg",130,173,1);thumbnails[6038090]=new thumbnail(6038090,"338988","Glowing - Finalist - Portraiture Category","POR_glowing_thumb.jpg",130,130,1);thumbnails[6038094]=new thumbnail(6038094,"338988","Phoebe - Finalist - Portaiture Category","POR_phoebe_thumb.jpg",130,108,1);thumbnails[6038099]=new thumbnail(6038099,"338988","The Barroom - Finalist - Portaiture Category","POR_thebarroom_thumb.jpg",130,197,1);thumbnails[6038113]=new thumbnail(6038113,"338988","Bermuda - Finalist - Portaiture Category","POR-bermuda-_thumb.jpg",130,98,1);thumbnails[6038156]=new thumbnail(6038156,"338988","Reflection - Finalist - Portaiture Category","POR-REFLECTION_thumb.jpg",130,104,1);thumbnails[6038157]=new thumbnail(6038157,"338988","Seagull Chasing - Finalist - Portraiture Category","POR-Seagull-Chasing_thumb.jpg",130,78,1);thumbnails[6040283]=new thumbnail(6040283,"338988","1940's - Finalist - Social & Portrait - Student Category","STDa_1940s1_thumb.jpg",130,185,1);thumbnails[6040340]=new thumbnail(6040340,"338988","Arlene Portrait  - Finalist - Social & Portrait - Student Category","STDa_Arleneportrait_thumb.jpg",130,98,1);thumbnails[6040342]=new thumbnail(6040342,"338988","Blownaway - Finalist - Social & Portraiture - Student Category","STDa_blownaway_thumb.jpg",130,86,1);thumbnails[6040360]=new thumbnail(6040360,"338988","Catriona - Finalist - Social & Portraiture - Student Category","STDa_Catriona_thumb.jpg",130,195,1);thumbnails[6040471]=new thumbnail(6040471,"338988","Staying - Finalist - Social & Portraiture - Student Category","STDa_Staying_thumb.jpg",130,98,1);thumbnails[6040615]=new thumbnail(6040615,"338988","Breathingspace - Finalist - Advertising & Fashion - Student Category","STDb_breathingspace_thumb.jpg",130,193,1);thumbnails[6040623]=new thumbnail(6040623,"338988","BREMENN-industrial-metal-band-II - Finalist - Advertising & Fashion - Student Category","STDb_BREMENN-industrial-metal-band-II_thumb.jpg",130,88,1);thumbnails[6040624]=new thumbnail(6040624,"338988","Don't Open - Finalist - Advertising & Fashion - Student Category","STDb_Dont_Open_thumb.jpg",130,87,1);thumbnails[6044160]=new thumbnail(6044160,"338988","Ferris Wheel - Finalist - Advertising and Fashion Student Category","STDc_-Ferris-wheel-_thumb.jpg",130,189,1);thumbnails[6044181]=new thumbnail(6044181,"338988","Mud - Finalist - Photo-Journalism Student Category","STDc_mud_thumb.jpg",130,195,1);thumbnails[6044183]=new thumbnail(6044183,"338988","Blowing for Home - Finalist - Photo-Journalism Student Category","STDc_Blowing-for-Home_thumb.jpg",130,67,1);var galleries=new Object();galleries[338986]=new gallery(338986,"6040787,6040736,6040461,6038268,6038189,6038074,6038051,6038026,6038008,6037475","2010 Image Awards - Category Winners","gallery",[6037475,6038008,6038026,6038051,6038074,6038189,6038268,6040461,6040736,6040787]);galleries[338987]=new gallery(338987,"6044174,6044171,6040729,6040608,6040457,6040449,6038119,6038087,6038078,6038072","2010 Image Awards Runners-up","gallery",[6037482,6037483,6038006,6038007,6038025,6038057,6038058,6038072,6038078,6038087,6038119,6040449,6040457,6040608,6040729,6044171,6044174]);galleries[338988]=new gallery(338988,"6044183,6044181,6044160,6040624,6040623,6040615,6040471,6040360,6040342,6040340","2010 Image Awards Finalists","gallery",[6037479,6037481,6037485,6037487,6037490,6037492,6037493,6037980,6037984,6037986,6038009,6038015,6038050,6038053,6038055,6038056,6038059,6038060,6038063,6038069,6038079,6038090,6038094,6038099,6038113,6038156,6038157,6040283,6040340,6040342,6040360,6040471,6040615,6040623,6040624,6044160,6044181,6044183]);var imageSets=new Object();imageSets[1]="6040787,6040461,6038268,6038189,6038074,6038051,6038026,6038008,6037475";imageSets[3]="6044183,6044181,6044174,6044171,6044160,6040787,6040736,6040729,6040624,6040623,6040615,6040608,6040471,6040461,6040457,6040449,6040360,6040342,6040340,6040283,6038268,6038189,6038157,6038156,6038119,6038113,6038099,6038094,6038090,6038087,6038079,6038078,6038074,6038072,6038069,6038063,6038060,6038059,6038058,6038057,6038056,6038055,6038053,6038051,6038050,6038026,6038025,6038015,6038009,6038008";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/bipp/images";break}switch(a){case 1:b="http://www1.clikpic.com/bipp/images";break}switch(a){case 2:b="http://admin.clikpic.com/bipp/images";break}switch(a){case 24:b="http://tpc15/clikpic/bipp/images";break}switch(a){case 4:b="http://www.clikchurch.com/bipp/images";break}switch(a){case 5:b="http://www2.clikpic.com/bipp/images";break}switch(a){case 22:b="http://tpc5/clikpic/bipp/images";break}switch(a){case 23:b="http://tpc10/clikpic/bipp/images";break}switch(a){case 25:b="http://tpc16/clikpic/bipp/images";break}switch(a){case 15:b="http://www3.clikpic.com/bipp/images";break}switch(a){case 18:b="http://www4.clikpic.com/bipp/images";break}switch(a){case 19:b="http://www5.clikpic.com/bipp/images";break}switch(a){case 31:b="http://www7.clikpic.com/bipp/images";break}switch(a){case 32:b="http://admin2.clikpic.com/bipp/images";break}switch(a){case 33:b="http://www8.clikpic.com/bipp/images";break}switch(a){case 34:b="http://www9.clikpic.com/bipp/images";break}switch(a){case 35:b="http://admin3.clikpic.com/bipp/images";break}switch(a){case 37:b="http://admin4.clikpic.com/bipp/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="BIPP Scotland: "+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+'")'})}}};