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[4046823]=new thumbnail(4046823,"243769","Baskerville House","24_thumb.jpg",130,87,32);thumbnails[4053057]=new thumbnail(4053057,"243937","325-ops-black","325-ops-black_thumb.gif",130,32,32);thumbnails[4804690]=new thumbnail(4804690,"275382","Derby Hospital Exhibition","August_2009_086Publication_thumb.jpg",130,98,32);thumbnails[4053058]=new thumbnail(4053058,"243937","box-216","box-216_thumb.jpg",130,205,32);thumbnails[4804691]=new thumbnail(4804691,"275382","Derby Hospital Exhibition","August_2009_091Publication_thumb.jpg",130,98,32);thumbnails[4804693]=new thumbnail(4804693,"275382","Derby Hospital Exhibition","August_2009_093Publication_thumb.jpg",130,173,32);thumbnails[4912443]=new thumbnail(4912443,"279830","In the Shadows 1","image1Publication_thumb.jpg",130,131,32);thumbnails[4804694]=new thumbnail(4804694,"275382","Derby Hospital Exhibition","August_2009_094Publication_thumb.jpg",130,98,32);thumbnails[4912444]=new thumbnail(4912444,"279830","In the Shadows 2","Image2Publication_thumb.jpg",130,129,32);thumbnails[4912445]=new thumbnail(4912445,"279830","In the Shadows 3","Image3Publication_thumb.jpg",130,134,32);thumbnails[4912446]=new thumbnail(4912446,"279830","In the Shadows 4","Image4Publication_thumb.jpg",130,130,32);thumbnails[4912447]=new thumbnail(4912447,"279830","In the Shadows 5","Image5Publication_thumb.jpg",130,130,32);thumbnails[4912448]=new thumbnail(4912448,"279830","In the Shadows 6","Image6Publication_thumb.jpg",130,132,32);thumbnails[4912449]=new thumbnail(4912449,"279830","In the Shadows 7","Image7Publication_thumb.jpg",130,135,32);thumbnails[4912450]=new thumbnail(4912450,"279830","In the Shadows 8","Image8Publication_thumb.jpg",130,134,32);thumbnails[4912451]=new thumbnail(4912451,"279830","In the Shadows 9","Image9Publication_thumb.jpg",130,131,32);thumbnails[4912440]=new thumbnail(4912440,"279830","In te Shadows 10","Image10Publication_thumb.jpg",130,134,32);thumbnails[4066584]=new thumbnail(4066584,"192852","Cold and Warm at the same time 9","Derby_Exhibition_079Publication_thumb.jpg",130,125,32);thumbnails[3145137]=new thumbnail(3145137,"192852","Cold and warm at the same time 1 (92cmx184cm) Acrylic and Oil on canvas<br>\r\n<br>\r\nSOLD","Cold and warm at the same time 1 (92cmx184cm) Acrylic and Oil on canvas_thumb.jpg",130,63,32);thumbnails[3570011]=new thumbnail(3570011,"192852","Cold and warm at the same time 3","Cold_and_warm_at_the_same_time_3_92cmx92cm_Acrylic_and_Oil_on_Linen_thumb.jpg",130,131,32);thumbnails[3570012]=new thumbnail(3570012,"192852","Cold and warm at the same time 4 ","Cold_and_warm_at_the_same_time_4_92cmx92cm_Acrylic_and_Oil_on_Canvas_thumb.jpg",130,128,32);thumbnails[3145141]=new thumbnail(3145141,"192852","Cold and warm at the same time 2 (92cmx184cm) Acrylic and Oil on Linen","Cold and warm at the same time 2 (92cmx184cm) Acrylic and Oil on Linen_thumb.jpg",130,65,32);thumbnails[3570013]=new thumbnail(3570013,"192852","Cold and warm at the same time 5 ","Cold_and_warm_at_the_same_time_5_92cmx92cm_Acrylic_and_Oil_on_Canvas_thumb.jpg",130,129,32);thumbnails[3570014]=new thumbnail(3570014,"192852","Cold and warm at the same time 6 ","Cold_and_warm_at_the_same_time_6_92cmx92cm_Acrylic_and_Oil_on_Canvas_thumb.jpg",130,126,32);thumbnails[1989321]=new thumbnail(1989321,"133539","Remembered landscape 1","Remebered Landscape 1_thumb.jpg",130,60,32);thumbnails[1989335]=new thumbnail(1989335,"133539","Remembered landscape 2","11thFeb2008 008b_thumb.jpg",130,58,32);thumbnails[1989403]=new thumbnail(1989403,"133539","Remembered Landscape 3","11thFeb2008 012b_thumb.jpg",130,59,32);thumbnails[1990124]=new thumbnail(1990124,"133539","Remembered Landscape 4","11thFeb2008 016b_thumb.jpg",130,62,32);thumbnails[1990130]=new thumbnail(1990130,"133539","Remembered Landscape 5","11thFeb2008 019b_thumb.jpg",130,58,32);thumbnails[1990138]=new thumbnail(1990138,"133539","Remembered Landscape 6","11thFeb2008 026b_thumb.jpg",130,58,32);thumbnails[1990143]=new thumbnail(1990143,"133539","Remembered Landscape 7","11thFeb2008 028b2_thumb.jpg",130,60,32);thumbnails[2020068]=new thumbnail(2020068,"133539","Remembered landscape 8","11thFeb2008 032b_thumb.jpg",130,59,32);thumbnails[2020070]=new thumbnail(2020070,"133539","Remembered landscape 10","12thFeb2008 011b_thumb.jpg",130,57,32);thumbnails[2020071]=new thumbnail(2020071,"133539","Remembered landscape 11","12thFeb2008 018b_thumb.jpg",130,60,32);thumbnails[2020072]=new thumbnail(2020072,"133539","Remembered landscape 12","13thFeb2008 009b_thumb.jpg",130,59,32);thumbnails[2020074]=new thumbnail(2020074,"133539","Remembered landscape 14","13thFeb2008 021b_thumb.jpg",130,57,32);thumbnails[2020075]=new thumbnail(2020075,"133539","Remembered landscape 15","13thFeb2008 025b_thumb.jpg",130,61,32);thumbnails[2020076]=new thumbnail(2020076,"133539","Remembered landscape 16","15thFeb2008 002b_thumb.jpg",130,60,32);thumbnails[2020077]=new thumbnail(2020077,"133539","Remembered landscape 17","15thFeb2008 004b_thumb.jpg",130,63,32);thumbnails[2020078]=new thumbnail(2020078,"133539","Remembered landscape 18","15thFeb2008 006b_thumb.jpg",130,59,32);thumbnails[2020079]=new thumbnail(2020079,"133539","Remembered landscape 19","15thFeb2008 007b_thumb.jpg",130,63,32);thumbnails[2020080]=new thumbnail(2020080,"133539","Remembered landscape 20","15thFeb2008 014b_thumb.jpg",130,57,32);thumbnails[2020081]=new thumbnail(2020081,"133539","Remembered landscape 21","15thFeb2008 020b_thumb.jpg",130,57,32);thumbnails[2020082]=new thumbnail(2020082,"133539","Remembered landscape 22","15thFeb2008 021b_thumb.jpg",130,60,32);thumbnails[2020084]=new thumbnail(2020084,"133539","Remembered landscape 24","15thFeb2008 028b_thumb.jpg",130,58,32);thumbnails[2020085]=new thumbnail(2020085,"133539","Remembered landscape 25","15thFeb2008 032b_thumb.jpg",130,58,32);thumbnails[2020086]=new thumbnail(2020086,"133539","Remembered landscape 26","15thFeb2008 037b_thumb.jpg",130,62,32);thumbnails[2020088]=new thumbnail(2020088,"133539","Remembered landscape 28","15thFeb2008 066b_thumb.jpg",130,58,32);thumbnails[2020090]=new thumbnail(2020090,"133539","Remembered landscape 30","15thFeb2008 069b_thumb.jpg",130,61,32);thumbnails[2020092]=new thumbnail(2020092,"133539","Remembered landscape 32","15thFeb2008 080b_thumb.jpg",130,63,32);thumbnails[2020093]=new thumbnail(2020093,"133539","Remembered landscape 33","painting1_thumb.jpg",130,62,32);thumbnails[2020094]=new thumbnail(2020094,"133539","Remembered landscape 34","painting2_thumb.jpg",130,60,32);thumbnails[2117355]=new thumbnail(2117355,"133539","Remembered Landscape 35","Remebered Landscape 35_thumb.jpg",130,63,32);thumbnails[2117357]=new thumbnail(2117357,"133539","Remembered Landscape 37","Remebered Landscape 37_thumb.jpg",130,60,32);thumbnails[2117358]=new thumbnail(2117358,"133539","Remembered Landscape 38","Remebered Landscape 38_thumb.jpg",130,62,32);thumbnails[2117361]=new thumbnail(2117361,"133539","Remembered Landscape 41","Remebered Landscape 41_thumb.jpg",130,63,32);thumbnails[2117362]=new thumbnail(2117362,"133539","Remembered Landscape 42","Remebered Landscape 42_thumb.jpg",130,59,32);thumbnails[2117367]=new thumbnail(2117367,"133539","Remembered Landscape 47","Remebered Landscape 47_thumb.jpg",130,58,32);thumbnails[2117368]=new thumbnail(2117368,"133539","Remembered Landscape 48","Remebered Landscape 48_thumb.jpg",130,59,32);thumbnails[2117369]=new thumbnail(2117369,"133539","Remembered Landscape 49","Remebered Landscape 49_thumb.jpg",130,59,32);thumbnails[2117370]=new thumbnail(2117370,"133539","Remembered Landscape 50","Remebered Landscape 50_thumb.jpg",130,59,32);thumbnails[2237206]=new thumbnail(2237206,"133565","Remembered Landscape 201","No_thumb.11. Remembered Landscape 201.jpg",130,63,32);thumbnails[2237207]=new thumbnail(2237207,"133565","Remembered Landscape 202","No_thumb.12. Remembered Landscape 202.jpg",130,64,32);thumbnails[4066586]=new thumbnail(4066586,"244585","Buckland Hollow","P00007Publication_thumb.jpg",130,87,32);thumbnails[4066588]=new thumbnail(4066588,"244583","Slide 1","slide1Publication_thumb.jpg",130,45,32);thumbnails[4066589]=new thumbnail(4066589,"244583","Slide 2","slide13Publication_thumb.jpg",130,46,32);thumbnails[4066590]=new thumbnail(4066590,"244583","Slide 3","slide20Publication_thumb.jpg",130,41,32);thumbnails[4066591]=new thumbnail(4066591,"244583","Slide 4","slide25Publication_thumb.jpg",130,44,32);thumbnails[4066593]=new thumbnail(4066593,"244583","Slide 5","slide62Publication_thumb.jpg",130,45,32);thumbnails[4066574]=new thumbnail(4066574,"244586","Reflections 1","Derby_Exhibition_049Publication_thumb.jpg",130,132,32);thumbnails[4066576]=new thumbnail(4066576,"244586","Reflections 2","Derby_Exhibition_054Publication_thumb.jpg",130,128,32);thumbnails[5237827]=new thumbnail(5237827,"244586","New work 1","Dec_2009_007Publication1_thumb.jpg",130,127,32);thumbnails[5237831]=new thumbnail(5237831,"244586","Fading Light","Dec_2009_009Publication_thumb.jpg",130,129,32);thumbnails[5237834]=new thumbnail(5237834,"244586","All I see before me","Dec_2009_011Publication_thumb.jpg",130,131,32);thumbnails[5237837]=new thumbnail(5237837,"244586","Through golden trees and hills","Dec_2009_012Publication_thumb.jpg",130,129,32);thumbnails[5237840]=new thumbnail(5237840,"244586","Reflections at dusk","Dec_2009_015Publication_thumb.jpg",130,133,32);thumbnails[5237843]=new thumbnail(5237843,"244586","New Work 6","Dec_2009_016Publication_thumb.jpg",130,131,32);thumbnails[5237844]=new thumbnail(5237844,"244586","New Work 7","Dec_2009_019Publication_thumb.jpg",130,131,32);thumbnails[5237845]=new thumbnail(5237845,"244586","Approaching Storm","Dec_2009_021Publication_thumb.jpg",130,130,32);thumbnails[5237847]=new thumbnail(5237847,"244586","Over the tops","Dec_2009_024Publication_thumb.jpg",130,130,32);thumbnails[5237848]=new thumbnail(5237848,"244586","New Work 10","Dec_2009_026Publication_thumb.jpg",130,133,32);thumbnails[4912441]=new thumbnail(4912441,"244586","work in progress 1","Image11Publication_thumb.jpg",130,87,32);thumbnails[4912442]=new thumbnail(4912442,"244586","work in progress 2","Image12Publication_thumb.jpg",130,87,32);thumbnails[6358025]=new thumbnail(6358025,"176368","","rsz_paulnew1thumb_thumb.jpg",130,129,32);thumbnails[6358040]=new thumbnail(6358040,"176368","","rsz_paulnew2athumb_thumb.jpg",130,133,32);thumbnails[2827676]=new thumbnail(2827676,"176368","Studio 063c","Studio 063c_thumb.jpg",130,63,32);thumbnails[2827677]=new thumbnail(2827677,"176368","Studio 065c","Studio 065c_thumb.jpg",130,97,32);thumbnails[2827678]=new thumbnail(2827678,"176368","Studio 066c","Studio 066c_thumb.jpg",130,98,32);thumbnails[4066558]=new thumbnail(4066558,"133563","Ashby De-La Zouch Festival","Aug2008_023Publication_thumb.jpg",130,97,32);thumbnails[4066562]=new thumbnail(4066562,"133563","University of Derby","Derby_Exhibition_029Publication_thumb.jpg",130,97,32);thumbnails[4066564]=new thumbnail(4066564,"133563","University of Derby","Derby_Exhibition_030Publication_thumb.jpg",130,97,32);thumbnails[4066565]=new thumbnail(4066565,"133563","University of Derby","Derby_Exhibition_031Publication_thumb.jpg",130,97,32);thumbnails[4066566]=new thumbnail(4066566,"133563","","Derby_Exhibition_032Publication_thumb.jpg",130,97,32);thumbnails[4066569]=new thumbnail(4066569,"133563","","Derby_Exhibition_033Publication_thumb.jpg",130,97,32);thumbnails[4066572]=new thumbnail(4066572,"133563","","Derby_Exhibition_035Publication_thumb.jpg",130,97,32);thumbnails[4066585]=new thumbnail(4066585,"133563","Pride Art Gallery","hirst-4214Publication_thumb.jpg",130,90,32);thumbnails[4066594]=new thumbnail(4066594,"133563","Buxton Dome","Studio_657bPublication_thumb.jpg",130,100,32);thumbnails[4066597]=new thumbnail(4066597,"133563","Buxton Dome","Studio_663bPublication_thumb.jpg",130,97,32);thumbnails[4830149]=new thumbnail(4830149,"133563","OPS Osnabruck Germany","OPS_thumb.jpg",130,173,32);thumbnails[2261974]=new thumbnail(2261974,"133563","Final Show 067","Final Show 067_thumb.jpg",130,97,32);thumbnails[2271248]=new thumbnail(2271248,"133563","Final Show 003b","Final Show 003b_thumb.jpg",130,97,32);thumbnails[4291049]=new thumbnail(4291049,"133563","Baskerville House 1","3706681067_e518b3b537_msmall_thumb.jpg",130,86,32);thumbnails[2261973]=new thumbnail(2261973,"133563","Final Show 063","Final Show 063_thumb.jpg",130,97,32);thumbnails[4291050]=new thumbnail(4291050,"133563","Baskerville House 2","3706683181_9207b60e37_msmall_thumb.jpg",130,86,32);thumbnails[2261969]=new thumbnail(2261969,"133563","Final Show 010","Final Show 010_thumb.jpg",130,97,32);thumbnails[4291051]=new thumbnail(4291051,"133563","Baskerville House 3","3707475006_bbeeb4f9e9_msmall_thumb.jpg",130,86,32);thumbnails[4804692]=new thumbnail(4804692,"133563","Derby Hospital Exhibition","August_2009_092Publication_thumb.jpg",130,98,32);thumbnails[2261970]=new thumbnail(2261970,"133563","Final Show 011","Final Show 011_thumb.jpg",130,97,32);thumbnails[4291052]=new thumbnail(4291052,"133563","Baskerville House 4","3707485066_3bfd854eb6_msmall_thumb.jpg",130,82,32);thumbnails[2261971]=new thumbnail(2261971,"133563","Final Show 019","Final Show 019_thumb.jpg",130,97,32);thumbnails[4291053]=new thumbnail(4291053,"133563","Baskerville House 5","3707493616_7082db34ff_msmall_thumb.jpg",130,86,32);thumbnails[2261972]=new thumbnail(2261972,"133563","Final Show 020","Final Show 020_thumb.jpg",130,97,32);thumbnails[4291054]=new thumbnail(4291054,"133563","Baskerville House 6","3707494254_f2f686183a_msmall_thumb.jpg",130,86,32);thumbnails[4291055]=new thumbnail(4291055,"133563","Baskerville House 7","3707495192_30fb98aac4_msmall_thumb.jpg",130,83,32);var galleries=new Object();galleries[279830]=new gallery(279830,"4912451,4912450,4912449,4912448,4912447,4912446,4912445,4912444,4912443,4912440","In the Shadows","gallery",[4912443,4912444,4912445,4912446,4912447,4912448,4912449,4912450,4912451,4912440]);galleries[275382]=new gallery(275382,"4804694,4804693,4804691,4804690","News","section330917",[4804690,4804691,4804693,4804694]);galleries[243937]=new gallery(243937,"4053058,4053057","One Picture Show Osnabruck Germany","section296238",[4053057,4053058]);galleries[243769]=new gallery(243769,"4046823","Visual at Baskerville House 2009","section296048",[4046823]);galleries[192852]=new gallery(192852,"3570011,3145141,3145137","Cold and warm at the same time","gallery",[4066584,3145137,3570011,3570012,3145141,3570013,3570014]);galleries[133539]=new gallery(133539,"1990143","Remembered Landscape Series","gallery",[1989321,1989335,1989403,1990124,1990130,1990138,1990143,2020068,2020070,2020071,2020072,2020074,2020075,2020076,2020077,2020078,2020079,2020080,2020081,2020082,2020084,2020085,2020086,2020088,2020090,2020092,2020093,2020094,2117355,2117357,2117358,2117361,2117362,2117367,2117368,2117369,2117370]);galleries[133565]=new gallery(133565,"2237207,2237206","Remembered Large Landscape","gallery",[2237206,2237207]);galleries[244585]=new gallery(244585,"4066586","Prints","gallery",[4066586]);galleries[244583]=new gallery(244583,"4066593,4066591,4066590,4066589,4066588","Slide Landscapes","gallery",[4066588,4066589,4066590,4066591,4066593]);galleries[244586]=new gallery(244586,"5237848,5237847,5237845,5237844,5237843,5237840,5237837,5237834,5237831,5237827","Miscellaneous","gallery",[4066574,4066576,5237827,5237831,5237834,5237837,5237840,5237843,5237844,5237845,5237847,5237848,4912441,4912442]);galleries[176368]=new gallery(176368,"2827678,2827677,2827676","Work in Progress","gallery",[6358025,6358040,2827676,2827677,2827678]);galleries[133563]=new gallery(133563,"4830149,4804692,4291055,4291054,4291053,4291052,4291051,4291050,4291049,4066597","Recent Exhibitions","gallery",[4066558,4066562,4066564,4066565,4066566,4066569,4066572,4066585,4066594,4066597,4830149,2261974,2271248,4291049,2261973,4291050,2261969,4291051,4804692,2261970,4291052,2261971,4291053,2261972,4291054,4291055]);var imageSets=new Object();imageSets[1]="3145141,3145137,2271248,2261974,2261973,2261972,2261971,2261970,2261969,2020094,2020093,2020079,2020072,2020071,2020070,2020068,1990143,1990138,1990130,1990124,1989403,1989335";imageSets[2]="3570011,3145141,3145137,2827678,2827677,2827676,2237207,2237206,1990143";imageSets[3]="6358040,6358025,5237848,5237847,5237845,5237844,5237843,5237840,5237837,5237834,5237831,5237827,4912451,4912450,4912449,4912448,4912447,4912446,4912445,4912444,4912443,4912442,4912441,4912440,4830149,4804694,4804693,4804692,4804691,4804690,4291055,4291054,4291053,4291052,4291051,4291050,4291049,4066597,4066594,4066593,4066591,4066590,4066589,4066588,4066586,4066585,4066584,4066576,4066574,4066572";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/hirstpaul/images";break}switch(a){case 1:b="http://www1.clikpic.com/hirstpaul/images";break}switch(a){case 2:b="http://admin.clikpic.com/hirstpaul/images";break}switch(a){case 24:b="http://tpc15/clikpic/hirstpaul/images";break}switch(a){case 4:b="http://www.clikchurch.com/hirstpaul/images";break}switch(a){case 5:b="http://www2.clikpic.com/hirstpaul/images";break}switch(a){case 22:b="http://tpc5/clikpic/hirstpaul/images";break}switch(a){case 23:b="http://tpc10/clikpic/hirstpaul/images";break}switch(a){case 25:b="http://tpc16/clikpic/hirstpaul/images";break}switch(a){case 15:b="http://www3.clikpic.com/hirstpaul/images";break}switch(a){case 18:b="http://www4.clikpic.com/hirstpaul/images";break}switch(a){case 19:b="http://www5.clikpic.com/hirstpaul/images";break}switch(a){case 31:b="http://www7.clikpic.com/hirstpaul/images";break}switch(a){case 32:b="http://admin2.clikpic.com/hirstpaul/images";break}switch(a){case 33:b="http://www8.clikpic.com/hirstpaul/images";break}switch(a){case 34:b="http://www9.clikpic.com/hirstpaul/images";break}switch(a){case 35:b="http://admin3.clikpic.com/hirstpaul/images";break}switch(a){case 37:b="http://admin4.clikpic.com/hirstpaul/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="Paul Hirst 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>Artist </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="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="HIRSTPAUL">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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+'")'})}}};