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[4900591]=new thumbnail(4900591,"278454","","Web_073_thumb.jpg",130,87,1);thumbnails[4900521]=new thumbnail(4900521,"278454","","Web_031_thumb.jpg",130,195,1);thumbnails[4900522]=new thumbnail(4900522,"278454","","Web_032_thumb.jpg",130,195,1);thumbnails[4900584]=new thumbnail(4900584,"278454","","Web_068_thumb.jpg",130,198,1);thumbnails[4900306]=new thumbnail(4900306,"278454","","Web_0011_thumb.jpg",130,87,1);thumbnails[4900569]=new thumbnail(4900569,"278454","","Web_059_thumb.jpg",130,87,1);thumbnails[4900309]=new thumbnail(4900309,"278454","","Web_0021_thumb.jpg",130,87,1);thumbnails[4900548]=new thumbnail(4900548,"278454","","Web_047_thumb.jpg",130,195,1);thumbnails[4900484]=new thumbnail(4900484,"278454","","Web_010_thumb.jpg",130,195,1);thumbnails[4900516]=new thumbnail(4900516,"278454","","Web_027_thumb.jpg",130,195,1);thumbnails[4900318]=new thumbnail(4900318,"278454","","Web_005_thumb.jpg",130,195,1);thumbnails[4900497]=new thumbnail(4900497,"278454","","Web_018_thumb.jpg",130,87,1);thumbnails[4900493]=new thumbnail(4900493,"278454","","Web_015_thumb.jpg",130,175,1);thumbnails[4900490]=new thumbnail(4900490,"278454","","Web_014_thumb.jpg",130,87,1);thumbnails[4900480]=new thumbnail(4900480,"278454","","Web_007_thumb.jpg",130,81,1);thumbnails[4900312]=new thumbnail(4900312,"278454","","Web_004_thumb.jpg",130,87,1);thumbnails[4900550]=new thumbnail(4900550,"278454","","Web_048_thumb.jpg",130,87,1);thumbnails[4900500]=new thumbnail(4900500,"278454","","Web_020_thumb.jpg",130,87,1);thumbnails[4900518]=new thumbnail(4900518,"278454","","Web_029_thumb.jpg",130,195,1);thumbnails[4900519]=new thumbnail(4900519,"278454","","Web_030_thumb.jpg",130,87,1);thumbnails[4900565]=new thumbnail(4900565,"278454","","Web_057_thumb.jpg",130,87,1);thumbnails[4900514]=new thumbnail(4900514,"278454","","Web_0251_thumb.jpg",130,87,1);thumbnails[4900483]=new thumbnail(4900483,"278454","","Web_009_thumb.jpg",130,98,1);thumbnails[4900310]=new thumbnail(4900310,"278454","","Web_003_thumb.jpg",130,195,1);thumbnails[4900501]=new thumbnail(4900501,"278454","","Web_021_thumb.jpg",130,198,1);thumbnails[4900489]=new thumbnail(4900489,"278454","","Web_013_thumb.jpg",130,195,1);thumbnails[4900498]=new thumbnail(4900498,"278454","","Web_019_thumb.jpg",130,195,1);thumbnails[4900532]=new thumbnail(4900532,"278454","","Web_037_thumb.jpg",130,189,1);thumbnails[4900557]=new thumbnail(4900557,"278454","","Web_053_thumb.jpg",130,195,1);thumbnails[4900602]=new thumbnail(4900602,"278454","","Hann_541_thumb.jpg",130,86,1);thumbnails[4900478]=new thumbnail(4900478,"278454","","Web_006_thumb.jpg",130,195,1);thumbnails[4900534]=new thumbnail(4900534,"278454","","Web_039_thumb.jpg",130,195,1);thumbnails[4900544]=new thumbnail(4900544,"278454","","Web_043_thumb.jpg",130,87,1);thumbnails[4900593]=new thumbnail(4900593,"278454","","Web_075_thumb.jpg",130,195,1);thumbnails[4900533]=new thumbnail(4900533,"278454","","Web_038_thumb.jpg",130,195,1);thumbnails[4900525]=new thumbnail(4900525,"278454","","Web_033_thumb.jpg",130,195,1);thumbnails[4900486]=new thumbnail(4900486,"278454","","Web_011_thumb.jpg",130,195,1);thumbnails[4900494]=new thumbnail(4900494,"278454","","Web_016_thumb.jpg",130,195,1);thumbnails[4900529]=new thumbnail(4900529,"278454","","Web_035_thumb.jpg",130,195,1);thumbnails[4900583]=new thumbnail(4900583,"278454","","Web_067_thumb.jpg",130,195,1);thumbnails[4900551]=new thumbnail(4900551,"278454","","Web_049_thumb.jpg",130,195,1);thumbnails[4900585]=new thumbnail(4900585,"278454","","Web_069_thumb.jpg",130,195,1);thumbnails[4900571]=new thumbnail(4900571,"278454","","Web_060_thumb.jpg",130,195,1);thumbnails[4900577]=new thumbnail(4900577,"278454","","Web_063_thumb.jpg",130,195,1);thumbnails[4900579]=new thumbnail(4900579,"278454","","Web_064_thumb.jpg",130,195,1);thumbnails[4900530]=new thumbnail(4900530,"278454","","Web_036_thumb.jpg",130,195,1);thumbnails[4900547]=new thumbnail(4900547,"278454","","Web_046_thumb.jpg",130,195,1);thumbnails[4900495]=new thumbnail(4900495,"278454","","Web_017_thumb.jpg",130,195,1);thumbnails[4900517]=new thumbnail(4900517,"278454","","Web_028_thumb.jpg",130,190,1);thumbnails[4900560]=new thumbnail(4900560,"278454","","Web_055_thumb.jpg",130,195,1);thumbnails[4900543]=new thumbnail(4900543,"278454","","Web_042_thumb.jpg",130,87,1);thumbnails[4900506]=new thumbnail(4900506,"278454","","Web_024_thumb.jpg",130,195,1);thumbnails[4900482]=new thumbnail(4900482,"278454","","Web_008_thumb.jpg",130,195,1);thumbnails[4900592]=new thumbnail(4900592,"278454","","Web_074_thumb.jpg",130,195,1);thumbnails[4900487]=new thumbnail(4900487,"278454","","Web_012_thumb.jpg",130,196,1);thumbnails[4900559]=new thumbnail(4900559,"278454","","Web_054_thumb.jpg",130,87,1);thumbnails[4900545]=new thumbnail(4900545,"278454","","Web_044_thumb.jpg",130,195,1);thumbnails[4900582]=new thumbnail(4900582,"278454","","Web_066_thumb.jpg",130,87,1);thumbnails[4900589]=new thumbnail(4900589,"278454","","Web_071_thumb.jpg",130,195,1);thumbnails[4900587]=new thumbnail(4900587,"278454","","Web_070_thumb.jpg",130,87,1);thumbnails[4900542]=new thumbnail(4900542,"278454","","Web_041_thumb.jpg",130,87,1);thumbnails[4900568]=new thumbnail(4900568,"278454","","Web_058_thumb.jpg",130,87,1);thumbnails[4900576]=new thumbnail(4900576,"278454","","Web_062_thumb.jpg",130,87,1);thumbnails[4900581]=new thumbnail(4900581,"278454","","Web_065_thumb.jpg",130,87,1);thumbnails[4900562]=new thumbnail(4900562,"278454","","Web_056_thumb.jpg",130,87,1);thumbnails[4900574]=new thumbnail(4900574,"278454","","Web_061_thumb.jpg",130,195,1);thumbnails[4900555]=new thumbnail(4900555,"278454","","Web_052_thumb.jpg",130,87,1);thumbnails[4900554]=new thumbnail(4900554,"278454","","Web_051_thumb.jpg",130,196,1);thumbnails[4900552]=new thumbnail(4900552,"278454","","Web_050_thumb.jpg",130,87,1);thumbnails[4900546]=new thumbnail(4900546,"278454","","Web_045_thumb.jpg",130,195,1);thumbnails[4900538]=new thumbnail(4900538,"278454","","Web_040_thumb.jpg",130,195,1);thumbnails[4900527]=new thumbnail(4900527,"278454","","Web_034_thumb.jpg",130,87,1);thumbnails[4900507]=new thumbnail(4900507,"278454","","Web_026_thumb.jpg",130,195,1);thumbnails[4900502]=new thumbnail(4900502,"278454","","Web_022_thumb.jpg",130,195,1);thumbnails[4900505]=new thumbnail(4900505,"278454","","Web_023_thumb.jpg",130,87,1);thumbnails[4900595]=new thumbnail(4900595,"279309","","Web_076_thumb.jpg",130,87,1);thumbnails[4900596]=new thumbnail(4900596,"279309","","Web_077_thumb.jpg",130,197,1);thumbnails[4900598]=new thumbnail(4900598,"279309","","Web_079_thumb.jpg",130,87,1);thumbnails[4900597]=new thumbnail(4900597,"279309","","Web_078_thumb.jpg",130,198,1);thumbnails[4925505]=new thumbnail(4925505,"280211","","georgerave1_thumb.jpg",130,93,1);thumbnails[4920975]=new thumbnail(4920975,"280211","","widrave1_thumb.jpg",130,93,1);thumbnails[4920926]=new thumbnail(4920926,"280211","","al_and_heatherraves_thumb.jpg",130,93,1);thumbnails[4925508]=new thumbnail(4925508,"280211","","george2raves_thumb.jpg",130,93,1);thumbnails[4900590]=new thumbnail(4900590,"280211","","Web_072_thumb.jpg",130,195,1);var galleries=new Object();galleries[278454]=new gallery(278454,"4900521","Weddings","section261570",[4900591,4900521,4900522,4900584,4900306,4900569,4900309,4900548,4900484,4900516,4900318,4900497,4900493,4900490,4900480,4900312,4900550,4900500,4900518,4900519,4900565,4900514,4900483,4900310,4900501,4900489,4900498,4900532,4900557,4900602,4900478,4900534,4900544,4900593,4900533,4900525,4900486,4900494,4900529,4900583,4900551,4900585,4900571,4900577,4900579,4900530,4900547,4900495,4900517,4900560,4900543,4900506,4900482,4900592,4900487,4900559,4900545,4900582,4900589,4900587,4900542,4900568,4900576,4900581,4900562,4900574,4900555,4900554,4900552,4900546,4900538,4900527,4900507,4900502,4900505]);galleries[279309]=new gallery(279309,"4900597","Presentation","section261570",[4900595,4900596,4900598,4900597]);galleries[280211]=new gallery(280211,"4900590","Acclaim","section261570",[4925505,4920975,4920926,4925508,4900590]);galleries[278455]=new gallery(278455,"","Music","gallery",[]);galleries[282070]=new gallery(282070,"","Publication","gallery",[]);galleries[282071]=new gallery(282071,"","Raves","gallery",[]);galleries[282072]=new gallery(282072,"","Reflection","section338590",[]);galleries[282073]=new gallery(282073,"","Resolution","section338590",[]);galleries[282075]=new gallery(282075,"","Refusation","section338590",[]);var imageSets=new Object();imageSets[1]="4900602,4900591,4900576,4900569,4900565,4900559,4900550,4900544,4900543,4900514,4900500,4900497,4900490,4900483,4900480,4900312,4900309,4900306";imageSets[2]="4900597,4900590,4900521";imageSets[3]="4900602,4900593,4900591,4900585,4900584,4900583,4900579,4900577,4900571,4900569,4900565,4900560,4900557,4900551,4900550,4900548,4900547,4900544,4900534,4900533,4900532,4900530,4900529";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 34:b="http://www9.clikpic.com/ruthiedepix/images";break}switch(a){case 1:b="http://www1.clikpic.com/ruthiedepix/images";break}switch(a){case 2:b="http://admin.clikpic.com/ruthiedepix/images";break}switch(a){case 4:b="http://www.clikchurch.com/ruthiedepix/images";break}switch(a){case 5:b="http://www2.clikpic.com/ruthiedepix/images";break}switch(a){case 15:b="http://www3.clikpic.com/ruthiedepix/images";break}switch(a){case 21:b="http://www6.clikpic.com/ruthiedepix/images";break}switch(a){case 18:b="http://www4.clikpic.com/ruthiedepix/images";break}switch(a){case 19:b="http://www5.clikpic.com/ruthiedepix/images";break}switch(a){case 22:b="http://tpc5/clikpic/ruthiedepix/images";break}switch(a){case 23:b="http://tpc10/clikpic/ruthiedepix/images";break}switch(a){case 24:b="http://tpc15/clikpic/ruthiedepix/images";break}switch(a){case 25:b="http://tpc16/clikpic/ruthiedepix/images";break}switch(a){case 31:b="http://www7.clikpic.com/ruthiedepix/images";break}switch(a){case 32:b="http://admin2.clikpic.com/ruthiedepix/images";break}switch(a){case 33:b="http://www8.clikpic.com/ruthiedepix/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("section261570"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section261570.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("section261570"!=""){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="Photographs by Ruth Stanley : "+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> 				&pound;"+(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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="depixphotography@yahoo.co.uk">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="depixphotography@yahoo.co.uk">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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+'")'})}}};