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[2681158]=new thumbnail(2681158,"4072","","5web_thumb.jpg",130,195,1);thumbnails[2681168]=new thumbnail(2681168,"4072","","6web_thumb.jpg",130,195,1);thumbnails[2681162]=new thumbnail(2681162,"4072","The Train Now Arriving ........","8web_thumb.jpg",130,195,1);thumbnails[226064]=new thumbnail(226064,"4072","African Dancer","African Dancer_thumb.jpg",130,267,1);thumbnails[2667523]=new thumbnail(2667523,"4072",'"Smile Please"',"DSC_the-photographerweb_thumb.jpg",130,209,1);thumbnails[3426467]=new thumbnail(3426467,"4072",'"Charlie in a Hat"',"Charlie in hat_thumb.jpg",130,170,1);thumbnails[3828191]=new thumbnail(3828191,"4072","The Road Ahead","lexie-on-bike---the-road-ahead_thumb.jpg",130,209,1);thumbnails[3465600]=new thumbnail(3465600,"4072","Indian Boats","Indian Boats_thumb.JPG",130,179,1);thumbnails[886310]=new thumbnail(886310,"4648","","DSC_2166z_thumb.jpg",130,130,1);thumbnails[2667512]=new thumbnail(2667512,"4648",'"Kerry"',"DSC_5070web_thumb.jpg",130,156,1);thumbnails[3156078]=new thumbnail(3156078,"4648","Baby Fresh - 1st Place Digital Open 2008","40 Tonya Smedley - Baby Fresh_thumb.jpg",130,122,1);thumbnails[3828026]=new thumbnail(3828026,"4648",'"Freya" - Robert Halford Portraiture Cup Winner 2009',"DSC_7126-2_thumb.jpg",130,192,1);thumbnails[3828064]=new thumbnail(3828064,"4648","Shaggy Ink Cap","shaggy-ink-cap_1_thumb.jpg",130,199,1);thumbnails[3828070]=new thumbnail(3828070,"4648","Barbary Macaque Monkey","barbary-macaque-5_thumb.jpg",130,175,1);thumbnails[3828127]=new thumbnail(3828127,"4648","Peacock","peacock-1_thumb.jpg",130,173,1);thumbnails[3465609]=new thumbnail(3465609,"4648","Monkey","Monkey_thumb.JPG",130,241,1);thumbnails[2667514]=new thumbnail(2667514,"35716","Snowdrops","DSC_4982web_thumb.jpg",130,189,1);thumbnails[3828133]=new thumbnail(3828133,"35716","Montresor Colour","montresor-colour_thumb.jpg",130,195,1);thumbnails[3828135]=new thumbnail(3828135,"35716","Priest House - Infra Red","priest-house-infra-red_thumb.jpg",130,184,1);thumbnails[3828174]=new thumbnail(3828174,"35716","Prince Street","prince-street_thumb.jpg",130,180,1);thumbnails[5278922]=new thumbnail(5278922,"35716","Steps","DSC_1247web_thumb.jpg",130,166,1);thumbnails[5278923]=new thumbnail(5278923,"35716","Pigeons","DSC_2278web_thumb.jpg",130,189,1);thumbnails[5596954]=new thumbnail(5596954,"35716","Blackpool 1","Blackpool1_thumb.jpg",130,194,1);thumbnails[3435616]=new thumbnail(3435616,"2673","Selfridges Building,Bull Ring,Birmingham","Selfridges Building, Birmingham_thumb.JPG",130,173,1);thumbnails[3435617]=new thumbnail(3435617,"2673","Honfleur Harbour,France","Honfleur Harbour, France_thumb.JPG",130,173,1);thumbnails[3435619]=new thumbnail(3435619,"2673","French Directions","French directions_thumb.JPG",130,115,1);thumbnails[2681181]=new thumbnail(2681181,"215619","","14web_thumb.jpg",130,87,1);thumbnails[39100]=new thumbnail(39100,"215619","Chatsworth House","PICT0004_thumb.jpg",130,98,1);thumbnails[1512842]=new thumbnail(1512842,"215619","Joyce Cresswell","Joyce 5th_586x440_thumb.jpg",130,98,1);thumbnails[2938005]=new thumbnail(2938005,"215619","The Big Wheel","Big Wheel Resize_thumb.jpg",130,86,1);thumbnails[2938008]=new thumbnail(2938008,"215619","The Guildhall","Guildhall Resize_thumb.jpg",130,86,1);thumbnails[2938096]=new thumbnail(2938096,"215619","A View of Quad","View of Quad resize_thumb.jpg",130,91,1);thumbnails[2938304]=new thumbnail(2938304,"215619","The Wheel and Quad","Wheel & Quad resize_thumb.jpg",130,86,1);thumbnails[3426469]=new thumbnail(3426469,"215619","Still Life - Cheese","Still life cheese_thumb.jpg",130,91,1);thumbnails[3426470]=new thumbnail(3426470,"215619","Peppers","peppers2_thumb.jpg",130,97,1);thumbnails[3426819]=new thumbnail(3426819,"215619","Chatsworth in the Snow","IMGP3645_thumb.jpg",130,85,1);thumbnails[5201409]=new thumbnail(5201409,"215619","Old Man's Beard aka Clematis Seeds","Old_Mans_Beard_alias_Clematis_Seeds_-_Member_No_36_thumb.jpg",130,94,1);thumbnails[5201414]=new thumbnail(5201414,"215619","Clematis Seeds","Clematis20Seeds20-20Member20No2036_thumb.jpg",130,91,1);thumbnails[686526]=new thumbnail(686526,"215620","Ghost Train","GhostTrain1_thumb.jpg",130,78,1);thumbnails[686531]=new thumbnail(686531,"215620","Koi Carp","KoiCarp1_thumb.jpg",130,92,1);thumbnails[707711]=new thumbnail(707711,"215620",'"That Old Susannah"',"ThatOldSusannah1_thumb.jpg",130,110,1);thumbnails[1283795]=new thumbnail(1283795,"215620","Boathouse at Ullswater","boat-house-4-ullswater_thumb.gif",130,87,1);thumbnails[1283829]=new thumbnail(1283829,"215620","Fab Four on Bangor Pier","fab-4-on-bangor-pier_thumb.gif",130,70,1);thumbnails[1283846]=new thumbnail(1283846,"215620","Norfolk Beach Huts","norfolk beach huts_thumb.jpg",130,111,1);thumbnails[1283932]=new thumbnail(1283932,"215620","Morning Mist","Victoria-Park-81_thumb.gif",130,94,1);thumbnails[1512838]=new thumbnail(1512838,"215620","Sharon Turner","Sharon 6th_586x440_thumb.jpg",130,98,1);thumbnails[1512846]=new thumbnail(1512846,"215620","Derek Moseley","4th_586x440_thumb.jpg",130,98,1);thumbnails[1283815]=new thumbnail(1283815,"215621","Bird of Prey","chatsworth-b-of-prey2_thumb.gif",130,105,1);thumbnails[3156075]=new thumbnail(3156075,"215621","On The Steps - 3rd Place Digital Open 2008","17 Steve Walters on the steps_thumb.jpg",130,96,1);thumbnails[3523835]=new thumbnail(3523835,"215621","Foremark Sunset","Foremark+Sunset_thumb.jpg",130,59,1);thumbnails[3523839]=new thumbnail(3523839,"215621","Turkish Sunset","Turkish+Sunset_thumb.jpg",130,67,1);thumbnails[3828182]=new thumbnail(3828182,"215621","Azay Storm","azay-storm_thumb.jpg",130,89,1);thumbnails[5201437]=new thumbnail(5201437,"215621","Bring Me Sunshine ","Bring20me20Sunshine20-20Member20No2036_thumb.jpg",130,130,1);thumbnails[5278926]=new thumbnail(5278926,"215621","Chocolate Rose","DSC_3883web_thumb.jpg",130,142,1);thumbnails[3455368]=new thumbnail(3455368,"215621","Garlic - 1st Place,Food Competition 2009","garlic20_thumb.jpg",130,99,1);thumbnails[3455370]=new thumbnail(3455370,"215621","Sundried Tomatoes - 2nd Place,Food Competition 2009","sundried tomatoes19_thumb.jpg",130,85,1);thumbnails[3455372]=new thumbnail(3455372,"215621","Deer","DSC_4647_thumb.jpg",130,81,1);thumbnails[3455373]=new thumbnail(3455373,"215621","Winter Fun","DSC_5348_thumb.jpg",130,71,1);thumbnails[3465613]=new thumbnail(3465613,"215621","Hot,Hot,Hot","Hot, hot, hot_thumb.JPG",130,104,1);thumbnails[3435620]=new thumbnail(3435620,"215622","Bus Ends !!!","Bus ends!!_thumb.JPG",130,98,1);thumbnails[3828185]=new thumbnail(3828185,"215622","London Skyline","london-skyline_thumb.jpg",130,54,1);thumbnails[3828188]=new thumbnail(3828188,"215622","","DSC_0069-hp-small_thumb.jpg",130,92,1);thumbnails[3828194]=new thumbnail(3828194,"215622",'"Down The Lane" - Winner - Colour Print,Annual Exhibition 2009',"DSC_5429_thumb.jpg",130,77,1);thumbnails[5353451]=new thumbnail(5353451,"215622","Bridge Inn,Cotmanhay","DSC_8145x_thumb.jpg",130,79,1);thumbnails[5596955]=new thumbnail(5596955,"215622","Dahlia","Dahlia_thumb.jpg",130,137,1);thumbnails[5596974]=new thumbnail(5596974,"215622","","DSC_8742x_thumb.jpg",130,86,1);var galleries=new Object();galleries[4072]=new gallery(4072,"3828191,3465600,3426467,2681162,2681158,2667523","Gallery 1","gallery",[2681158,2681168,2681162,226064,2667523,3426467,3828191,3465600]);galleries[4648]=new gallery(4648,"3828127,3828070,3828064,2667512,886310","Gallery 2","gallery",[886310,2667512,3156078,3828026,3828064,3828070,3828127,3465609]);galleries[35716]=new gallery(35716,"5596954,5278922,3828174,3828135,3828133,2667514","Gallery 3","gallery",[2667514,3828133,3828135,3828174,5278922,5278923,5596954]);galleries[2673]=new gallery(2673,"3435619,3435617,3435616","Gallery 4","gallery",[3435616,3435617,3435619]);galleries[215619]=new gallery(215619,"5201414,5201409,3426470,3426469","Gallery 9","gallery",[2681181,39100,1512842,2938005,2938008,2938096,2938304,3426469,3426470,3426819,5201409,5201414]);galleries[215620]=new gallery(215620,"1512846,1512838,1283932,1283846,1283829,1283795,707711,686531,686526","Gallery 10","gallery",[686526,686531,707711,1283795,1283829,1283846,1283932,1512838,1512846]);galleries[215621]=new gallery(215621,"5201437","Gallery 11","gallery",[1283815,3156075,3523835,3523839,3828182,5201437,5278926,3455368,3455370,3455372,3455373,3465613]);galleries[215622]=new gallery(215622,"5596974,5596955,5353451,3828194,3828188,3828185,3435620","Gallery 12","gallery",[3435620,3828185,3828188,3828194,5353451,5596955,5596974]);var imageSets=new Object();imageSets[1]="5353451,3828194,3828188,3828182,3465613,3426819,2681181,1283795";imageSets[2]="5596954,5278922,5201437,5201414,5201409,3828191,3828174,3828135,3828133,3828127,3828070,3828064,3465600,3426470,3426469,3426467,2681162,2681158,2667523,2667514,2667512,886310";imageSets[3]="5596974";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/samtron/images";break}switch(a){case 1:b="http://www1.clikpic.com/samtron/images";break}switch(a){case 2:b="http://admin.clikpic.com/samtron/images";break}switch(a){case 24:b="http://tpc15/clikpic/samtron/images";break}switch(a){case 4:b="http://www.clikchurch.com/samtron/images";break}switch(a){case 5:b="http://www2.clikpic.com/samtron/images";break}switch(a){case 22:b="http://tpc5/clikpic/samtron/images";break}switch(a){case 23:b="http://tpc10/clikpic/samtron/images";break}switch(a){case 25:b="http://tpc16/clikpic/samtron/images";break}switch(a){case 15:b="http://www3.clikpic.com/samtron/images";break}switch(a){case 18:b="http://www4.clikpic.com/samtron/images";break}switch(a){case 19:b="http://www5.clikpic.com/samtron/images";break}switch(a){case 31:b="http://www7.clikpic.com/samtron/images";break}switch(a){case 32:b="http://admin2.clikpic.com/samtron/images";break}switch(a){case 33:b="http://www8.clikpic.com/samtron/images";break}switch(a){case 34:b="http://www9.clikpic.com/samtron/images";break}switch(a){case 35:b="http://admin3.clikpic.com/samtron/images";break}switch(a){case 37:b="http://admin4.clikpic.com/samtron/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="Ilkeston Photo 2000 Club";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>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</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="t">';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="t">';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(b,a){imageID=randomListVal(galleries[b].featured_images);if(imageID!=0){a.src=thumbnails[imageID].src;a.width=thumbnails[imageID].width;a.height=thumbnails[imageID].height}}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+'")'})}}};