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[3271708]=new thumbnail(3271708,"199436",'"dining with death"',"dining-with-death_thumb.jpg",130,184,32);thumbnails[3108194]=new thumbnail(3108194,"151185",'"light"',"015_thumb.jpg",130,92,32);thumbnails[3108209]=new thumbnail(3108209,"151185",'"the bridge"',"025_thumb.jpg",130,92,32);thumbnails[3108214]=new thumbnail(3108214,"151185",'"style confusion"<br>\r\n',"035_thumb.jpg",130,92,32);thumbnails[3108234]=new thumbnail(3108234,"151185",'"back in the days"',"045_thumb.jpg",130,92,32);thumbnails[3108238]=new thumbnail(3108238,"151185",'"Solitude"',"055_thumb.jpg",130,92,32);thumbnails[3108241]=new thumbnail(3108241,"151185",'"Dark world"',"064_thumb.jpg",130,92,32);thumbnails[3108336]=new thumbnail(3108336,"162587",'"roomservice"<br>\r\n',"016_thumb.jpg",130,92,32);thumbnails[3108341]=new thumbnail(3108341,"162587",'"green walls"<br>\r\n',"026_thumb.jpg",130,92,32);thumbnails[3108348]=new thumbnail(3108348,"162587",'"the blue door"<br>\r\n',"036_thumb.jpg",130,92,32);thumbnails[3108351]=new thumbnail(3108351,"162587",'"yellow"<br>\r\n',"046_thumb.jpg",130,92,32);thumbnails[3108355]=new thumbnail(3108355,"162587",'"bricks and bones"<br>\r\n<br>\r\n',"056_thumb.jpg",130,92,32);thumbnails[3108357]=new thumbnail(3108357,"162587",'"rust in pieces"<br>\r\n',"065_thumb.jpg",130,92,32);thumbnails[3108358]=new thumbnail(3108358,"162587",'"the heat is on"<br>\r\n',"073_thumb.jpg",130,92,32);thumbnails[3108362]=new thumbnail(3108362,"162587",'"broken light"<br>\r\n',"08_thumb.jpg",130,92,32);thumbnails[3108364]=new thumbnail(3108364,"162587",'"room service II"<br>\r\n',"091_thumb.jpg",130,92,32);thumbnails[3108367]=new thumbnail(3108367,"162587",'"behind closed doors"<br>\r\n',"101_thumb.jpg",130,184,32);thumbnails[3108372]=new thumbnail(3108372,"162587",'"house by the beach"<br>\r\n',"11_thumb.jpg",130,184,32);thumbnails[3108375]=new thumbnail(3108375,"162587",'"stairway to ruin"<br>\r\n',"121_thumb.jpg",130,184,32);thumbnails[3108390]=new thumbnail(3108390,"162587",'"corrosion in 3d"<br>\r\n',"13_thumb.jpg",130,184,32);thumbnails[3108393]=new thumbnail(3108393,"162587",'"scratch the surface"<br>\r\n',"14_thumb.jpg",130,184,32);thumbnails[3108399]=new thumbnail(3108399,"162587",'"old fishing hut"<br>\r\n',"15_thumb.jpg",130,184,32);thumbnails[3108593]=new thumbnail(3108593,"190791",'"Sarah"',"018_thumb.jpg",130,184,32);thumbnails[3108595]=new thumbnail(3108595,"190791",'"Sarah II"',"027_thumb.jpg",130,184,32);thumbnails[3108601]=new thumbnail(3108601,"190791",'"Camilla I"',"047_thumb.jpg",130,184,32);thumbnails[3108611]=new thumbnail(3108611,"190791",'"Camilla III"',"066_thumb.jpg",130,184,32);thumbnails[3109677]=new thumbnail(3109677,"151183",'"Deep cut"<br>\r\n',"019_thumb.jpg",130,184,32);thumbnails[3109699]=new thumbnail(3109699,"151183",'"alien encounter"<br>\r\n',"028_thumb.jpg",130,184,32);thumbnails[3109709]=new thumbnail(3109709,"151183",'"bloodlines II"<br>\r\n',"038_thumb.jpg",130,184,32);thumbnails[2311707]=new thumbnail(2311707,"151183",'"Bloodlines"',"bloodlines_thumb.jpg",130,92,32);thumbnails[2311778]=new thumbnail(2311778,"151184",'"Room with a view"',"012_thumb.jpg",130,92,32);thumbnails[2311781]=new thumbnail(2311781,"151184",'"Please enter"',"022_thumb.jpg",130,92,32);thumbnails[2311786]=new thumbnail(2311786,"151184",'"Lights out"',"032_thumb.jpg",130,92,32);thumbnails[2311793]=new thumbnail(2311793,"151184",'"captivity"',"051_thumb.jpg",130,92,32);thumbnails[2311794]=new thumbnail(2311794,"151184",'"looking in - looking out"',"061_thumb.jpg",130,92,32);thumbnails[2311797]=new thumbnail(2311797,"151184",'"the ribcage"',"12_thumb.jpg",130,92,32);thumbnails[2311804]=new thumbnail(2311804,"151048",'"The man and the sea"',"013_thumb.jpg",130,92,32);thumbnails[2311805]=new thumbnail(2311805,"151048",'"before the storm"',"023_thumb.jpg",130,92,32);thumbnails[2311815]=new thumbnail(2311815,"151048",'"map"',"033_thumb.jpg",130,92,32);thumbnails[2311817]=new thumbnail(2311817,"151048",'"on the rocks"',"042_thumb.jpg",130,92,32);thumbnails[2311818]=new thumbnail(2311818,"151048",'"Rocks"',"052_thumb.jpg",130,92,32);thumbnails[2311874]=new thumbnail(2311874,"151048",'"a time long lost"',"062_thumb.jpg",130,92,32);thumbnails[2311877]=new thumbnail(2311877,"151048",'"road to ruin"',"211_thumb.jpg",130,184,32);thumbnails[2311878]=new thumbnail(2311878,"151048",'"back in the days"',"201_thumb.jpg",130,184,32);thumbnails[2311882]=new thumbnail(2311882,"151048",'"three of a kind"',"221_thumb.jpg",130,184,32);thumbnails[2666690]=new thumbnail(2666690,"168707","art by definition 1","art-of-destuction-1_thumb.jpg",130,184,32);thumbnails[2666691]=new thumbnail(2666691,"168707","break my face!","broken-face_thumb.jpg",130,184,32);thumbnails[2666695]=new thumbnail(2666695,"168707","art by definition 2","art-of-destuction-2_thumb.jpg",130,184,32);thumbnails[2666899]=new thumbnail(2666899,"151184",'"house by the railway"',"vojenshus_thumb.jpg",130,92,32);thumbnails[2666941]=new thumbnail(2666941,"168707",'"art by definition 3"',"art-of-destuction-3_thumb.jpg",130,92,32);thumbnails[3108597]=new thumbnail(3108597,"190791",'"Sarah II"',"037_thumb.jpg",130,184,32);thumbnails[3108604]=new thumbnail(3108604,"190791",'"Camilla II"',"057_thumb.jpg",130,184,32);thumbnails[3861577]=new thumbnail(3861577,"168707",'"crop the crap"',"cropthecrap_thumb.jpg",130,92,32);thumbnails[3861602]=new thumbnail(3861602,"168707",'"3 stooges"',"3stooges_thumb.jpg",130,92,32);thumbnails[3861614]=new thumbnail(3861614,"168707",'"emptiness is a clichee"',"emptiness_thumb.jpg",130,184,32);thumbnails[3861693]=new thumbnail(3861693,"168707",'"which direction"',"wich-direction_thumb.jpg",130,184,32);thumbnails[3861750]=new thumbnail(3861750,"168707",'"empty words"',"empty-words_thumb.jpg",130,184,32);thumbnails[3862260]=new thumbnail(3862260,"199436",'"life is pain"',"lifeispain_thumb.jpg",130,184,32);thumbnails[4614596]=new thumbnail(4614596,"285225","MIRJA","09_thumb.jpg",130,184,32);thumbnails[4614656]=new thumbnail(4614656,"285225","Mirja","10_thumb.jpg",130,184,32);thumbnails[5039403]=new thumbnail(5039403,"285225","Mirja","034_thumb.jpg",130,184,32);thumbnails[5505123]=new thumbnail(5505123,"311721","Frieda","01_thumb.jpg",130,184,32);thumbnails[5505137]=new thumbnail(5505137,"311721",'"Anton"',"02_thumb.jpg",130,184,32);thumbnails[5505165]=new thumbnail(5505165,"311721",'"vintage"',"06_CDC86315-1EC9-D45B-1C02185B95443D9D_thumb.jpg",130,184,32);thumbnails[5505234]=new thumbnail(5505234,"311721",'"angel"',"09_CDD2C0E2-1EC9-D45B-1C268CC4C1F365D7_thumb.jpg",130,92,32);thumbnails[5505239]=new thumbnail(5505239,"311721",'"Frieda"',"07_CDD3D000-1EC9-D45B-1CA4EC03BFDAFC9B_thumb.jpg",130,92,32);thumbnails[5505331]=new thumbnail(5505331,"199436",'"Jeallousy is a bitch", Mirja',"JEALOUSY-IS-A-BITCH_thumb.jpg",130,184,32);thumbnails[6012905]=new thumbnail(6012905,"285225","Mirja ","10_C56A1211-1D09-001F-99B00EE287A97DCC_thumb.jpg",130,184,32);thumbnails[6012910]=new thumbnail(6012910,"285225","Mirja","06_C56B76B2-1D09-001F-992C7FB083A5BF3F_thumb.jpg",130,184,32);thumbnails[6012917]=new thumbnail(6012917,"285225","MIRJA","12_C56D4A98-1D09-001F-99F5D470D1F89519_thumb.jpg",130,184,32);thumbnails[6012923]=new thumbnail(6012923,"285225","MIRJA","13_C5700A15-1D09-001F-99B0A5E688903D5D_thumb.jpg",130,184,32);thumbnails[6012967]=new thumbnail(6012967,"199436","MIRJA","14_C58198D6-1D09-001F-99C870B9DA53197A_thumb.jpg",130,184,32);thumbnails[6012977]=new thumbnail(6012977,"199436","HENRIETTE","15_C5866EA1-1D09-001F-999989EA1CFE8225_thumb.jpg",130,184,32);thumbnails[6012983]=new thumbnail(6012983,"190791","ADIL","16_thumb.jpg",130,184,32);thumbnails[6211299]=new thumbnail(6211299,"190791","Sarah Simone ","17_thumb.jpg",130,195,32);thumbnails[6211306]=new thumbnail(6211306,"311721",'"Thilde"',"10_66286CA8-24E8-5EC4-4F4BF1B8268B80F5_thumb.jpg",130,130,32);thumbnails[6211313]=new thumbnail(6211313,"190791",'"Melanie"',"18_thumb.jpg",130,195,32);var galleries=new Object();galleries[199436]=new gallery(199436,"6012977,6012967","arty","section193163",[3271708,3862260,5505331,6012967,6012977]);galleries[162587]=new gallery(162587,"3108390,3108367","house","section193163",[3108336,3108341,3108348,3108351,3108355,3108357,3108358,3108362,3108364,3108367,3108372,3108375,3108390,3108393,3108399]);galleries[311721]=new gallery(311721,"5505165","kids","section193163",[5505123,5505137,5505165,5505234,5505239,6211306]);galleries[151185]=new gallery(151185,"3108209","landscapes","section193163",[3108194,3108209,3108214,3108234,3108238,3108241]);galleries[151183]=new gallery(151183,"2311707","macros","section193163",[3109677,3109699,3109709,2311707]);galleries[285225]=new gallery(285225,"6012923,6012917,6012910,6012905,5039403,4614656,4614596","mirja","section193163",[4614596,4614656,5039403,6012905,6012910,6012917,6012923]);galleries[190791]=new gallery(190791,"6012983","Model work","section193163",[3108593,3108595,3108601,3108611,3108597,3108604,6012983,6211299,6211313]);galleries[151048]=new gallery(151048,"2311804","nature","section193163",[2311804,2311805,2311815,2311817,2311818,2311874,2311877,2311878,2311882]);galleries[151184]=new gallery(151184,"2666899,2311781","textures","section193163",[2311778,2311781,2311786,2311793,2311794,2311797,2666899]);galleries[168707]=new gallery(168707,"3861602,2666941","urban art","section193163",[2666690,2666691,2666695,2666941,3861577,3861602,3861614,3861693,3861750]);var imageSets=new Object();imageSets[1]="3861602,3861577,3108357,3108351,3108348,3108214,2666941";imageSets[2]="6012983,6012977,6012967,5505165,3861602,3108390,3108367,3108209,2666941,2666899,2311804,2311781,2311707";imageSets[3]="6211313,6211306,6211299,6012983,6012977,6012967,6012923,6012917,6012910,6012905,5505331,5505239,5505234,5505165,5505137,5505123,5039403,4614656,4614596,3862260,3861750,3861693,3861614,3861602,3861577,3271708,3109709,3109699,3109677,3108611,3108604,3108601,3108597,3108595,3108593,3108399,3108393,3108390,3108375,3108372,3108367,3108364,3108362,3108358,3108357,3108355,3108351,3108348,3108341,3108336";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/bloodduster/images";break}switch(a){case 1:b="http://www1.clikpic.com/bloodduster/images";break}switch(a){case 2:b="http://admin.clikpic.com/bloodduster/images";break}switch(a){case 24:b="http://tpc15/clikpic/bloodduster/images";break}switch(a){case 4:b="http://www.clikchurch.com/bloodduster/images";break}switch(a){case 5:b="http://www2.clikpic.com/bloodduster/images";break}switch(a){case 22:b="http://tpc5/clikpic/bloodduster/images";break}switch(a){case 23:b="http://tpc10/clikpic/bloodduster/images";break}switch(a){case 25:b="http://tpc16/clikpic/bloodduster/images";break}switch(a){case 15:b="http://www3.clikpic.com/bloodduster/images";break}switch(a){case 18:b="http://www4.clikpic.com/bloodduster/images";break}switch(a){case 19:b="http://www5.clikpic.com/bloodduster/images";break}switch(a){case 31:b="http://www7.clikpic.com/bloodduster/images";break}switch(a){case 32:b="http://admin2.clikpic.com/bloodduster/images";break}switch(a){case 33:b="http://www8.clikpic.com/bloodduster/images";break}switch(a){case 34:b="http://www9.clikpic.com/bloodduster/images";break}switch(a){case 35:b="http://admin3.clikpic.com/bloodduster/images";break}switch(a){case 37:b="http://admin4.clikpic.com/bloodduster/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("section193163"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section193163.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("section193163"!=""){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="visby: "+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<80){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+'")'})}}};