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[2637730]=new thumbnail(2637730,"","","akvareller-aug08-124_thumb.jpg",130,98,5);thumbnails[2637739]=new thumbnail(2637739,"","","akvareller-aug08-126_thumb.jpg",130,98,5);thumbnails[2637750]=new thumbnail(2637750,"","","akvareller-aug08-123_thumb.jpg",130,98,5);thumbnails[2570785]=new thumbnail(2570785,"","","selvportræt_iateliet_thumb.jpg",130,194,5);thumbnails[2569594]=new thumbnail(2569594,"","","klippeornament_2_thumb.jpg",130,104,5);thumbnails[2637767]=new thumbnail(2637767,"","","akvareller-aug08-040_thumb.jpg",130,173,5);thumbnails[4450464]=new thumbnail(4450464,"","","selvportræt__copy12.jpg",130,130,5);thumbnails[4450465]=new thumbnail(4450465,"","","selvportræt__copy1234.jpg",130,130,5);thumbnails[2637809]=new thumbnail(2637809,"","","akvareller-aug08-044_thumb.jpg",130,173,5);thumbnails[2637800]=new thumbnail(2637800,"","","akvareller-aug08-033_thumb.jpg",130,173,5);thumbnails[2729572]=new thumbnail(2729572,"163423","","farvefelter-med-venstre-sid5_thumb.jpg",130,97,5);thumbnails[2729579]=new thumbnail(2729579,"163423","","felter_ivenstre_side_med_fo_thumb.jpg",130,98,5);thumbnails[2557229]=new thumbnail(2557229,"163423","","Fight1_thumb.jpg",130,96,5);thumbnails[2634118]=new thumbnail(2634118,"163423","","Iona_thumb.jpg",130,115,5);thumbnails[2569599]=new thumbnail(2569599,"163423","","klippeornament1_thumb.jpg",130,104,5);thumbnails[2637891]=new thumbnail(2637891,"163423","","stenbrud2_thumb.jpg",130,97,5);thumbnails[2686373]=new thumbnail(2686373,"163423","","gråmedgrønbort_thumb.jpg",130,96,5);thumbnails[2576368]=new thumbnail(2576368,"163423","","lystornament_thumb.jpg",130,98,5);thumbnails[2686445]=new thumbnail(2686445,"163423","","gråmedbark_thumb.jpg",130,96,5);thumbnails[2686446]=new thumbnail(2686446,"163423","","treorangepletter_thumb.jpg",130,98,5);thumbnails[2634368]=new thumbnail(2634368,"163423","","Natsværmere_thumb.jpg",130,119,5);thumbnails[2557234]=new thumbnail(2557234,"163423","","Ratlles-1_thumb.jpg",130,117,5);thumbnails[3150860]=new thumbnail(3150860,"163423","","struktur_bedste_thumb.jpg",130,98,5);thumbnails[3151150]=new thumbnail(3151150,"163423","","lys_struktur_thumb.jpg",130,96,5);thumbnails[3151151]=new thumbnail(3151151,"163423","","grøn_mosaik_thumb.jpg",130,96,5);thumbnails[2686880]=new thumbnail(2686880,"163425","","spirit_thumb.jpg",130,130,5);thumbnails[2729051]=new thumbnail(2729051,"163425","","Figure_thumb.jpg",130,132,5);thumbnails[2558868]=new thumbnail(2558868,"163425","","Fragmenter_thumb.jpg",130,130,5);thumbnails[2557290]=new thumbnail(2557290,"163425","","El-ni`no1_thumb.jpg",130,91,5);thumbnails[2558858]=new thumbnail(2558858,"163425","","Hos-Rosita-_2_thumb.jpg",130,95,5);thumbnails[2558585]=new thumbnail(2558585,"163425","","Dos-mujeres-PSD-red1_thumb.jpg",130,94,5);thumbnails[2558752]=new thumbnail(2558752,"163425","","Åndekano-PDS_thumb.jpg",130,95,5);thumbnails[2558864]=new thumbnail(2558864,"163425","","Forfædrene_thumb.jpg",130,92,5);thumbnails[2729342]=new thumbnail(2729342,"163425","","Bælg-1-kopi_thumb_thumb.jpg.jpg.jpg",130,95,2);thumbnails[3151138]=new thumbnail(3151138,"163425","","Kopi-af-Foran-porten-Chiapa2_thumb.jpg",130,173,5);thumbnails[3150898]=new thumbnail(3150898,"163425","","Agave-kopi_thumb.jpg",130,149,5);thumbnails[3151134]=new thumbnail(3151134,"163425","","Markedsplads1-kopi1_thumb.jpg",130,172,5);thumbnails[3151140]=new thumbnail(3151140,"163425","","ornament_thumb.-1psd.jpg",130,98,5);thumbnails[3151141]=new thumbnail(3151141,"163425","","Kopi-af-Tikal_thumb.jpg",130,96,5);thumbnails[3151143]=new thumbnail(3151143,"163425","","Kirke1_thumb.jpg",130,181,5);thumbnails[2687319]=new thumbnail(2687319,"169626","","gardinkollonihave_thumb.jpg",130,98,5);thumbnails[2687322]=new thumbnail(2687322,"169626","","gardinkollonihave_thumb._2jpg.jpg",130,98,5);thumbnails[2687323]=new thumbnail(2687323,"169626","","gardinkollonihave_thumb._3jpg.jpg",130,98,5);thumbnails[2687327]=new thumbnail(2687327,"169626","","gardinkollonihave_thumb._4pg.jpg",130,173,5);thumbnails[2687331]=new thumbnail(2687331,"169626","","gardinkollonihave_thumb._6jpg.jpg",130,173,5);thumbnails[2687374]=new thumbnail(2687374,"169626","","søjle_med_skygge-08-155_thumb.jpg",130,173,5);thumbnails[2687330]=new thumbnail(2687330,"169626","","gardinkollonihave_thumb._5jpg.jpg",130,98,5);thumbnails[2687332]=new thumbnail(2687332,"169626","","gardinkollonihave_thumb._7jpg.jpg",130,98,5);thumbnails[2687349]=new thumbnail(2687349,"169626","","orkideer_thumb.jpg",130,98,5);thumbnails[3018104]=new thumbnail(3018104,"185697","","blåmosaik_thumb.jpg",130,86,5);thumbnails[3018105]=new thumbnail(3018105,"185697","","blåmosaik_udsnit_2_thumb.jpg",130,58,5);thumbnails[3018107]=new thumbnail(3018107,"185697","","grønmosaik_udsnit_thumb.jpg",130,69,5);thumbnails[3018109]=new thumbnail(3018109,"185697","","fugl_udsnit_thumb.jpg",130,86,5);thumbnails[2999974]=new thumbnail(2999974,"184831","","Oval_thumb.jpg",130,157,5);thumbnails[3151554]=new thumbnail(3151554,"184831","","kegle_2_thumb.jpg",130,163,5);thumbnails[3000399]=new thumbnail(3000399,"184831","","Kegle_thumb.jpg",130,159,5);thumbnails[2999977]=new thumbnail(2999977,"184831","","House-of-the-raising-som_thumb.jpg",130,106,5);thumbnails[3000404]=new thumbnail(3000404,"184831","","blues_thumb.jpg",130,103,5);thumbnails[3151544]=new thumbnail(3151544,"193176","","oval1_thumb.jpg",130,160,5);var galleries=new Object();galleries[163423]=new gallery(163423,"2686373","Maleri","gallery",[2729572,2729579,2557229,2634118,2569599,2637891,2686373,2576368,2686445,2686446,2634368,2557234,3150860,3151150,3151151]);galleries[163425]=new gallery(163425,"2686880","Mexicanske motiver","gallery",[2686880,2729051,2558868,2557290,2558858,2558585,2558752,2558864,2729342,3151138,3150898,3151134,3151140,3151141,3151143]);galleries[169626]=new gallery(169626,"2687319","Foto","gallery",[2687319,2687322,2687323,2687327,2687331,2687374,2687330,2687332,2687349]);galleries[185697]=new gallery(185697,"3018104","Katrinebjerg Skolen Århus","section220548",[3018104,3018105,3018107,3018109]);galleries[184831]=new gallery(184831,"2999974","Risskov Hospital","section220548",[2999974,3151554,3000399,2999977,3000404]);galleries[193176]=new gallery(193176,"3151544","Ingeniørhøjskolen Århus","section220548",[3151544]);var imageSets=new Object();imageSets[1]="2686880";imageSets[2]="3151544,3018104,2999974,2687319,2686880,2686373,2637730";imageSets[3]="4450465,4450464,3151554,3151544,3151151,3151150,3151143,3151141,3151140,3151138,3151134,3150898,3150860,3018109,3018107,3018105,3018104,3000404,3000399,2999977,2999974,2729579,2729572,2729342,2729051,2687374,2687349,2687332,2687331,2687330,2687327,2687323,2687322,2687319,2686880,2686446,2686445,2686373,2637891,2637809,2637800,2637767,2637750,2637739,2637730,2634368,2634118,2576368,2570785,2569599";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/mari50/images";break}switch(a){case 1:b="http://www1.clikpic.com/mari50/images";break}switch(a){case 2:b="http://admin.clikpic.com/mari50/images";break}switch(a){case 24:b="http://tpc15/clikpic/mari50/images";break}switch(a){case 4:b="http://www.clikchurch.com/mari50/images";break}switch(a){case 5:b="http://www2.clikpic.com/mari50/images";break}switch(a){case 22:b="http://tpc5/clikpic/mari50/images";break}switch(a){case 23:b="http://tpc10/clikpic/mari50/images";break}switch(a){case 25:b="http://tpc16/clikpic/mari50/images";break}switch(a){case 15:b="http://www3.clikpic.com/mari50/images";break}switch(a){case 18:b="http://www4.clikpic.com/mari50/images";break}switch(a){case 19:b="http://www5.clikpic.com/mari50/images";break}switch(a){case 31:b="http://www7.clikpic.com/mari50/images";break}switch(a){case 32:b="http://admin2.clikpic.com/mari50/images";break}switch(a){case 33:b="http://www8.clikpic.com/mari50/images";break}switch(a){case 34:b="http://www9.clikpic.com/mari50/images";break}switch(a){case 35:b="http://admin3.clikpic.com/mari50/images";break}switch(a){case 37:b="http://admin4.clikpic.com/mari50/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("section220548"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section220548.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("section220548"!=""){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="Marianne Tønnesen: "+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+'")'})}}};