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[2246544]=new thumbnail(2246544,"","Miami 2008 (yellow art deco hotel) ","Miami-yellow-hotel-front-20_thumb.jpg",130,187,18);thumbnails[2246546]=new thumbnail(2246546,"","Miami 2008 (yellow and pink art deco hotels)","Miami-yellow-and-pink-hotel_thumb.jpg",130,188,18);thumbnails[2246548]=new thumbnail(2246548,"","Miami 2008 (pink art deco hotel with palm)","Miami-pink-hotel-with-palm-_thumb.jpg",130,186,18);thumbnails[2191625]=new thumbnail(2191625,"","Fireworks, Florida 2005","Fireworks-Florida-2005_thumb.jpg",130,173,18);thumbnails[2235834]=new thumbnail(2235834,"","Florida Diner 2005","Florida-Diner-2005_thumb.jpg",130,185,18);thumbnails[2235837]=new thumbnail(2235837,"","D'Orsay Museum, Paris 2007","d'Orsay-2007_thumb.jpg",130,195,18);thumbnails[2235840]=new thumbnail(2235840,"","D'Orsay Museum Clock, Paris 2007","d'Orsay-Clock-close-up-2007_thumb.jpg",130,195,18);thumbnails[2235842]=new thumbnail(2235842,"","Eiffel Tower Shadow, Paris 2007","Eiffel-Shadow-BW-2007_thumb.jpg",130,190,18);thumbnails[1491286]=new thumbnail(1491286,"","Pantheon, Rome 2007<br>\r\n<br>\r\n","Pantheon-Rome-2007_thumb.jpg",130,195,18);thumbnails[1587996]=new thumbnail(1587996,"","Flat Iron Building, New York 2004","Flat-Iron-Building-2004-cop_thumb.jpg",130,191,18);thumbnails[2235817]=new thumbnail(2235817,"","Portland 2006","Phone-Box-Portland-BW-and-R_thumb.jpg",130,195,18);thumbnails[2250457]=new thumbnail(2250457,"","Munich Towers 2007","Munich-towers-2006_thumb.jpg",130,195,18);thumbnails[1588025]=new thumbnail(1588025,"","Langkawi Island","Langkawi-Circle_thumb.jpg",130,163,18);thumbnails[2191552]=new thumbnail(2191552,"","Langkawi Island - detail","Langkawi-Circle-detail_thumb.jpg",130,162,18);thumbnails[4741298]=new thumbnail(4741298,"27937","It Took an Ecological Catastrophe to Allow Mammals to Become the Dominant Group","It-Took-an-Ecological-Catas_thumb.gif",130,180,18);thumbnails[4741286]=new thumbnail(4741286,"27937","Land of 1,000 Dances","Land-of-1000-Dances_thumb.gif",130,109,18);thumbnails[4741284]=new thumbnail(4741284,"27937","Ayres Road","Ayres-Road_thumb.gif",130,130,18);thumbnails[3483065]=new thumbnail(3483065,"27937","Whilst Thinking of Leaving","Whilst-Thinking-of-Leaving_thumb.gif",130,130,18);thumbnails[3483066]=new thumbnail(3483066,"27937","Whilst Thinking of Leaving - detail","Whilst-Thinking-of-Leaving-_thumb.gif",130,87,18);thumbnails[3483099]=new thumbnail(3483099,"27937","At the Twisted Wheel","At-the-Twisted-Wheel_thumb.gif",130,130,18);thumbnails[3483105]=new thumbnail(3483105,"27937","At the Twisted Wheel - detail","At-the-Twisted-Wheel-detail_thumb.gif",130,89,18);thumbnails[1003046]=new thumbnail(1003046,"27937","Barcelona I<br>\r\n<br>\r\n","Barcelona-I_thumb.jpg",130,130,18);thumbnails[1003047]=new thumbnail(1003047,"27937","Barcelona II","Barcelona-II_thumb.jpg",130,130,18);thumbnails[1005722]=new thumbnail(1005722,"27937","Barcelona II - detail","Barcelona-II-detail_thumb.jpg",130,87,18);thumbnails[334823]=new thumbnail(334823,"27937","Castaway","Blue-Planet_thumb.jpg",130,130,18);thumbnails[5007472]=new thumbnail(5007472,"27937","Painting No. 2 (of a 3-part process)","Painting-no2_thumb.gif",130,130,18);thumbnails[3483051]=new thumbnail(3483051,"28076","Soothe Me","Soothe-Me_thumb.gif",130,130,18);thumbnails[3248155]=new thumbnail(3248155,"28076","Soothe Me (detail)<br>\r\n<br>\r\n","Soothe-Me-detail_thumb.gif",130,87,18);thumbnails[334814]=new thumbnail(334814,"28076","Axe","Axe_thumb.jpg",130,187,18);thumbnails[334874]=new thumbnail(334874,"28076","Belladonna","Belladonna_thumb.jpg",130,129,18);thumbnails[1003095]=new thumbnail(1003095,"28076","Decker","Decker_thumb.jpg",130,127,18);thumbnails[334883]=new thumbnail(334883,"28076","Bethlem I","Friends-of-Bedlam_thumb.jpg",130,130,18);thumbnails[335155]=new thumbnail(335155,"28076","Green Poles","Green-Poles_thumb.jpg",130,130,18);thumbnails[336031]=new thumbnail(336031,"28076","Helmet","Helmet_thumb.jpg",130,130,18);thumbnails[336047]=new thumbnail(336047,"28076","Hold Position","Hubble-I_thumb.jpg",130,131,18);thumbnails[6429930]=new thumbnail(6429930,"28076","Ghosts","Ghosts_thumb.gif",130,57,18);thumbnails[3483179]=new thumbnail(3483179,"28158","Belvedere","Belvedere_thumb.gif",130,130,18);thumbnails[3483182]=new thumbnail(3483182,"28158","Belvedere - detail","Belvedere-detail_thumb.gif",130,94,18);thumbnails[2191635]=new thumbnail(2191635,"28158","Liberty Ships","Liberty-Ships_thumb.jpg",130,130,18);thumbnails[2751198]=new thumbnail(2751198,"28158","Englantis","Englantis_thumb.jpg",130,130,18);thumbnails[2751202]=new thumbnail(2751202,"28158","Englantis (detail)","Englantis-Detail_thumb.jpg",130,87,18);thumbnails[2584444]=new thumbnail(2584444,"28158","Contact","Contact_thumb.jpg",130,130,18);thumbnails[1005744]=new thumbnail(1005744,"28158","Core II","Core-II_thumb.gif",130,128,18);thumbnails[336077]=new thumbnail(336077,"28158","SoHo Moon","Soho-Moon_thumb.jpg",130,130,18);thumbnails[336061]=new thumbnail(336061,"28158","When Will You","London-Bridge_thumb.jpg",130,129,18);thumbnails[3483198]=new thumbnail(3483198,"28162","Enough Already","Enough-Already_thumb.jpg",130,130,18);thumbnails[3483204]=new thumbnail(3483204,"28162","Exus Trek","Exus-Trek_thumb.jpg",130,130,18);thumbnails[1001106]=new thumbnail(1001106,"28162","Closer","Closer_thumb.jpg",130,112,18);thumbnails[1003257]=new thumbnail(1003257,"28162","Tectonic","Tectonic_thumb.jpg",130,130,18);thumbnails[520611]=new thumbnail(520611,"28162","I Don't Wish to Worry You<br>\r\n<br>\r\n","I-Dont-Wish-to-Worry-You_thumb.gif",130,129,18);thumbnails[1000996]=new thumbnail(1000996,"28162","Approach III","Approach III_thumb.jpg",130,131,18);thumbnails[1005732]=new thumbnail(1005732,"28162","Approach III - detail","Approach-III-detail_thumb.gif",130,87,18);thumbnails[1005787]=new thumbnail(1005787,"28162","Brook Benton","Brook-Benton_thumb.jpg",130,130,18);thumbnails[1005791]=new thumbnail(1005791,"28162","Brook Benton - detail","Brook-Benton-detail_thumb.jpg",130,122,18);thumbnails[3483221]=new thumbnail(3483221,"75206","Touchy Feely","Touchy-Feely_thumb.jpg",130,130,18);thumbnails[334821]=new thumbnail(334821,"75206","Birdsong","Birdsong_thumb.jpg",130,131,18);thumbnails[334870]=new thumbnail(334870,"75206","Echo II","Deep-Blue_thumb.jpg",130,127,18);thumbnails[336074]=new thumbnail(336074,"75206","Core","Core_thumb.jpg",130,128,18);thumbnails[336136]=new thumbnail(336136,"75206","Sunken Cathedral","Sunken-Cathedral_thumb.jpg",130,129,18);thumbnails[337141]=new thumbnail(337141,"75206","Blink","Night-Lights_thumb.jpg",130,130,18);thumbnails[1003259]=new thumbnail(1003259,"75206","Quiet Earth","Quiet-Earth_thumb.jpg",130,130,18);thumbnails[1005753]=new thumbnail(1005753,"75206","Quiet Earth - detail","Quiet-Earth-detail_thumb.jpg",130,87,18);thumbnails[1003263]=new thumbnail(1003263,"75206","Quiet Earth and Core","Quiet-Earth-and-Core---Inst_thumb.jpg",130,87,18);thumbnails[3483225]=new thumbnail(3483225,"75348","Louise","Louise_thumb.jpg",130,55,18);thumbnails[3483229]=new thumbnail(3483229,"75348","Louise - detail","Louise-detail_thumb.jpg",130,87,18);thumbnails[1003256]=new thumbnail(1003256,"75348","Hubble III","Hubble-III1_thumb.jpg",130,130,18);thumbnails[1003265]=new thumbnail(1003265,"75348","Discobolos","Roman_thumb.jpg",130,131,18);thumbnails[1005845]=new thumbnail(1005845,"75348","Mercator IV","Mercator-IV_thumb.jpg",130,130,18);thumbnails[1005754]=new thumbnail(1005754,"75348","Approach V","Approach-V_thumb.jpg",130,130,18);thumbnails[1202855]=new thumbnail(1202855,"75348","Hubble IV","Hubble-IV_thumb.jpg",130,130,18);thumbnails[1202862]=new thumbnail(1202862,"75348","Hubble V","Hubble-V_thumb.jpg",130,130,18);thumbnails[2162178]=new thumbnail(2162178,"75348","Lagoon","Lagoon_thumb.jpg",130,130,18);thumbnails[3483238]=new thumbnail(3483238,"75358","Mercator II","Mercator-II_thumb.jpg",130,130,18);thumbnails[1005806]=new thumbnail(1005806,"75358","Lookout","Lookout_thumb.jpg",130,131,18);thumbnails[1087276]=new thumbnail(1087276,"75358","Looking at the Stars II","Looking-at-the-Stars-II_thumb.jpg",130,130,18);thumbnails[1087351]=new thumbnail(1087351,"75358","Looking at the Stars II - detail","Looking-at-the-Stars-II-Det_thumb.jpg",130,98,18);thumbnails[1005767]=new thumbnail(1005767,"75358","Looking at the Stars I","Looking-at-the-Stars_thumb.jpg",130,129,18);thumbnails[1005770]=new thumbnail(1005770,"75358","Looking at the Stars I - detail","Looking-at-the-Stars-detail_thumb.jpg",130,87,18);thumbnails[1202874]=new thumbnail(1202874,"75358","Tectonic II","Tectonic-II_thumb.jpg",130,130,18);thumbnails[1202877]=new thumbnail(1202877,"75358","Untitled - Bronze and Black","Untitled-bronze-and-black_thumb.jpg",130,130,18);thumbnails[1005737]=new thumbnail(1005737,"75358","Blackdraft I","Blackdraft-1_thumb.jpg",130,131,18);thumbnails[3483284]=new thumbnail(3483284,"86273","Walls Come Tumbling Down","Walls-Come-Tumbing-Down_thumb.gif",130,130,18);thumbnails[3483289]=new thumbnail(3483289,"86273","Walls Come Tumbling Down - detail","Walls-Come-Tumbing-Down-det_thumb.gif",130,87,18);thumbnails[1001148]=new thumbnail(1001148,"86273","Credo","Credo_thumb.jpg",130,68,18);thumbnails[1001171]=new thumbnail(1001171,"86273","Credo II","Credo II_thumb.jpg",130,61,18);thumbnails[1202835]=new thumbnail(1202835,"86273","Don't You Ever Wonder How Things Might Have Turned Out?","Don't-You-Ever-Wonder_thumb.jpg",130,88,18);thumbnails[1288813]=new thumbnail(1288813,"86273","Pantheon I","Pantheon-I_thumb.jpg",130,130,18);thumbnails[1296343]=new thumbnail(1296343,"86273","Pantheon II","Pantheon-II_thumb.jpg",130,92,18);thumbnails[1296347]=new thumbnail(1296347,"86273","Pantheon III","Pantheon-IIIL_thumb.jpg",130,93,18);thumbnails[1296349]=new thumbnail(1296349,"86273","Pantheon III","Pantheon-IIIP_thumb.jpg",130,182,18);thumbnails[1202844]=new thumbnail(1202844,"86273","Move On Up","Move-On-Up_thumb.jpg",130,93,18);thumbnails[2207933]=new thumbnail(2207933,"86273","Monicker","Monicker-2008_thumb.jpg",130,129,18);thumbnails[3483500]=new thumbnail(3483500,"212995","Pantalaimon","Pantalaimon_thumb.jpg",130,130,18);thumbnails[3483607]=new thumbnail(3483607,"212995","The Long Dark Tea Time of the Soul","The-Long-Dark-Tea-Time-of-t_thumb.jpg",130,130,18);thumbnails[334882]=new thumbnail(334882,"212995","First One","First-One_thumb.jpg",130,136,18);thumbnails[334868]=new thumbnail(334868,"212995","Ruby<br>\r\n","Crab-Hubble_thumb.jpg",130,130,18);thumbnails[335154]=new thumbnail(335154,"212995","Pterodactyl","Green-on-Pink_thumb.jpg",130,130,18);thumbnails[1003101]=new thumbnail(1003101,"212995","I Don't Wish to Worry You II","I-Dont-Wish-to-Worry-You-I_thumb.gif",130,129,18);thumbnails[1003267]=new thumbnail(1003267,"212995","Oi","Oi_thumb.jpg",130,129,18);thumbnails[6516539]=new thumbnail(6516539,"212995","Life on Mars","Life-on-Mars_thumb.gif",130,129,18);thumbnails[1001017]=new thumbnail(1001017,"212995","Goldfinger","Goldfinger_thumb.jpg",130,130,18);thumbnails[3755342]=new thumbnail(3755342,"229173","Palimpsest","Palimpsest_thumb.gif",130,130,18);thumbnails[3755350]=new thumbnail(3755350,"229173","Palimpsest - detail","Palimpsest-detail_thumb.gif",130,87,18);thumbnails[334827]=new thumbnail(334827,"229173","Bronze and White II","Bronze-and-White-II_thumb.jpg",130,131,18);thumbnails[5661014]=new thumbnail(5661014,"229173","Scan<br>\r\n<br>\r\n","scan_thumb.gif",130,131,18);thumbnails[5105637]=new thumbnail(5105637,"229173","Chimera","Chimera_thumb.gif",130,130,18);thumbnails[5105656]=new thumbnail(5105656,"229173","Roobop<br>\r\n","Roobop_thumb.gif",130,130,18);thumbnails[5105670]=new thumbnail(5105670,"229173","Roobop (detail)","Roobop-detail_thumb.gif",130,87,18);thumbnails[6067408]=new thumbnail(6067408,"229173","Technical Pleasure","Technical-Pleasure_thumb.gif",130,130,18);thumbnails[6081905]=new thumbnail(6081905,"229173","Fire in the Holed","Fire-in-the-Holed_thumb.gif",130,97,18);thumbnails[6197199]=new thumbnail(6197199,"229173","Death of Chatterton","Death-of-Chatterton-1998-co_thumb.gif",130,104,18);thumbnails[5934490]=new thumbnail(5934490,"229173","Flareride 1","Flareride-1_thumb.gif",130,129,18);thumbnails[3755363]=new thumbnail(3755363,"229173","Birdsong II","Birdsong-II_thumb.gif",130,122,18);var galleries=new Object();galleries[27937]=new gallery(27937,"3483065","Gallery 1","gallery",[4741298,4741286,4741284,3483065,3483066,3483099,3483105,1003046,1003047,1005722,334823,5007472]);galleries[28076]=new gallery(28076,"6429930","Gallery 2","gallery",[3483051,3248155,334814,334874,1003095,334883,335155,336031,336047,6429930]);galleries[28158]=new gallery(28158,"3483182,3483179","Gallery 3","gallery",[3483179,3483182,2191635,2751198,2751202,2584444,1005744,336077,336061]);galleries[28162]=new gallery(28162,"3483198,1003257","Gallery 4","gallery",[3483198,3483204,1001106,1003257,520611,1000996,1005732,1005787,1005791]);galleries[75206]=new gallery(75206,"3483221,336074","Gallery 5","gallery",[3483221,334821,334870,336074,336136,337141,1003259,1005753,1003263]);galleries[75348]=new gallery(75348,"3483229,3483225,1202855","Gallery 6","gallery",[3483225,3483229,1003256,1003265,1005845,1005754,1202855,1202862,2162178]);galleries[75358]=new gallery(75358,"3483238","Gallery 7","gallery",[3483238,1005806,1087276,1087351,1005767,1005770,1202874,1202877,1005737]);galleries[86273]=new gallery(86273,"3483289,3483284","Gallery 8","gallery",[3483284,3483289,1001148,1001171,1202835,1288813,1296343,1296347,1296349,1202844,2207933]);galleries[212995]=new gallery(212995,"3483607,3483500,1001017","Gallery 9","gallery",[3483500,3483607,334882,334868,335154,1003101,1003267,6516539,1001017]);galleries[229173]=new gallery(229173,"6081905","Gallery 10","gallery",[3755342,3755350,334827,5661014,5105637,5105656,5105670,6067408,6081905,6197199,5934490,3755363]);var imageSets=new Object();imageSets[1]="6516539,6429930,5934490,3483179,3483099,3483065,3483051";imageSets[2]="6429930,6081905,3483607,3483500,3483289,3483284,3483238,3483229,3483225,3483221,3483198,3483182,3483179,3483065,2191625,1202855,1003257,1001017,336074";imageSets[3]="6516539,6429930,6197199,6081905,6067408,5934490,5661014,5105670,5105656,5105637,5007472,4741298,4741286,4741284,3755363,3755350,3755342,3483607,3483500,3483289,3483284,3483238,3483229,3483225,3483221,3483204,3483198,3483182,3483179,3483105,3483099,3483066,3483065,3483051,3248155,2751202,2751198,2584444,2250457,2246548,2246546,2246544,2235842,2235840,2235837,2235834,2235817,2207933,2191635,2191625";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/steveart/images";break}switch(a){case 1:b="http://www1.clikpic.com/steveart/images";break}switch(a){case 2:b="http://admin.clikpic.com/steveart/images";break}switch(a){case 24:b="http://tpc15/clikpic/steveart/images";break}switch(a){case 4:b="http://www.clikchurch.com/steveart/images";break}switch(a){case 5:b="http://www2.clikpic.com/steveart/images";break}switch(a){case 22:b="http://tpc5/clikpic/steveart/images";break}switch(a){case 23:b="http://tpc10/clikpic/steveart/images";break}switch(a){case 25:b="http://tpc16/clikpic/steveart/images";break}switch(a){case 15:b="http://www3.clikpic.com/steveart/images";break}switch(a){case 18:b="http://www4.clikpic.com/steveart/images";break}switch(a){case 19:b="http://www5.clikpic.com/steveart/images";break}switch(a){case 31:b="http://www7.clikpic.com/steveart/images";break}switch(a){case 32:b="http://admin2.clikpic.com/steveart/images";break}switch(a){case 33:b="http://www8.clikpic.com/steveart/images";break}switch(a){case 34:b="http://www9.clikpic.com/steveart/images";break}switch(a){case 35:b="http://admin3.clikpic.com/steveart/images";break}switch(a){case 37:b="http://admin4.clikpic.com/steveart/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="Stephen Riley 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>"}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> 				&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="stephenriley8@hotmail.com">';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="stephenriley8@hotmail.com">';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+'")'})}}};