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[4466894]=new thumbnail(4466894,"260391","Beech Avenue","Trees_at_Badbury_Rings_02_thumb.jpg",130,86,1);thumbnails[4466895]=new thumbnail(4466895,"260391","Beech Avenue","Trees_at_Badbury_Rings_07_thumb.jpg",130,87,1);thumbnails[4466902]=new thumbnail(4466902,"260391","Harvest Time","Harvest_Time_04_thumb.jpg",130,67,1);thumbnails[4466891]=new thumbnail(4466891,"260391","Harvest Time","Harvest_Time_03_thumb.jpg",130,86,1);thumbnails[4455119]=new thumbnail(4455119,"260391","Poole Quay","Poole_Quay_01_thumb.jpg",130,78,1);thumbnails[4455125]=new thumbnail(4455125,"260391","Poole Town ","Poole_Town_from_Holes_Bay_at_Night_01_thumb.jpg",130,87,1);thumbnails[4455113]=new thumbnail(4455113,"260391","River Frome","River_Frome_at_Sunrise_Wareham_01_thumb.jpg",130,87,1);thumbnails[6060538]=new thumbnail(6060538,"260391","The Cobb","Clikpic__The_Cobb_01_thumb.jpg",130,87,1);thumbnails[4466892]=new thumbnail(4466892,"260391","Whitchurch Canonicorum Church ","Whitchurch_Canonicorum_Church_01_thumb.jpg",130,86,1);thumbnails[394097]=new thumbnail(394097,"147328","Christchurch Priory","Christchurch Priory _thumb.jpg",130,86,1);thumbnails[393720]=new thumbnail(393720,"147328","Corfe Castle","Corfe Castle 31_thumb.jpg",130,86,1);thumbnails[3615156]=new thumbnail(3615156,"147328","Corfe Castle ","Z-Corfe_Castle_and_Train_thumb.jpg",130,87,1);thumbnails[5293108]=new thumbnail(5293108,"147328","Durlston Head Lighthouse ","Durlston_Head_Lighthouse_01_thumb.jpg",130,87,1);thumbnails[394137]=new thumbnail(394137,"147328","Gold Hill","Card_20_Front_thumb.jpg",130,86,1);thumbnails[1527869]=new thumbnail(1527869,"147328","Milton Abbas ","Card_21_Front_thumb.jpg",130,90,1);thumbnails[396770]=new thumbnail(396770,"147328","Wareham Church and the River Frome ","2_thumb.Wareham River & Church 02.jpg",130,87,1);thumbnails[4960007]=new thumbnail(4960007,"147328","Whitemill Bridge","Clikpic_Whitemill_Bridge_09_thumb.jpg",130,87,1);thumbnails[1527881]=new thumbnail(1527881,"147328","Witchampton Church ","Witchampton Church 01-1_thumb.jpg",130,86,1);thumbnails[2240935]=new thumbnail(2240935,"147318","Chapmans Pool","Chapmans Pool and Dorset Coast_thumb.jpg",130,87,1);thumbnails[394088]=new thumbnail(394088,"147318","Chesil Beach","Chesil Beach _thumb.jpg",130,86,1);thumbnails[394092]=new thumbnail(394092,"147318","Chesil Beach and Portland","Chesil Beach and Portland _thumb.jpg",130,86,1);thumbnails[5287420]=new thumbnail(5287420,"147318","Durdle Door","Durdle_Door_12_thumb.jpg",130,87,1);thumbnails[2240937]=new thumbnail(2240937,"147318","Durdle Door","Durdle Door _thumb.jpg",130,86,1);thumbnails[5293096]=new thumbnail(5293096,"147318","Durdle Door","Durdle_Door_15_thumb.jpg",130,87,1);thumbnails[5293115]=new thumbnail(5293115,"147318","Durlston Head ","Durlston_Head_Sea_05_thumb.jpg",130,87,1);thumbnails[1527884]=new thumbnail(1527884,"147318","Kimmeridge Bay ","Kimmeridge Beach _thumb.jpg",130,87,1);thumbnails[396762]=new thumbnail(396762,"147318","Poole Harbour","Poole Harbour 81_thumb.jpg",130,86,1);thumbnails[396754]=new thumbnail(396754,"147318","Poole Harbour ","Hamworthy Beach 01_thumb.jpg",130,87,1);thumbnails[2240939]=new thumbnail(2240939,"147318","Poole Quay ","Poole Quay jpg_thumb.jpg",130,72,1);thumbnails[5287435]=new thumbnail(5287435,"147318","Portland","Portland_Sunset_02_thumb.jpg",130,96,1);thumbnails[396791]=new thumbnail(396791,"147318","Portland ","Portland Bill 04_thumb.jpg",130,86,1);thumbnails[3262038]=new thumbnail(3262038,"147318","Pulpit Rock","Portland Bill 02-1_thumb.jpg",130,86,1);thumbnails[396767]=new thumbnail(396767,"147318","Ringstead Bay","Ringstead Bay1_thumb.jpg",130,86,1);thumbnails[5295789]=new thumbnail(5295789,"147318","Southbourne Beach ","Southbourne_Beach_03_thumb.jpg",130,87,1);thumbnails[5295795]=new thumbnail(5295795,"147318","Southbourne Beach","Southbourne_Beach_05_thumb.jpg",130,83,1);thumbnails[1013267]=new thumbnail(1013267,"147318","Swanage Beach ","Swanage Beach_thumb.jpg",130,87,1);thumbnails[2240934]=new thumbnail(2240934,"147318","Worbarrow Bay","_thumb.Worborrow Bay.jpg",130,76,1);thumbnails[393683]=new thumbnail(393683,"31547","Ashmore Village","Ashmore Village Pond Clik _thumb.jpg",130,87,1);thumbnails[1527864]=new thumbnail(1527864,"31547","Avon Causeway","Avon Causeway _thumb.jpg",130,86,1);thumbnails[3417764]=new thumbnail(3417764,"31547","Badbury Rings ","10 View From Badbury Rings 01_thumb.jpg",130,87,1);thumbnails[1013284]=new thumbnail(1013284,"31547","Badbury Rings Trees","Trees at Bradbury Rings 13[1]_thumb.jpg",130,86,1);thumbnails[3417759]=new thumbnail(3417759,"31547","Badbury Rings Trees ","10 Beech Trees at Badbury Rings 02_thumb.jpg",130,86,1);thumbnails[3414637]=new thumbnail(3414637,"31547","Badbury Rings Trees","1 Beech Trees at Badbury Rings 03_thumb.jpg",130,86,1);thumbnails[393851]=new thumbnail(393851,"31547","Cerne Giant","Cerne Abbas Gaint _thumb.jpg",130,86,1);thumbnails[394103]=new thumbnail(394103,"31547","Colmer Hill ","Colmer Hill Nr Bridport _thumb.jpg",130,86,1);thumbnails[3411470]=new thumbnail(3411470,"31547","Dawn at Eyebridge","Dawn at Eybridge 02_thumb.jpg",130,86,1);thumbnails[632720]=new thumbnail(632720,"31547","Harvest Time ","Harvest_Time_17_thumb.jpg",130,86,1);thumbnails[3615197]=new thumbnail(3615197,"31547","River Frome","Z-River_Frome_at_Wareham_01_thumb.jpg",130,87,1);thumbnails[1527877]=new thumbnail(1527877,"31547","River Stour","River Stour at Wimborne _thumb.jpg",130,86,1);thumbnails[396783]=new thumbnail(396783,"31547","West Dorset","View from Eggarden Hill 01_thumb.jpg",130,86,1);thumbnails[396788]=new thumbnail(396788,"31547","Zig-Zag Hill","View from Zig-Zag Hill 41_thumb.jpg",130,86,1);thumbnails[1527819]=new thumbnail(1527819,"31457","Bournemouth Beach at Dawn","Dawn at Bournemouth Beach _thumb.jpg",130,86,1);thumbnails[5285785]=new thumbnail(5285785,"31457","Dawn at Badbury Rings ","Badbury_Rings_Sunrise_12-1_thumb.jpg",130,84,1);thumbnails[5285786]=new thumbnail(5285786,"31457","Dawn at Badbury Rings ","Badbury_Rings_Sunrise_16-1_thumb.jpg",130,94,1);thumbnails[3414638]=new thumbnail(3414638,"31457","Dawn at Eyebridge","2 Eyebridge 01_thumb.jpg",130,86,1);thumbnails[396753]=new thumbnail(396753,"31457","Hengistbury Head and Beach","1_thumb.Hengistbury Head Beach at Dawn .jpg",130,87,1);thumbnails[1013264]=new thumbnail(1013264,"31457","Poole Harbour Sunset ","Sunset over Poole Harbour 01_thumb.jpg",130,86,1);thumbnails[3615160]=new thumbnail(3615160,"31457","River Frome at Dawn","Z-Dawn_on_the_River_Frome_01jpg_thumb.jpg",130,87,1);thumbnails[1013305]=new thumbnail(1013305,"31457","River Stour at Dawn.","River Stour at Dawn 05_thumb.jpg",130,86,1);thumbnails[629150]=new thumbnail(629150,"31457","River Stour Sunrise ","River Stour Sunrise_thumb.jpg",130,87,1);thumbnails[636489]=new thumbnail(636489,"31457","Sandbanks at Dawn ","Sandbanks at Dawn 04_thumb.jpg",130,86,1);thumbnails[725848]=new thumbnail(725848,"31457","Sunset over Durdle Door","Sunset at Durdle Dor 01_thumb.jpg",130,86,1);thumbnails[1527870]=new thumbnail(1527870,"31457","Sunset over Portland ","Sunset over Portland _thumb.jpg",130,86,1);thumbnails[3847165]=new thumbnail(3847165,"208679","Bluebells ","040605_thumb.jpg",130,87,1);thumbnails[3824633]=new thumbnail(3824633,"208679","Bluebells","4Delcombe_Woods__05_thumb.jpg",130,87,1);thumbnails[3847181]=new thumbnail(3847181,"208679","Bluebells","030605_thumb.jpg",130,87,1);thumbnails[3824630]=new thumbnail(3824630,"208679","Bluebells","3Delcombe_Woods_03_thumb.jpg",130,87,1);thumbnails[5901782]=new thumbnail(5901782,"208679","Bluebells ","Delcombe_Woods_Bluebells_01_thumb.jpg",130,87,1);thumbnails[3824634]=new thumbnail(3824634,"208679","Poole Park","5Spring_in_Poole_Park_01_thumb.jpg",130,87,1);thumbnails[3824623]=new thumbnail(3824623,"208679","Powerstock Woods","2Powerstock_Woods_01_thumb.jpg",130,87,1);thumbnails[3824635]=new thumbnail(3824635,"208679","Tulips","6Spring_in_Poole_Park_03_thumb.jpg",130,87,1);thumbnails[3847229]=new thumbnail(3847229,"208679","Wild Garlic ","050605_thumb.jpg",130,87,1);thumbnails[2237224]=new thumbnail(2237224,"208827","Beech Trees at Badbury Rings ","Card 6 Front_thumb.jpg",130,86,1);thumbnails[2237229]=new thumbnail(2237229,"208827","Bournemouth Beach and Pier","Card_7_Front_thumb.jpg",130,83,1);thumbnails[2237238]=new thumbnail(2237238,"208827","Chapman's Pool","Card_13_Front_thumb.jpg",130,87,1);thumbnails[2237241]=new thumbnail(2237241,"208827","Christchurch Priory ","Card_4_Front_thumb.jpg",130,81,1);thumbnails[5678152]=new thumbnail(5678152,"208827","Chesil Beach","Card_4_Front__thumb.jpg",130,88,1);thumbnails[2237213]=new thumbnail(2237213,"208827","Colmer's Hill","Card_1_Front_thumb.jpg",130,86,1);thumbnails[2237226]=new thumbnail(2237226,"208827","Corfe Castle ","Card_10_Front_thumb.jpg",130,87,1);thumbnails[5678116]=new thumbnail(5678116,"208827","Dawn at Eyebridge","Dawn_at_Eyebridge_thumb.jpg",130,86,1);thumbnails[5678127]=new thumbnail(5678127,"208827","Dorset Bluebells","Card_2_Front_thumb.jpg",130,87,1);thumbnails[2237202]=new thumbnail(2237202,"208827","Dorset Poppies ","Card 1 Front_thumb.jpg",130,88,1);thumbnails[2237220]=new thumbnail(2237220,"208827","Durdle Door Sunset","Card 5 Front_thumb.jpg",130,86,1);thumbnails[5678120]=new thumbnail(5678120,"208827","Lyme Regis","Card_5_Front_thumb.jpg",130,83,1);thumbnails[2237236]=new thumbnail(2237236,"208827","Poole Harbour","Card_12_Front_thumb.jpg",130,86,1);thumbnails[5678124]=new thumbnail(5678124,"208827","Poole Park","Card_11_Front_828A13D8-1EC9-D45B-1CFCA7FFB9625066_thumb.jpg",130,87,1);thumbnails[2237228]=new thumbnail(2237228,"208827","Poole Quay","Card_11_Front_thumb.jpg",130,85,1);thumbnails[2237234]=new thumbnail(2237234,"208827","Portland Lighthouse","Card_6_Front_thumb.jpg",130,86,1);thumbnails[5678149]=new thumbnail(5678149,"208827","Portland Bill","Card_3_Front__thumb.jpg",130,87,1);thumbnails[2237218]=new thumbnail(2237218,"208827","River Frome ","Card_9_Front_thumb.jpg",130,87,1);thumbnails[2237231]=new thumbnail(2237231,"208827","Swanage ","Card_14_Front1_thumb.jpg",130,87,1);thumbnails[5678167]=new thumbnail(5678167,"208827","Swanage Pier<br>\r\n<br>\r\n<br>\r\n","Card_8_Front_thumb.jpg",130,87,1);thumbnails[5678159]=new thumbnail(5678159,"208827","The Cobb","Card_12_Front_82966B92-1EC9-D45B-1C8C53CA1B869068_thumb.jpg",130,85,1);thumbnails[5678139]=new thumbnail(5678139,"208827","Westbay ","Westbay_thumb.jpg",130,91,1);thumbnails[5678142]=new thumbnail(5678142,"208827","Whitemill Bridge","Card_6_Front__thumb.jpg",130,87,1);thumbnails[2245729]=new thumbnail(2245729,"208827","Sample of the back of the card","Card_12_Back_thumb.jpg",130,87,1);var galleries=new Object();galleries[260391]=new gallery(260391,"6060538,4466902,4466895,4466894,4466892,4466891,4455125,4455119,4455113","Dorset in Black & White","gallery",[4466894,4466895,4466902,4466891,4455119,4455125,4455113,6060538,4466892]);galleries[147328]=new gallery(147328,"5293108,4960007,3615156,1527881,1527869,396770,394137,394097,393720","Dorset Buildings ","gallery",[394097,393720,3615156,5293108,394137,1527869,396770,4960007,1527881]);galleries[147318]=new gallery(147318,"5295795,5295789,5293115,5293096,5287435,5287420,3262038,2240939,2240937,2240935","Dorset Coast","gallery",[2240935,394088,394092,5287420,2240937,5293096,5293115,1527884,396762,396754,2240939,5287435,396791,3262038,396767,5295789,5295795,1013267,2240934]);galleries[31547]=new gallery(31547,"3615197,3417764,3417759,3414637,3411470,1527877,1527864,1013284,632720,396788","Dorset Countryside","gallery",[393683,1527864,3417764,1013284,3417759,3414637,393851,394103,3411470,632720,3615197,1527877,396783,396788]);galleries[31457]=new gallery(31457,"5285786,5285785,3615160,3414638,1527870,1527819,1013305,1013264,725848,636489","Dorset Sunsets and Sunrises","gallery",[1527819,5285785,5285786,3414638,396753,1013264,3615160,1013305,629150,636489,725848,1527870]);galleries[208679]=new gallery(208679,"5901782,3847229,3847181,3847165,3824635,3824634,3824633,3824630,3824623","Dorset in Bloom","gallery",[3847165,3824633,3847181,3824630,5901782,3824634,3824623,3824635,3847229]);galleries[208827]=new gallery(208827,"5678167,5678159,5678152,5678149,5678142,5678139,5678127,5678124,5678120,5678116","Dorset Cards ","gallery",[2237224,2237229,2237238,2237241,5678152,2237213,2237226,5678116,5678127,2237202,2237220,5678120,2237236,5678124,2237228,2237234,5678149,2237218,2237231,5678167,5678159,5678139,5678142,2245729]);var imageSets=new Object();imageSets[1]="6060538,5901782,5293108,5293096,5287435,5285786,5285785,4960007,3615197,3615160,1013305";imageSets[3]="6060538,5901782,5678167,5678159,5678152,5678149,5678142,5678139,5678127,5678124,5678120,5678116,5295795,5295789,5293115,5293108,5293096,5287435,5287420,5285786,5285785,4960007,4466902,4466895,4466894,4466892,4466891,4455125,4455119,4455113,3847229,3847181,3847165,3824635,3824634,3824633,3824630,3824623,3615197,3615160,3615156,3417764,3417759,3414638,3414637,3411470,3262038,2245729,2240939,2240937";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/Andrewchild/images";break}switch(a){case 1:b="http://www1.clikpic.com/Andrewchild/images";break}switch(a){case 2:b="http://admin.clikpic.com/Andrewchild/images";break}switch(a){case 24:b="http://tpc15/clikpic/Andrewchild/images";break}switch(a){case 4:b="http://www.clikchurch.com/Andrewchild/images";break}switch(a){case 5:b="http://www2.clikpic.com/Andrewchild/images";break}switch(a){case 22:b="http://tpc5/clikpic/Andrewchild/images";break}switch(a){case 23:b="http://tpc10/clikpic/Andrewchild/images";break}switch(a){case 25:b="http://tpc16/clikpic/Andrewchild/images";break}switch(a){case 15:b="http://www3.clikpic.com/Andrewchild/images";break}switch(a){case 18:b="http://www4.clikpic.com/Andrewchild/images";break}switch(a){case 19:b="http://www5.clikpic.com/Andrewchild/images";break}switch(a){case 31:b="http://www7.clikpic.com/Andrewchild/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Andrewchild/images";break}switch(a){case 33:b="http://www8.clikpic.com/Andrewchild/images";break}switch(a){case 34:b="http://www9.clikpic.com/Andrewchild/images";break}switch(a){case 35:b="http://admin3.clikpic.com/Andrewchild/images";break}switch(a){case 37:b="http://admin4.clikpic.com/Andrewchild/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="Dorsetgallery: "+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="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="dorsetgallery@aol.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="dorsetgallery@aol.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+'")'})}}};