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[5060279]=new thumbnail(5060279,"","Alex_Ferguson_Manchester","WEB_MONTAGE1_thumb.jpg",130,243,1);thumbnails[5159543]=new thumbnail(5159543,"167800","","Suzanne5_thumb.JPG",130,204,1);thumbnails[5159638]=new thumbnail(5159638,"167800","","Suzanne1_thumb.JPG",130,86,1);thumbnails[5159641]=new thumbnail(5159641,"167800","","Suzanne2_thumb.JPG",130,86,1);thumbnails[5159643]=new thumbnail(5159643,"167800","","Suzanne3_thumb.JPG",130,86,1);thumbnails[5159652]=new thumbnail(5159652,"167800","","131_thumb.jpg",130,195,1);thumbnails[5159646]=new thumbnail(5159646,"167800","","Suzanne4_thumb.JPG",130,86,1);thumbnails[5159649]=new thumbnail(5159649,"167800","","130_thumb.jpg",130,87,1);thumbnails[5159653]=new thumbnail(5159653,"167800","","147_thumb.jpg",130,86,1);thumbnails[5160004]=new thumbnail(5160004,"167800","","Alicia-01_thumb.JPG",130,180,1);thumbnails[5160009]=new thumbnail(5160009,"167800","","Alicia-02_thumb.JPG",130,214,1);thumbnails[5160018]=new thumbnail(5160018,"167800","","Alicia-03_thumb.JPG",130,205,1);thumbnails[5160020]=new thumbnail(5160020,"167800","","Alicia-04_thumb.JPG",130,201,1);thumbnails[5160117]=new thumbnail(5160117,"167800","","Wedding_141_thumb.jpg",130,195,1);thumbnails[5160125]=new thumbnail(5160125,"167800","","Wedding_50_thumb.jpg",130,231,1);thumbnails[5160127]=new thumbnail(5160127,"167800","","Wedding_133_thumb.jpg",130,87,1);thumbnails[5160130]=new thumbnail(5160130,"167800","","Wedding_52_thumb.jpg",130,87,1);thumbnails[4242829]=new thumbnail(4242829,"167800","","small_Wedding_135_thumb.jpg",130,95,1);thumbnails[4242847]=new thumbnail(4242847,"167800","","small_Wedding_139_thumb.jpg",130,87,1);thumbnails[4245679]=new thumbnail(4245679,"167800","","Montage_Wedding_thumb.jpg",130,83,1);thumbnails[4246064]=new thumbnail(4246064,"167800","","Wedding_1461_thumb.jpg",130,86,1);thumbnails[4240208]=new thumbnail(4240208,"190394","Prospectus photography in Manchester","small_Students_chatting-14_thumb.jpg",130,186,1);thumbnails[4240026]=new thumbnail(4240026,"190394","Students in Manchester","Students_city_centre-03_thumb.jpg",130,87,1);thumbnails[4239863]=new thumbnail(4239863,"190394","Prospectus Photography in Manchester","War_Museum_small_thumb.jpg",130,93,1);thumbnails[4240147]=new thumbnail(4240147,"190394","Salford University students","Students_chatting-11_thumb.jpg",130,88,1);thumbnails[3104694]=new thumbnail(3104694,"190394","Ronhill brochure photography Manchester","ronhill 011_thumb.jpg",130,89,1);thumbnails[3104690]=new thumbnail(3104690,"190394","Ronhill brochure photography Manchester","ronhill 02_thumb.jpg",130,88,1);thumbnails[3104712]=new thumbnail(3104712,"190394","Ronhill brochure photography","ronhill 03_thumb.jpg",130,87,1);thumbnails[3104726]=new thumbnail(3104726,"190394","Ronhill brochure photography","Ronhill 04_thumb.jpg",130,71,1);thumbnails[4239915]=new thumbnail(4239915,"190394","Business Photography in Manchester","Harvey_Nic-25_thumb.jpg",130,88,1);thumbnails[5596237]=new thumbnail(5596237,"190394","New Charter staff","Charter_thumb.jpg",130,97,1);thumbnails[5596244]=new thumbnail(5596244,"190394","Commercial interiors","Allerton_thumb.jpg",130,86,1);thumbnails[5596245]=new thumbnail(5596245,"190394","Commercial exteriors","Sunset_thumb.jpg",130,78,1);thumbnails[5159021]=new thumbnail(5159021,"45882","Cycling Champion Victoria Pendleton at Sportcity in Manchester.","Pendleton_thumb.jpg",130,195,1);thumbnails[598277]=new thumbnail(598277,"45882","A happy Netto customer","Netto _thumb.jpg",130,251,1);thumbnails[598278]=new thumbnail(598278,"45882","Bear Grylls opens the North Face store in Manchester","North Face_thumb.jpg",130,212,1);thumbnails[598276]=new thumbnail(598276,"45882","Coleen Rooney in Manchester.","Coleen Asda_thumb.jpg",130,214,1);thumbnails[598282]=new thumbnail(598282,"45882","Corporate gambling night photography","Viacom 3_thumb.jpg",130,204,1);thumbnails[598275]=new thumbnail(598275,"45882","PR promotion photography Manchester","Cafe Kiss 3July_thumb.jpg",130,156,1);thumbnails[5594585]=new thumbnail(5594585,"45882","Strada Restaurant opening in Wilmslow.","00000182_thumb.jpg",130,195,1);thumbnails[5594584]=new thumbnail(5594584,"45882","Food display","00000242_thumb.jpg",130,195,1);thumbnails[598270]=new thumbnail(598270,"45882","Pregnant British Airways staff at Manchester Airport","arrivals_thumb.jpg",130,92,1);thumbnails[5159107]=new thumbnail(5159107,"45882","Manchester businessmen on St George's Day.","St_George1_thumb.JPG",130,99,1);thumbnails[5594583]=new thumbnail(5594583,"45882","Strada Restaurant opening in Wilmslow","00000326_thumb.jpg",130,85,1);thumbnails[5158979]=new thumbnail(5158979,"45882","Frankie Dettori at Haydock Park","Betfred_thumb.jpg",130,99,1);thumbnails[5594992]=new thumbnail(5594992,"45882","Valentine's Day tree planting","Valentine-01_thumb.jpg",130,92,1);thumbnails[702203]=new thumbnail(702203,"45884","Sylvester Stallone in Liverpool","Stallone_thumb.jpg",130,184,1);thumbnails[3104614]=new thumbnail(3104614,"45884","Victoria Beckham arrives at Harvey Nicols ","posh11_thumb.jpg",130,170,1);thumbnails[611667]=new thumbnail(611667,"45884","Sir Ian Mckellen in Manchester","McKellan1_thumb.jpg",130,176,1);thumbnails[5594946]=new thumbnail(5594946,"45884","Tina O'Brien with Key 103's Mike Toolan","OBrien_thumb.jpg",130,148,1);thumbnails[598286]=new thumbnail(598286,"45884","Coleen Rooney at Selfridges, Manchester.","Coleen_thumb.jpg",130,217,1);thumbnails[3104845]=new thumbnail(3104845,"45884","David Gest at The Lowry, Manchester","gest 01_thumb.jpg",130,203,1);thumbnails[5594947]=new thumbnail(5594947,"45884","David Platt with David Platt, aka Jack P Shepherd.","Platt_thumb.jpg",130,134,1);thumbnails[611695]=new thumbnail(611695,"45884","Coronation Street actress Samia Smith","samia1_thumb.jpg",130,226,1);thumbnails[598323]=new thumbnail(598323,"45884","Nadine Coyle from Girls Aloud","Nadine1_thumb.jpg",130,232,1);thumbnails[598368]=new thumbnail(598368,"45884","Katie Price in Manchester","Jordan_thumb.jpg",130,203,1);thumbnails[5594958]=new thumbnail(5594958,"45884","Alan Halsall and Lucy-Jo Hudson","Halsall1_thumb.jpg",130,161,1);thumbnails[597093]=new thumbnail(597093,"45881","The Prince of Wales","Charles & camilla_thumb.jpg",130,166,1);thumbnails[3512040]=new thumbnail(3512040,"45881","David Cameron in Manchester","PB2_1577_thumb.jpg",130,135,1);thumbnails[597092]=new thumbnail(597092,"45881","The Duchess of Cornwall in Buxton","Camilla_thumb.jpg",130,190,1);thumbnails[3568228]=new thumbnail(3568228,"45881","The Duke of York in Manchester","PB-Duke-04_thumb.jpg",130,130,1);thumbnails[695812]=new thumbnail(695812,"45881","A football streaker escorted off the field","Streaker2_thumb.jpg",130,165,1);thumbnails[597094]=new thumbnail(597094,"45881","David Dickinson in Manchester","Cheap as chips 600_thumb.jpg",130,107,1);thumbnails[597095]=new thumbnail(597095,"45881","Conference photography in Manchester","Clarke_thumb.jpg",130,101,1);thumbnails[598370]=new thumbnail(598370,"45881","Manchester Peace Garden artist","Artwork silhouette1_thumb.jpg",130,87,1);thumbnails[3601203]=new thumbnail(3601203,"45881","Reading in the John Rylands Library, Manchester","Rylands_thumb.JPG",130,87,1);thumbnails[5596239]=new thumbnail(5596239,"45881","Brave walkers on a frozen canal","ice_thumb.jpg",130,98,1);thumbnails[5596240]=new thumbnail(5596240,"45881","A proper Oldham snowdrift","Snow_thumb.jpg",130,98,1);thumbnails[5596243]=new thumbnail(5596243,"45881","Portland Basin frozen solid","Portland_thumb.jpg",130,85,1);thumbnails[598305]=new thumbnail(598305,"45885","David Blunkett speaking in Manchester","Blunkett_thumb.jpg",130,224,1);thumbnails[2651881]=new thumbnail(2651881,"45885","Portrait photography in Manchester","20071211-PB_Rozman_02_thumb.jpg",130,202,1);thumbnails[3104928]=new thumbnail(3104928,"45885","Ryan Giggs with an honorary degree","giggs_thumb.jpg",130,191,1);thumbnails[2651915]=new thumbnail(2651915,"45885","Anthony Wilson in Manchester","20070213-PB__Wilson 02_thumb.jpg",130,97,1);thumbnails[2614159]=new thumbnail(2614159,"45885","","william_thumb.jpg",130,154,1);thumbnails[2614358]=new thumbnail(2614358,"45885","","jackson_thumb.jpg",130,97,1);thumbnails[2614362]=new thumbnail(2614362,"45885","","nic1_thumb.jpg",130,117,1);thumbnails[2614368]=new thumbnail(2614368,"45885","","daz_thumb.jpg",130,125,1);thumbnails[2614881]=new thumbnail(2614881,"45885","","ethan_thumb.jpg",130,129,1);thumbnails[2649483]=new thumbnail(2649483,"45885","","will_fair_thumb.jpg",130,195,1);thumbnails[3104920]=new thumbnail(3104920,"45885","","deloitte1_thumb.jpg",130,106,1);thumbnails[598300]=new thumbnail(598300,"45883","","hyde v gains5_thumb.jpg",130,119,1);thumbnails[598301]=new thumbnail(598301,"45883","","Jose_thumb.jpg",130,182,1);thumbnails[598312]=new thumbnail(598312,"45883","","beckett cele_thumb.jpg",130,104,1);thumbnails[4238884]=new thumbnail(4238884,"45883","","Dusk_Runner_thumb.jpg",130,87,1);thumbnails[4238909]=new thumbnail(4238909,"45883","","Golf1_thumb.jpg",130,88,1);thumbnails[4238919]=new thumbnail(4238919,"45883","","Golf2_thumb.jpg",130,111,1);thumbnails[4239035]=new thumbnail(4239035,"45883","","Ronhill-327_thumb.jpg",130,93,1);thumbnails[4239042]=new thumbnail(4239042,"45883","","Ronhill-3581_thumb.jpg",130,195,1);var galleries=new Object();galleries[167800]=new gallery(167800,"4242829","Weddings","gallery",[5159543,5159638,5159641,5159643,5159652,5159646,5159649,5159653,5160004,5160009,5160018,5160020,5160117,5160125,5160127,5160130,4242829,4242847,4245679,4246064]);galleries[190394]=new gallery(190394,"4239863","Corporate","gallery",[4240208,4240026,4239863,4240147,3104694,3104690,3104712,3104726,4239915,5596237,5596244,5596245]);galleries[45882]=new gallery(45882,"5158979,598270","Manchester PR Photography","gallery",[5159021,598277,598278,598276,598282,598275,5594585,5594584,598270,5159107,5594583,5158979,5594992]);galleries[45884]=new gallery(45884,"5594958,5594946,3104614,702203,598286","Celebrities","gallery",[702203,3104614,611667,5594946,598286,3104845,5594947,611695,598323,598368,5594958]);galleries[45881]=new gallery(45881,"3512040","News","gallery",[597093,3512040,597092,3568228,695812,597094,597095,598370,3601203,5596239,5596240,5596243]);galleries[45885]=new gallery(45885,"2651881,2614881,2614368,2614362,2614358","Portraits","gallery",[598305,2651881,3104928,2651915,2614159,2614358,2614362,2614368,2614881,2649483,3104920]);galleries[45883]=new gallery(45883,"4238919,4238909,4238884","Sport","gallery",[598300,598301,598312,4238884,4238909,4238919,4239035,4239042]);var imageSets=new Object();imageSets[1]="5060279";imageSets[2]="5594958,5594946,5158979,4242829,4239863,4238919,4238909,4238884,3512040,3104614,2651881,2614881,2614368,2614362,2614358,702203,598286,598270";imageSets[3]="5596245,5596244,5596243,5596240,5596239,5596237,5594992,5594958,5594947,5594946,5594585,5594584,5594583,5160130,5160127,5160125,5160117,5160020,5160018,5160009,5160004,5159653,5159652,5159649,5159646,5159643,5159641,5159638,5159543,5159107,5159021,5158979,5060279,4246064,4245679,4242847,4242829,4240208,4240147,4240026,4239915,4239863,4239042,4239035,4238919,4238909,4238884,3601203,3568228,3512040";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/paulburrows/images";break}switch(a){case 1:b="http://www1.clikpic.com/paulburrows/images";break}switch(a){case 2:b="http://admin.clikpic.com/paulburrows/images";break}switch(a){case 24:b="http://tpc15/clikpic/paulburrows/images";break}switch(a){case 4:b="http://www.clikchurch.com/paulburrows/images";break}switch(a){case 5:b="http://www2.clikpic.com/paulburrows/images";break}switch(a){case 22:b="http://tpc5/clikpic/paulburrows/images";break}switch(a){case 23:b="http://tpc10/clikpic/paulburrows/images";break}switch(a){case 25:b="http://tpc16/clikpic/paulburrows/images";break}switch(a){case 15:b="http://www3.clikpic.com/paulburrows/images";break}switch(a){case 18:b="http://www4.clikpic.com/paulburrows/images";break}switch(a){case 19:b="http://www5.clikpic.com/paulburrows/images";break}switch(a){case 31:b="http://www7.clikpic.com/paulburrows/images";break}switch(a){case 32:b="http://admin2.clikpic.com/paulburrows/images";break}switch(a){case 33:b="http://www8.clikpic.com/paulburrows/images";break}switch(a){case 34:b="http://www9.clikpic.com/paulburrows/images";break}switch(a){case 35:b="http://admin3.clikpic.com/paulburrows/images";break}switch(a){case 37:b="http://admin4.clikpic.com/paulburrows/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="Paul Burrows Photographer Manchester: "+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(b,a){imageID=randomListVal(galleries[b].featured_images);if(imageID!=0){a.src=thumbnails[imageID].src;a.width=thumbnails[imageID].width;a.height=thumbnails[imageID].height}}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+'")'})}}};