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[563976]=new thumbnail(563976,"","","Nick_1_thumb.jpg",130,159,1);thumbnails[457687]=new thumbnail(457687,"36201","Polonium<br>\r\n96x128cm (2010)","Polonium_thumb.jpg",130,170,1);thumbnails[457689]=new thumbnail(457689,"36201","Quilt<br>\r\n75x75cm (2010)","Quilt_Art_Hurts_thumb.jpg",130,132,1);thumbnails[457698]=new thumbnail(457698,"36201","Show Business<br>\r\n78x78cm (2010)<br>\r\n","Show_Business_thumb.jpg",130,132,1);thumbnails[457757]=new thumbnail(457757,"36201","Half and Half (2010) 100x110cm","Half_and_Half_thumb.jpg",130,145,1);thumbnails[457770]=new thumbnail(457770,"36201","Tecopa Hot Srings<br>\r\n95x110cm (2010)","Tecopa_Hot_Springs_819ED66C-1EC9-D45B-1C39A9D72C4CF0FC_thumb.jpg",130,150,1);thumbnails[459852]=new thumbnail(459852,"36201","Signature Piece<br>\r\n60x80cm (2010)","Signature_Piece_thumb.jpg",130,173,1);thumbnails[916066]=new thumbnail(916066,"36201","Isadore Ducasse<br>\r\n66x87cm (2010) ","Isadore_Ducasse_thumb.jpg",130,168,1);thumbnails[916074]=new thumbnail(916074,"36201","Gift<br>\r\n68x80cm (2010)","Vanitas_Group_thumb.jpg",130,151,1);thumbnails[2803312]=new thumbnail(2803312,"36201","Henderson the Rain-King<br>\r\n110x120cm (2010)","Henderson_the_Rain_King_thumb.jpg",130,138,1);thumbnails[2803314]=new thumbnail(2803314,"36201","The Blue Afternoon<br>\r\n92x92cm (2010)","The_Blue_Afternoon_thumb.jpg",130,126,1);thumbnails[2803336]=new thumbnail(2803336,"36201","Totem<br>\r\n94x160cm (2010)","Totem_1_thumb.jpg",130,221,1);thumbnails[5818608]=new thumbnail(5818608,"36201","Drawing from Life<br>\r\n110x110cm (2010)","Drawing_From_Life_thumb.jpg",130,131,1);thumbnails[5818612]=new thumbnail(5818612,"36201","Who Killed Cock Robin?<br>\r\n95x125cm (2010)","Who_Killed_Cock_Robin_thumb.jpg",130,167,1);thumbnails[457644]=new thumbnail(457644,"36201","Blue Poles 75x75cm (2009)","Blue_Poles_thumb.jpg",130,131,1);thumbnails[457748]=new thumbnail(457748,"36201","Twelve New Songs 95x95cm (2009)","Twelve_New_Songs_thumb.jpg",130,131,1);thumbnails[916061]=new thumbnail(916061,"36201","Extra Time 157x157cm (2009)","Extra_Time_thumb.jpg",130,132,1);thumbnails[2803322]=new thumbnail(2803322,"36201","In Bad Company<br>\r\n75x75cm (2009)","In_Bad_Company_thumb.jpg",130,130,1);thumbnails[2803324]=new thumbnail(2803324,"36201","The Sorceress of Majipoor<br>\r\n75x75cm (2009)","The_Sorceress_of_Majipoor_thumb.jpg",130,131,1);thumbnails[2803328]=new thumbnail(2803328,"36201","Karaoke<br>\r\n92x124cm (2009)<br>\r\n<br>\r\n","Karaoke_thumb.jpg",130,173,1);thumbnails[5818604]=new thumbnail(5818604,"36201","Seconds<br>\r\n78x95cm (2009)","Seconds_thumb.jpg",130,145,1);thumbnails[457769]=new thumbnail(457769,"36201","Prospero's Island 92x92cm (2008) ","Prosperos_Island_thumb.jpg",130,130,1);thumbnails[2803310]=new thumbnail(2803310,"36201","Fountain 90x117cm (2009)","Fountain_thumb.jpg",130,168,1);thumbnails[2803311]=new thumbnail(2803311,"36201","Mirrorball<br>\r\n60x60cm (2008)","Mirrorball_thumb.jpg",130,134,1);thumbnails[2803313]=new thumbnail(2803313,"36201","Echo Chamber<br>\r\n152x152cm (2008)","Echo Chamber_thumb.jpg",130,131,1);thumbnails[2803325]=new thumbnail(2803325,"36201","Treasure Island<br>\r\n80x100cm (2008)","Treasure Island_thumb.jpg",130,159,1);thumbnails[2803326]=new thumbnail(2803326,"36201","Help Me Somebody 56x62cm (2008)","Help Me Somebody5_thumb.jpg",130,142,1);thumbnails[457758]=new thumbnail(457758,"36201","Goldfish<br>\r\n90x125cm (2008)","Goldfish_thumb.jpg",130,185,1);thumbnails[916037]=new thumbnail(916037,"36201","A Gardener's Alphabet (2)<br>\r\n50x55cm (2007)","Gardener's Alphabet (2)_thumb.jpg",130,145,1);thumbnails[457690]=new thumbnail(457690,"36201","Study for Chimpanzee<br>\r\n52x58cm (2007)","Study for Chimpanzee_thumb.jpg",130,146,1);thumbnails[457756]=new thumbnail(457756,"36201","Straw Dog<br>\r\n95x95cm (2007)<br>\r\n","Straw Dog_thumb.jpg",130,130,1);thumbnails[1315949]=new thumbnail(1315949,"36201","Untitled 1979 105x125cm (2007)","Destroyed1_thumb.jpg",130,158,1);thumbnails[1315957]=new thumbnail(1315957,"36201","Berlin Horse 110x125cm (2007)","Berlin Horse_thumb.jpg",130,116,1);thumbnails[916078]=new thumbnail(916078,"36201","The Day The Earth Stood Still<br>\r\n91x91cm (2007)","The Day The Earth Stood Still_thumb.jpg",130,130,1);thumbnails[916082]=new thumbnail(916082,"36201","Vox Pop<br>\r\n92x123cm (2007)","Vox Pop1_thumb.jpg",130,174,1);thumbnails[457699]=new thumbnail(457699,"36201","The Kitchenmaid<br>\r\n96x125cm (2006)","The Kitchenmaid_thumb.jpg",130,169,1);thumbnails[916042]=new thumbnail(916042,"36201","In A Gadda Da Vida<br>\r\n75x75cm (2006)","In A Gadda Da Vida_thumb.jpg",130,133,1);thumbnails[457742]=new thumbnail(457742,"36201","Girls and Boys<br>\r\n75x75cm (2005)","Girls_and_Boys_75x75cm_250_thumb.jpg",130,130,1);thumbnails[457750]=new thumbnail(457750,"36201","Comedies & Proverbs<br>\r\n110x125cm (2005)<br>\r\n","Comedies and Proverbs_thumb.jpg",130,149,1);thumbnails[457754]=new thumbnail(457754,"36201","Critical Interventions (Evil)<br>\r\n92x92cm (2005)","Critical Interventions (Evil)_thumb.jpg",130,130,1);thumbnails[457768]=new thumbnail(457768,"36201","Solaris<br>\r\n110x125cm (2005)","Solaris_thumb.jpg",130,142,1);thumbnails[458173]=new thumbnail(458173,"36201","Shangri-La<br>\r\n95x125cm (2005)","Shangri-La_thumb.jpg",130,171,1);thumbnails[459844]=new thumbnail(459844,"36201","Pod People<br>\r\n85x118cm (2005)","Pod People_thumb.jpg",130,182,1);thumbnails[456918]=new thumbnail(456918,"36201","Examining Pictures <br>\r\n95x125cm (2004)","Examining Pictures_thumb.jpg",130,173,1);thumbnails[457646]=new thumbnail(457646,"36201","Lost in Translation<br>\r\n97x127cm (2004)","Lost in Translation_thumb.jpg",130,168,1);thumbnails[457740]=new thumbnail(457740,"36201","Alreet<br>\r\n97x127cm (2004)","Alreet_thumb.jpg",130,172,1);thumbnails[457760]=new thumbnail(457760,"36201","Let's Get Away from it All 125x90cm (2004)","Let's get away from it all_thumb.jpg",130,96,1);thumbnails[916087]=new thumbnail(916087,"36201","In The Beginning<br>\r\n95x155cm (2003)","In the Beginning_thumb.jpg",130,215,1);thumbnails[457771]=new thumbnail(457771,"36201","Minotaur<br>\r\n90x120cm (2003)","Minotaur (1) _thumb.jpg",130,170,1);thumbnails[456831]=new thumbnail(456831,"36201","Abstraction <br>\r\n95x125cm (2003)","Abstraction_thumb.jpg",130,174,1);thumbnails[2803331]=new thumbnail(2803331,"36224","Hide and Seek<br>\r\n55x57cm (2009)","Hide__Seek_thumb.jpg",130,136,1);thumbnails[5818637]=new thumbnail(5818637,"36224","Cheating at Canasta<br>\r\n45x80cm (2009)","Cheating_at_Canasta_thumb.jpg",130,232,1);thumbnails[5818651]=new thumbnail(5818651,"36224","Man and Boy<br>\r\n45x65cm (2009)","Man_and_Bpy_thumb.jpg",130,243,1);thumbnails[5818654]=new thumbnail(5818654,"36224","Jordan Belson<br>\r\n41x67cm (2009)","Jordan_Belson_thumb.jpg",130,214,1);thumbnails[457631]=new thumbnail(457631,"36224","Hitchcock's Curtain 51x88cm (2007)","Hitchcock's Curtain_thumb.jpg",130,229,1);thumbnails[1315952]=new thumbnail(1315952,"36224","I Fall In Love, 71x33cm (2007)","I Fall in Love_thumb.jpg",130,58,1);thumbnails[1315980]=new thumbnail(1315980,"36224","Cider with Rosie (4) 40x65cm (2007)","Cider with Rosie (4)_thumb.jpg",130,217,1);thumbnails[457949]=new thumbnail(457949,"36224","Tribal Art 2<br>\r\n42x90cm (2005)","Tribal Art (2)_thumb.jpg",130,316,1);thumbnails[457635]=new thumbnail(457635,"36224","Up to Picasso 46x120cm (2004)","Up to Picasso_thumb.jpg",130,336,1);thumbnails[457683]=new thumbnail(457683,"36224","A3 30x42cm (2004)","A3_thumb.jpg",130,155,1);var galleries=new Object();galleries[36201]=new gallery(36201,"2803336","Paintings","gallery",[457687,457689,457698,457757,457770,459852,916066,916074,2803312,2803314,2803336,5818608,5818612,457644,457748,916061,2803322,2803324,2803328,5818604,457769,2803310,2803311,2803313,2803325,2803326,457758,916037,457690,457756,1315949,1315957,916078,916082,457699,916042,457742,457750,457754,457768,458173,459844,456918,457646,457740,457760,916087,457771,456831]);galleries[36224]=new gallery(36224,"5818654","Constructions","gallery",[2803331,5818637,5818651,5818654,457631,1315952,1315980,457949,457635,457683]);var imageSets=new Object();imageSets[1]="457757";imageSets[2]="5818654,2803336";imageSets[3]="5818651,5818637,5818612,5818608,5818604,2803336,2803326,2803322,2803310,916061,457769,457757,457748,457683,457644,457635,457631";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/nickholmes/images";break}switch(a){case 1:b="http://www1.clikpic.com/nickholmes/images";break}switch(a){case 2:b="http://admin.clikpic.com/nickholmes/images";break}switch(a){case 24:b="http://tpc15/clikpic/nickholmes/images";break}switch(a){case 4:b="http://www.clikchurch.com/nickholmes/images";break}switch(a){case 5:b="http://www2.clikpic.com/nickholmes/images";break}switch(a){case 22:b="http://tpc5/clikpic/nickholmes/images";break}switch(a){case 23:b="http://tpc10/clikpic/nickholmes/images";break}switch(a){case 25:b="http://tpc16/clikpic/nickholmes/images";break}switch(a){case 15:b="http://www3.clikpic.com/nickholmes/images";break}switch(a){case 18:b="http://www4.clikpic.com/nickholmes/images";break}switch(a){case 19:b="http://www5.clikpic.com/nickholmes/images";break}switch(a){case 31:b="http://www7.clikpic.com/nickholmes/images";break}switch(a){case 32:b="http://admin2.clikpic.com/nickholmes/images";break}switch(a){case 33:b="http://www8.clikpic.com/nickholmes/images";break}switch(a){case 34:b="http://www9.clikpic.com/nickholmes/images";break}switch(a){case 35:b="http://admin3.clikpic.com/nickholmes/images";break}switch(a){case 37:b="http://admin4.clikpic.com/nickholmes/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="'+escape(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="Nick Holmes Art: "+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>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+(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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="helen@helendholmes.demon.co.uk">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="helen@helendholmes.demon.co.uk">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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+'")'})}}};