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[3103056]=new thumbnail(3103056,"190403","RAINBOW REFRACTION","11 Rainbow Refraction (3)_thumb.jpg",130,76,1);thumbnails[3103063]=new thumbnail(3103063,"190403","LILAC TREE","22 Lilac Tree_thumb.jpg",130,192,1);thumbnails[3103070]=new thumbnail(3103070,"190403","SNOWDROPS AT CAMBO","24 Snowdrops at Cambo_thumb.jpg",130,93,1);thumbnails[3103072]=new thumbnail(3103072,"190403","THE RECITAL","26 The Recital_thumb.jpg",130,81,1);thumbnails[3103089]=new thumbnail(3103089,"190403","GIRL WITH PARASOL","82 Girl with Parasol  Alhambra Gardens_thumb.jpg",130,137,1);thumbnails[3103052]=new thumbnail(3103052,"190403","AUTUMN","1 Autumn_thumb.jpg",130,90,1);thumbnails[3103096]=new thumbnail(3103096,"190403","SAILING THROUGH THE AURORA","88 Sailing through the Aurora_thumb.jpg",130,155,1);thumbnails[3103059]=new thumbnail(3103059,"190403","RED BOAT  STORMY SEA","14 Red Boat  Stormy Sea_thumb.jpg",130,83,1);thumbnails[3103076]=new thumbnail(3103076,"190403","EARTH SATELLITE","27 Earth Satellite_thumb.jpg",130,165,1);thumbnails[3103069]=new thumbnail(3103069,"190403","CALEDONIAN WAY","23 Caledonian Way_thumb.jpg",130,81,1);thumbnails[3103077]=new thumbnail(3103077,"190403","ST ANDREWS FARMHOUSE CHEESE COMPANY","80 St Andrews farmhouse Cheese Company_thumb.jpg",130,98,1);thumbnails[3103098]=new thumbnail(3103098,"190403","CROVIE","91 Crovie_thumb.jpg",130,112,1);thumbnails[3103080]=new thumbnail(3103080,"190403","ORANGE FRUIT BLUE TREE","81 Orange fruit Blue Tree_thumb.jpg",130,78,1);thumbnails[3103093]=new thumbnail(3103093,"190403","GIRL WITH COMPACT","83 Girl with Compact_thumb.jpg",130,142,1);thumbnails[1951792]=new thumbnail(1951792,"64533","Laid  , Quiet Land","Laid  Quiet Land_thumb.jpg",130,51,1);thumbnails[538373]=new thumbnail(538373,"41872","Bobby at Greyfriars","Bobby at Greyfriars_thumb.JPG",130,57,1);thumbnails[1951775]=new thumbnail(1951775,"64533","Balnakeil, Durness","Balnakeil  Durness_thumb.jpg",130,172,1);thumbnails[1951789]=new thumbnail(1951789,"64533","Croft in Winter","Croft in Winter D08_thumb.jpg",130,98,1);thumbnails[1951794]=new thumbnail(1951794,"64533","Sangomore<br>\r\nDurness    Sutherland","Sangomore crop_thumb.jpg",130,98,1);thumbnails[538380]=new thumbnail(538380,"41872","A Perthshire winter","FOOTPRINTS_thumb.jpg",130,107,1);thumbnails[1951777]=new thumbnail(1951777,"64533","Balnakeil Bay & Cape Wrath","Balnakeil Bay & Cape Wrath_thumb.jpg",130,176,1);thumbnails[1951782]=new thumbnail(1951782,"64533","By Keoldale<br>\r\nSutherland","by Keoldale Sutherland_thumb.jpg",130,98,1);thumbnails[1951793]=new thumbnail(1951793,"64533","Laid,   Winter Sunshine","Laid  Winter Sunshine_thumb.jpg",130,170,1);thumbnails[1951796]=new thumbnail(1951796,"64533","Storm passing - Loch Eribol","Storm passing Loch Eribol_thumb.jpg",130,97,1);thumbnails[538382]=new thumbnail(538382,"41872","Holyrood","Holyrood_thumb.jpg",130,92,1);thumbnails[835106]=new thumbnail(835106,"64533","Ben Loyal","Ben Loyal_thumb.jpg",130,103,1);thumbnails[1951779]=new thumbnail(1951779,"64533","Ben Loyal","Ben Loyal_1_thumb.jpg",130,81,1);thumbnails[538385]=new thumbnail(538385,"41872","Paris Boulevard","Paris Boulevard_thumb.jpg",130,97,1);thumbnails[1951795]=new thumbnail(1951795,"64533","Sarsgrum<br>\r\nKyle of Durness","Sarsgrum  Kyle of Durness_thumb.jpg",130,51,1);thumbnails[1951784]=new thumbnail(1951784,"64533","By Loch Meadaidch","By Loch Meadaidh, Kyle of Durness_thumb.jpg",130,98,1);thumbnails[538387]=new thumbnail(538387,"41872","Soldier's Leap, Killiecrankie","Soldier's Leap, Killiecrankie_thumb.jpg",130,98,1);thumbnails[1951786]=new thumbnail(1951786,"64533","By the Hope Road","By the Hope Road_thumb.jpg",130,98,1);thumbnails[538388]=new thumbnail(538388,"41872","St. Monans","St_thumb. Monans.jpg",130,96,1);thumbnails[3290562]=new thumbnail(3290562,"41884","Tea with my Father","TeaWithMyFather_thumb.jpg",130,195,1);thumbnails[3290564]=new thumbnail(3290564,"41884","Untitled Portrait","UntitledPortraitNo1_thumb.jpg",130,195,1);thumbnails[581679]=new thumbnail(581679,"41884","Crail Harbour","Artiststogether5_thumb.jpg",130,173,1);thumbnails[581690]=new thumbnail(581690,"41884","Pittenweem Rocks","Artiststogether11_thumb.jpg",130,194,1);thumbnails[3290553]=new thumbnail(3290553,"41884","Returning to Roost","ReturningToRoost_thumb.jpg",130,87,1);thumbnails[545414]=new thumbnail(545414,"41884","Old Course in Winter<br>\r\nSt. Andrews","OLDCOURSEINWINTER Stan Farrow Photography_thumb.jpg",130,89,1);thumbnails[3290551]=new thumbnail(3290551,"41884","Regrets","Regrets_thumb.jpg",130,130,1);thumbnails[545415]=new thumbnail(545415,"41884","Rust & Wood - Newburgh Boats","RUSTANDWOO   Stan Farrow Photography_thumb.jpg",130,195,1);thumbnails[581676]=new thumbnail(581676,"41884","The Longest Day<br>\r\nEast Sands, St.Andrews","Artiststogether4_thumb.jpg",130,72,1);thumbnails[3290555]=new thumbnail(3290555,"41884","Sand Portrait","SandPortrait_thumb.jpg",130,195,1);thumbnails[3290566]=new thumbnail(3290566,"41884","Valia","Valia_thumb.jpg",130,196,1);thumbnails[545416]=new thumbnail(545416,"41884","Rose for Malievich","ROSE8email_thumb.jpg",130,130,1);thumbnails[538392]=new thumbnail(538392,"41873","In Sula's Wake","AT Web Clare_thumb.jpg",130,90,1);thumbnails[545605]=new thumbnail(545605,"41873","Ab Ovo","Clare Eggs 1_thumb.jpg",130,82,1);thumbnails[538420]=new thumbnail(538420,"41875","Gentle Giant","Gentle Giant    Ron Forbes copy_thumb.jpg",130,107,1);thumbnails[538422]=new thumbnail(538422,"41875","Still Life with Fruit","Still Life with Fruit  Ron Forbes_thumb.jpg",130,91,1);thumbnails[538421]=new thumbnail(538421,"41875","His & Hers","His & Hers    Ron Forbes_thumb.jpg",130,93,1);thumbnails[3080596]=new thumbnail(3080596,"41877","Girl with Parasol","Girl with Parasol 4web_thumb.jpg",130,179,1);thumbnails[5836523]=new thumbnail(5836523,"41877","Victory Hall ABOYNE","web_Victory_Hall_Aboyne__March_2010_thumb.jpg",130,104,1);thumbnails[538408]=new thumbnail(538408,"41877","The Five Sisters of Kintail","11 Five Sisters of Ki~00C0_thumb.jpg",130,92,1);thumbnails[538417]=new thumbnail(538417,"41877","Modern Piano","Modern Piano_thumb.jpg",130,184,1);thumbnails[538399]=new thumbnail(538399,"41874","After Picasso","after Picasso_thumb.jpg",130,185,1);thumbnails[538409]=new thumbnail(538409,"41877","Over the Sea to Skye","12 Over the Sea to Skye_thumb.jpg",130,92,1);thumbnails[538413]=new thumbnail(538413,"41877","Moonlight Sonata","A4 Print  Moonlight S~00A3 copy_thumb.jpg",130,80,1);thumbnails[538402]=new thumbnail(538402,"41874","Portrait - Icon Series","icon series_thumb.jpg",130,182,1);thumbnails[538410]=new thumbnail(538410,"41877","The Black Cuillins","13 The Black Cuillins~00C2_thumb.jpg",130,92,1);thumbnails[538414]=new thumbnail(538414,"41877","Fife Boats","Fife Boats copy_thumb.jpg",130,94,1);thumbnails[590362]=new thumbnail(590362,"41877","Musicians","Musical Inspirations ~0021 copy_thumb.jpg",130,85,1);thumbnails[538395]=new thumbnail(538395,"41874","After Klimt","after Klimt_thumb.jpg",130,183,1);thumbnails[538416]=new thumbnail(538416,"41877","Harbour Houses, Pittenweem","Harbour Houses Pitten~00B7_thumb.jpg",130,92,1);thumbnails[538404]=new thumbnail(538404,"41874","Pink Motel","Motel_thumb.jpg",130,72,1);thumbnails[538412]=new thumbnail(538412,"41877","Rainbow Refraction","14 Rainbow Refraction (3)_thumb.jpg",130,92,1);thumbnails[590363]=new thumbnail(590363,"41877","Glen Clova","Glen Clova JPEG_thumb.jpg",130,92,1);thumbnails[538406]=new thumbnail(538406,"41874","Open Mind","open mind_thumb.jpg",130,173,1);thumbnails[590364]=new thumbnail(590364,"41877","Balcarres","A4 Print Balcarres Ar~00A6_thumb.jpg",130,92,1);thumbnails[538407]=new thumbnail(538407,"41874","Valentine's Day","valentine's day_thumb.jpg",130,173,1);thumbnails[538418]=new thumbnail(538418,"41877","Stromness, Orkney","Stromness Art Gallery  Orkney_thumb.jpg",130,95,1);thumbnails[590366]=new thumbnail(590366,"41877","Algarve<br>\r\nImpressions","A4 Print Algarve impr~00A5_thumb.jpg",130,92,1);thumbnails[590367]=new thumbnail(590367,"41877","Main Street<br>\r\nStromness","A4 Print  Main Street~00A2_thumb.jpg",130,92,1);thumbnails[550670]=new thumbnail(550670,"42249","Allium","alium_thumb.jpg",130,87,1);thumbnails[552117]=new thumbnail(552117,"42249","Mesembryanthemum","mesembryanthemum_thumb.jpg",130,195,1);thumbnails[552118]=new thumbnail(552118,"42249","Outgoing Tide, Tentsmuir","outgoing tide, tentsmuir_thumb.jpg",130,195,1);thumbnails[552119]=new thumbnail(552119,"42249","Stack<br>\r\nSandwood Bay","stack, sandwood bay_thumb.jpg",130,195,1);thumbnails[552120]=new thumbnail(552120,"42249","River Braan<br>\r\nThe Hermitage, Perthshire","river braan, the hermitage_thumb.jpg",130,195,1);thumbnails[552121]=new thumbnail(552121,"42249","Sunset over the Kyle of Tongue<br>\r\nSutherland","sunset over the kyle of tongue_thumb.jpg",130,195,1);thumbnails[552122]=new thumbnail(552122,"42249","Tree at Dusk<br>\r\nAberdeen","tree at dusk, aberdeen_thumb.jpg",130,195,1);thumbnails[550660]=new thumbnail(550660,"42249","White Rose","white rose_thumb.jpg",130,87,1);thumbnails[552124]=new thumbnail(552124,"42249","Loch Rannoch","loch rannoch1_thumb.jpg",130,87,1);thumbnails[550665]=new thumbnail(550665,"42249","Kyle of Durness","kyle of durness_thumb.jpg",130,195,1);thumbnails[545407]=new thumbnail(545407,"42216","Chef","Chef copy_thumb.jpg",130,81,1);thumbnails[545408]=new thumbnail(545408,"42216","Froggie (2)","_9051797_thumb.JPG",130,180,1);thumbnails[583751]=new thumbnail(583751,"42216","Bear & Cub","Bear & Cub_thumb.jpg",130,186,1);thumbnails[545409]=new thumbnail(545409,"42216","Froggie (3)","_9051794_thumb.JPG",130,177,1);thumbnails[545410]=new thumbnail(545410,"42216","Froggie (1)","_9051793_thumb.JPG",130,179,1);thumbnails[583752]=new thumbnail(583752,"42216","Pink Birdie (1)","Pink Birdie (1)_thumb.jpg",130,179,1);thumbnails[583753]=new thumbnail(583753,"42216","Pink Birdie (2)","Pink Birdie (2)_thumb.jpg",130,183,1);thumbnails[583755]=new thumbnail(583755,"42216","Pink Birdie (3)","Pink Birdie (3)_thumb.jpg",130,183,1);thumbnails[1030352]=new thumbnail(1030352,"76880","Meconopsis","Mecon MFS 2 embed copy_thumb.jpg",130,193,1);thumbnails[1030444]=new thumbnail(1030444,"76880","Merlin","Merlin perching_thumb.jpg",130,187,1);thumbnails[1030455]=new thumbnail(1030455,"76880","Redheads","MFS Redheads_thumb.jpg",130,172,1);thumbnails[1030438]=new thumbnail(1030438,"76880","Golden Eagle","Golden Eagle MFS1_thumb.jpg",130,121,1);thumbnails[1030449]=new thumbnail(1030449,"76880","4 Red Poppies","MFS 4 Red Poppies_thumb.jpg",130,169,1);thumbnails[1030460]=new thumbnail(1030460,"76880","Meconopsis (multi heads)","Multi Mecon WEB_thumb.jpg",130,93,1);thumbnails[1030452]=new thumbnail(1030452,"76880","Field Edge","MFS Lg Poppy Group copy_thumb.jpg",130,167,1);thumbnails[1030463]=new thumbnail(1030463,"76880","Osprey Head","Osprey Head_thumb.jpg",130,158,1);var galleries=new Object();galleries[190403]=new gallery(190403,"3103096,3103089,3103077,3103076,3103072,3103070,3103069,3103063,3103052","PRISMATIC SHAPEISM PAINTINGS","section235525",[3103056,3103063,3103070,3103072,3103089,3103052,3103096,3103059,3103076,3103069,3103077,3103098,3103080,3103093]);galleries[41872]=new gallery(41872,"538388,538385,538382,538380,538373","James Bowman  D.A.","gallery",[538373,538380,538382,538385,538387,538388]);galleries[64533]=new gallery(64533,"1951796,1951794,1951793,835106","Sue Challis","gallery",[1951792,1951775,1951789,1951794,1951777,1951782,1951793,1951796,835106,1951779,1951795,1951784,1951786]);galleries[41884]=new gallery(41884,"3290553,3290551,581679,545416","Stan Farrow","gallery",[3290562,3290564,581679,581690,3290553,545414,3290551,545415,581676,3290555,3290566,545416]);galleries[41873]=new gallery(41873,"545605,538392","S.Clare M.Fernie","gallery",[538392,545605]);galleries[41875]=new gallery(41875,"538422,538420","Ron Forbes D.A","gallery",[538420,538422,538421]);galleries[41874]=new gallery(41874,"538404,538402,538399,538395","Peter Green","gallery",[538399,538402,538395,538404,538406,538407]);galleries[41877]=new gallery(41877,"3080596,590367,590366,590362,538418,538417,538414,538413,538412,538408","Philip Greene","gallery",[3080596,5836523,538408,538417,538409,538413,538410,538414,590362,538416,538412,590363,590364,538418,590366,590367]);galleries[42249]=new gallery(42249,"552124,552121,552118,550665,550660","Craig MacKenzie","gallery",[550670,552117,552118,552119,552120,552121,552122,550660,552124,550665]);galleries[42216]=new gallery(42216,"583753,583752,583751,545408,545407","Megan Ramsay","gallery",[545407,545408,583751,545409,545410,583752,583753,583755]);galleries[76880]=new gallery(76880,"1030463,1030460,1030455,1030452,1030449","Margaret F. Stevenson","gallery",[1030352,1030444,1030455,1030438,1030449,1030460,1030452,1030463]);var imageSets=new Object();imageSets[1]="3290553,3290551,3103096,3103089,3103072,3103069,3103063,3103052,3080596,1951796,1951794,1951793,1030463,1030460,1030455,1030452,1030449,1030438,1030352,835106,590366,590362,583753,581679,552124,552121,552118,550660,545605,545416,538422,538418,538413,538412,538408,538402,538399,538395,538392,538388,538382,538380,538373";imageSets[2]="3290553,3290551,3103096,3103089,3103077,3103076,3103072,3103070,3103069,3103063,3103052,3080596,1951796,1951794,1951793,1030463,1030460,1030455,1030452,1030449,835106,590367,590366,590362,583753,583752,583751,581679,552124,552121,552118,550665,550660,545605,545416,545408,545407,538422,538420,538418,538417,538414,538413,538412,538408,538404,538402,538399,538395,538392,538388,538385,538382,538380,538373";imageSets[3]="5836523,3290566,3290564,3290562,3290555,3290553,3290551,3103098,3103096,3103093,3103089,3103080,3103077,3103076,3103072,3103070,3103069,3103063,3103059,3103056,3103052,3080596,1951796,1951795,1951794,1951793,1951792,1951789,1951786,1951784,1951782,1951779,1951777,1951775,1030463,1030460,1030455,1030452,1030449,1030444,1030438,1030352,835106,590367,590366,590364,590363,590362,583755,583753";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/arttog/images";break}switch(a){case 1:b="http://www1.clikpic.com/arttog/images";break}switch(a){case 2:b="http://admin.clikpic.com/arttog/images";break}switch(a){case 24:b="http://tpc15/clikpic/arttog/images";break}switch(a){case 4:b="http://www.clikchurch.com/arttog/images";break}switch(a){case 5:b="http://www2.clikpic.com/arttog/images";break}switch(a){case 22:b="http://tpc5/clikpic/arttog/images";break}switch(a){case 23:b="http://tpc10/clikpic/arttog/images";break}switch(a){case 25:b="http://tpc16/clikpic/arttog/images";break}switch(a){case 15:b="http://www3.clikpic.com/arttog/images";break}switch(a){case 18:b="http://www4.clikpic.com/arttog/images";break}switch(a){case 19:b="http://www5.clikpic.com/arttog/images";break}switch(a){case 31:b="http://www7.clikpic.com/arttog/images";break}switch(a){case 32:b="http://admin2.clikpic.com/arttog/images";break}switch(a){case 33:b="http://www8.clikpic.com/arttog/images";break}switch(a){case 34:b="http://www9.clikpic.com/arttog/images";break}switch(a){case 35:b="http://admin3.clikpic.com/arttog/images";break}switch(a){case 37:b="http://admin4.clikpic.com/arttog/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="artiststogether: "+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> 							"+(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+'<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+'")'})}}};