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[998711]=new thumbnail(998711,"74940","","Untitled-23_thumb.jpg",130,89,1);thumbnails[1330813]=new thumbnail(1330813,"74940","","DSC_3398_thumb.jpg",130,90,1);thumbnails[2074580]=new thumbnail(2074580,"74940","","_DSC0040-1_thumb.jpg",130,81,1);thumbnails[998717]=new thumbnail(998717,"74940","","5_thumb.jpg",130,75,1);thumbnails[998724]=new thumbnail(998724,"74940","","9_thumb.jpg",130,73,1);thumbnails[1330814]=new thumbnail(1330814,"74940","","hut_colour_thumb.jpg",130,97,1);thumbnails[4165470]=new thumbnail(4165470,"74940","","DSC_3418_thumb.jpg",130,89,1);thumbnails[1330811]=new thumbnail(1330811,"74940","","152_thumb.jpg",130,89,1);thumbnails[1110510]=new thumbnail(1110510,"74940","","20071129-DSC_2629 copy_thumb.jpg",130,96,1);thumbnails[1125108]=new thumbnail(1125108,"74940","","20071129-DSC_2641-2 copy_thumb.jpg",130,95,1);thumbnails[998716]=new thumbnail(998716,"74940","","4_thumb.jpg",130,126,1);thumbnails[998709]=new thumbnail(998709,"74940","","1_thumb.jpg",130,126,1);thumbnails[4171994]=new thumbnail(4171994,"74940","","11_thumb.jpg",130,88,1);thumbnails[4171995]=new thumbnail(4171995,"74940","","12_1_thumb.jpg",130,96,1);thumbnails[4171999]=new thumbnail(4171999,"74940","","20071208-horror_show2_thumb.jpg",130,92,1);thumbnails[4172004]=new thumbnail(4172004,"74940","","14_thumb.jpg",130,85,1);thumbnails[4172013]=new thumbnail(4172013,"74940","","15_thumb.jpg",130,87,1);thumbnails[4172018]=new thumbnail(4172018,"74940","","Untitled_HDR218x10_thumb.jpg",130,73,1);thumbnails[998811]=new thumbnail(998811,"74940","","bone breakers_thumb.jpg",130,172,1);thumbnails[2074589]=new thumbnail(2074589,"74940","","tower_thumb.jpg",130,184,1);thumbnails[4876685]=new thumbnail(4876685,"74940","","tramp_1_thumb.jpg",130,179,1);thumbnails[6077730]=new thumbnail(6077730,"74940","","_DSC0009_thumb.jpg",130,130,1);thumbnails[6077733]=new thumbnail(6077733,"74940","","_DSC0020_thumb.jpg",130,130,1);thumbnails[6077778]=new thumbnail(6077778,"74940","","DSC_2638_thumb.jpg",130,130,1);thumbnails[998793]=new thumbnail(998793,"74947","","DSC_2182-Edit-2 copy_thumb.jpg",130,93,1);thumbnails[998796]=new thumbnail(998796,"74947","","-10-2_thumb.jpg",130,98,1);thumbnails[998776]=new thumbnail(998776,"74947","","12_thumb.jpg",130,84,1);thumbnails[4172069]=new thumbnail(4172069,"74947","","DSC_2177_thumb.jpg",130,86,1);thumbnails[4172093]=new thumbnail(4172093,"74947","","DSC_2213_thumb.jpg",130,86,1);thumbnails[4172095]=new thumbnail(4172095,"74947","","DSC_2229_thumb.jpg",130,86,1);thumbnails[4172051]=new thumbnail(4172051,"74947","","-3_thumb.jpg",130,196,1);thumbnails[1110512]=new thumbnail(1110512,"74947","","ephesus 2 print copy_thumb.jpg",130,203,1);thumbnails[4172056]=new thumbnail(4172056,"74947","","DSC_2189_thumb.jpg",130,196,1);thumbnails[998795]=new thumbnail(998795,"74947","","barca 1_thumb.jpg",130,162,1);thumbnails[998783]=new thumbnail(998783,"74947","","port 16x25_thumb.jpg",130,203,1);thumbnails[998770]=new thumbnail(998770,"74947","","5_1_thumb.jpg",130,180,1);thumbnails[4876692]=new thumbnail(4876692,"74947","","DSC_2164_thumb.jpg",130,195,1);thumbnails[4876714]=new thumbnail(4876714,"74947","","DSC_2197_thumb.jpg",130,195,1);thumbnails[6078070]=new thumbnail(6078070,"74947","","_DSC0004_thumb.jpg",130,130,1);thumbnails[4876731]=new thumbnail(4876731,"74947","","DSC_2216_thumb.jpg",130,195,1);thumbnails[998760]=new thumbnail(998760,"74948","","7_thumb.jpg",130,97,1);thumbnails[1110514]=new thumbnail(1110514,"74948","","planet_thumb.jpg",130,92,1);thumbnails[998765]=new thumbnail(998765,"74948","","121_thumb.jpg",130,74,1);thumbnails[998817]=new thumbnail(998817,"74948","","-9_thumb.jpg",130,76,1);thumbnails[998826]=new thumbnail(998826,"74948","","-13_thumb.jpg",130,82,1);thumbnails[1110502]=new thumbnail(1110502,"74948","","Copy of DSC_1664 copy_thumb.jpg",130,74,1);thumbnails[1125110]=new thumbnail(1125110,"74948","","_DSC0014_thumb.jpg",130,86,1);thumbnails[1110507]=new thumbnail(1110507,"74948","","-14_thumb.jpg",130,85,1);thumbnails[998746]=new thumbnail(998746,"74948","","2_1_thumb.jpg",130,172,1);thumbnails[998749]=new thumbnail(998749,"74948","","DSC_1962 copy_1_thumb.jpg",130,163,1);thumbnails[998806]=new thumbnail(998806,"74948","","20_thumb.jpg",130,159,1);thumbnails[998756]=new thumbnail(998756,"74948","","1_1_thumb.jpg",130,169,1);thumbnails[6078072]=new thumbnail(6078072,"74948","","_DSC0028_thumb.jpg",130,130,1);thumbnails[6078100]=new thumbnail(6078100,"74948","","fallen_angel_thumb.jpg",130,129,1);thumbnails[6078080]=new thumbnail(6078080,"74948","","-52_thumb.jpg",130,98,1);thumbnails[6078102]=new thumbnail(6078102,"74948","","3_elephants_thumb.jpg",130,95,1);thumbnails[6078103]=new thumbnail(6078103,"74948","","clouds_sig_thumb.jpg",130,101,1);thumbnails[6078105]=new thumbnail(6078105,"74948","","DSC_4659_thumb.jpg",130,87,1);thumbnails[6078106]=new thumbnail(6078106,"74948","","DSC_4669_thumb.jpg",130,87,1);thumbnails[6078108]=new thumbnail(6078108,"74948","","DSC_4654_thumb.jpg",130,87,1);thumbnails[4876698]=new thumbnail(4876698,"278244","","_DSC0012-17_thumb.jpg",130,130,1);thumbnails[6077782]=new thumbnail(6077782,"278244","","_DSC0240_thumb.jpg",130,153,1);thumbnails[4876699]=new thumbnail(4876699,"278244","","-56_thumb.jpg",130,130,1);thumbnails[6077954]=new thumbnail(6077954,"278244","","-25_thumb.jpg",130,130,1);thumbnails[4876701]=new thumbnail(4876701,"278244","","_DSC0051-8_thumb.jpg",130,130,1);thumbnails[6077958]=new thumbnail(6077958,"278244","","-26_thumb.jpg",130,130,1);thumbnails[4876703]=new thumbnail(4876703,"278244","","_DSC0040_thumb.jpg",130,131,1);thumbnails[6077961]=new thumbnail(6077961,"278244","","-36_thumb.jpg",130,130,1);thumbnails[4172105]=new thumbnail(4172105,"278244","","_DSC0060-14_thumb.jpg",130,130,1);thumbnails[6077964]=new thumbnail(6077964,"278244","","DSC_4615_thumb.jpg",130,130,1);thumbnails[998807]=new thumbnail(998807,"278244","","4_1_thumb.jpg",130,86,1);thumbnails[998813]=new thumbnail(998813,"278244","","flower pebbles sml_thumb.jpg",130,130,1);thumbnails[6077969]=new thumbnail(6077969,"278244","","-53_1_thumb.jpg",130,194,1);thumbnails[4876709]=new thumbnail(4876709,"278244","","soft_star_thumb.jpg",130,130,1);thumbnails[4876727]=new thumbnail(4876727,"278244","","-29_1_thumb.jpg",130,223,1);thumbnails[6077779]=new thumbnail(6077779,"278244","","_DSC0183_thumb.jpg",130,130,1);thumbnails[6077975]=new thumbnail(6077975,"278244","","-22_thumb.jpg",130,130,1);thumbnails[6077988]=new thumbnail(6077988,"278244","","DSC_4627_thumb.jpg",130,130,1);thumbnails[1452264]=new thumbnail(1452264,"100397","Aquarius","aquariussml_thumb.jpg",130,126,1);thumbnails[1452271]=new thumbnail(1452271,"100397","Pisces","piscessml_thumb.jpg",130,129,1);thumbnails[1452265]=new thumbnail(1452265,"100397","Aries","ariessml_thumb.jpg",130,131,1);thumbnails[1452275]=new thumbnail(1452275,"100397","Taurus","taurussml_thumb.jpg",130,129,1);thumbnails[1452268]=new thumbnail(1452268,"100397","Gemini","geminisml_thumb.jpg",130,133,1);thumbnails[1452266]=new thumbnail(1452266,"100397","Cancer","cancersml_thumb.jpg",130,129,1);thumbnails[1452269]=new thumbnail(1452269,"100397","Leo","leosml_thumb.jpg",130,132,1);thumbnails[1452276]=new thumbnail(1452276,"100397","Virgo","virgosml_thumb.jpg",130,129,1);thumbnails[1452270]=new thumbnail(1452270,"100397","Libra","librasml_thumb.jpg",130,129,1);thumbnails[1452273]=new thumbnail(1452273,"100397","Scorpio","scorpiosml_thumb.jpg",130,128,1);thumbnails[1452272]=new thumbnail(1452272,"100397","Sagittarius","sagittariussml_thumb.jpg",130,131,1);thumbnails[1452267]=new thumbnail(1452267,"100397","Capricorn","capricornsml_thumb.jpg",130,132,1);var galleries=new Object();galleries[74940]=new gallery(74940,"2074589","coast","gallery",[998711,1330813,2074580,998717,998724,1330814,4165470,1330811,1110510,1125108,998716,998709,4171994,4171995,4171999,4172004,4172013,4172018,998811,2074589,4876685,6077730,6077733,6077778]);galleries[74947]=new gallery(74947,"6078070","buildings","gallery",[998793,998796,998776,4172069,4172093,4172095,4172051,1110512,4172056,998795,998783,998770,4876692,4876714,6078070,4876731]);galleries[74948]=new gallery(74948,"998756","misc","gallery",[998760,1110514,998765,998817,998826,1110502,1125110,1110507,998746,998749,998806,998756,6078072,6078100,6078080,6078102,6078103,6078105,6078106,6078108]);galleries[278244]=new gallery(278244,"6077964","still life","gallery",[4876698,6077782,4876699,6077954,4876701,6077958,4876703,6077961,4172105,6077964,998807,998813,6077969,4876709,4876727,6077779,6077975,6077988]);galleries[100397]=new gallery(100397,"1452269","zodiac","gallery",[1452264,1452271,1452265,1452275,1452268,1452266,1452269,1452276,1452270,1452273,1452272,1452267]);var imageSets=new Object();imageSets[1]="998711";imageSets[2]="6078070,6077964,2074589,1452269,998756";imageSets[3]="6078108,6078106,6078105,6078103,6078102,6078100,6078080,6078072,6078070,6077988,6077975,6077969,6077964,6077961,6077958,6077954,6077782,6077779,6077778,6077733,6077730,4876731,4876727,4876714,4876709,4876703,4876701,4876699,4876698,4876692,4876685,4172105,4172095,4172093,4172069,4172056,4172051,4172018,4172013,4172004,4171999,4171995,4171994,4165470,2074589,2074580,1452276,1452275,1452273,1452272";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/hillrock/images";break}switch(a){case 1:b="http://www1.clikpic.com/hillrock/images";break}switch(a){case 2:b="http://admin.clikpic.com/hillrock/images";break}switch(a){case 24:b="http://tpc15/clikpic/hillrock/images";break}switch(a){case 4:b="http://www.clikchurch.com/hillrock/images";break}switch(a){case 5:b="http://www2.clikpic.com/hillrock/images";break}switch(a){case 22:b="http://tpc5/clikpic/hillrock/images";break}switch(a){case 23:b="http://tpc10/clikpic/hillrock/images";break}switch(a){case 25:b="http://tpc16/clikpic/hillrock/images";break}switch(a){case 15:b="http://www3.clikpic.com/hillrock/images";break}switch(a){case 18:b="http://www4.clikpic.com/hillrock/images";break}switch(a){case 19:b="http://www5.clikpic.com/hillrock/images";break}switch(a){case 31:b="http://www7.clikpic.com/hillrock/images";break}switch(a){case 32:b="http://admin2.clikpic.com/hillrock/images";break}switch(a){case 33:b="http://www8.clikpic.com/hillrock/images";break}switch(a){case 34:b="http://www9.clikpic.com/hillrock/images";break}switch(a){case 35:b="http://admin3.clikpic.com/hillrock/images";break}switch(a){case 37:b="http://admin4.clikpic.com/hillrock/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="hillrock: "+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+'")'})}}};