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[1766140]=new thumbnail(1766140,"118459","Roses<br>\r\nSOLD","roses_thumb.jpg",130,155,18);thumbnails[1766153]=new thumbnail(1766153,"118459","Stone Roses","stone roses view 2_thumb.jpg",130,129,18);thumbnails[1766164]=new thumbnail(1766164,"118695","Sea Garden","sea garden_thumb.JPG",130,109,18);thumbnails[1773953]=new thumbnail(1773953,"118695","Sea Meadow","sea meadow_thumb.jpg",130,111,18);thumbnails[1775755]=new thumbnail(1775755,"119400","my house","house and garden_thumb.JPG",130,87,18);thumbnails[1786139]=new thumbnail(1786139,"119400","my garden","garden_thumb.JPG",130,87,18);thumbnails[1786145]=new thumbnail(1786145,"119400","upstairs bedroom","upstairs bedroom 1_thumb.JPG",130,87,18);thumbnails[1786148]=new thumbnail(1786148,"119400","upstairs sitting room","upstairs sitting room_thumb.JPG",130,87,18);thumbnails[1786149]=new thumbnail(1786149,"119400","kitchen","kitchen_thumb.JPG",130,194,18);thumbnails[1786153]=new thumbnail(1786153,"119400","downstairs outside dining and lounge area","downstairs patio_thumb.JPG",130,87,18);thumbnails[1786155]=new thumbnail(1786155,"119400","downstairs bedroom","downstairs bedroom_thumb.JPG",130,87,18);thumbnails[1794446]=new thumbnail(1794446,"118459","moonlight and roses","moolight and roses_thumb.jpg",130,97,18);thumbnails[1815816]=new thumbnail(1815816,"118459","Stone roses 2","sea roses 3_thumb.jpg",130,130,18);thumbnails[1815828]=new thumbnail(1815828,"118459","Roses 2<br>\r\nSOLD","roses 2_thumb.jpg",130,108,18);thumbnails[1925208]=new thumbnail(1925208,"129141","Cat's Garden","Cats garden_thumb.JPG",130,153,18);thumbnails[1961827]=new thumbnail(1961827,"118459"," Tangle<br>\r\nSold","Tangle_thumb.JPG",130,165,18);thumbnails[1975872]=new thumbnail(1975872,"159163","Posy<br>\r\n<br>\r\nFor Sale","posy_thumb.jpg",130,173,18);thumbnails[2007513]=new thumbnail(2007513,"129141","A Celebration of Life<br>\r\nSOLD","A Celebration of Life_thumb.JPG",130,170,18);thumbnails[2017478]=new thumbnail(2017478,"119400","Land For Sale","land_for sale copy for clikpic_thumb.jpg",130,184,18);thumbnails[2036439]=new thumbnail(2036439,"159163","Posy 2","posy 2_thumb.JPG",130,198,18);thumbnails[2054923]=new thumbnail(2054923,"129141","Passion<br>\r\nSOLD","Passion_thumb.jpg",130,119,18);thumbnails[2114067]=new thumbnail(2114067,"159163","Posy 3","posy 3_thumb.jpg",130,194,18);thumbnails[2126836]=new thumbnail(2126836,"158986","Fish<br>\r\nSOLD","fish_thumb.jpg",130,84,18);thumbnails[2178333]=new thumbnail(2178333,"118695","Offerings to The Sea Gods","DSC01270jeannie2_thumb.JPG",130,78,18);thumbnails[2178334]=new thumbnail(2178334,"129141","Water Iris","DSC01271jeannie_thumb.JPG",130,102,18);thumbnails[2295842]=new thumbnail(2295842,"152719","Cow Parsley","IMG_1589_thumb.JPG",87,130,18);thumbnails[2295849]=new thumbnail(2295849,"152719","Windswept in Portugal","IMG_1590[1]_thumb.JPG",92,130,18);thumbnails[2295853]=new thumbnail(2295853,"129141","Alliums<br>\r\nSOLD","IMG_1423_thumb.JPG",130,105,18);thumbnails[2343489]=new thumbnail(2343489,"152719","Meadow Portugal 2008","meadow Portugal 2008_thumb.jpg",130,96,18);thumbnails[2343498]=new thumbnail(2343498,"159163","Alliums in Vase","IMG_8792_thumb.jpg",130,198,18);thumbnails[2343507]=new thumbnail(2343507,"152719","Studio at OBRAS","IMG_8790_thumb.jpg",130,87,18);thumbnails[2357543]=new thumbnail(2357543,"152719","OBRAS Studio","IMG_8775_thumb.jpg",130,87,18);thumbnails[2454465]=new thumbnail(2454465,"152719","Cow Parlsey Meadow<br>\r\n<br>\r\nSOLD","Meadow_thumb.JPG",130,88,18);thumbnails[2454477]=new thumbnail(2454477,"152719","Summer Meadow Portugal 2008 ","Meadow Portugal_thumb.JPG",130,95,18);thumbnails[2454484]=new thumbnail(2454484,"152719",'Roses "Tangle" Portugal 2008',"Roses in June_thumb.JPG",130,274,18);thumbnails[2473795]=new thumbnail(2473795,"158986","Angel","Angel_thumb.jpg",130,153,18);thumbnails[2473824]=new thumbnail(2473824,"159163","Dried Flowers In Vase<br>\r\nSOLD","Dried Flowers_thumb.JPG",130,160,18);thumbnails[2473849]=new thumbnail(2473849,"129141","Agapanthus","Agapanthus_thumb.JPG",130,98,18);thumbnails[2473939]=new thumbnail(2473939,"129141","Cornflowers 1","IMG_2013_thumb.JPG",130,197,18);thumbnails[2473953]=new thumbnail(2473953,"129141","Cornflowers 2","Cornflowers 2_thumb.jpg",130,95,18);thumbnails[2476630]=new thumbnail(2476630,"159163","Mackintosh Roses<br>\r\nSOLD","IMG_2016_thumb.JPG",130,199,18);thumbnails[3608120]=new thumbnail(3608120,"","","resized_offering_painting_thumb.jpg",130,102,18);thumbnails[3612827]=new thumbnail(3612827,"221077","Cafe Des Artistes Ubud Bali 2008","exhibition_for_resizingjpg_6_thumb.jpg",130,98,18);thumbnails[3612829]=new thumbnail(3612829,"221077","Cafe Des Artistes Ubud Bali 2008","exhibition_for_resizingjpg_7_thumb.jpg",130,98,18);thumbnails[3612837]=new thumbnail(3612837,"221077","Cafe Des Artistes Ubud Bali 2008","exhibition_for_resizingjpg_9_thumb.jpg",130,98,18);thumbnails[3612913]=new thumbnail(3612913,"221077","Cafe Des Artistes Ubud Bali 2008","for_resizing_1_thumb.jpg",130,87,18);thumbnails[3612922]=new thumbnail(3612922,"221077","Cafe Des Artistes Ubud Bali 2008","for_resizing_2_thumb.jpg",130,87,18);thumbnails[3612974]=new thumbnail(3612974,"221076","Half Day Workshop in Ubud Bali","painting_class_thumb.jpg",130,98,18);thumbnails[4166874]=new thumbnail(4166874,"129141","Fairy","roses_paintings_001_thumb.JPG",130,98,18);thumbnails[4166934]=new thumbnail(4166934,"129141","Peace","roses_paintings_002_thumb.JPG",130,98,18);thumbnails[4166975]=new thumbnail(4166975,"129141","Nevada","roses_paintings_003_thumb.JPG",130,98,18);thumbnails[4661409]=new thumbnail(4661409,"129141","Wild roses","Fritha_1_thumb.jpg",130,128,18);thumbnails[4661410]=new thumbnail(4661410,"129141","Summer Roses","Fritha_2_thumb.jpg",130,128,18);thumbnails[5059864]=new thumbnail(5059864,"221076","NEW WORKSHOP<br>\r\nJoin Jan for a four hour workshop exploring the use of mixed media to create<br>\r\nabstract and semi abstract paintings. This particular workshop will focus on<br>\r\nexploring creative techniques using black and white media including<br>\r\nacrylics, marbling inks, glossies, spray paints and gold wax on watercolour<br>\r\npaper, sandpaper and canvas and will be of particular value to artists open<br>\r\nto allowing the mediums used and their reactions with each other to control<br>\r\nand determine the direction and outcome of the work rather than themselves.<br>\r\n<br>\r\nDate: 22nd November 2009<br>\r\nVenue: Manik Organik Jl DanauTamblingan 85, Sanur<br>\r\nTime: 1pm to 5pm<br>\r\nCost: Rp  475.000<br>\r\n Early bird: Rp 450,000 if paid by 15th November 2009<br>\r\nLimited space available deposit required to secure your place<br>\r\nFurther info: 0361 855 3380 / info@manikorganikbali.com<br>\r\n<br>\r\n<br>\r\n<br>\r\n<br>\r\n<br>\r\n","Black_and_White_001_thumb.JPG",130,134,18);var galleries=new Object();galleries[221077]=new gallery(221077,"3612922,3612913,3612837,3612829,3612827","Exhibitions","gallery",[3612827,3612829,3612837,3612913,3612922]);galleries[129141]=new gallery(129141,"4661410,4661409,4166975,4166934,4166874,2473953,2473939,2473849,2295853,2178334","Gardens and Flowers","gallery",[1925208,2007513,2054923,2178334,2295853,2473849,2473939,2473953,4166874,4166934,4166975,4661409,4661410]);galleries[119400]=new gallery(119400,"1786139","House and Garden in Ubud bali","gallery",[1775755,1786139,1786145,1786148,1786149,1786153,1786155,2017478]);galleries[158986]=new gallery(158986,"2473795,2126836","Miscellaneous","gallery",[2126836,2473795]);galleries[152719]=new gallery(152719,"2454484,2454477,2454465,2357543,2343507,2343489,2295849,2295842","OBRAS Portugal 2008","gallery",[2295842,2295849,2343489,2343507,2357543,2454465,2454477,2454484]);galleries[221076]=new gallery(221076,"5059864,3612974","Painting workshops","gallery",[3612974,5059864]);galleries[118695]=new gallery(118695,"1773953,1766164","Sea Gardens","gallery",[1766164,1773953,2178333]);galleries[118459]=new gallery(118459,"1766140","Stone Roses","gallery",[1766140,1766153,1794446,1815816,1815828,1961827]);galleries[159163]=new gallery(159163,"2476630,2473824,2343498,2114067,2036439,1975872","Vases of Flowers","gallery",[1975872,2036439,2114067,2343498,2473824,2476630]);var imageSets=new Object();imageSets[1]="2476630,2473824,2343498";imageSets[2]="1786139,1773953,1766164,1766140";imageSets[3]="5059864,4661410,4661409,4166975,4166934,4166874,3612974,3612922,3612913,3612837,3612829,3612827,3608120,2476630,2473953,2473939,2473849,2473824,2473795,2454484,2454477,2454465,2357543,2343507,2343498,2343489,2295853,2295849,2295842,2178334,2178333,2126836,2114067,2054923,2036439,2017478,2007513,1975872,1961827,1925208,1815828,1815816,1794446,1786155,1786153,1786149,1786148,1786145,1786139,1775755";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/janmerrills/images";break}switch(a){case 1:b="http://www1.clikpic.com/janmerrills/images";break}switch(a){case 2:b="http://admin.clikpic.com/janmerrills/images";break}switch(a){case 24:b="http://tpc15/clikpic/janmerrills/images";break}switch(a){case 4:b="http://www.clikchurch.com/janmerrills/images";break}switch(a){case 5:b="http://www2.clikpic.com/janmerrills/images";break}switch(a){case 22:b="http://tpc5/clikpic/janmerrills/images";break}switch(a){case 23:b="http://tpc10/clikpic/janmerrills/images";break}switch(a){case 25:b="http://tpc16/clikpic/janmerrills/images";break}switch(a){case 15:b="http://www3.clikpic.com/janmerrills/images";break}switch(a){case 18:b="http://www4.clikpic.com/janmerrills/images";break}switch(a){case 19:b="http://www5.clikpic.com/janmerrills/images";break}switch(a){case 31:b="http://www7.clikpic.com/janmerrills/images";break}switch(a){case 32:b="http://admin2.clikpic.com/janmerrills/images";break}switch(a){case 33:b="http://www8.clikpic.com/janmerrills/images";break}switch(a){case 34:b="http://www9.clikpic.com/janmerrills/images";break}switch(a){case 35:b="http://admin3.clikpic.com/janmerrills/images";break}switch(a){case 37:b="http://admin4.clikpic.com/janmerrills/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="jan merrills paintings: "+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({centre:true});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+'")'})}}};