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[534925]=new thumbnail(534925,"41536","A pint and a smoke, Golden Eagle, Peckham","APintandasmoke_thumb.jpg",130,146,15);thumbnails[534929]=new thumbnail(534929,"41536","Market Barrows, Green Dragon Court, Borough Market","BoroughMarket_thumb.jpg",130,148,15);thumbnails[534934]=new thumbnail(534934,"41536","Night Light - Canary Wharf","NightLights_thumb.jpg",130,163,15);thumbnails[546073]=new thumbnail(546073,"42307","Pyrenees - Marie Louise","MarieLouiseDonkey_thumb.jpg",130,108,15);thumbnails[546074]=new thumbnail(546074,"42307","Pyrenees - The Boules Players","TheBoulesPlayers_thumb.jpg",130,124,15);thumbnails[546077]=new thumbnail(546077,"42307","Pyrenees - Waiting for the Tour de France","WaitingforTourdeFrance_thumb.jpg",130,130,15);thumbnails[546084]=new thumbnail(546084,"42671","The Pyrenees Meadow","TheMeadow_thumb.jpg",130,91,15);thumbnails[546085]=new thumbnail(546085,"42671","Corn Light, Pyrenees","CornLight_thumb.jpg",130,186,15);thumbnails[546094]=new thumbnail(546094,"41536","The Thinker, Bridge House Tavern, Canning Town.","TheThinker_thumb.jpg",130,154,15);thumbnails[546095]=new thumbnail(546095,"41536","A quiet corner, Chelsea Flower Show","ChelseaFlowerShow_thumb.jpg",130,108,15);thumbnails[546115]=new thumbnail(546115,"42670","Light Moment No.1, A580, East Lancs Road, Liverpool","LightMomentNo1_thumb.jpg",130,92,15);thumbnails[546142]=new thumbnail(546142,"",'Exhibition poster - "Black & Light"',"Poster-for-GN-website_thumb.jpg",130,190,15);thumbnails[578160]=new thumbnail(578160,"42670","towards perception - river calling","image157_thumb.jpg",130,85,15);thumbnails[578161]=new thumbnail(578161,"42670","towards perception - river calling","image159_thumb.jpg",130,86,15);thumbnails[578183]=new thumbnail(578183,"42671","The Pyrenees meadow","image160_thumb.jpg",130,103,15);thumbnails[578186]=new thumbnail(578186,"42671","The Pyrenees meadow","image163_thumb.jpg",130,101,15);thumbnails[578187]=new thumbnail(578187,"42671","The Pyrenees meadow","image165_thumb.jpg",130,103,15);thumbnails[578188]=new thumbnail(578188,"42670","Kolkata Carnival, Millennium Park","image166_thumb.jpg",130,97,15);thumbnails[578193]=new thumbnail(578193,"45658","Evening breeze, Ganges riverside - Kolkata","image171_thumb.jpg",130,99,15);thumbnails[777204]=new thumbnail(777204,"42671","The Pyrenees Meadow","meadow_thumb.jpg",130,86,15);thumbnails[534715]=new thumbnail(534715,"41496","Beach scene - Anglesey","AngleseaBeachweb_thumb.jpg",130,198,15);thumbnails[534733]=new thumbnail(534733,"41496","The Road to the Ferry - Normandy","RoadtotheFerryweb_thumb.jpg",130,150,15);thumbnails[534784]=new thumbnail(534784,"41496","Sea scene - Ardnamurchan","ScotlandSeaCloudweb_thumb.jpg",130,131,15);thumbnails[534786]=new thumbnail(534786,"41496","Still waters - Ardnamurchan","Scotlandweb_thumb.jpg",130,129,15);thumbnails[534809]=new thumbnail(534809,"41496","Evening towards Skye","ViewtowardsSkyeweb2_thumb.jpg",130,129,15);thumbnails[534812]=new thumbnail(534812,"41521","Tabard Works - Down's medical instruments","hands_thumb.jpg",130,108,15);thumbnails[534816]=new thumbnail(534816,"41521","Pullen's Yards, Stephen Barber,<br>\r\nLutemaker","lutes_thumb.jpg",130,130,15);thumbnails[534828]=new thumbnail(534828,"41521","Pullen's Yards,<br>\r\nMr Horn - fan maker","MrHorn1980_thumb.jpg",130,129,15);thumbnails[534830]=new thumbnail(534830,"41521","Pullen's Yards, Mr Horn - fan maker","MrHorn1980outsideshop_thumb.jpg",130,131,15);thumbnails[534834]=new thumbnail(534834,"41521","Pullen's Yards,<br>\r\nMr Rutter - brush maker","MrRutterbrushmaker_thumb.jpg",130,130,15);thumbnails[534837]=new thumbnail(534837,"41521","Union Street,<br>\r\nThe Woods Family - hat makers","TheWoodsFamily_thumb.jpg",130,154,15);thumbnails[546081]=new thumbnail(546081,"41521","Flo","Flo_thumb.jpg",130,152,15);thumbnails[777200]=new thumbnail(777200,"41521","Made in Southwark - The printer","made in southwark 1_thumb.jpg",130,130,15);thumbnails[777201]=new thumbnail(777201,"41521","Made in Southwark - The Book","made in southwark 2_thumb.jpg",130,173,15);thumbnails[534794]=new thumbnail(534794,"41519","Shrimping, Les Salisbury, Furness Fish - Morecambe Bay, Cumbria","Borough-Market-cookbook-024_thumb.jpg",130,87,15);thumbnails[534797]=new thumbnail(534797,"41519","The Dexter, Northfield Farm, Rutland","Borough-Market-cookbook-036_thumb.jpg",130,128,15);thumbnails[534800]=new thumbnail(534800,"41519","Geese - The new brood, Seldom Seen Farm, Leicestershire","Borough-Market-cookbook-061_thumb.jpg",130,130,15);thumbnails[534801]=new thumbnail(534801,"41519","Dorothy - prototype Cumberland Pig, Sillfield farm, Cumbria","Borough-Market-cookbook-095_thumb.jpg",130,199,15);thumbnails[534802]=new thumbnail(534802,"41519","Lizzie Vines & The Matriarch, Wild Beef, Dartmoor, Devon","Borough-Market-cookbook-106_thumb.jpg",130,130,15);thumbnails[578191]=new thumbnail(578191,"41519","Farmer Sharp, Master Butcher, Borough Market","image169_thumb.jpg",130,130,15);thumbnails[578616]=new thumbnail(578616,"41519","Smoked eels with Michael Brown, Brown & Forest, Somerset","001_thumb.jpg",130,193,15);thumbnails[578617]=new thumbnail(578617,"41519","Ostriches - Gamston Wood Farm, Nottingham","BO9012~1_thumb.jpg",130,128,15);thumbnails[578638]=new thumbnail(578638,"41519","The Tamworth - Ginger Pig (& piglet), Grange farm, Levisham","BOA01A~1_thumb.jpg",130,130,15);thumbnails[578662]=new thumbnail(578662,"41519","Grange Farm, Levisham","BOA81E~1_thumb.jpg",130,102,15);thumbnails[578666]=new thumbnail(578666,"41519","Grange Farm, Levisham","BOB01A~1_thumb.jpg",130,140,15);thumbnails[578668]=new thumbnail(578668,"41519","Smoked Duck - Brown & Forest, Somerset","Borough-Market-cookbook-009_thumb.jpg",130,93,15);thumbnails[1705854]=new thumbnail(1705854,"41519","The Borough Market Cookbook cover","bmcover_thumb.jpg",130,178,15);thumbnails[534848]=new thumbnail(534848,"39182","Marais cafe","Pariscafewithsunsmoke_thumb.jpg",130,86,15);thumbnails[534851]=new thumbnail(534851,"39182","Inside Out","InsideOutsideviewsParis-_thumb.jpg",130,198,15);thumbnails[534912]=new thumbnail(534912,"39182","Crepe stall","CrepeStallParis_thumb.jpg",130,152,15);thumbnails[534961]=new thumbnail(534961,"39182","Love Tunnel","LoveTunnel_thumb.jpg",130,159,15);thumbnails[546079]=new thumbnail(546079,"39182","Dreamland - Euro Disney","Dreamland_thumb.jpg",130,170,15);thumbnails[578197]=new thumbnail(578197,"39182","Leg-up ","image156_thumb.jpg",130,155,15);thumbnails[534955]=new thumbnail(534955,"41541","Fish market trader","Kolkatafishmarkettrader_thumb.jpg",130,129,15);thumbnails[578143]=new thumbnail(578143,"41541","Fish market trader","image151_thumb.jpg",130,113,15);thumbnails[578192]=new thumbnail(578192,"41541","Fish market trader","image170_thumb.jpg",130,128,15);thumbnails[777197]=new thumbnail(777197,"41541","Fish Market Trader ","kolkata fish market1_thumb.jpg",130,171,15);thumbnails[777198]=new thumbnail(777198,"41541","Fish Market Trader","kolkata fish market2_thumb.jpg",130,128,15);thumbnails[534943]=new thumbnail(534943,"41537","The power & the glory","Powergloryweb_thumb.jpg",130,194,15);thumbnails[534952]=new thumbnail(534952,"41537","The Immersion in the Ganges","Immersionweb1_thumb.jpg",130,129,15);thumbnails[578157]=new thumbnail(578157,"41537","Ganesha & Laxmi","image154_thumb.jpg",130,88,15);thumbnails[578158]=new thumbnail(578158,"41537","Ganesha & Laxmi","image155_thumb.jpg",130,87,15);thumbnails[777193]=new thumbnail(777193,"41537","The Immersion - Judges Ghat","durga puga 1_thumb.jpg",130,98,15);thumbnails[777194]=new thumbnail(777194,"41537","The Immersion - Judges Ghat","durga puga 2_thumb.jpg",130,197,15);thumbnails[777195]=new thumbnail(777195,"41537","The Immersion - Judges Ghat","durga puga 3_thumb.jpg",130,194,15);thumbnails[777196]=new thumbnail(777196,"41537","The Para and the Glory","durga puga 4_thumb.jpg",130,197,15);thumbnails[534967]=new thumbnail(534967,"41542","Black Light - after Matisse","BlackLight_thumb.jpg",130,131,15);thumbnails[546105]=new thumbnail(546105,"41542","Heat and Light","HeatandLight_thumb.jpg",130,189,15);thumbnails[578144]=new thumbnail(578144,"41542","Tulips - after Kertesz","image152_thumb.jpg",130,200,15);thumbnails[578145]=new thumbnail(578145,"41542","The back garden","image153_thumb.jpg",130,129,15);thumbnails[578610]=new thumbnail(578610,"41542","The tug ","image172_thumb.jpg",130,188,15);thumbnails[777191]=new thumbnail(777191,"41542","Catalan Curve - Barcelona","Black and light1_thumb.jpg",130,165,15);thumbnails[806484]=new thumbnail(806484,"62515","Borough Market Cookbook: Meat & Fish","Borough Market cookbook_thumb.jpg",130,185,15);thumbnails[806485]=new thumbnail(806485,"62515","River Calling","river calling_thumb.jpg",130,92,15);thumbnails[806488]=new thumbnail(806488,"62515","Rivers of Meaning","rivers of meaning_thumb.jpg",130,93,15);thumbnails[806512]=new thumbnail(806512,"62515","Made in Southwark: a photographic celebration of the hand","made in southwark 21_thumb.jpg",130,173,15);thumbnails[806569]=new thumbnail(806569,"62519","Black & Light exhibition - Oct-Nov 2006","Poster-for-GN-website1_thumb.jpg",130,190,15);var galleries=new Object();galleries[42307]=new gallery(42307,"546077,546074,546073","France","gallery",[546073,546074,546077]);galleries[45658]=new gallery(45658,"578193","Kolkata","gallery",[578193]);galleries[41536]=new gallery(41536,"546095,546094,534934,534929,534925","London","gallery",[534925,534929,534934,546094,546095]);galleries[42670]=new gallery(42670,"578188,578161,578160,546115","Painting with Light","gallery",[546115,578160,578161,578188]);galleries[42671]=new gallery(42671,"777204,578187,578186,578183,546085,546084","The Meadow","gallery",[546084,546085,578183,578186,578187,777204]);galleries[41496]=new gallery(41496,"534809,534786,534784,534733,534715","Landscapes/seascapes","gallery",[534715,534733,534784,534786,534809]);galleries[41521]=new gallery(41521,"777201,777200,546081,534837,534834,534830,534828,534816,534812","Made in Southwark","gallery",[534812,534816,534828,534830,534834,534837,546081,777200,777201]);galleries[41519]=new gallery(41519,"1705854,578668,578666,578662,578638,578617,578616,578191,534802,534801","The Borough Market Cookbook","gallery",[534794,534797,534800,534801,534802,578191,578616,578617,578638,578662,578666,578668,1705854]);galleries[39182]=new gallery(39182,"578197,546079,534961,534912,534851,534848","Paris","gallery",[534848,534851,534912,534961,546079,578197]);galleries[41541]=new gallery(41541,"777198,777197,578192,578143,534955","Kolkata Markets","gallery",[534955,578143,578192,777197,777198]);galleries[41537]=new gallery(41537,"777196,777195,777194,777193,578158,578157,534952,534943","Durga Puja","gallery",[534943,534952,578157,578158,777193,777194,777195,777196]);galleries[41542]=new gallery(41542,"777191,578610,578145,578144,546105,534967","Black Light","gallery",[534967,546105,578144,578145,578610,777191]);galleries[62515]=new gallery(62515,"806512,806488,806485,806484","Publications","gallery",[806484,806485,806488,806512]);galleries[62519]=new gallery(62519,"806569","Previous exhibitions posters","gallery",[806569]);var imageSets=new Object();imageSets[1]="534809,534802";imageSets[3]="1705854,806569,806512,806488,806485,806484,777204,777201,777200,777198,777197,777196,777195,777194,777193,777191,578668,578666,578662,578638,578617,578616,578610,578197,578193,578192,578191,578188,578187,578186,578183,578161,578160,578158,578157,578145,578144,578143,546142,546115,546105,546095,546094,546085,546084,546081,546079,546077,546074,546073";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/georgen/images";break}switch(a){case 1:b="http://www1.clikpic.com/georgen/images";break}switch(a){case 2:b="http://admin.clikpic.com/georgen/images";break}switch(a){case 4:b="http://www.clikchurch.com/georgen/images";break}switch(a){case 5:b="http://www2.clikpic.com/georgen/images";break}switch(a){case 15:b="http://www3.clikpic.com/georgen/images";break}switch(a){case 21:b="http://www6.clikpic.com/georgen/images";break}switch(a){case 18:b="http://www4.clikpic.com/georgen/images";break}switch(a){case 19:b="http://www5.clikpic.com/georgen/images";break}switch(a){case 22:b="http://tpc5/clikpic/georgen/images";break}switch(a){case 23:b="http://tpc10/clikpic/georgen/images";break}switch(a){case 24:b="http://tpc15/clikpic/georgen/images";break}switch(a){case 25:b="http://tpc16/clikpic/georgen/images";break}switch(a){case 31:b="http://www7.clikpic.com/georgen/images";break}switch(a){case 32:b="http://admin2.clikpic.com/georgen/images";break}switch(a){case 33:b="http://www8.clikpic.com/georgen/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="George Nicholson 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;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+"</p>";var e=c.purchase_instruction;var d=c.item_price;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+'")'})}}};