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[4771095]=new thumbnail(4771095,"","...coming to a bookshop near you in 2010...","title-page-cp_thumb.jpg",130,130,1);thumbnails[4499875]=new thumbnail(4499875,"262137","Cats (poster)","clikpic-cat-poster_thumb.jpg",130,130,1);thumbnails[4771135]=new thumbnail(4771135,"153525","Velasquez Talks To Las Meninas","Velasquez-Talks-to-Las-Meninas-cp_thumb.jpg",130,130,1);thumbnails[1612575]=new thumbnail(1612575,"153525","A Day In The Life Of Picasso ","A-Day-In-The-Life-Of-Picasso-No_thumb.2.jpg",130,128,1);thumbnails[4499879]=new thumbnail(4499879,"262137","Dogs (poster)","clikpic-dog-poster_thumb.jpg",130,130,1);thumbnails[4499893]=new thumbnail(4499893,"262137","Cats (print on canvas)","clikpic-cat-canvas_thumb.jpg",130,129,1);thumbnails[4499895]=new thumbnail(4499895,"262137","Dogs (print on canvas)","clikpic-dog-canvas_thumb.jpg",130,130,1);thumbnails[2639115]=new thumbnail(2639115,"153525","Sean Scully Painting 'Wall of Light, Light'","Sean-Scully-small_thumb.jpg",130,81,1);thumbnails[2388314]=new thumbnail(2388314,"153525","A Day In The Life Of Rothko ","An-Afternon-With-Rothko-small_thumb.jpg",130,130,1);thumbnails[3837199]=new thumbnail(3837199,"153525","A Conversation With Matisse","Holly-Frean-A-Conversation-WIth-Matisse-oil-on-canvas-155-x-125cm-2008-AVAILABLEclikpicjpg_thumb.jpg",130,104,1);thumbnails[2639111]=new thumbnail(2639111,"153525","Hockney In His Studio ","Hockney-In-Front-Of-His-Studio-Wall-2-small_thumb.jpg",130,130,1);thumbnails[2639113]=new thumbnail(2639113,"153525","Lucien Freud Paints The Queen ","Lucien-Freud-Paints-The-Queen-small_thumb.jpg",130,130,1);thumbnails[3982377]=new thumbnail(3982377,"153525","A Day In The Life Of Picasso No.2","A-Day-in-the-Life-of-Picasso-small_thumb.jpg",130,130,1);thumbnails[4771128]=new thumbnail(4771128,"153525","A Day In The Life Of Leonardo da Vinci","A-Day-In-The-Life-Of-Leonardo-da-Vinci-No2-cp_thumb.jpg",130,130,1);thumbnails[4771133]=new thumbnail(4771133,"153525","A Day In The Life Of Edouard Vuillard","A-Day-In-The-Life-Of-Vuillard-cp_thumb.jpg",130,130,1);thumbnails[4771134]=new thumbnail(4771134,"153525","A Day In The Life Of Alfred Wallis","A-Day-In-The-Life-Of-Alfred-Wallis-cp_thumb.jpg",130,130,1);thumbnails[4359700]=new thumbnail(4359700,"153525","Leonardo Paints Mona Lisa","cl-Leonardo-Paints-The-Mona-Lisa-copy_thumb.jpg",130,88,1);thumbnails[4359704]=new thumbnail(4359704,"153525","Picasso Drawing","cl-Picasso-Drawing-copy_thumb.jpg",130,89,1);thumbnails[4359705]=new thumbnail(4359705,"153525","Pollock Begins a New Painting","cl-Pollock-Starts-A-New-Painting-copy_thumb.jpg",130,95,1);thumbnails[4771139]=new thumbnail(4771139,"153525","Rembrandt to Hockney (set of Russian dolls)","Rembrandt-Hockney-fronts-cp_thumb.jpg",130,98,1);thumbnails[4771141]=new thumbnail(4771141,"153525","Rembrandt to Hockney (set of Russian Dolls)","Rembrandt-Hockney-cp_thumb.jpg",130,98,1);thumbnails[2388313]=new thumbnail(2388313,"153535","Sixty Four Artists Painting Self Portraits ","64 Artists Painting Themselves_clikpic_thumb.jpg",130,130,1);thumbnails[1879599]=new thumbnail(1879599,"153535","Redhead ","Redhead-for-clikpik_thumb.jpg",112,130,1);thumbnails[1879315]=new thumbnail(1879315,"153535","To Chuck Close ","Chuck-Close-for-clikpik_thumb.jpg",129,130,1);thumbnails[1879321]=new thumbnail(1879321,"153535","Hommage to Hockney ","cp_HF_313_Hommage-to-Hockney41_thumb.jpg",130,130,1);thumbnails[2388312]=new thumbnail(2388312,"153535","A Crowd Of Artists ","A-Crowd-Of-Artists-clikpic_thumb.jpg",103,130,1);thumbnails[1387975]=new thumbnail(1387975,"153535","Nine Lives ","CP Nine-Lives_thumb.jpg",128,130,1);thumbnails[1387941]=new thumbnail(1387941,"153535","Twelve Old Masters ","CP 12 Old-Masters_thumb.jpg",130,129,1);thumbnails[1387917]=new thumbnail(1387917,"153535","Se Ipsum No.10 ","CP Se-Ipsum-10_thumb.jpg",116,130,1);thumbnails[1387940]=new thumbnail(1387940,"153535","Ninety Old Masters (Backviews) ","CP 90-Old-Masters(Backs)-11_thumb.06.jpg",114,130,1);thumbnails[1625950]=new thumbnail(1625950,"153535","Forty Nine Hats ","Turn-Around-2_thumb.jpg",124,130,1);thumbnails[1388142]=new thumbnail(1388142,"153535","The Goat and Tricycle ","Goat+Tricycle_thumb.jpg",130,107,1);thumbnails[4500010]=new thumbnail(4500010,"262138","'Grizzly Bear'","clik-grizzly_thumb.jpg",130,129,1);thumbnails[1388154]=new thumbnail(1388154,"153535","Picasso and the Donut Queen No.2","Wall-Study-No_thumb.3.jpg",130,116,1);thumbnails[4500024]=new thumbnail(4500024,"262138","'Hello Pig'","clik-pig_thumb.jpg",130,130,1);thumbnails[4500031]=new thumbnail(4500031,"262138","'Hello Polar Bear'","clik-polar_thumb.jpg",130,129,1);thumbnails[4499943]=new thumbnail(4499943,"262138","'Hello Dog'","clik-dog_thumb.jpg",130,130,1);thumbnails[4500037]=new thumbnail(4500037,"262138","'Hello Rhino'","clik-rhino_thumb.jpg",130,129,1);thumbnails[4500040]=new thumbnail(4500040,"262138","'Hello Mouse'","clik-mouse_thumb.jpg",130,129,1);thumbnails[4500046]=new thumbnail(4500046,"262138","'Hello Panda'","clik-panda_thumb.jpg",130,129,1);thumbnails[4500049]=new thumbnail(4500049,"262138","'Hello Sheep'","clik-sheep_thumb.jpg",130,129,1);thumbnails[2991750]=new thumbnail(2991750,"301224","Get Ready catalogue","catalogue-cover-small_thumb.jpg",130,130,1);thumbnails[2482280]=new thumbnail(2482280,"96497","Jasper 1999","Jasper clikpic_thumb.jpg",96,130,1);thumbnails[1879577]=new thumbnail(1879577,"96497","Tony 2008 ","Tony-Rickaby-for-clikpik_thumb.jpg",123,130,1);thumbnails[1879439]=new thumbnail(1879439,"96497","the Randells 2008","Randell's-clikpic_thumb.jpg",129,130,1);thumbnails[2275395]=new thumbnail(2275395,"96497","Employees of the Month ","Holly-Frean-'examples-of-Employee-of-the-Month-portraits'-oil-on-board-each-approx_thumb.-10-x-10-cm-SMALL.jpg",130,124,1);thumbnails[3436167]=new thumbnail(3436167,"96497","Roger 2006","Roger-Watson-small_thumb.jpg",130,130,1);thumbnails[3436169]=new thumbnail(3436169,"96497","Monty 1999","Monty-Praying-small_thumb.jpg",130,130,1);thumbnails[3436172]=new thumbnail(3436172,"96497","Chubb 2005","Chubb-small_thumb.jpg",130,130,1);thumbnails[4464108]=new thumbnail(4464108,"96497","Louis 2005","louis_portrait_clikpic_thumb.jpg",109,130,1);thumbnails[4464102]=new thumbnail(4464102,"96497","Valerie 2004","Valerie_Otte_clikpic_thumb.jpg",104,130,1);thumbnails[4464111]=new thumbnail(4464111,"96497","Gus 2006","clikpic-GusParker_thumb.jpg",130,93,1);thumbnails[4464113]=new thumbnail(4464113,"96497","Michael 2009","clikpicMichael-Handrick_thumb.jpg",130,99,1);thumbnails[4464115]=new thumbnail(4464115,"96497","Paul 2002","clikpic-PaulV01_thumb.jpg",98,130,1);thumbnails[4763296]=new thumbnail(4763296,"96497","Betty 2008","Betty-Jackson-cp_thumb.jpg",110,130,1);thumbnails[4763304]=new thumbnail(4763304,"96497","Jens 2007","Jens-cp_thumb.jpg",95,130,1);thumbnails[4763336]=new thumbnail(4763336,"96497","Juergen 2009","Juergen-cp_thumb.jpg",130,93,1);thumbnails[4763389]=new thumbnail(4763389,"96497","kate 2005","Kate-cp_thumb.jpg",105,130,1);thumbnails[4763398]=new thumbnail(4763398,"96497","linda 2006","lindaw_clikpic_thumb.jpg",102,130,1);thumbnails[1388130]=new thumbnail(1388130,"96496","Old Master Grid No.1","Old-Masters-Screenprint_thumb.jpg",104,130,1);thumbnails[1388131]=new thumbnail(1388131,"96496","Old Master Grid No.2","CP OM re+bl_thumb.jpg",104,130,1);thumbnails[3436219]=new thumbnail(3436219,"96496","Old Master Grid No.2 (detail)","detail_thumb.red-head-small.jpg",130,130,1);thumbnails[1388132]=new thumbnail(1388132,"96496","Old Master Grid No.3 ","CP OM wh+pi_thumb.jpg",104,130,1);thumbnails[1388109]=new thumbnail(1388109,"96496","Seventy Two Faces ","CP 72-Faces_thumb.jpg",119,130,1);thumbnails[3436187]=new thumbnail(3436187,"96496","Seventy Two Faces (detail)","72-Faces-detail2-clikpic_thumb.jpg",98,130,1);thumbnails[4359716]=new thumbnail(4359716,"96496","25 Rembrandts","cl-25-Rembrandts-HF-254_thumb.jpg",130,130,1);thumbnails[2991802]=new thumbnail(2991802,"184345","Get Ready featured in World of Interiors, October 2008 issue","WoI-coveroct-08_thumb.jpg",99,130,1);thumbnails[2991801]=new thumbnail(2991801,"184345","Get Ready featured in Exhibition Diary","WoI-listing_thumb.jpg",130,107,1);thumbnails[5349785]=new thumbnail(5349785,"184345","Get Ready catalogue","catalogue-cover-small_152FC5F8-1D09-001F-99811ED9BDB8C768_thumb.jpg",130,130,1);thumbnails[3982355]=new thumbnail(3982355,"206047","","holly-catalogue-pic-small2_thumb.jpg",98,130,1);var galleries=new Object();galleries[262137]=new gallery(262137,"4499875","posters + prints","section316259",[4499875,4499879,4499893,4499895]);galleries[153525]=new gallery(153525,"2388314","recent","gallery",[4771135,1612575,2639115,2388314,3837199,2639111,2639113,3982377,4771128,4771133,4771134,4359700,4359704,4359705,4771139,4771141]);galleries[153535]=new gallery(153535,"1387941","archive","gallery",[2388313,1879599,1879315,1879321,2388312,1387975,1387941,1387917,1387940,1625950,1388142,1388154]);galleries[262138]=new gallery(262138,"4500010","greetings cards","section316259",[4500010,4500024,4500031,4499943,4500037,4500040,4500046,4500049]);galleries[301224]=new gallery(301224,"2991750","books","section316259",[2991750]);galleries[96497]=new gallery(96497,"3436172","portraits","gallery",[2482280,1879577,1879439,2275395,3436167,3436169,3436172,4464108,4464102,4464111,4464113,4464115,4763296,4763304,4763336,4763389,4763398]);galleries[96496]=new gallery(96496,"4359716,3436219,3436187,1388132,1388131,1388130,1388109","prints + drawings","gallery",[1388130,1388131,3436219,1388132,1388109,3436187,4359716]);galleries[184345]=new gallery(184345,"5349785,2991802,2991801"," press 08","section228435",[2991802,2991801,5349785]);galleries[206047]=new gallery(206047,"3982355","  ","section228435",[3982355]);var imageSets=new Object();imageSets[1]="1879321";imageSets[2]="4771095,4500010,4499875,3436172,2991750,2388314,1387941";imageSets[3]="5349785,4771141,4771139,4771135,4771134,4771133,4771128,4771095,4763398,4763389,4763336,4763304,4763296,4500049,4500046,4500040,4500037,4500031,4500024,4500010,4499943,4499895,4499893,4499879,4499875,4464115,4464113,4464111,4464108,4464102,4359716,4359705,4359704,4359700,3982377,3982355,3837199,3436219,3436187,3436172,3436169,3436167,2991802,2991801,2991750,2639115,2639113,2639111,2482280,2388314";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/hollyfrean/images";break}switch(a){case 1:b="http://www1.clikpic.com/hollyfrean/images";break}switch(a){case 2:b="http://admin.clikpic.com/hollyfrean/images";break}switch(a){case 4:b="http://www.clikchurch.com/hollyfrean/images";break}switch(a){case 5:b="http://www2.clikpic.com/hollyfrean/images";break}switch(a){case 15:b="http://www3.clikpic.com/hollyfrean/images";break}switch(a){case 21:b="http://www6.clikpic.com/hollyfrean/images";break}switch(a){case 18:b="http://www4.clikpic.com/hollyfrean/images";break}switch(a){case 19:b="http://www5.clikpic.com/hollyfrean/images";break}switch(a){case 22:b="http://tpc5/clikpic/hollyfrean/images";break}switch(a){case 23:b="http://tpc10/clikpic/hollyfrean/images";break}switch(a){case 24:b="http://tpc15/clikpic/hollyfrean/images";break}switch(a){case 25:b="http://tpc16/clikpic/hollyfrean/images";break}switch(a){case 31:b="http://www7.clikpic.com/hollyfrean/images";break}switch(a){case 32:b="http://admin2.clikpic.com/hollyfrean/images";break}switch(a){case 33:b="http://www8.clikpic.com/hollyfrean/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="Holly Frean: "+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+'")'})}}};