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[3622560]=new thumbnail(3622560,"221619","Chokushi-Mon","Chokushi-Mon_thumb.jpg",130,130,32);thumbnails[3622964]=new thumbnail(3622964,"221619","Clouds over Kew Pagoda","clouds-over-kew-pagoda-bw_thumb.jpg",130,130,32);thumbnails[3622979]=new thumbnail(3622979,"221619","Clouds over the Temperate House","Clouds-over-the-Temperate-House_thumb.jpg",130,130,32);thumbnails[3623007]=new thumbnail(3623007,"221619","Clouds over the Palm House","clouds-over-the-palm-house_thumb.jpg",130,130,32);thumbnails[3622994]=new thumbnail(3622994,"221619","Kew Pagoda - Detail","kew-pagoda_thumb.jpg",130,130,32);thumbnails[3623022]=new thumbnail(3623022,"221619","Steps to the Treetop Walkway","Steps-to-the-Treetop-Walk_thumb.jpg",130,130,32);thumbnails[3623031]=new thumbnail(3623031,"221619","Treetop Walkway","Treetop-Walk_thumb.jpg",130,130,32);thumbnails[3813705]=new thumbnail(3813705,"221619","Sackler Crossing","Sackler-Crossing-II_thumb.jpg",130,130,32);thumbnails[3813709]=new thumbnail(3813709,"221619","Tulips","Tulips_thumb.jpg",130,130,32);thumbnails[3569972]=new thumbnail(3569972,"199464","Richmond Bridge","Richmond-Bridge_thumb.jpg",130,130,32);thumbnails[3968922]=new thumbnail(3968922,"199464","Classic View from Richmond Hill","View-from-Richmond-Hill-II_thumb.jpg",130,130,32);thumbnails[3896268]=new thumbnail(3896268,"199464","View from Richmond Hill","View-from-Richmond-Hill_thumb.jpg",130,130,32);thumbnails[3111523]=new thumbnail(3111523,"199464","Star & Garter, Misty Morning II","Star_&_Garter_Misty_Morning_II_thumb.jpg",130,130,32);thumbnails[3111529]=new thumbnail(3111529,"199464","Sunrise Behind Richmond","Sunrise-Behind-Richmond_thumb.jpg",130,130,32);thumbnails[3333012]=new thumbnail(3333012,"199464","Ghost Train","Ghost-Train-bw_thumb.jpg",130,130,32);thumbnails[3111504]=new thumbnail(3111504,"199464","Richmond Lock","Richmond-Lock-reprocessed_thumb.jpg",130,130,32);thumbnails[3111503]=new thumbnail(3111503,"199464","Railway Bridge in Mist","Railway_Bridge_in_Mist_thumb.jpg",130,130,32);thumbnails[3111517]=new thumbnail(3111517,"199464","Star & Garter, Autumn Morning","Star_&_Garter_Autumn_Morning_thumb.jpg",130,130,32);thumbnails[3111522]=new thumbnail(3111522,"199464","Star & Garter, Misty Morning I","Star_&_Garter_Misty_Morning_I_thumb.jpg",130,130,32);thumbnails[3111432]=new thumbnail(3111432,"199464","Railway Bridge at Dawn","Railway_Bridge_at_Dawn_thumb.jpg",130,130,32);thumbnails[3111333]=new thumbnail(3111333,"199464","Beneath the Railway Bridge, Richmond","Beneath_the_Railway_Bridge_Richmond_thumb.jpg",130,130,32);thumbnails[3111535]=new thumbnail(3111535,"199464","Star & Garter, Sunrise","Star_&_Garter_Sunrise_thumb.jpg",130,130,32);thumbnails[3271579]=new thumbnail(3271579,"199465","Ham House Sunrise","ham-house-sunrise_thumb.jpg",130,130,32);thumbnails[3261709]=new thumbnail(3261709,"199465","Trees Reflected in the Thames","trees-reflected-in-the-thames_thumb.jpg",130,130,32);thumbnails[3523389]=new thumbnail(3523389,"199465","White Swan at Twickenham","white-swan-at-twickenham_thumb.jpg",130,130,32);thumbnails[3181238]=new thumbnail(3181238,"199465","Thames Boats at Dawn","Thames-Boats-at-Dawn_thumb.jpg",130,130,32);thumbnails[3181235]=new thumbnail(3181235,"199465","Ham House Reflections","Ham-House-Reflections_thumb.jpg",130,130,32);thumbnails[3111423]=new thumbnail(3111423,"199465","Marble Hill House","Marble_Hill_House_thumb.jpg",130,130,32);thumbnails[3237674]=new thumbnail(3237674,"199465","Twickenham Rowing Club","Twickenham-Rowing-Club-colour_thumb.jpg",130,130,32);thumbnails[3616702]=new thumbnail(3616702,"199470","Sunrise at Teddington Weir","Sunrise-at-Teddington-Weir-I_thumb.jpg",130,130,32);thumbnails[3616773]=new thumbnail(3616773,"199470","Sunrise at Teddington Weir II","Sunrise-at-Teddington-Weir-II_thumb.jpg",130,130,32);thumbnails[3616853]=new thumbnail(3616853,"199470","Sunrise at Teddington Weir III","Sunrise-at-Teddington-Weir-III_thumb.jpg",130,130,32);thumbnails[3111557]=new thumbnail(3111557,"199470","Teddington Lock Before Sunrise","Teddington_Lock_Before_Sunrise_thumb.jpg",130,130,32);thumbnails[3111570]=new thumbnail(3111570,"199470","Teddington Lock Sunrise","Teddington_Lock_Sunrise_II_thumb.jpg",130,130,32);thumbnails[3406608]=new thumbnail(3406608,"208111","London Eye Through Charing Cross Bridge","london-eye-through-charing-cross-bridge_thumb.jpg",130,130,32);thumbnails[3406609]=new thumbnail(3406609,"208111","London Eye and Houses of Parliament","london-eye-and-houses-of-parliament_thumb.jpg",130,130,32);thumbnails[3406610]=new thumbnail(3406610,"208111","Man and Seagulls on Waterloo Bridge","Man-and-Seagulls-on-Waterloo-Bridge_thumb.jpg",130,130,32);thumbnails[3406597]=new thumbnail(3406597,"208111","Waterloo Underpass","waterloo-underpass_thumb.jpg",130,130,32);thumbnails[3406605]=new thumbnail(3406605,"208111","Queen Elizabeth Hall I","queen-elizabeth-hall-I_thumb.jpg",130,130,32);thumbnails[3406607]=new thumbnail(3406607,"208111","Queen Elizabeth Hall II","queen-elizabeth-hall-II_thumb.jpg",130,130,32);thumbnails[3752479]=new thumbnail(3752479,"228980","Ilkley Moor","Ilkley-Moor_thumb.jpg",130,130,32);thumbnails[3752482]=new thumbnail(3752482,"228980","Ilkley Moor Sunset","Ilkley-Moor-Sunset_thumb.jpg",130,130,32);thumbnails[3765490]=new thumbnail(3765490,"228980","Ilkley Moor II","Ilkley-Moor-II_thumb.jpg",130,130,32);thumbnails[5035396]=new thumbnail(5035396,"228980","Ilkley Moor Stream #1","Ilkley-Moor-Stream-1_thumb.jpg",130,130,32);thumbnails[5035405]=new thumbnail(5035405,"228980","Ilkley Moor Stream #2","Ilkley-Moor-Stream-2_thumb.jpg",130,130,32);thumbnails[5035413]=new thumbnail(5035413,"228980","Purple Heather on Ilkley Moor","Purple-Heather-on-Ilkley-Moor_thumb.jpg",130,130,32);thumbnails[5199655]=new thumbnail(5199655,"228980","Hills Near Grassington","Hills-Near-Grassington_thumb.jpg",130,130,32);thumbnails[5260274]=new thumbnail(5260274,"228980","Hills Near Strid Wood","Hills-Near-Strid-Wood_thumb.jpg",130,130,32);thumbnails[3574542]=new thumbnail(3574542,"218510","Playground, Sunlight, Frost","playground-sunlight-frost_thumb.jpg",130,130,32);thumbnails[3574629]=new thumbnail(3574629,"218510","Roundabout with Frost","roundabout-with-frost_thumb.jpg",130,130,32);thumbnails[3574636]=new thumbnail(3574636,"218510","Spinner Bowl","spinner-bowl_thumb.jpg",130,130,32);thumbnails[3574702]=new thumbnail(3574702,"218510","Swing Chain","swing-chain_thumb.jpg",130,130,32);thumbnails[3574528]=new thumbnail(3574528,"218510","Mooring Post","mooring-post_thumb.jpg",130,130,32);thumbnails[3574483]=new thumbnail(3574483,"218510","Eiffel Tower","Eiffel-Tower_thumb.jpg",130,130,32);thumbnails[3752532]=new thumbnail(3752532,"218510","Street Signs","street-signs_thumb.jpg",130,130,32);thumbnails[3977542]=new thumbnail(3977542,"218510","Curve #1","Curve-1_thumb.jpg",130,130,32);thumbnails[4191856]=new thumbnail(4191856,"249306","Thames Rocks #1","Thames_Rocks_1_thumb.jpg",130,130,32);thumbnails[4191916]=new thumbnail(4191916,"249306","Thames Rocks #2","Thames_Rocks_3_thumb.jpg",130,130,32);thumbnails[4192004]=new thumbnail(4192004,"249306","Thames Branches","Thames_Branches_thumb.jpg",130,130,32);thumbnails[4192040]=new thumbnail(4192040,"249306","Thames Wall","Thames_Wall_thumb.jpg",130,130,32);thumbnails[4308037]=new thumbnail(4308037,"249306","Enclosure #1","Enclosure_1_thumb.jpg",130,130,32);thumbnails[4308044]=new thumbnail(4308044,"249306","Enclosure #2","Enclosure_2_thumb.jpg",130,130,32);thumbnails[4308045]=new thumbnail(4308045,"249306","Enclosure #3","Enclosure_3_thumb.jpg",130,130,32);thumbnails[4308047]=new thumbnail(4308047,"249306","Enclosure #4","Enclosure_4_thumb.jpg",130,130,32);thumbnails[4308051]=new thumbnail(4308051,"249306","River Barrier","River_Barrier_thumb.jpg",130,130,32);thumbnails[4666947]=new thumbnail(4666947,"269078","Trefin Sunset #1","Trefin-Sunset-11_thumb.jpg",130,130,32);thumbnails[4666956]=new thumbnail(4666956,"269078","Trefin Sunset #2","Trefin-Sunset-2_thumb.jpg",130,130,32);thumbnails[4666966]=new thumbnail(4666966,"269078","Trefin Sunset #3","Trefin-Sunset-3_thumb.jpg",130,130,32);thumbnails[4666982]=new thumbnail(4666982,"269078","Trefin Sunset #4","Trefin-Sunset-4_thumb.jpg",130,130,32);thumbnails[4666986]=new thumbnail(4666986,"269078","Trefin Sunset #5","Trefin-Sunset-5_thumb.jpg",130,130,32);thumbnails[4667146]=new thumbnail(4667146,"269078","Whitesands","Whitesands_thumb.jpg",130,130,32);thumbnails[4667200]=new thumbnail(4667200,"269078","Littlehaven #1","Littlehaven-1_thumb.jpg",130,130,32);thumbnails[4667256]=new thumbnail(4667256,"269078","Littlehaven #2","Littlehaven-2_thumb.jpg",130,130,32);var galleries=new Object();galleries[221619]=new gallery(221619,"3622964","Kew Gardens","gallery",[3622560,3622964,3622979,3623007,3622994,3623022,3623031,3813705,3813709]);galleries[199464]=new gallery(199464,"3968922","Richmond","gallery",[3569972,3968922,3896268,3111523,3111529,3333012,3111504,3111503,3111517,3111522,3111432,3111333,3111535]);galleries[199465]=new gallery(199465,"3271579","Twickenham and Ham","gallery",[3271579,3261709,3523389,3181238,3181235,3111423,3237674]);galleries[199470]=new gallery(199470,"3616702","Teddington","gallery",[3616702,3616773,3616853,3111557,3111570]);galleries[208111]=new gallery(208111,"3406610","Central London","gallery",[3406608,3406609,3406610,3406597,3406605,3406607]);galleries[228980]=new gallery(228980,"3752482","Yorkshire","gallery",[3752479,3752482,3765490,5035396,5035405,5035413,5199655,5260274]);galleries[218510]=new gallery(218510,"3574542","Alternative Views","gallery",[3574542,3574629,3574636,3574702,3574528,3574483,3752532,3977542]);galleries[249306]=new gallery(249306,"4308037","Slow Water","gallery",[4191856,4191916,4192004,4192040,4308037,4308044,4308045,4308047,4308051]);galleries[269078]=new gallery(269078,"4666947","Pembrokeshire","gallery",[4666947,4666956,4666966,4666982,4666986,4667146,4667200,4667256]);var imageSets=new Object();imageSets[1]="4308037,4191916,3968922,3752482,3616702,3574542,3406610,3333012";imageSets[2]="4666947,4308037,3968922,3752482,3622964,3616702,3574542,3406610,3271579";imageSets[3]="4308037,4191916,3968922,3765490,3574636,3574629,3406610,3333012,3271579";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/rhollins/images";break}switch(a){case 1:b="http://www1.clikpic.com/rhollins/images";break}switch(a){case 2:b="http://admin.clikpic.com/rhollins/images";break}switch(a){case 4:b="http://www.clikchurch.com/rhollins/images";break}switch(a){case 5:b="http://www2.clikpic.com/rhollins/images";break}switch(a){case 15:b="http://www3.clikpic.com/rhollins/images";break}switch(a){case 21:b="http://www6.clikpic.com/rhollins/images";break}switch(a){case 18:b="http://www4.clikpic.com/rhollins/images";break}switch(a){case 19:b="http://www5.clikpic.com/rhollins/images";break}switch(a){case 22:b="http://tpc5/clikpic/rhollins/images";break}switch(a){case 23:b="http://tpc10/clikpic/rhollins/images";break}switch(a){case 24:b="http://tpc15/clikpic/rhollins/images";break}switch(a){case 25:b="http://tpc16/clikpic/rhollins/images";break}switch(a){case 31:b="http://www7.clikpic.com/rhollins/images";break}switch(a){case 32:b="http://admin2.clikpic.com/rhollins/images";break}switch(a){case 33:b="http://www8.clikpic.com/rhollins/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="Photographs by Richard Hollins: "+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><br>Title<br> </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><br>Location<br> </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="RHOLLINS">';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+'")'})}}};