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[5209517]=new thumbnail(5209517,"","","MOWY024_Misty_Mammoth_small_1_thumb.jpg",113,113,1);thumbnails[1778468]=new thumbnail(1778468,"","","JK_09_thumb.jpg",91,130,1);thumbnails[2134455]=new thumbnail(2134455,"","Flevoland sunset","Flevoland001_edited-1_thumb.jpg",113,113,1);thumbnails[2495310]=new thumbnail(2495310,"","Aldeyjarfoss","Iceland-08-Aldeyjarfoss_thumb.jpg",113,113,1);thumbnails[2496664]=new thumbnail(2496664,"","","homepage-4_thumb.jpg",113,113,1);thumbnails[3003248]=new thumbnail(3003248,"","Sunrise at Mesquite Dunes","Mesquite-Dunes-Sunrise_thumb.jpg",113,113,1);thumbnails[4040501]=new thumbnail(4040501,"","Black Mount","GC09_-_Black_Mount004_thumb.jpg",130,130,1);thumbnails[2495306]=new thumbnail(2495306,"","Lichen","Iceland-08-4761-lichen_thumb.jpg",113,113,1);thumbnails[2134523]=new thumbnail(2134523,"","Mewslade, Gower","Mewslade-2003-1_thumb.jpg",113,113,1);thumbnails[1577853]=new thumbnail(1577853,"","Reine","Reine-hut_thumb.jpg",113,113,1);thumbnails[1548501]=new thumbnail(1548501,"","San Antimo","SanAntimo_thumb.jpg",113,113,1);thumbnails[1548492]=new thumbnail(1548492,"","Barns at Kvaloy","Kvaloybarns_thumb.jpg",113,113,1);thumbnails[2134460]=new thumbnail(2134460,"362935","Flevoland sunset 2","Flevoland-003_thumb.jpg",113,113,1);thumbnails[2495317]=new thumbnail(2495317,"362935","Dynjandi waterfall","Iceland-08-Dynjandi_thumb.jpg",113,113,1);thumbnails[2501039]=new thumbnail(2501039,"362935","Basalt columns","Hofsos-basalt_thumb.jpg",113,113,1);thumbnails[3307244]=new thumbnail(3307244,"362935","Patterns in the ice","IJs 09-5439_thumb.jpg",113,113,1);thumbnails[3307256]=new thumbnail(3307256,"362935","Sheets of ice","IJs 09-5461_thumb.jpg",113,113,1);thumbnails[3307259]=new thumbnail(3307259,"362935","Sheets of ice (2)","IJs 09-5463_thumb.jpg",113,113,1);thumbnails[3307271]=new thumbnail(3307271,"362935","Ice patterns","IJs 09-5469_thumb.jpg",113,113,1);thumbnails[3307275]=new thumbnail(3307275,"362935","Reflections","IJs 09-5508_thumb.jpg",113,113,1);thumbnails[1548511]=new thumbnail(1548511,"362935","Vik","Vik_thumb.jpg",113,113,1);thumbnails[1548339]=new thumbnail(1548339,"362935","Angel Glacier","Angleglacier_thumb.jpg",113,113,1);thumbnails[1548363]=new thumbnail(1548363,"362935","Markermeer","Markermeer_thumb.jpg",113,113,1);thumbnails[1550671]=new thumbnail(1550671,"362935","Traigh Steinigidh","Traigh_Steinigidh_thumb.jpg",113,113,1);thumbnails[1550670]=new thumbnail(1550670,"362935","Seilebost","Seilebost_thumb.jpg",113,113,1);thumbnails[1548365]=new thumbnail(1548365,"362935","Tranoy lighthouse","Tranoy_thumb.jpg",113,113,1);thumbnails[1548513]=new thumbnail(1548513,"362935","Vikspollen","Vikspollen_thumb.jpg",113,113,1);thumbnails[1548509]=new thumbnail(1548509,"362935","Kampereiland","Kampereiland_thumb.jpg",113,113,1);thumbnails[1697836]=new thumbnail(1697836,"362935","Kampereiland in winter","Kampereiland-winter_thumb.jpg",113,113,1);thumbnails[3003238]=new thumbnail(3003238,"362936","Telegraph Poles","Death-Valley-Telegraph-Pole_thumb.jpg",113,113,1);thumbnails[2495221]=new thumbnail(2495221,"362936","Raudisandur","Iceland-08-4278-Raudisandur_thumb.jpg",113,113,1);thumbnails[2495274]=new thumbnail(2495274,"362936","Breidavik beach","Iceland-08-4304-Breidavik_thumb.jpg",113,113,1);thumbnails[3003209]=new thumbnail(3003209,"362936","Badwater","Badwater-Sunrise_thumb.jpg",113,113,1);thumbnails[3003231]=new thumbnail(3003231,"362936","Big country, big skies.","Cloudscape_thumb.jpg",113,113,1);thumbnails[3003243]=new thumbnail(3003243,"362936","Sunrise at Mesquite Dunes","Mesquite-Dunes-Sunrise-2_thumb.jpg",113,113,1);thumbnails[3003256]=new thumbnail(3003256,"362936","Looking down on Owen's Valley","Owen's-Valley_thumb.jpg",113,113,1);thumbnails[3037747]=new thumbnail(3037747,"362936","Sunrise at Zabriskie Point","Zabriskie-Point_thumb.jpg",113,113,1);thumbnails[1548347]=new thumbnail(1548347,"362936","Cypresses","Cypresses_thumb.jpg",113,113,1);thumbnails[1548502]=new thumbnail(1548502,"362936","Tuscan hills","Tuscany_thumb.jpg",113,113,1);thumbnails[1548500]=new thumbnail(1548500,"362936","Franchere Peak","FrancherePeak_thumb.jpg",113,113,1);thumbnails[1548348]=new thumbnail(1548348,"362936","Dyrfjall","Dyrfjall_thumb.jpg",113,113,1);thumbnails[1551122]=new thumbnail(1551122,"362936","Glen Etive","GlenCoe_thumb.jpg",113,113,1);thumbnails[1633016]=new thumbnail(1633016,"362936","Ferns on Kvaloy","Ferns-on-Kvaloy_thumb.jpg",113,113,1);thumbnails[1579081]=new thumbnail(1579081,"362936","Flevoland","Flevoland_thumb.jpg",113,113,1);thumbnails[3003215]=new thumbnail(3003215,"362938","Blue barrel","Blue-Barrel_thumb.jpg",113,113,1);thumbnails[3003225]=new thumbnail(3003225,"362938","Detail of a wall of one of the many wooden buildings in Bodie. ","DVNS08_Bodie_knots_cp_thumb.jpg",113,113,1);thumbnails[3003253]=new thumbnail(3003253,"362938","Mosaic Canyon","Mosaic-Canyon_thumb.jpg",113,113,1);thumbnails[3003268]=new thumbnail(3003268,"362938","Detail of one of the tin clad sheds in Bodie.","Tin-Shed_thumb.jpg",113,113,1);thumbnails[3170306]=new thumbnail(3170306,"362938","Mono Lake grasses","Mono-Lake-grasses-2_thumb.jpg",113,113,1);thumbnails[2495286]=new thumbnail(2495286,"362938","Orange and blue","Iceland-08-4382-rust_thumb.jpg",113,113,1);thumbnails[1577848]=new thumbnail(1577848,"362938","Garennin","Garennin_thumb.jpg",113,113,1);thumbnails[2495297]=new thumbnail(2495297,"362938","Kelp washed up on a beach.","Iceland-08-4394---kelp_thumb.jpg",113,113,1);thumbnails[2495327]=new thumbnail(2495327,"362938","Sand patterns","Iceland-08-Hvitserkur_thumb.jpg",113,113,1);thumbnails[1550974]=new thumbnail(1550974,"362938","Dettifoss","Dettifoss_thumb.jpg",113,113,1);thumbnails[1548372]=new thumbnail(1548372,"362938","Svinafellsjokull","Svinafellsjokull_thumb.jpg",113,113,1);thumbnails[1548367]=new thumbnail(1548367,"362938","Sticks","Sticks_thumb.jpg",113,113,1);thumbnails[2134522]=new thumbnail(2134522,"362938","Mewslade, Gower","Mewslade-2002-copy_thumb.jpg",113,113,1);thumbnails[2134528]=new thumbnail(2134528,"362938","Worms Head beach, Gower","Worms-Head-2001-1_thumb.jpg",113,113,1);thumbnails[1550925]=new thumbnail(1550925,"362938","Sand patterns","Sandpatterns_thumb.jpg",113,113,1);thumbnails[1548481]=new thumbnail(1548481,"362938","Ferns","Ferns_thumb.jpg",113,113,1);thumbnails[2495301]=new thumbnail(2495301,"362938","Dandelions","Iceland-08-4649-dandelions_thumb.jpg",113,113,1);thumbnails[2501776]=new thumbnail(2501776,"362938","Hosta leaf","Hosta_thumb.jpg",113,113,1);thumbnails[1551332]=new thumbnail(1551332,"362938","Ice patterns","Icepatterns_thumb.jpg",113,113,1);thumbnails[1548494]=new thumbnail(1548494,"362938","Reflections","Reflections_thumb.jpg",113,113,1);thumbnails[1548493]=new thumbnail(1548493,"362938","Logs","Logs_thumb.jpg",113,113,1);thumbnails[1548343]=new thumbnail(1548343,"362938","Aspens","Aspens_thumb.jpg",113,113,1);thumbnails[1578858]=new thumbnail(1578858,"362938","Silver birches","Silver-birches_thumb.jpg",113,113,1);thumbnails[2495336]=new thumbnail(2495336,"362938","At Viti","Iceland-08---Viti_thumb.jpg",113,113,1);thumbnails[1577855]=new thumbnail(1577855,"362938","Rock detail","Rock-detail_thumb.jpg",113,113,1);thumbnails[5209526]=new thumbnail(5209526,"141807","","MOWY013_Oxbow_Bend_2_thumb.jpg",113,113,1);thumbnails[5209522]=new thumbnail(5209522,"141807","","MOWY004_Mormon_Row_dawn_edit_small1_thumb.jpg",113,113,1);thumbnails[5209524]=new thumbnail(5209524,"141807","","MOWY025_Misty_Mammoth_small_2_thumb.jpg",113,113,1);thumbnails[5209521]=new thumbnail(5209521,"141807","","MOWY008_tin_wall_Virginia_City_thumb.jpg",113,113,1);var galleries=new Object();galleries[362935]=new gallery(362935,"1548365","Water","gallery",[2134460,2495317,2501039,3307244,3307256,3307259,3307271,3307275,1548511,1548339,1548363,1550671,1550670,1548365,1548513,1548509,1697836]);galleries[362936]=new gallery(362936,"1548347","Land","gallery",[3003238,2495221,2495274,3003209,3003231,3003243,3003256,3037747,1548347,1548502,1548500,1548348,1551122,1633016,1579081]);galleries[362938]=new gallery(362938,"1548372,1548367","Details & Abstracts","gallery",[3003215,3003225,3003253,3003268,3170306,2495286,1577848,2495297,2495327,1550974,1548372,1548367,2134522,2134528,1550925,1548481,2495301,2501776,1551332,1548494,1548493,1548343,1578858,2495336,1577855]);galleries[141807]=new gallery(141807,"5209526,5209524,5209522,5209521","Latest images","gallery",[5209526,5209522,5209524,5209521]);var imageSets=new Object();imageSets[1]="5209526,3003268,2501776,1578858";imageSets[2]="1548372,1548367,1548365,1548347";imageSets[3]="5209526,5209524,5209522,5209521,5209517,4040501,3307275,3307271,3307259,3307256,3307244,3170306,3037747,3003268,3003256,3003253,3003248,3003243,3003238,3003231,3003225,3003215,3003209,2501776,2501039,2496664,2495336,2495327,2495317,2495310,2495306,2495301,2495297,2495286,2495274,2495221,2134528,2134523,2134522,2134460,2134455,1778468,1697836,1633016,1579081,1578858,1577855,1577853,1577848,1551332";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/janneke/images";break}switch(a){case 1:b="http://www1.clikpic.com/janneke/images";break}switch(a){case 2:b="http://admin.clikpic.com/janneke/images";break}switch(a){case 24:b="http://tpc15/clikpic/janneke/images";break}switch(a){case 4:b="http://www.clikchurch.com/janneke/images";break}switch(a){case 5:b="http://www2.clikpic.com/janneke/images";break}switch(a){case 22:b="http://tpc5/clikpic/janneke/images";break}switch(a){case 23:b="http://tpc10/clikpic/janneke/images";break}switch(a){case 25:b="http://tpc16/clikpic/janneke/images";break}switch(a){case 15:b="http://www3.clikpic.com/janneke/images";break}switch(a){case 18:b="http://www4.clikpic.com/janneke/images";break}switch(a){case 19:b="http://www5.clikpic.com/janneke/images";break}switch(a){case 31:b="http://www7.clikpic.com/janneke/images";break}switch(a){case 32:b="http://admin2.clikpic.com/janneke/images";break}switch(a){case 33:b="http://www8.clikpic.com/janneke/images";break}switch(a){case 34:b="http://www9.clikpic.com/janneke/images";break}switch(a){case 35:b="http://admin3.clikpic.com/janneke/images";break}switch(a){case 37:b="http://admin4.clikpic.com/janneke/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="Janneke Kroes Photography: "+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+'")'})}}};