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[4334146]=new thumbnail(4334146,"","","Bio11_thumb.jpg",130,102,18);thumbnails[4337098]=new thumbnail(4337098,"","Hundlochquelle","_DSC0137_600_thumb.jpg",130,87,18);thumbnails[4557467]=new thumbnail(4557467,"","Titel","Titel_thumb.jpg",130,87,18);thumbnails[4722453]=new thumbnail(4722453,"","Titel","_DSC0068b_600_thumb.jpg",130,87,18);thumbnails[5661342]=new thumbnail(5661342,"","Titel","2010_02_27_MS_WimsenFoLa_059_600_thumb.jpg",130,87,18);thumbnails[6189703]=new thumbnail(6189703,"","Titel","2010_06_04_FoLa_Harz_261_600_thumb.jpg",130,87,18);thumbnails[6683757]=new thumbnail(6683757,"","Titel","2010_09_01_MS_Zelske_Jama_05_600_thumb.jpg",130,88,18);thumbnails[4331971]=new thumbnail(4331971,"255026","young manatee","Florida_2008_01581_thumb.jpg",130,87,18);thumbnails[4331975]=new thumbnail(4331975,"255026","young manatee","Florida_2008_01601_thumb.jpg",130,87,18);thumbnails[4331979]=new thumbnail(4331979,"255026","young manatee","Florida_2008_01631_thumb.jpg",130,87,18);thumbnails[4331995]=new thumbnail(4331995,"255027","Rainbow River","Florida_2008_127012_thumb.jpg",130,87,18);thumbnails[4331997]=new thumbnail(4331997,"255027","Rainbow River","Florida_2008_128712_thumb.jpg",130,87,18);thumbnails[4366227]=new thumbnail(4366227,"255027","Rainbow River","Florida2008_1295_700_thumb.jpg",130,87,18);thumbnails[4366229]=new thumbnail(4366229,"255027","Rainbow River","Florida2008_1306_700_thumb.jpg",130,87,18);thumbnails[4366248]=new thumbnail(4366248,"255027","Rainbow River","Florida2008_1291_700_thumb.jpg",130,87,18);thumbnails[4356648]=new thumbnail(4356648,"255082","Santa Fe River<br>\r\n","Florida_2008_0969a_700_thumb.jpg",130,87,18);thumbnails[4356654]=new thumbnail(4356654,"255082","Devil's Eye","Florida_2008_1023_700_thumb.jpg",130,87,18);thumbnails[4356661]=new thumbnail(4356661,"255082","Santa Fe River<br>\r\n","Florida_2008_1052d_700_thumb.jpg",130,87,18);thumbnails[4356664]=new thumbnail(4356664,"255082","Little Devil","Florida_2008_1085_700_thumb.jpg",130,87,18);thumbnails[4356666]=new thumbnail(4356666,"255082","Devil's Eye","Florida_2008_1108_700_thumb.jpg",130,87,18);thumbnails[4337782]=new thumbnail(4337782,"255285","Vortex Spring","Florida_2008_0699a_thumb.jpg",130,87,18);thumbnails[4337795]=new thumbnail(4337795,"255285","Vortex Spring","Florida_2008_06421_thumb.jpg",130,87,18);thumbnails[4337799]=new thumbnail(4337799,"255285","Vortex Spring","Florida_2008_065012_thumb.jpg",130,87,18);thumbnails[4338915]=new thumbnail(4338915,"255285","Morrison Spring","Florida_2008_0707_Kopie_thumb.jpg",130,87,18);thumbnails[4338923]=new thumbnail(4338923,"255285","Morrison Spring","Florida_2008_0726_Kopie_thumb.jpg",130,87,18);thumbnails[4338927]=new thumbnail(4338927,"255285","Morrison Spring","Florida_2008_0729_Kopie_thumb.jpg",130,87,18);thumbnails[4338930]=new thumbnail(4338930,"255285","Morrison Spring","Florida_2008_0731_Kopie_thumb.jpg",130,87,18);thumbnails[4338936]=new thumbnail(4338936,"255285","Morrison Spring","Florida_2008_0738_Kopie1_thumb.jpg",130,87,18);thumbnails[4338938]=new thumbnail(4338938,"255285","Morrison Spring","Florida_2008_0743_Kopie_thumb.jpg",130,87,18);thumbnails[4356749]=new thumbnail(4356749,"255285","Morrison Spring","Florida_2008_0753_700_thumb.jpg",130,87,18);thumbnails[4337809]=new thumbnail(4337809,"255288","Spring in the gypsum karst","_DSC0067_thumb.jpg",130,87,18);thumbnails[4332141]=new thumbnail(4332141,"255076","Cave Caleta Negra","MS_2009_01_Fuerte_135_thumb.jpg",130,87,18);thumbnails[4332143]=new thumbnail(4332143,"255076","Cave Caleta Negra","MS_2009_01_Fuerte_346b_thumb.jpg",130,87,18);thumbnails[4332782]=new thumbnail(4332782,"255076","Cave Caleta Negra","MS_2009_01_Fuerte_35312_thumb.jpg",87,130,18);thumbnails[4331960]=new thumbnail(4331960,"255061","Hundlochquelle","_DSC0137_thumb.jpg",130,87,18);thumbnails[4895684]=new thumbnail(4895684,"255061","Hundlochquelle","_DSC0106_700_thumb.jpg",87,130,18);thumbnails[4556882]=new thumbnail(4556882,"264320","Icecave","_DSC0033_thumb.jpg",130,87,18);thumbnails[4556891]=new thumbnail(4556891,"264320","Icecave","_DSC0040_thumb.jpg",130,87,18);thumbnails[4557465]=new thumbnail(4557465,"264320","Icecave","_DSC0050_700_thumb.jpg",130,87,18);thumbnails[4722433]=new thumbnail(4722433,"271231","","_DSC0028b_700_thumb.jpg",130,87,18);thumbnails[4722443]=new thumbnail(4722443,"271231","","_DSC0041b_700_thumb.jpg",130,87,18);thumbnails[4722445]=new thumbnail(4722445,"271231","","_DSC0068b_700_thumb.jpg",130,87,18);thumbnails[5661318]=new thumbnail(5661318,"320699","","2010_02_27_MS_WimsenFoLa_075_thumb.jpg",130,87,18);thumbnails[5661319]=new thumbnail(5661319,"320699","","2010_02_27_MS_WimsenFoLa_089_thumb.jpg",130,87,18);thumbnails[5668858]=new thumbnail(5668858,"320699","","2010_02_27_MS_WimsenFoLa_002_thumb.jpg",130,87,18);thumbnails[5668860]=new thumbnail(5668860,"320699","","2010_02_27_MS_WimsenFoLa_011_thumb.jpg",130,87,18);thumbnails[5661312]=new thumbnail(5661312,"320699","","2010_02_27_MS_WimsenFoLa_035_thumb.jpg",130,87,18);thumbnails[5661313]=new thumbnail(5661313,"320699","","2010_02_27_MS_WimsenFoLa_039_thumb.jpg",130,87,18);thumbnails[5661314]=new thumbnail(5661314,"320699","","2010_02_27_MS_WimsenFoLa_051_thumb.jpg",130,87,18);thumbnails[5661315]=new thumbnail(5661315,"320699","","2010_02_27_MS_WimsenFoLa_059_thumb.jpg",130,87,18);thumbnails[6189707]=new thumbnail(6189707,"345607","","2010_06_04_FoLa_Harz_196_700_thumb.jpg",130,87,18);thumbnails[6189709]=new thumbnail(6189709,"345607","","2010_06_04_FoLa_Harz_261_700_thumb.jpg",130,87,18);thumbnails[6189710]=new thumbnail(6189710,"345607","","2010_06_05_FoLa_Harz_051_700_thumb.jpg",130,87,18);thumbnails[6210400]=new thumbnail(6210400,"345607","","2010_06_04_FoLa_Harz_388_700_thumb.jpg",130,87,18);thumbnails[6210402]=new thumbnail(6210402,"345607","","2010_06_05_FoLa_Harz_008_7001_thumb.jpg",130,87,18);thumbnails[6210410]=new thumbnail(6210410,"345607","","2010_06_04_FoLa_Harz_083_700_thumb.jpg",130,87,18);thumbnails[6210425]=new thumbnail(6210425,"345607","","2010_06_05_FoLa_Harz_104_700_thumb.jpg",130,87,18);thumbnails[6215386]=new thumbnail(6215386,"345607","","2010_06_05_FoLa_Harz_124_700_thumb.jpg",130,87,18);thumbnails[6215387]=new thumbnail(6215387,"345607","","2010_06_05_FoLa_Harz_082_700_thumb.jpg",130,87,18);thumbnails[6215388]=new thumbnail(6215388,"345607","","2010_06_04_FoLa_Harz_136_700_thumb.jpg",130,87,18);thumbnails[6215390]=new thumbnail(6215390,"345607","","2010_06_05_FoLa_Harz_041_700_thumb.jpg",130,87,18);thumbnails[6216021]=new thumbnail(6216021,"345607","","2010_06_04_FoLa_Harz_212_700_thumb.jpg",130,87,18);thumbnails[6683670]=new thumbnail(6683670,"364770","Planinka Jama","2010_08_27_MS_Laze_PlaninskaJama_034_5_6_7_8_9_thumb.jpg",130,86,18);thumbnails[6683688]=new thumbnail(6683688,"364770","Divaska Jama","2010_08_31_MS_Laze_010_700_thumb.jpg",130,86,18);thumbnails[6683686]=new thumbnail(6683686,"364770","Divaska Jama","2010_08_31_MS_Laze_008_700_thumb.jpg",130,86,18);thumbnails[6683691]=new thumbnail(6683691,"364770","Divaska Jama","2010_08_31_MS_Laze_039_700_thumb.jpg",130,86,18);thumbnails[6683700]=new thumbnail(6683700,"364770","Divaska Jama","2010_08_31_MS_Laze_050_700_thumb.jpg",130,87,18);thumbnails[6683705]=new thumbnail(6683705,"364770","Divaska Jama","2010_08_31_MS_Laze_078_700_thumb.jpg",130,86,18);thumbnails[6683703]=new thumbnail(6683703,"364770","Divaska Jama","2010_08_31_MS_Laze_071_700_thumb.jpg",86,130,18);thumbnails[6683671]=new thumbnail(6683671,"364770","Vranja Jama","2010_08_28_MS_Laze_41_2_3_4_5_thumb.jpg",130,86,18);thumbnails[6683716]=new thumbnail(6683716,"364770","Zelske Jama","2010_09_01_MS_Zelske_Jama_76_700_thumb.jpg",130,86,18);thumbnails[6683715]=new thumbnail(6683715,"364770","Zelske Jama","2010_09_01_MS_Zelske_Jama_44_700_thumb.jpg",130,86,18);thumbnails[6683713]=new thumbnail(6683713,"364770","Zelske Jama","2010_09_01_MS_Zelske_Jama_39_700_thumb.jpg",130,86,18);thumbnails[6683711]=new thumbnail(6683711,"364770","Zelske Jama","2010_09_01_MS_Zelske_Jama_22_700_thumb.jpg",130,86,18);thumbnails[6683708]=new thumbnail(6683708,"364770","Zelske Jama","2010_09_01_MS_Zelske_Jama_05_700_thumb.jpg",130,86,18);var galleries=new Object();galleries[255026]=new gallery(255026,"4331979,4331975,4331971","Manatees 2008","gallery",[4331971,4331975,4331979]);galleries[255027]=new gallery(255027,"4366248,4366229,4366227,4331997,4331995","Rainbow River 2008","gallery",[4331995,4331997,4366227,4366229,4366248]);galleries[255082]=new gallery(255082,"4356666,4356664,4356661,4356654,4356648","Ginnie Springs 2008","gallery",[4356648,4356654,4356661,4356664,4356666]);galleries[255285]=new gallery(255285,"4356749,4338938,4338936,4338930,4338927,4338923,4338915,4337799,4337795,4337782","Ponce De Leon 2008","gallery",[4337782,4337795,4337799,4338915,4338923,4338927,4338930,4338936,4338938,4356749]);galleries[255288]=new gallery(255288,"4337809","German Karst Springs 2008","gallery",[4337809]);galleries[255076]=new gallery(255076,"4332782,4332143,4332141","Fuerteventura 2009","gallery",[4332141,4332143,4332782]);galleries[255061]=new gallery(255061,"4895684,4331960","Hundlochquelle 2009","gallery",[4331960,4895684]);galleries[264320]=new gallery(264320,"4557465,4556891,4556882","Icecave 2009","gallery",[4556882,4556891,4557465]);galleries[271231]=new gallery(271231,"4722445,4722443,4722433","Swabian Jura 2009","gallery",[4722433,4722443,4722445]);galleries[320699]=new gallery(320699,"5668860,5668858,5661319,5661318,5661315,5661314,5661313,5661312","Wimsener Cave 2010","gallery",[5661318,5661319,5668858,5668860,5661312,5661313,5661314,5661315]);galleries[345607]=new gallery(345607,"6216021,6215390,6215388,6215387,6215386,6210425,6210410,6210402,6210400,6189710","German Harz 2010","gallery",[6189707,6189709,6189710,6210400,6210402,6210410,6210425,6215386,6215387,6215388,6215390,6216021]);galleries[364770]=new gallery(364770,"6683716,6683715,6683713,6683711,6683708,6683705,6683703,6683700,6683691,6683688","Slovenia 2010","gallery",[6683670,6683688,6683686,6683691,6683700,6683705,6683703,6683671,6683716,6683715,6683713,6683711,6683708]);var imageSets=new Object();imageSets[1]="6683757";imageSets[3]="6683757,6683716,6683715,6683713,6683711,6683708,6683705,6683703,6683700,6683691,6683688,6683686,6683671,6683670,6216021,6215390,6215388,6215387,6215386,6210425,6210410,6210402,6210400,6189710,6189709,6189707,6189703,5668860,5668858,5661342,5661319,5661318,5661315,5661314,5661313,5661312,4895684,4722453,4722445,4722443,4722433,4557467,4557465,4556891,4556882,4366248,4366229,4366227,4356749,4356666";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/MichaS/images";break}switch(a){case 1:b="http://www1.clikpic.com/MichaS/images";break}switch(a){case 2:b="http://admin.clikpic.com/MichaS/images";break}switch(a){case 24:b="http://tpc15/clikpic/MichaS/images";break}switch(a){case 4:b="http://www.clikchurch.com/MichaS/images";break}switch(a){case 5:b="http://www2.clikpic.com/MichaS/images";break}switch(a){case 22:b="http://tpc5/clikpic/MichaS/images";break}switch(a){case 23:b="http://tpc10/clikpic/MichaS/images";break}switch(a){case 25:b="http://tpc16/clikpic/MichaS/images";break}switch(a){case 15:b="http://www3.clikpic.com/MichaS/images";break}switch(a){case 18:b="http://www4.clikpic.com/MichaS/images";break}switch(a){case 19:b="http://www5.clikpic.com/MichaS/images";break}switch(a){case 31:b="http://www7.clikpic.com/MichaS/images";break}switch(a){case 32:b="http://admin2.clikpic.com/MichaS/images";break}switch(a){case 33:b="http://www8.clikpic.com/MichaS/images";break}switch(a){case 34:b="http://www9.clikpic.com/MichaS/images";break}switch(a){case 35:b="http://admin3.clikpic.com/MichaS/images";break}switch(a){case 37:b="http://admin4.clikpic.com/MichaS/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="Michael Schopper 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;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(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+'")'})}}};