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[6193135]=new thumbnail(6193135,"161538","Yellow Vase","IMG_0819_thumb.JPG",130,98,32);thumbnails[6193143]=new thumbnail(6193143,"161538","Still Life with Yellow Jug","IMG_0808_thumb.JPG",130,94,32);thumbnails[5792475]=new thumbnail(5792475,"161538","Spanish Afternoon","spain1_thumb.jpg",130,174,32);thumbnails[5787916]=new thumbnail(5787916,"161538","Image in Black","IMG_7845_thumb.jpg",130,179,32);thumbnails[5777252]=new thumbnail(5777252,"144559","Spring at at Last","IMG_7702_thumb.JPG",130,86,32);thumbnails[5777265]=new thumbnail(5777265,"144673","Camera Image","_MG_7711_thumb.jpg",130,195,32);thumbnails[5777273]=new thumbnail(5777273,"144673","Mirror Image","_MG_7716_thumb.jpg",130,98,32);thumbnails[5777276]=new thumbnail(5777276,"144673","Tornado Coming","_MG_7816_thumb.jpg",130,195,32);thumbnails[5803274]=new thumbnail(5803274,"144499","Reflections","_MG_7672_thumb.jpg",130,195,32);thumbnails[5792472]=new thumbnail(5792472,"161538","Falling Pots","red_thumb.jpg",130,180,32);thumbnails[5650004]=new thumbnail(5650004,"320087","Hawth Theatre, Crawley, UK.","IMG_7628_thumb.JPG",130,86,32);thumbnails[5650106]=new thumbnail(5650106,"320087","Foyer at the Hawth with Norman's artwork","IMG_7608_thumb.JPG",130,86,32);thumbnails[5650111]=new thumbnail(5650111,"320087","Artwork at the Hawth","IMG_7605_thumb.JPG",130,86,32);thumbnails[5650116]=new thumbnail(5650116,"320087","Artwork at the Hawth.","IMG_7609_thumb.JPG",130,86,32);thumbnails[5650185]=new thumbnail(5650185,"320087","Upstairs foyer at the Hawth.","IMG_7615_thumb.JPG",130,86,32);thumbnails[5650214]=new thumbnail(5650214,"320087","Upstairs at the Hawth","IMG_7620_thumb.JPG",130,86,32);thumbnails[5650215]=new thumbnail(5650215,"320087","At the Hawth.","IMG_7629_thumb.jpg",130,195,32);thumbnails[5654918]=new thumbnail(5654918,"320087","Hawth Exhibition","IMG_7623_thumb.JPG",130,86,32);thumbnails[5654936]=new thumbnail(5654936,"320087","Foyer at the Hawth Theatre with Norman's Art","IMG_7606_thumb.jpg",130,195,32);thumbnails[5654938]=new thumbnail(5654938,"320087","The Hawth Exhibition","IMG_7610_thumb.JPG",130,86,32);thumbnails[5654940]=new thumbnail(5654940,"320087","Crawley Hawth Exhibition","IMG_7626_thumb.JPG",130,86,32);thumbnails[5655075]=new thumbnail(5655075,"144559","Spring Flowers","redflowers_thumb.jpg",130,85,32);thumbnails[5488420]=new thumbnail(5488420,"161538","Flowers in a Vase","IMG_3158_thumb.jpg",130,258,32);thumbnails[5307477]=new thumbnail(5307477,"161538","Blue Vase with Fruit","IMG_0519_thumb.JPG",130,98,32);thumbnails[5197291]=new thumbnail(5197291,"161538","Lily the Dog","lily-the-dog_thumb.jpg",130,120,32);thumbnails[4897459]=new thumbnail(4897459,"144556","Jester","jestar_thumb.jpg",130,185,32);thumbnails[4881659]=new thumbnail(4881659,"144673","Meditation","meditation_thumb.jpg",130,194,32);thumbnails[4795551]=new thumbnail(4795551,"161538","The cry of nature","the-cry-of-nature_thumb.jpg",130,65,32);thumbnails[4857485]=new thumbnail(4857485,"144499","Seaside scene","normans-bay_thumb.jpg",130,173,32);thumbnails[4857502]=new thumbnail(4857502,"144499","Beached Boat","red-boat_thumb.jpg",130,110,32);thumbnails[5313390]=new thumbnail(5313390,"161538","French washing line","IMG_0532_thumb.JPG",130,98,32);thumbnails[5313396]=new thumbnail(5313396,"161538","French Cornfield","IMG_0530_edited-1_thumb.jpg",130,98,32);thumbnails[5313416]=new thumbnail(5313416,"161538","Bikes in a French Setting","IMG_0531_edited-1_thumb.jpg",130,92,32);thumbnails[5655037]=new thumbnail(5655037,"320087","Uckfield Art Trail jULY 2009","IMG_2846_thumb.jpg",130,121,32);thumbnails[5655089]=new thumbnail(5655089,"320087","Uckfield Art","art2_thumb.jpg",130,108,32);thumbnails[4867771]=new thumbnail(4867771,"144673","Blue boats","boats_thumb.jpg",130,87,32);thumbnails[4178951]=new thumbnail(4178951,"161538","Hill Town ","IMG_0254_thumb.JPG",130,98,32);thumbnails[3820801]=new thumbnail(3820801,"161538","The South Downs - SOLD","IMG_0255_thumb.JPG",130,98,32);thumbnails[4178954]=new thumbnail(4178954,"161538","Blue Vase with Flowers","IMG_0252_thumb.JPG",130,173,32);thumbnails[3810502]=new thumbnail(3810502,"161538","Rascals","IMG_0272_thumb.JPG",130,173,32);thumbnails[4178962]=new thumbnail(4178962,"161538","Hill Village in Blue","IMG_0257_thumb.JPG",130,173,32);thumbnails[4867759]=new thumbnail(4867759,"144556","Antwerp Scene","antwerp-statue_thumb.jpg",130,195,32);thumbnails[4178960]=new thumbnail(4178960,"161538","Jugs and Pears - SOLD","IMG_0251_thumb.JPG",130,173,32);thumbnails[3855178]=new thumbnail(3855178,"144673","Eastbourne Pier","pier-in-distence_thumb.jpg",130,87,32);thumbnails[4111305]=new thumbnail(4111305,"219019","Volcano in Clouds","volcano-1_thumb.jpg",130,82,32);thumbnails[3855186]=new thumbnail(3855186,"219019","","green-snake_thumb.jpg",130,64,32);thumbnails[3840685]=new thumbnail(3840685,"219019","Crocodile at leisure","croc_thumb.jpg",130,78,32);thumbnails[3840707]=new thumbnail(3840707,"219019","Crocodile away","croc1_thumb.jpg",130,80,32);thumbnails[3840783]=new thumbnail(3840783,"219019","No Swimming","no-swimming_thumb.jpg",130,173,32);thumbnails[3841755]=new thumbnail(3841755,"219019","Costa Trucker","trucker_thumb.jpg",130,189,32);thumbnails[3846465]=new thumbnail(3846465,"219019","Truckers","truck1_thumb.jpg",130,176,32);thumbnails[5803248]=new thumbnail(5803248,"219019","Costa Rican Coconuts","_Costa_Rican_Coconut_thumb.jpg",130,87,32);thumbnails[4741689]=new thumbnail(4741689,"219019","Costa Rican Flag","costa-flag_thumb.jpg",130,93,32);thumbnails[4870477]=new thumbnail(4870477,"219019","Tree Iguana","iggi_thumb.jpg",130,92,32);thumbnails[4881617]=new thumbnail(4881617,"219019","Costa Rican Rainbow.","costa-rainbow_thumb.jpg",130,87,32);thumbnails[4892969]=new thumbnail(4892969,"277700","Paris skyline","paris-bridgr_thumb.jpg",130,192,32);thumbnails[4870484]=new thumbnail(4870484,"277700","Blue Ice Gull.","ice-bird-2_thumb.jpg",130,92,32);thumbnails[4870486]=new thumbnail(4870486,"277700","Frozen Pond.","ice-birds_thumb.jpg",130,87,32);thumbnails[4893036]=new thumbnail(4893036,"148387","Pyramid & Fountain","louve-fountain_thumb.jpg",130,190,32);thumbnails[3039112]=new thumbnail(3039112,"144673","Walking Bird","bird-on-water_thumb.jpg",130,86,32);thumbnails[2208563]=new thumbnail(2208563,"144556","Three Jesters","three-jesters_thumb.jpg",130,92,32);thumbnails[3048019]=new thumbnail(3048019,"161538","Violets on Orange Background","IMG_02641_thumb.JPG",130,173,32);thumbnails[3048023]=new thumbnail(3048023,"144559","Violets on Orange Background","violets (1 of 1)1_thumb.jpg",130,91,32);thumbnails[3291334]=new thumbnail(3291334,"161538","Paper Roses","_MG_3389_thumb.JPG",130,86,32);thumbnails[3291350]=new thumbnail(3291350,"144556","Don't Touch","IMG_2328_thumb.JPG",130,173,32);thumbnails[2907295]=new thumbnail(2907295,"161538","Autumn Fruit","IMG_0281_thumb.JPG",130,173,32);thumbnails[3776838]=new thumbnail(3776838,"144673","Black Flags at Sea","black-flag_thumb.jpg",130,199,32);thumbnails[2794508]=new thumbnail(2794508,"148387","Sea Creatures","FISH KITES (1 of 1)_thumb.jpg",130,172,32);thumbnails[2794504]=new thumbnail(2794504,"148387","Geisha Kites","giesha-kites_thumb.jpg",130,86,32);thumbnails[2800178]=new thumbnail(2800178,"148387","Bottles in a Tent.","BOTTLES IN TENT (1 of 1)_thumb.jpg",130,156,32);thumbnails[3216776]=new thumbnail(3216776,"144673","Goldfish in Blue Water","fish copy_thumb.jpg",130,86,32);thumbnails[4897470]=new thumbnail(4897470,"277700","Poppies in tha French Alps.","poppy_thumb.jpg",130,77,32);thumbnails[4892990]=new thumbnail(4892990,"144559","French Pumpkins & Green Beans","pumpkin-1-of-1_thumb.jpg",130,112,32);thumbnails[2448080]=new thumbnail(2448080,"148387","The Sword Player","sword-player_thumb.jpg",130,161,32);thumbnails[2448623]=new thumbnail(2448623,"148387","Corn on the Floor","wagon-wheel_thumb.jpg",130,196,32);thumbnails[2728205]=new thumbnail(2728205,"148387","The Odd One","tomatoes_thumb.jpg",130,67,32);thumbnails[2728212]=new thumbnail(2728212,"148387","Carnations","Carnation_thumb.jpg",130,91,32);thumbnails[2488476]=new thumbnail(2488476,"148387","Blue Bottles","blue-bottles_thumb.jpg",130,188,32);thumbnails[2421015]=new thumbnail(2421015,"148387","Ochre Garages","garages_thumb.jpg",130,86,32);thumbnails[2443256]=new thumbnail(2443256,"148387","Hanging Cloth in the Barn","red-clothes_thumb.jpg",130,196,32);thumbnails[2443295]=new thumbnail(2443295,"148387","Yellow Dust","yellow-jars_thumb.jpg",130,72,32);thumbnails[2611639]=new thumbnail(2611639,"161538","Trees in Roussilon, France.","trees-in-roussillon1_thumb.jpg",130,100,32);thumbnails[2520889]=new thumbnail(2520889,"148387","Cogs","cogs-1_thumb.jpg",130,81,32);thumbnails[2260433]=new thumbnail(2260433,"144559","Yucca after Rain","black-yugga_thumb.jpg",130,87,32);thumbnails[2267024]=new thumbnail(2267024,"144559","Blue Flower in the Dark","blue-cornflower_thumb.jpg",130,87,32);thumbnails[2247282]=new thumbnail(2247282,"144559","Pepper Flower","red-petals_thumb.jpg",130,196,32);thumbnails[2247287]=new thumbnail(2247287,"144559","White Lily","white-lily_thumb.jpg",130,196,32);thumbnails[2240777]=new thumbnail(2240777,"144559","Flower in the Garden","WHITE-FLOWER_thumb.jpg",130,85,32);thumbnails[2183625]=new thumbnail(2183625,"144559","Seeds","Dandolion-1_thumb.jpg",130,108,32);thumbnails[2208395]=new thumbnail(2208395,"144673","Guitar Man","guitar-man_thumb.jpg",130,155,32);thumbnails[2237270]=new thumbnail(2237270,"144558","Spanish Hams","recent pictures (1 of 1)_thumb.jpg",130,84,32);thumbnails[2202929]=new thumbnail(2202929,"144559","Sunflower","Sunflower_thumb.JPG",130,98,32);thumbnails[2183684]=new thumbnail(2183684,"144560","Pop Man","yessy1_thumb.gif",130,207,32);thumbnails[2240797]=new thumbnail(2240797,"144499","Seven Sisters","IMG_0511_thumb.JPG",130,87,32);thumbnails[2202949]=new thumbnail(2202949,"144499","Cliffs with Lighthouse","seven srs 4_thumb.JPG",130,51,32);thumbnails[4893010]=new thumbnail(4893010,"144559","Woodland Walk","heathers-photo_edited-1_thumb.jpg",130,166,32);thumbnails[2202936]=new thumbnail(2202936,"144560","Man on Beach","norman-on-beach_thumb.gif",130,98,32);thumbnails[2208451]=new thumbnail(2208451,"144559","Red Lily by a Window","RED Lily_thumb.JPG",130,98,32);thumbnails[3291316]=new thumbnail(3291316,"161538","Ham","HAM (4 of 5)_thumb.jpg",130,84,32);thumbnails[2185613]=new thumbnail(2185613,"144559","Flowers","IMG_0277_thumb.JPG",130,173,32);thumbnails[3776851]=new thumbnail(3776851,"161538","Flowers & Candle Holders","IMG_0276_thumb.JPG",130,173,32);thumbnails[2183751]=new thumbnail(2183751,"144560","Butchers Landrover","jeep_edited-1_thumb.gif",130,85,32);thumbnails[2959113]=new thumbnail(2959113,"144673","Spanish White House","Spanish-white-house_thumb.jpg",130,98,32);thumbnails[2208420]=new thumbnail(2208420,"144556","Old Chair at Home","IMG_0409_thumb.JPG",130,174,32);thumbnails[3389046]=new thumbnail(3389046,"161538","Town by the Sea.","IMG_0279_thumb.JPG",130,173,32);thumbnails[2208487]=new thumbnail(2208487,"144559","Framed Coloured Pen Painting, Red Flowers Blue Vase on Yellow Cloth.","IMG_0275_thumb.JPG",130,173,32);thumbnails[2240782]=new thumbnail(2240782,"144673","Evening on the Beach","lazy evening_thumb.JPG",130,101,32);thumbnails[4893016]=new thumbnail(4893016,"144559","Black View","black-1_thumb.jpg",130,98,32);thumbnails[4178964]=new thumbnail(4178964,"161538","View from a Tent in France.","IMG_0271_thumb.JPG",130,173,32);thumbnails[2257441]=new thumbnail(2257441,"148387","Brittany Fishing Bouys","fishing bouys_thumb.jpg",130,169,32);thumbnails[2539234]=new thumbnail(2539234,"161538","Red Flowers Red Vase - Sold","IMG_0269_thumb.JPG",130,173,32);thumbnails[2247338]=new thumbnail(2247338,"144558","Jugs and Cup with Corkscrew","IMG_0278_thumb.JPG",130,98,32);thumbnails[2208497]=new thumbnail(2208497,"144559","Red Flowers in Red Vase","IMG_02691_thumb.JPG",130,173,32);thumbnails[2185608]=new thumbnail(2185608,"144673","Man on Deauville Beach","IMG_0845_thumb.JPG",130,98,32);thumbnails[2247342]=new thumbnail(2247342,"144673","Cornfield","burnt-corn_thumb.jpg",130,98,32);thumbnails[4178973]=new thumbnail(4178973,"161538","Still Life with a Yellow Pot","IMG_0250_thumb.JPG",130,173,32);thumbnails[4178970]=new thumbnail(4178970,"161538","Sunflowers","IMG_0249_thumb.JPG",130,173,32);thumbnails[4178966]=new thumbnail(4178966,"161538","Poppies in Vase","IMG_0248_thumb.JPG",130,173,32);thumbnails[2199988]=new thumbnail(2199988,"144499","Clump of Trees in the Ashdown Forest","red trees (Small)_thumb.jpg",130,93,32);thumbnails[2237262]=new thumbnail(2237262,"144673","Spanish Buskers","spanish (1 of 1)-4_thumb.jpg",130,173,32);thumbnails[5655086]=new thumbnail(5655086,"320087","Uckfield Art 2009","art_thumb.jpg",130,171,32);thumbnails[5699711]=new thumbnail(5699711,"144673","Green Pool","Green_Pool1_thumb.jpg",130,87,32);thumbnails[5803311]=new thumbnail(5803311,"144499","Green Pool","Green-Pool_thumb.jpg",130,87,32);var galleries=new Object();galleries[161538]=new gallery(161538,"2907295","Art","gallery",[6193135,6193143,5792475,5787916,5792472,5488420,5307477,5197291,4795551,5313390,5313396,5313416,4178951,3820801,4178954,3810502,4178962,4178960,3048019,3291334,2907295,2611639,3291316,3776851,3389046,4178964,2539234,4178973,4178970,4178966]);galleries[219019]=new gallery(219019,"5803248,4881617,4870477,4741689,4111305,3855186,3846465,3841755,3840783,3840707","Costa Rica","gallery",[4111305,3855186,3840685,3840707,3840783,3841755,3846465,5803248,4741689,4870477,4881617]);galleries[320087]=new gallery(320087,"5655089,5655086,5655037,5654940,5654938,5654936,5654918,5650215,5650214,5650185","Exhibitions","gallery",[5650004,5650106,5650111,5650116,5650185,5650214,5650215,5654918,5654936,5654938,5654940,5655037,5655089,5655086]);galleries[148387]=new gallery(148387,"4893036,2800178,2794508,2794504,2728212,2728205,2520889,2488476,2448623,2448080","French Scenes","gallery",[4893036,2794508,2794504,2800178,2448080,2448623,2728205,2728212,2488476,2421015,2443256,2443295,2520889,2257441]);galleries[144556]=new gallery(144556,"4897459,4867759,3291350,2208563,2208420","History","gallery",[4897459,4867759,2208563,3291350,2208420]);galleries[144499]=new gallery(144499,"5803311,5803274,4857502,4857485,2240797,2202949,2199988","Landscapes","gallery",[5803274,4857485,4857502,2240797,2202949,2199988,5803311]);galleries[144673]=new gallery(144673,"5777276,5777273,5777265,5699711,4881659,4867771,3855178,3776838,3216776,3039112","Leisure Time","gallery",[5777265,5777273,5777276,4881659,4867771,3855178,3039112,3776838,3216776,2208395,2959113,2240782,2185608,2247342,2237262,5699711]);galleries[144559]=new gallery(144559,"5777252,5655075,4893016,4893010,4892990,3048023,2267024,2260433,2247287,2247282","Plants & Flowers","gallery",[5777252,5655075,3048023,4892990,2260433,2267024,2247282,2247287,2240777,2183625,2202929,4893010,2208451,2185613,2208487,4893016,2208497]);galleries[144560]=new gallery(144560,"2202936,2183751,2183684","Pop Art","gallery",[2183684,2202936,2183751]);galleries[144558]=new gallery(144558,"2247338,2237270","Still Life","gallery",[2237270,2247338]);galleries[277700]=new gallery(277700,"4897470,4892969,4870486,4870484","TRAVEL","gallery",[4892969,4870484,4870486,4897470]);var imageSets=new Object();imageSets[1]="4178973,4178970,4178964,4178962,4178960,4178954,3048019,2907295,2488476";imageSets[2]="2907295";imageSets[3]="6193143,6193135,5803311,5803274,5803248,5792475,5792472,5787916,5777276,5777273,5777265,5777252,5699711,5655089,5655086,5655075,5655037,5654940,5654938,5654936,5654918,5650215,5650214,5650185,5650116,5650111,5650106,5650004,5488420,5313416,5313396,5313390,5307477,5197291,4897470,4897459,4893036,4893016,4893010,4892990,4892969,4881659,4881617,4870486,4870484,4870477,4867771,4867759,4857502,4857485";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/normanstarley/images";break}switch(a){case 1:b="http://www1.clikpic.com/normanstarley/images";break}switch(a){case 2:b="http://admin.clikpic.com/normanstarley/images";break}switch(a){case 24:b="http://tpc15/clikpic/normanstarley/images";break}switch(a){case 4:b="http://www.clikchurch.com/normanstarley/images";break}switch(a){case 5:b="http://www2.clikpic.com/normanstarley/images";break}switch(a){case 22:b="http://tpc5/clikpic/normanstarley/images";break}switch(a){case 23:b="http://tpc10/clikpic/normanstarley/images";break}switch(a){case 25:b="http://tpc16/clikpic/normanstarley/images";break}switch(a){case 15:b="http://www3.clikpic.com/normanstarley/images";break}switch(a){case 18:b="http://www4.clikpic.com/normanstarley/images";break}switch(a){case 19:b="http://www5.clikpic.com/normanstarley/images";break}switch(a){case 31:b="http://www7.clikpic.com/normanstarley/images";break}switch(a){case 32:b="http://admin2.clikpic.com/normanstarley/images";break}switch(a){case 33:b="http://www8.clikpic.com/normanstarley/images";break}switch(a){case 34:b="http://www9.clikpic.com/normanstarley/images";break}switch(a){case 35:b="http://admin3.clikpic.com/normanstarley/images";break}switch(a){case 37:b="http://admin4.clikpic.com/normanstarley/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="Norman Starley Art & Photography: "+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="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="NORMANSTARLEY">';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+'")'})}}};