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[2331642]=new thumbnail(2331642,"","","bazandmaureen_thumb.jpg",130,110,32);thumbnails[2331944]=new thumbnail(2331944,"228190",'"Trees by the river", acrylic on canvas, 24x22cm,£125',"trees_thumb.jpg",130,111,32);thumbnails[3762703]=new thumbnail(3762703,"228190","'Church', oil on canvas, 47 x 39 cm, £145","MKchurch_thumb.jpg",130,106,32);thumbnails[3762706]=new thumbnail(3762706,"228190","'Stone Circle', oil on canvas, 38 x 31 cm £150","MKStone_Circle_thumb.jpg",130,105,32);thumbnails[3762708]=new thumbnail(3762708,"228190","'Winter Cottages', oil on canvas, 27 x 17 cm £95","MKWinter_Cottages_thumb.jpg",130,81,32);thumbnails[5196703]=new thumbnail(5196703,"228190","'Shed in the Wood', acrylic, 23x17cm, £125 SOLD","shed_in_the_wood_thumb.jpg",130,91,32);thumbnails[5196711]=new thumbnail(5196711,"228191","'Bone Spirits', bone on slate, w.40cm, £125","bone_spirits_thumb.jpg",130,61,32);thumbnails[5196714]=new thumbnail(5196714,"228191","'Demon Slayer', serpentine, wood, copper, etc, l.35cm, £150","demon_slayer_thumb.jpg",130,115,32);thumbnails[5196720]=new thumbnail(5196720,"228191","'Goddess Neclace', bone, & beads, l.35cm, £60 SOLD","goddess-necklace_thumb.jpg",130,143,32);thumbnails[5196725]=new thumbnail(5196725,"228191","'Boat Man', steartite & resin, h.15cm, £75 SOLD","boat_man_thumb.jpg",130,133,32);thumbnails[5196728]=new thumbnail(5196728,"228191","'Boat people', steatite & resin, h.15cm, £95","boat_people_thumb.jpg",130,97,32);thumbnails[5196731]=new thumbnail(5196731,"228191","'Axehead', soapstone, l.7cm, £50","axehead_thumb.jpg",130,97,32);thumbnails[5196735]=new thumbnail(5196735,"228191","'Handaxe', serpentine, l.10cm, £75 SOLD","handaxe_thumb.jpg",130,96,32);thumbnails[5196739]=new thumbnail(5196739,"228191","'Owl', serpentine & bone, h.9cm, £125","large_owl_thumb.jpg",130,97,32);thumbnails[5196746]=new thumbnail(5196746,"228191","'Owl', serpentine & bone on oak, h.10cm, £75","standing_owl_thumb.jpg",130,167,32);thumbnails[5196752]=new thumbnail(5196752,"228191","'Skull', serpentine, h.6cm, £40","skull_thumb.jpg",130,97,32);thumbnails[5936768]=new thumbnail(5936768,"228190","'Marshes', mixed media, 26x18.5cm, £195","Marshes_thumb.JPG",130,98,32);thumbnails[5936785]=new thumbnail(5936785,"228190","'The red boat', oil, 24x19cm, £75 SOLD","the_red_boat_thumb.JPG",130,101,32);thumbnails[5936791]=new thumbnail(5936791,"228190","'Farm walk', acrylic, 20x20cm, £145","Farm_walk_thumb.JPG",130,128,32);thumbnails[5936824]=new thumbnail(5936824,"228190","'Farm Walk' II, acrylic, 34x19cm, £155","Farm_Walk_II_thumb.JPG",130,69,32);thumbnails[5936859]=new thumbnail(5936859,"228190","'Mining country', acrylic & collage, 33x22cm, £195","Mining_country_thumb.JPG",130,86,32);thumbnails[5936861]=new thumbnail(5936861,"228190","'Cornflowers', oil, 30.5x29.5cm, £100 SOLD","cornflowers_thumb.JPG",130,177,32);thumbnails[5936904]=new thumbnail(5936904,"228190","'Summer flowers', oil, 17.5x12.5cm, £50","flowers_thumb.JPG",130,187,32);thumbnails[5936929]=new thumbnail(5936929,"228190","'Blackthorn in bloom', acrylic & collage, 23.5x18.5cm, £150 SOLD","Blackthorn_in_bloom_thumb.JPG",130,101,32);thumbnails[5936934]=new thumbnail(5936934,"228190","'Fox', acrylic, 29x20cm, £125","Fox_thumb.JPG",130,89,32);thumbnails[5936961]=new thumbnail(5936961,"228190","'Fox' II, 29x20cm, £125","Fox_II_thumb.JPG",130,91,32);thumbnails[5936967]=new thumbnail(5936967,"228190","'Cove Cottages', 10x13.5cms, £135","Cove_Cottages_thumb.JPG",130,174,32);thumbnails[5936999]=new thumbnail(5936999,"228190","'Hidden cottage - Majorca', pastel, 20x16.5cm, £125","Majorcan_agaves_thumb.JPG",130,106,32);thumbnails[5937033]=new thumbnail(5937033,"228190","'Hidden Cottages', pastel, 24.5x8cm, £95 SOLD","Hidden_Cottages_thumb.JPG",130,42,32);thumbnails[5975385]=new thumbnail(5975385,"228191","'Beetle', serpentine & bone, w.22cm, £150 SOLD","beetle_thumb.JPG",130,98,32);thumbnails[5975655]=new thumbnail(5975655,"228191","'Grasshopper', alabaster, w.21cm, £175","grasshopper_thumb.JPG",130,95,32);thumbnails[5975702]=new thumbnail(5975702,"228191","'Handaxe', serpentine, w.14cm, £75 SOLD","handaxe_A6922EDC-1EC9-D45B-1CE83D03BF50B4AD_thumb.JPG",130,98,32);thumbnails[5975708]=new thumbnail(5975708,"228191","'Shaman', serpentine & badger hair, h.15cm, £50","punk__thumb.JPG",130,173,32);thumbnails[5975714]=new thumbnail(5975714,"228191","'Snail Shell', serpentine, w.6cm, £45 SOLD","shell_thumb.JPG",130,103,32);thumbnails[5975720]=new thumbnail(5975720,"228191","'Spiral', serpentine, d.8.5cm, £45 SOLD","spiral_thumb.JPG",130,97,32);thumbnails[5975724]=new thumbnail(5975724,"228191","'Ammonite man', slate, 36x42cm, £95","serpent__thumb.JPG",130,177,32);thumbnails[5975728]=new thumbnail(5975728,"228191","'Spiral', slate, 21x24cm, £75","slate_spiral_thumb.JPG",130,173,32);thumbnails[5975732]=new thumbnail(5975732,"228191","'Spirals', slate, 52x72cm, £250","slate_spirals_thumb.JPG",130,180,32);thumbnails[5975790]=new thumbnail(5975790,"228191","'Spiral ammonite', serpentine, w.12cm, £65 SOLD","spiral1_thumb.JPG",130,115,32);thumbnails[2331863]=new thumbnail(2331863,"228190",'"Man & Dog", acrylic on paper, 20x15cm, £100',"baz1_thumb.jpg",130,104,32);thumbnails[3762714]=new thumbnail(3762714,"228191","'Man becoming owl', serpentine & bronze(mahogany base), 23 x 24 x 9 cm £175","BMMan_becoming_owl_thumb.jpg",130,132,32);thumbnails[3763409]=new thumbnail(3763409,"228191","'Owl', soapstone, 20 x 10 x 5 cm, £90 SOLD","BMOwl_thumb.jpg",130,90,32);thumbnails[2331878]=new thumbnail(2331878,"228190",'"Hobo", acrylic on canvas, 37x30cm, £140',"baz4_thumb.jpg",130,92,32);thumbnails[3893452]=new thumbnail(3893452,"228190","'Cottages', oil on canvas, 24x20cm, £125","MKCottages_thumb.jpg",130,98,32);thumbnails[4739581]=new thumbnail(4739581,"228190","'Barns', pen & pastel, 28x9cm, £50","barns_thumb.jpg",130,49,32);thumbnails[2332004]=new thumbnail(2332004,"228190",'"Stone circle", oil on card, 24x17cm, £75 SOLD',"boscawen_thumb.jpg",130,91,32);thumbnails[3893455]=new thumbnail(3893455,"228190","'Cottages in winter', oil on canvas, 27x19cm, £95","MKWinter_Cottages1_thumb.jpg",130,84,32);thumbnails[4739586]=new thumbnail(4739586,"228191","'Walrus', serpentine & bone, l.12cm, £60","walrus_thumb.jpg",130,105,32);thumbnails[3893442]=new thumbnail(3893442,"228191","'Loon', soapstone, l.9cm, £30 SOLD","BMLoon_thumb.jpg",130,97,32);thumbnails[2331633]=new thumbnail(2331633,"151828","The Summer house","garden_4_thumb.jpg",130,98,32);thumbnails[4195179]=new thumbnail(4195179,"151828","Fish sculpture in garden.","fish_1_thumb.jpg",130,97,32);thumbnails[2331983]=new thumbnail(2331983,"151828","The workshop","garden_5_thumb.jpg",130,98,32);thumbnails[2331989]=new thumbnail(2331989,"151828","The vegetable garden","veg_gdn_2_thumb.jpg",130,98,32);thumbnails[2331990]=new thumbnail(2331990,"151828","House and garden","garden_11_thumb.jpg",130,98,32);thumbnails[2331992]=new thumbnail(2331992,"151828","Student accommodation","cottage_front_thumb.jpg",130,98,32);thumbnails[4098289]=new thumbnail(4098289,"245850","","Coco_thumb.jpg",130,173,32);thumbnails[4098293]=new thumbnail(4098293,"245850","","rob1_thumb.jpg",130,97,32);thumbnails[4098322]=new thumbnail(4098322,"245850","","Jammy2_thumb.jpg",130,97,32);thumbnails[4098327]=new thumbnail(4098327,"245850","","Dharm_thumb.jpg",130,173,32);thumbnails[2331985]=new thumbnail(2331985,"245850","","rob_thumb.jpg",130,173,32);thumbnails[2331987]=new thumbnail(2331987,"245850","","John_thumb.jpg",130,173,32);thumbnails[2331640]=new thumbnail(2331640,"152061","Cornwall","rocks_thumb.jpg",130,97,32);thumbnails[2331968]=new thumbnail(2331968,"152061","Lamorna Cove","lamorna-cove_thumb.jpg",130,97,32);thumbnails[2331976]=new thumbnail(2331976,"152061","Lamorna top view","lamorna-top-view_thumb.jpg",130,87,32);thumbnails[2331978]=new thumbnail(2331978,"152061","The Merry Maidens","merry-maidens_thumb.jpg",130,87,32);thumbnails[2331979]=new thumbnail(2331979,"152061","Mousehole","mousehole-best_thumb.jpg",130,98,32);thumbnails[2331981]=new thumbnail(2331981,"152061","St Michael's Mount","mount_thumb.jpg",130,173,32);thumbnails[2331982]=new thumbnail(2331982,"152061","Porthcurno","porthcurno_thumb.jpg",130,87,32);thumbnails[2339507]=new thumbnail(2339507,"152061","Echiums in Cornwall","echiums_thumb.jpg",130,195,32);thumbnails[2327038]=new thumbnail(2327038,"152057","slate spirals","spirals_thumb.jpg",130,152,32);thumbnails[2331683]=new thumbnail(2331683,"152057","Cycladic head","alabcycl_thumb.jpg",130,174,32);thumbnails[2331710]=new thumbnail(2331710,"152057","Leveret in the courgettes","leveret_thumb.jpg",130,98,32);thumbnails[2331740]=new thumbnail(2331740,"152057","Shaman in the garden","shaman_thumb.jpg",130,97,32);thumbnails[2331741]=new thumbnail(2331741,"152057","Modigliani head","modiglia_thumb.jpg",130,174,32);thumbnails[2331744]=new thumbnail(2331744,"152057","Peaceful god","bighead_thumb.jpg",130,168,32);thumbnails[3763417]=new thumbnail(3763417,"151813","Bear","BMBear_thumb.jpg",130,86,32);thumbnails[3763423]=new thumbnail(3763423,"151813","Hawks Head","BMHawks_Head_thumb.jpg",130,97,32);thumbnails[3806866]=new thumbnail(3806866,"151813","'Shaman's Box'","BMShamans_Box_thumb.jpg",130,87,32);thumbnails[3893438]=new thumbnail(3893438,"151813","Turtle","BMTortoise_thumb.jpg",130,97,32);thumbnails[5196732]=new thumbnail(5196732,"151813","'Fish'","bone_fish_thumb.jpg",130,97,32);thumbnails[5196741]=new thumbnail(5196741,"151813","'Arctic Loon'","loon_thumb.jpg",130,97,32);thumbnails[5196743]=new thumbnail(5196743,"151813","'Nightjar'","nightjar_thumb.jpg",130,97,32);thumbnails[2331780]=new thumbnail(2331780,"151813","Bear","bear_thumb.jpg",130,84,32);thumbnails[2331786]=new thumbnail(2331786,"151813","Bird ","bird-2_thumb.jpg",130,129,32);thumbnails[2331811]=new thumbnail(2331811,"151813","Hawk","hawk_thumb.jpg",130,94,32);thumbnails[2331813]=new thumbnail(2331813,"151813","Narwhal","narwhal_thumb.jpg",130,97,32);thumbnails[2331815]=new thumbnail(2331815,"151813","Magic Owl","owl_thumb.jpg",130,125,32);thumbnails[2331819]=new thumbnail(2331819,"151813","Slate owl","slateowl_thumb.jpg",130,119,32);thumbnails[2331847]=new thumbnail(2331847,"152056","Earth goddess","earthgoddess1_thumb.jpg",130,158,32);thumbnails[4098643]=new thumbnail(4098643,"152056",'"Cycladic Head"',"Cycladic_head_thumb.jpg",130,198,32);thumbnails[2331852]=new thumbnail(2331852,"152056","Alabaster goddess","goddess_thumb.jpg",130,224,32);thumbnails[2331854]=new thumbnail(2331854,"152056","God head","godhead_thumb.jpg",130,169,32);thumbnails[2331856]=new thumbnail(2331856,"152056","Horned god","hornedgod_thumb.jpg",130,222,32);thumbnails[2331858]=new thumbnail(2331858,"152056","Slate goddess","slategoddess_thumb.jpg",130,174,32);thumbnails[2331860]=new thumbnail(2331860,"152056","Threshold god","ThresholdGod_thumb.jpg",130,104,32);var galleries=new Object();galleries[228191]=new gallery(228191,"5975790,5975732,5975728,5975724,5975720,5975714,5975708,5975702,5975655,5975385","Baz's stonecarvings","section279101",[5196711,5196714,5196720,5196725,5196728,5196731,5196735,5196739,5196746,5196752,5975385,5975655,5975702,5975708,5975714,5975720,5975724,5975728,5975732,5975790,3762714,3763409,4739586,3893442]);galleries[228190]=new gallery(228190,"5937033,5936999,5936967,5936961,5936934,5936929,5936904,5936861,5936859,5936824","Maureen's paintings","section279101",[2331944,3762703,3762706,3762708,5196703,5936768,5936785,5936791,5936824,5936859,5936861,5936904,5936929,5936934,5936961,5936967,5936999,5937033,2331863,2331878,3893452,4739581,2332004,3893455]);galleries[151828]=new gallery(151828,"4195179,2331992,2331990,2331989,2331983,2331633","House & Workshop ","gallery",[2331633,4195179,2331983,2331989,2331990,2331992]);galleries[245850]=new gallery(245850,"4098327,4098322,4098293,4098289,2331987,2331985","Students","gallery",[4098289,4098293,4098322,4098327,2331985,2331987]);galleries[152061]=new gallery(152061,"2339507,2331982,2331981,2331979,2331978,2331976,2331968,2331640","Cornwall","gallery",[2331640,2331968,2331976,2331978,2331979,2331981,2331982,2339507]);galleries[152057]=new gallery(152057,"2331744,2331741,2331740,2331710,2331683,2327038","Carvings in the Garden","section298310",[2327038,2331683,2331710,2331740,2331741,2331744]);galleries[151813]=new gallery(151813,"5196743,5196741,5196732,3893438,3806866,3763423,3763417,2331819,2331815,2331813","Birds and Animals","section298310",[3763417,3763423,3806866,3893438,5196732,5196741,5196743,2331780,2331786,2331811,2331813,2331815,2331819]);galleries[152056]=new gallery(152056,"4098643,2331860,2331858,2331856,2331854,2331852,2331847","Gods and Goddesses","section298310",[2331847,4098643,2331852,2331854,2331856,2331858,2331860]);var imageSets=new Object();imageSets[1]="2327038";imageSets[3]="5975790,5975702,5937033,5936929,5936861,5936785,5196735,5196703";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/mehew1/images";break}switch(a){case 1:b="http://www1.clikpic.com/mehew1/images";break}switch(a){case 2:b="http://admin.clikpic.com/mehew1/images";break}switch(a){case 24:b="http://tpc15/clikpic/mehew1/images";break}switch(a){case 4:b="http://www.clikchurch.com/mehew1/images";break}switch(a){case 5:b="http://www2.clikpic.com/mehew1/images";break}switch(a){case 22:b="http://tpc5/clikpic/mehew1/images";break}switch(a){case 23:b="http://tpc10/clikpic/mehew1/images";break}switch(a){case 25:b="http://tpc16/clikpic/mehew1/images";break}switch(a){case 15:b="http://www3.clikpic.com/mehew1/images";break}switch(a){case 18:b="http://www4.clikpic.com/mehew1/images";break}switch(a){case 19:b="http://www5.clikpic.com/mehew1/images";break}switch(a){case 31:b="http://www7.clikpic.com/mehew1/images";break}switch(a){case 32:b="http://admin2.clikpic.com/mehew1/images";break}switch(a){case 33:b="http://www8.clikpic.com/mehew1/images";break}switch(a){case 34:b="http://www9.clikpic.com/mehew1/images";break}switch(a){case 35:b="http://admin3.clikpic.com/mehew1/images";break}switch(a){case 37:b="http://admin4.clikpic.com/mehew1/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="Stone Carving Cornwall: "+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;resizePhotoInfo();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(b,a){imageID=randomListVal(galleries[b].featured_images);if(imageID!=0){a.src=thumbnails[imageID].src;a.width=thumbnails[imageID].width;a.height=thumbnails[imageID].height}}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+'")'})}}};