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[2511161]=new thumbnail(2511161,"","Genetic Drift","Birmingham, H, Genetic Drift, A_thumb.jpg",130,153,15);thumbnails[2511210]=new thumbnail(2511210,"","Erosion","phi_thumb.jpg",130,130,15);thumbnails[2511531]=new thumbnail(2511531,"","Helen BIRMINGHAM","web_thumb.jpg",130,174,15);thumbnails[3420937]=new thumbnail(3420937,"","","website41_thumb.jpg",130,170,15);thumbnails[3421136]=new thumbnail(3421136,"","Auricula Helen Barter","c15_1_helen_barter_thumb.jpg",130,124,15);thumbnails[3421283]=new thumbnail(3421283,"","","website19_thumb.jpg",130,148,15);thumbnails[3421307]=new thumbnail(3421307,"","","progression_thumb.JPG",130,47,15);thumbnails[3421328]=new thumbnail(3421328,"","(Ab)Original Life","small_thumb.jpg",130,130,15);thumbnails[3425247]=new thumbnail(3425247,"",'Part of "Nascency" Series',"website111_thumb.jpg",130,133,15);thumbnails[3427086]=new thumbnail(3427086,"","","web111_thumb.jpg",130,175,15);thumbnails[4074487]=new thumbnail(4074487,"","","postersmall_thumb.JPG",130,183,15);thumbnails[4936997]=new thumbnail(4936997,"","","21web_thumb.jpg",130,90,15);thumbnails[4938177]=new thumbnail(4938177,"280721","No 1","postcard061_thumb.JPG",130,131,15);thumbnails[4938179]=new thumbnail(4938179,"280721","No 2","lifeline_thumb.jpg",130,130,15);thumbnails[4938182]=new thumbnail(4938182,"280721","No 3","31_thumb.jpg",130,130,15);thumbnails[4938185]=new thumbnail(4938185,"280721","No 4","art_080_thumb.jpg",130,132,15);thumbnails[4938187]=new thumbnail(4938187,"280721","No 5","52_thumb.jpg",130,137,15);thumbnails[4938189]=new thumbnail(4938189,"280721","No 6","71_thumb.jpg",130,136,15);thumbnails[4938190]=new thumbnail(4938190,"280721","No 7","91_thumb.jpg",130,136,15);thumbnails[4938192]=new thumbnail(4938192,"280721","No 8","61_thumb.jpg",130,137,15);thumbnails[4938194]=new thumbnail(4938194,"280721","No 9","81_thumb.jpg",130,121,15);thumbnails[4938196]=new thumbnail(4938196,"280721","No 10","111_thumb.jpg",130,128,15);thumbnails[4938197]=new thumbnail(4938197,"280721","No 11","art_1091_thumb.jpg",130,129,15);thumbnails[4938198]=new thumbnail(4938198,"280721","No 12","121_thumb.jpg",130,142,15);thumbnails[4938199]=new thumbnail(4938199,"280721","No 13","131_thumb.jpg",130,139,15);thumbnails[4938200]=new thumbnail(4938200,"280721","No 14","14_1_thumb.jpg",130,128,15);thumbnails[4938204]=new thumbnail(4938204,"280721","No 15","19web_thumb.jpg",130,124,15);thumbnails[4938205]=new thumbnail(4938205,"280721","No 16","16_thumb.jpg",130,130,15);thumbnails[4938206]=new thumbnail(4938206,"280721","No 17","15_thumb.jpg",130,143,15);thumbnails[4938207]=new thumbnail(4938207,"280721","No 18","17_thumb.jpg",130,126,15);thumbnails[4938209]=new thumbnail(4938209,"280721","No 19","18_thumb.jpg",130,130,15);thumbnails[4938211]=new thumbnail(4938211,"280721","No 20","20_thumb.jpg",130,136,15);thumbnails[4938214]=new thumbnail(4938214,"280721","No 21","24_thumb.jpg",130,138,15);thumbnails[4938217]=new thumbnail(4938217,"280721","No 22","art_205_thumb.jpg",130,137,15);thumbnails[4938220]=new thumbnail(4938220,"280721","No 23","art_084_thumb.jpg",130,130,15);thumbnails[4938223]=new thumbnail(4938223,"280721","No 24","framedprints_0061_thumb.jpg",130,130,15);thumbnails[4938225]=new thumbnail(4938225,"280721","No 25","22_thumb.jpg",130,139,15);thumbnails[4938227]=new thumbnail(4938227,"280721","No 26","darwinexhibition_005a_thumb.jpg",130,140,15);thumbnails[4938231]=new thumbnail(4938231,"280721","No 27","27_thumb.jpg",130,124,15);thumbnails[4938234]=new thumbnail(4938234,"280721","No 28","28_thumb.jpg",130,131,15);thumbnails[4938238]=new thumbnail(4938238,"280721","No 29","art_007a_thumb.jpg",130,125,15);thumbnails[4938243]=new thumbnail(4938243,"280721","No 30","art_1051_thumb.jpg",130,130,15);thumbnails[6149619]=new thumbnail(6149619,"","","tidetime4a_thumb.jpg",130,127,15);thumbnails[6149711]=new thumbnail(6149711,"","","2010_067a_thumb.jpg",130,154,15);thumbnails[6149760]=new thumbnail(6149760,"","","Image0303_thumb.jpg",130,181,15);thumbnails[6149963]=new thumbnail(6149963,"","Time & Tide I ","timetide1a_thumb.jpg",130,126,15);thumbnails[6150086]=new thumbnail(6150086,"","Time & Tide II","timetide2a_thumb.jpg",130,129,15);thumbnails[6150132]=new thumbnail(6150132,"","Time & Tide III","timetide3a_thumb.jpg",130,128,15);thumbnails[6150133]=new thumbnail(6150133,"","Time & Tide IV","tidetime4a1_thumb.jpg",130,128,15);thumbnails[6150134]=new thumbnail(6150134,"","Time & Tide V","timetide5a_thumb.jpg",130,140,15);thumbnails[6150136]=new thumbnail(6150136,"","Time & Tide VI","timetide6a_thumb.jpg",130,126,15);thumbnails[6150137]=new thumbnail(6150137,"","Time & Tide VII","timetide7a_thumb.jpg",130,128,15);thumbnails[6150138]=new thumbnail(6150138,"","Time & Tide VIII","timetide8a_thumb.jpg",130,129,15);thumbnails[6150142]=new thumbnail(6150142,"","Time & Tide IX","timetide9a_thumb.jpg",130,129,15);thumbnails[6150143]=new thumbnail(6150143,"","Time & Tide X","timetide10a_thumb.jpg",130,130,15);thumbnails[3423500]=new thumbnail(3423500,"","Geology, Transmutation, Research","sections_thumb.JPG",130,58,15);thumbnails[2511203]=new thumbnail(2511203,"","The Noble Science of Geology","goldpebble 002_thumb.jpg",130,130,15);thumbnails[3425020]=new thumbnail(3425020,"","Pebble Stage I","web14_thumb.jpg",130,173,15);thumbnails[2497720]=new thumbnail(2497720,"","Town Ruins","catalogue 4_thumb.jpg",130,130,15);thumbnails[2511017]=new thumbnail(2511017,"","Untitled","darwin2009 043_thumb.jpg",130,195,15);thumbnails[3425023]=new thumbnail(3425023,"","Pebble Stage II","web22_thumb.jpg",130,176,15);thumbnails[3425025]=new thumbnail(3425025,"","Pebble Stage III","web31_thumb.jpg",130,176,15);thumbnails[3425027]=new thumbnail(3425027,"","Pebble Stage IV","web41_thumb.jpg",130,178,15);thumbnails[3423733]=new thumbnail(3423733,"","","website21_thumb.jpg",130,100,15);thumbnails[3420929]=new thumbnail(3420929,"","","website18_thumb.jpg",130,129,15);thumbnails[3425048]=new thumbnail(3425048,"","Nascency I","web15_thumb.jpg",130,131,15);thumbnails[3425051]=new thumbnail(3425051,"","Nascency II","web23_thumb.jpg",130,134,15);thumbnails[3425055]=new thumbnail(3425055,"","Nascency IV","web32_thumb.jpg",130,131,15);thumbnails[3425059]=new thumbnail(3425059,"","Nascency VI","web42_thumb.jpg",130,135,15);var galleries=new Object();galleries[280721]=new gallery(280721,"4938243,4938238,4938234,4938231,4938227,4938225,4938223,4938220,4938217,4938214","Voyage of Discovery","section337337",[4938177,4938179,4938182,4938185,4938187,4938189,4938190,4938192,4938194,4938196,4938197,4938198,4938199,4938200,4938204,4938205,4938206,4938207,4938209,4938211,4938214,4938217,4938220,4938223,4938225,4938227,4938231,4938234,4938238,4938243]);var imageSets=new Object();imageSets[1]="3420929";imageSets[3]="6150143,6150142,6150138,6150137,6150136,6150134,6150133,6150132,6150086,6149963,6149760,6149711,6149619,4938243,4938238,4938234,4938231,4938227,4938225,4938223,4938220,4938217,4938214,4938211,4938209,4938207,4938206,4938205,4938204,4938200,4938199,4938198,4938197,4938196,4938194,4938192,4938190,4938189,4938187,4938185,4938182,4938179,4938177,4936997,4074487,3427086,3425247,3425059,3425055,3425051";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/helenbirmingham/images";break}switch(a){case 1:b="http://www1.clikpic.com/helenbirmingham/images";break}switch(a){case 2:b="http://admin.clikpic.com/helenbirmingham/images";break}switch(a){case 24:b="http://tpc15/clikpic/helenbirmingham/images";break}switch(a){case 4:b="http://www.clikchurch.com/helenbirmingham/images";break}switch(a){case 5:b="http://www2.clikpic.com/helenbirmingham/images";break}switch(a){case 22:b="http://tpc5/clikpic/helenbirmingham/images";break}switch(a){case 23:b="http://tpc10/clikpic/helenbirmingham/images";break}switch(a){case 25:b="http://tpc16/clikpic/helenbirmingham/images";break}switch(a){case 15:b="http://www3.clikpic.com/helenbirmingham/images";break}switch(a){case 18:b="http://www4.clikpic.com/helenbirmingham/images";break}switch(a){case 19:b="http://www5.clikpic.com/helenbirmingham/images";break}switch(a){case 31:b="http://www7.clikpic.com/helenbirmingham/images";break}switch(a){case 32:b="http://admin2.clikpic.com/helenbirmingham/images";break}switch(a){case 33:b="http://www8.clikpic.com/helenbirmingham/images";break}switch(a){case 34:b="http://www9.clikpic.com/helenbirmingham/images";break}switch(a){case 35:b="http://admin3.clikpic.com/helenbirmingham/images";break}switch(a){case 37:b="http://admin4.clikpic.com/helenbirmingham/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("section337337"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section337337.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("section337337"!=""){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="Helen Birmingham: "+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+'")'})}}};