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[4572324]=new thumbnail(4572324,"265036","Säuglings und Kinderkrankenhaus in Weissensee.","Weissensee_09wm_thumb.jpg",130,196,18);thumbnails[4572357]=new thumbnail(4572357,"265036","Säuglings und Kinderkrankenhaus in Weissensee.","Weissensee_wm_thumb.jpg",130,86,18);thumbnails[4572956]=new thumbnail(4572956,"265036","Spree Park in Treptower Park","Spree_Park_08_05_thumb.jpg",130,196,18);thumbnails[4573106]=new thumbnail(4573106,"265036","Spree Park in Treptower Park","Spree_Park_08_09_thumb.jpg",130,112,18);thumbnails[4808891]=new thumbnail(4808891,"265036","","Berlin_5-041_cemetery_kellyhumphries_thumb.jpg",130,196,18);thumbnails[4808893]=new thumbnail(4808893,"265036","","Berlin_5-086_cemetery_kellyhumphries_thumb.jpg",130,86,18);thumbnails[4808897]=new thumbnail(4808897,"265036","","Berlin_5_013_cemetery_kellyhumphries_thumb.jpg",130,196,18);thumbnails[4809696]=new thumbnail(4809696,"265036","","Berlin_5-004_Kreuzberg_kellyhumphries_thumb.jpg",130,186,18);thumbnails[4809718]=new thumbnail(4809718,"265036","","Berlin_6_SpreePark_kellyhumphries_thumb.jpg",130,87,18);thumbnails[4809722]=new thumbnail(4809722,"265036","","Biesenthal-006_kellyhumphries_thumb.jpg",130,86,18);thumbnails[4809725]=new thumbnail(4809725,"265036","","Spree_Park_08_01_thumb.jpg",130,86,18);thumbnails[4983256]=new thumbnail(4983256,"265036","Berlin.","Geishaandthecity_08_kellyhumphries_thumb.jpg",130,200,18);thumbnails[4983260]=new thumbnail(4983260,"265036","","Geishaandthecity_29_kellyhumphries_thumb.jpg",130,93,18);thumbnails[4983262]=new thumbnail(4983262,"265036","","Geishaandthecity_39_kellyhumphries_thumb.jpg",130,86,18);thumbnails[4983264]=new thumbnail(4983264,"265036","","Geishaandthecity_64_kellyhumphries_thumb.jpg",130,74,18);thumbnails[4983265]=new thumbnail(4983265,"265036","","Geishaandthecity_47_kellyhumphries_thumb.jpg",130,86,18);thumbnails[4983266]=new thumbnail(4983266,"265036","","Geishaandthecity_44_kellyhumphries_thumb.jpg",130,103,18);thumbnails[5002826]=new thumbnail(5002826,"265036","Elstal 1938 Olympic Village.","Elstal_13kellyhumphries_thumb.jpg",130,86,18);thumbnails[5002833]=new thumbnail(5002833,"265036","Elstal 1938 Olympic Village.","Elstal_49kellyhumphries_thumb.jpg",130,85,18);thumbnails[5002837]=new thumbnail(5002837,"265036","","Elstal_40kellyhumphries_thumb.jpg",130,196,18);thumbnails[5265625]=new thumbnail(5265625,"265036","Alexanderplatz, Berlin.","AlexanderplatzBerlinkellyhumphries_thumb.jpg",130,200,18);thumbnails[5701556]=new thumbnail(5701556,"322972","","BlackandwhiteBerlin_kellyhumphries_11_thumb.jpg",130,87,18);thumbnails[5701559]=new thumbnail(5701559,"322972","","FujicacolourBerlin_kellyhumphries_07_thumb.jpg",130,88,18);thumbnails[5701562]=new thumbnail(5701562,"322972","","FujicacolourBerlin_kellyhumphries_10_thumb.jpg",130,87,18);thumbnails[5701565]=new thumbnail(5701565,"322972","","FujicacolourBerlin_kellyhumphries_17_thumb.jpg",130,89,18);thumbnails[5701567]=new thumbnail(5701567,"322972","","FujicacolourBerlin_kellyhumphries_01_thumb.jpg",130,88,18);thumbnails[5701577]=new thumbnail(5701577,"322972","","BlackandwhiteBerlin_kellyhumphries_08_web_thumb.jpg",130,88,18);thumbnails[5701581]=new thumbnail(5701581,"322972","","BlackandwhiteBerlin_kellyhumphries_06_web_thumb.jpg",130,88,18);thumbnails[5701582]=new thumbnail(5701582,"322972","","BlackandwhiteBerlin_kellyhumphries_07_web_thumb.jpg",130,87,18);thumbnails[5929299]=new thumbnail(5929299,"322972","","blackwhitefujica_kellyhumphries_05_24_thumb.jpg",130,88,18);thumbnails[5929300]=new thumbnail(5929300,"322972","","blackwhitefujica_kellyhumphries_05_03_thumb.jpg",130,89,18);thumbnails[5929301]=new thumbnail(5929301,"322972","","blackwhitefujica_kellyhumphries_05_11_thumb.jpg",130,89,18);thumbnails[5929302]=new thumbnail(5929302,"322972","","blackwhitefujica_kellyhumphries_05_18_thumb.jpg",130,88,18);thumbnails[5929324]=new thumbnail(5929324,"322972","","blackwhitefujica_kellyhumphries_05_14_thumb.jpg",130,89,18);thumbnails[5929326]=new thumbnail(5929326,"322972","","blackwhitefujica_kellyhumphries_05_15_thumb.jpg",130,89,18);thumbnails[4808179]=new thumbnail(4808179,"114269","Butthole Surfers","Butthole_Surfers_57_kellyhumphries_thumb.jpg",130,196,18);thumbnails[4808184]=new thumbnail(4808184,"114269","Butthole Surfers","Butthole_Surfers_08_kellyhumphries_thumb.jpg",130,109,18);thumbnails[4808186]=new thumbnail(4808186,"114269","Asva","DL_Asva-037_kellyhumphries_thumb.jpg",130,162,18);thumbnails[4808389]=new thumbnail(4808389,"114269","The Bookhouse Boys","Bookhouse_Boys-158_kellyhumphries_thumb.jpg",130,183,18);thumbnails[4808413]=new thumbnail(4808413,"114269","Graveyard","Graveyard_02_kellyhumphries_thumb.jpg",130,196,18);thumbnails[4808416]=new thumbnail(4808416,"114269","Joan As Police Woman","JoanasPoliceWoman_01_kellyhumphries_thumb.jpg",130,196,18);thumbnails[4808425]=new thumbnail(4808425,"114269","Justice Yeldham","justiceyeldham-030_kellyhumphries_thumb.jpg",130,86,18);thumbnails[4808427]=new thumbnail(4808427,"114269","The Polecats","Polecats_01_kellyhumphries_thumb.jpg",130,183,18);thumbnails[4808431]=new thumbnail(4808431,"114269","VV Brown","VV_Brown_03_kellyhumphries_thumb.jpg",130,163,18);thumbnails[4808434]=new thumbnail(4808434,"114269","Weedeater","Weedeater-65_kellyhumphries_thumb.jpg",130,86,18);thumbnails[4808443]=new thumbnail(4808443,"114269","Whitehouse","Whitehouse-184_kellyhumphries_thumb.jpg",130,121,18);thumbnails[4808456]=new thumbnail(4808456,"114269","VideoKills International Video Art Festival 2009","VideoKills_Finissage_15_kellyhumphries_thumb.jpg",130,86,18);thumbnails[4808461]=new thumbnail(4808461,"114269","VideoKills International Video Art Festival 2009","VideoKills_Finissage_24_kellyhumphries_thumb.jpg",130,196,18);thumbnails[4808465]=new thumbnail(4808465,"114269","VideoKills International Video Art Festival 2009","VideoKills_vernissage_42_kellyhumphries_thumb.jpg",130,196,18);thumbnails[4808467]=new thumbnail(4808467,"114269","VideoKills International Video Art Festival 2009","VideoKills_vernissage_45_kellyhumphries_thumb.jpg",130,190,18);thumbnails[4808475]=new thumbnail(4808475,"114269","Angleterre Productions 'Inspector Hound'","Inspector_Hound_AngleterreProductions024_kellyhumphries_thumb.jpg",130,86,18);thumbnails[4808478]=new thumbnail(4808478,"114269","Angleterre Productions 'Inspector Hound'","Inspector_Hound_AngleterreProductions_017_kellyhumphries_thumb.jpg",130,181,18);thumbnails[4808489]=new thumbnail(4808489,"114269","Darkin Ensemble","DarkinEnsemble-077_kellyhumphries_thumb.jpg",130,170,18);thumbnails[5002905]=new thumbnail(5002905,"114269","Geisha Noise Research Group.","Geisha_Berlin_01kellyhumphries_thumb.jpg",130,86,18);thumbnails[5702241]=new thumbnail(5702241,"114269","Blake Worrell.","BlakeWorrell_kellyhumphries_web_thumb.jpg",130,184,18);thumbnails[2357737]=new thumbnail(2357737,"158688","","mindless_faith_beautiful_death_video_fallen_down_stairs_thumb.jpg.jpg",130,159,18);thumbnails[2391660]=new thumbnail(2391660,"158688","","Beautiful_death_woman_in_daffodils_mindless_faith_video_thumb.jpg.JPG",130,196,18);thumbnails[3037815]=new thumbnail(3037815,"158688","","Sarah_01a-190mod2_thumb.jpg",130,196,18);thumbnails[3037816]=new thumbnail(3037816,"158688","","Sarah_Batch_03_thumb.jpg",130,86,18);thumbnails[3037818]=new thumbnail(3037818,"158688","","Sarah_Batch_01_thumb.jpg",130,70,18);thumbnails[3583292]=new thumbnail(3583292,"158688","","Jen_MM_thumb.jpg",130,191,18);thumbnails[3583296]=new thumbnail(3583296,"158688","","Jen_MM2_thumb.jpg",130,196,18);thumbnails[4808717]=new thumbnail(4808717,"158688","","Tara_Judah_KellyHumphries_01_thumb.jpg",130,196,18);thumbnails[4809727]=new thumbnail(4809727,"158688","","Holly_02_portrait_kellyhumphries_thumb.jpg",130,196,18);thumbnails[4809730]=new thumbnail(4809730,"158688","","Holly_portrait_kellyhumphries_thumb.jpg",130,196,18);thumbnails[4809734]=new thumbnail(4809734,"158688","","Jen_11_portrait_kellyhumphries_thumb.jpg",130,196,18);thumbnails[4809737]=new thumbnail(4809737,"158688","","Jen_75_fashion_kellyhumphries_thumb.jpg",130,135,18);thumbnails[4809739]=new thumbnail(4809739,"158688","","MarkLeLeivre001_-8_thumb.jpg",130,196,18);thumbnails[5002883]=new thumbnail(5002883,"158688","Geisha Noise Research Group.","Geishaandthecity_11_kellyhumphries_thumb.jpg",130,194,18);thumbnails[5266042]=new thumbnail(5266042,"158688","Antoni Maiovvi.","antonimaiovvi_giallodisco_kellyhumphries_01web_thumb.jpg",130,178,18);thumbnails[5702348]=new thumbnail(5702348,"158688","Death has an Encore.","DeathhasanEncore_thumb.jpg",130,54,18);thumbnails[5702351]=new thumbnail(5702351,"158688","Death in Yellow.","DeathinYellow_thumb.jpg",130,276,18);thumbnails[5702353]=new thumbnail(5702353,"158688","Antoni Maiovvi.","MaiofinRed_thumb.jpg",130,196,18);thumbnails[5859124]=new thumbnail(5859124,"158688","","2-5278_web_thumb.jpg",130,86,18);thumbnails[5859126]=new thumbnail(5859126,"158688","","2-5284_web_thumb.jpg",130,196,18);thumbnails[5859392]=new thumbnail(5859392,"158688","","AndThenIntoTheDeep_kellyhumphries_web-39_thumb.jpg",130,196,18);var galleries=new Object();galleries[265036]=new gallery(265036,"5265625,5002837,5002833,5002826,4983266,4983265,4983264,4983262,4983260,4983256","Architectural.","gallery",[4572324,4572357,4572956,4573106,4808891,4808893,4808897,4809696,4809718,4809722,4809725,4983256,4983260,4983262,4983264,4983265,4983266,5002826,5002833,5002837,5265625]);galleries[322972]=new gallery(322972,"5929326,5929324,5929302,5929301,5929300,5929299,5701582,5701581,5701577,5701567","Fujica STX-1","gallery",[5701556,5701559,5701562,5701565,5701567,5701577,5701581,5701582,5929299,5929300,5929301,5929302,5929324,5929326]);galleries[114269]=new gallery(114269,"5702241,5002905,4808489,4808478,4808475,4808467,4808465,4808461,4808456,4808443","Event Photography","gallery",[4808179,4808184,4808186,4808389,4808413,4808416,4808425,4808427,4808431,4808434,4808443,4808456,4808461,4808465,4808467,4808475,4808478,4808489,5002905,5702241]);galleries[158688]=new gallery(158688,"5859392,5859126,5859124,5702353,5702351,5702348,5266042,5002883,4809739,4809737","People.","gallery",[2357737,2391660,3037815,3037816,3037818,3583292,3583296,4808717,4809727,4809730,4809734,4809737,4809739,5002883,5266042,5702348,5702351,5702353,5859124,5859126,5859392]);var imageSets=new Object();imageSets[1]="3037818,3037816,3037815";imageSets[3]="5929326,5929324,5929302,5929301,5929300,5929299,5859392,5859126,5859124,5702353,5702351,5702348,5702241,5701582,5701581,5701577,5701567,5701565,5701562,5701559,5701556,5266042,5265625,5002905,5002883,5002837,5002833,5002826,4983266,4983265,4983264,4983262,4983260,4983256,4809739,4809737,4809734,4809730,4809727,4809725,4809722,4809718,4809696,4808897,4808893,4808891,4808717,4808489,4808478,4808475";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/KellyHumphries/images";break}switch(a){case 1:b="http://www1.clikpic.com/KellyHumphries/images";break}switch(a){case 2:b="http://admin.clikpic.com/KellyHumphries/images";break}switch(a){case 24:b="http://tpc15/clikpic/KellyHumphries/images";break}switch(a){case 4:b="http://www.clikchurch.com/KellyHumphries/images";break}switch(a){case 5:b="http://www2.clikpic.com/KellyHumphries/images";break}switch(a){case 22:b="http://tpc5/clikpic/KellyHumphries/images";break}switch(a){case 23:b="http://tpc10/clikpic/KellyHumphries/images";break}switch(a){case 25:b="http://tpc16/clikpic/KellyHumphries/images";break}switch(a){case 15:b="http://www3.clikpic.com/KellyHumphries/images";break}switch(a){case 18:b="http://www4.clikpic.com/KellyHumphries/images";break}switch(a){case 19:b="http://www5.clikpic.com/KellyHumphries/images";break}switch(a){case 31:b="http://www7.clikpic.com/KellyHumphries/images";break}switch(a){case 32:b="http://admin2.clikpic.com/KellyHumphries/images";break}switch(a){case 33:b="http://www8.clikpic.com/KellyHumphries/images";break}switch(a){case 34:b="http://www9.clikpic.com/KellyHumphries/images";break}switch(a){case 35:b="http://admin3.clikpic.com/KellyHumphries/images";break}switch(a){case 37:b="http://admin4.clikpic.com/KellyHumphries/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="Kelly Humphries 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+'")'})}}};