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[3872272]=new thumbnail(3872272,"235315","Anything You Can Do!","Anythingyoucando1_thumb.jpg",130,195,15);thumbnails[3931858]=new thumbnail(3931858,"235315","Misty Morn over Laxey Valley<br>\r\nLondon Salon of Photography Acceptance 2009<br>\r\n","MistyMorn2_thumb.jpg",130,43,15);thumbnails[3939435]=new thumbnail(3939435,"235316","A snowy morning in Withdean Park","SnowinWithdeanPark1_thumb.jpg",130,87,15);thumbnails[3872024]=new thumbnail(3872024,"235316","Reflections of Brighton","BrightonReflections_thumb.jpg",130,65,15);thumbnails[3872256]=new thumbnail(3872256,"235316","Deck Chairs on the Pier","DeckChairsonthePier_thumb.jpg",130,65,15);thumbnails[3875097]=new thumbnail(3875097,"235316","Starlings over the Pier at Dusk","StarlingsoverthePier_thumb.jpg",130,130,15);thumbnails[3875123]=new thumbnail(3875123,"235316","The White Jug","TheWhiteJug1_thumb.jpg",130,170,15);thumbnails[3875127]=new thumbnail(3875127,"235316","Palm Trees in the Pacific","PalmTrees21_thumb.jpg",130,195,15);thumbnails[3875134]=new thumbnail(3875134,"235316","Tropical Paradise no.2","TropicalParadise2_thumb.jpg",130,195,15);thumbnails[3875142]=new thumbnail(3875142,"235316","Hove Graffiti","HoveGraffiti1_thumb.jpg",130,130,15);thumbnails[3875148]=new thumbnail(3875148,"235316","Tropical Paradise no.4","TropicalParadise4_thumb.jpg",130,130,15);thumbnails[3881551]=new thumbnail(3881551,"235316","Venetian Reflection","VenetianReflection_thumb.jpg",130,195,15);thumbnails[3881554]=new thumbnail(3881554,"235316","Sunset on Waikiki VBeach","SunsetonWaikikiBeach_thumb.jpg",130,87,15);thumbnails[3881563]=new thumbnail(3881563,"235316","The Spiral Staircase","SpiralStaircase_thumb.jpg",130,195,15);thumbnails[3881567]=new thumbnail(3881567,"235316","Still Life at the British Museum","StillLifeattheBritishMuseum_thumb.jpg",130,85,15);thumbnails[3881619]=new thumbnail(3881619,"235316","The West Pier","BrightonsWestPier_thumb.jpg",130,65,15);thumbnails[3881623]=new thumbnail(3881623,"235316","Images of Brighton","BrightonMontage_thumb.jpg",130,130,15);thumbnails[3881627]=new thumbnail(3881627,"235316","Golden Gate Bridge","GoldenGateBridge_thumb.jpg",130,80,15);thumbnails[2153055]=new thumbnail(2153055,"26597","Pebbles","Large pebbles_thumb.jpg",130,63,15);thumbnails[2153100]=new thumbnail(2153100,"26597","Mood Blue","Mood Blue_thumb.jpg",130,81,15);thumbnails[2253688]=new thumbnail(2253688,"26597","Birling Gap Sunset no.4","Birling Gap Sunset no_thumb.41.jpg",130,81,15);thumbnails[2253691]=new thumbnail(2253691,"26597","Birling Gap Sunset no.3","Birling Gap Sunset no31_thumb.jpg",130,85,15);thumbnails[2253695]=new thumbnail(2253695,"26597","After the Sun has Set","After the sun has set1_thumb.jpg",130,87,15);thumbnails[3939518]=new thumbnail(3939518,"26597","Off the shore of Zanzibar","OfftheshoreofZanzibar_thumb.jpg",130,94,15);thumbnails[3939521]=new thumbnail(3939521,"26597","Solitary Tulip","SolitaryTulip_thumb.jpg",130,87,15);thumbnails[949052]=new thumbnail(949052,"26597","The Estuary at Low Tide - 1","The Estuary at Low Tide-1_thumb.jpg",130,87,15);thumbnails[949055]=new thumbnail(949055,"26597","The Estuary at Low Tide - 2","The Estuary at Low Tide-2_thumb.jpg",130,175,15);thumbnails[949060]=new thumbnail(949060,"26597","The Estuary at Low Tide - 3","The Estuary at Low Tide-3_thumb.jpg",130,87,15);thumbnails[949049]=new thumbnail(949049,"26597","Seascape 1","Seascape-1_thumb.jpg",130,87,15);thumbnails[949050]=new thumbnail(949050,"26597","Seven Sisters from Birling Gap","Seven Sisters from Birling Gap_thumb.jpg",130,87,15);thumbnails[949063]=new thumbnail(949063,"26597","The Islands","The Islands_thumb.jpg",130,87,15);thumbnails[5372872]=new thumbnail(5372872,"302937","The Pimp","ThePimp_thumb.jpg",130,200,15);thumbnails[5372876]=new thumbnail(5372876,"302937","The Tobacco Farmer","TheTobaccoFarmer_thumb.jpg",130,192,15);thumbnails[5372879]=new thumbnail(5372879,"302937","What's he thinking?","Whatshethinking_thumb.jpg",130,87,15);thumbnails[146653]=new thumbnail(146653,"13574","Graffiti","Graffiti_thumb.jpg",130,66,15);thumbnails[158937]=new thumbnail(158937,"13574","Royal Pavilion","Brighton Pavilion_thumb.jpg",130,90,15);thumbnails[151390]=new thumbnail(151390,"13574","Waltzer Sunset","Waltzer_Sunset_thumb.jpg",130,87,15);thumbnails[5372848]=new thumbnail(5372848,"42033","Early Morning, Derwentwater, no.1<br>\r\n","Early_Morning_Derwentwater-1_thumb.jpg",130,41,15);thumbnails[5372857]=new thumbnail(5372857,"42033","Early Morning, Derwentwater, no.2","EarlyMorningDerwentwater-2_thumb.jpg",130,62,15);thumbnails[5372862]=new thumbnail(5372862,"42033","Early Morning, Derwentwater, no.3","EarlyMorningDerwentwater-3_thumb.jpg",130,60,15);thumbnails[150773]=new thumbnail(150773,"13577","Palacio da Pena, Sintra, Portugal","Palacio_da_Pena1_thumb.jpg",130,98,15);thumbnails[158652]=new thumbnail(158652,"13577","Sunset 1 Lake Nasser, Egypt","Sunset_Lake_Nasser_1_thumb.jpg",130,58,15);thumbnails[158653]=new thumbnail(158653,"13577","Sunset 2 Lake Nasser, Egypt","Sunset_Lake_Nasser_2_thumb.jpg",130,71,15);thumbnails[176897]=new thumbnail(176897,"13577","Sunset across the Nile, Luxor, Egypt","Sunset across the Nile_thumb.jpg",130,92,15);thumbnails[3890916]=new thumbnail(3890916,"13577","Harvesting Seaweed","HarvestingSeaweed_thumb.jpg",130,60,15);thumbnails[3890924]=new thumbnail(3890924,"13577","The Gathering Storm","TheGatheringStorm_thumb.jpg",130,195,15);thumbnails[3939527]=new thumbnail(3939527,"13577","Two Giraffes - they don't look it, but they were in the middle of a fight!","TwoGiraffes_thumb.jpg",130,236,15);thumbnails[949048]=new thumbnail(949048,"13577","Dalmatian Coast","Dalmatian Coast_thumb.jpg",130,87,15);thumbnails[542059]=new thumbnail(542059,"13577","Shelter from the blistering sun","WCP-l_thumb.jpg",130,87,15);thumbnails[541481]=new thumbnail(541481,"13577","View from the wall","WCP-ab_thumb.jpg",130,195,15);thumbnails[3890927]=new thumbnail(3890927,"236288","Hot Lips!","HotLips_thumb.jpg",130,86,15);thumbnails[3939515]=new thumbnail(3939515,"236288","Do I look good in this?","DoIlookgoodinthis_thumb.jpg",130,190,15);thumbnails[3939522]=new thumbnail(3939522,"236288","The Doctor and his Lady","TheDoctorandhisLady_thumb.jpg",130,188,15);thumbnails[146654]=new thumbnail(146654,"236292","Rialto Bridge, Venice","Rialto_Bridge_thumb.jpg",130,80,15);thumbnails[150760]=new thumbnail(150760,"236292","Goldoni Courtyard, Venice","Goldoni_Courtyard1_thumb.jpg",130,65,15);thumbnails[150767]=new thumbnail(150767,"236292","Gondoliers on the Grand Canal","Gondoliers_thumb.jpg",130,51,15);thumbnails[176893]=new thumbnail(176893,"236292","San Giorgio Maggiore, Venice","San Giorgio Maggiore_thumb.jpg",130,50,15);thumbnails[176899]=new thumbnail(176899,"236292","Burano Reflection, Venice","Burano Reflection_thumb.jpg",130,98,15);thumbnails[176901]=new thumbnail(176901,"236292","Santa Maria della Salute, Venice","Grand Canal_thumb.jpg",130,98,15);thumbnails[309947]=new thumbnail(309947,"236292","La Fenice, Venice","La Fenice-a060620_thumb.jpg",130,175,15);thumbnails[3939509]=new thumbnail(3939509,"236292","Blue Venice","BlueVenice_thumb.jpg",130,86,15);thumbnails[158950]=new thumbnail(158950,"13575","Tea Boy, Sri Lanka","Sri_Lankan_Tea_Boy_thumb.jpg",130,189,15);thumbnails[3939512]=new thumbnail(3939512,"13575","Dani 2008","Dani_thumb.jpg",130,197,15);thumbnails[4976895]=new thumbnail(4976895,"13575","Niamh","Niamh1_thumb.jpg",130,171,15);thumbnails[146711]=new thumbnail(146711,"13583","Ready for the Harvest","Field-a1_thumb.jpg",130,91,15);thumbnails[217885]=new thumbnail(217885,"19785","LRPS Panel - Dungeness","Dungeness_thumb.jpg",130,87,15);thumbnails[4978130]=new thumbnail(4978130,"282837","ARPS Panel","Coastal_Corrosion_thumb.jpg",130,92,15);var galleries=new Object();galleries[235315]=new gallery(235315,"3931858,3872272","London Salon of Photography Acceptances","gallery",[3872272,3931858]);galleries[235316]=new gallery(235316,"3939435,3881627,3881623,3881619,3881563,3881551,3875142,3875127,3875123,3872024","Brighton Open House 2009","gallery",[3939435,3872024,3872256,3875097,3875123,3875127,3875134,3875142,3875148,3881551,3881554,3881563,3881567,3881619,3881623,3881627]);galleries[26597]=new gallery(26597,"2253691,949060,949055,949052,949050,949049","Brighton Open House 2008","gallery",[2153055,2153100,2253688,2253691,2253695,3939518,3939521,949052,949055,949060,949049,949050,949063]);galleries[302937]=new gallery(302937,"5372876,5372872","Cuba","gallery",[5372872,5372876,5372879]);galleries[13574]=new gallery(13574,"158937,151390,146653","Brighton & Sussex","gallery",[146653,158937,151390]);galleries[42033]=new gallery(42033,"5372862,5372848","The Lake District","gallery",[5372848,5372857,5372862]);galleries[13577]=new gallery(13577,"3939527,3890924,3890916","Travel","gallery",[150773,158652,158653,176897,3890916,3890924,3939527,949048,542059,541481]);galleries[236288]=new gallery(236288,"3890927","Carnival Time in Venice","gallery",[3890927,3939515,3939522]);galleries[236292]=new gallery(236292,"309947","Venice - general","gallery",[146654,150760,150767,176893,176899,176901,309947,3939509]);galleries[13575]=new gallery(13575,"4976895","People","gallery",[158950,3939512,4976895]);galleries[13583]=new gallery(13583,"146711","Black & White","gallery",[146711]);galleries[19785]=new gallery(19785,"217885","LRPS Panel","gallery",[217885]);galleries[282837]=new gallery(282837,"4978130","ARPS Panel","gallery",[4978130]);var imageSets=new Object();imageSets[1]="5372879,5372876,5372848,4978130,4976895,3939527,3939522,3939521,3939518,3939515,3939512,3939435,3931858,3890927,3890924,3890916,3881623,3881567,3881563,3881554,3881551,3875134,3875123,3872272,3872256,2253695,949052,949050,309947,158937,146653";imageSets[2]="5372876,5372872,5372862,5372848,4978130,4976895,3939527,3939435,3931858,3890927,3890924,3890916,3881627,3881623,3881619,3881563,3881551,3875142,3875127,3875123,3872272,3872024,2253691,949060,949055,949052,949050,949049,309947";imageSets[3]="5372879,5372876,5372872,5372862,5372857,5372848,4978130,4976895,3939527,3939522,3939521,3939518,3939515,3939512,3939509,3939435,3931858,3890927,3890924,3890916,3881627,3881623,3881619,3881567,3881563,3881554,3881551,3875148,3875142,3875134,3875127,3875123,3875097,3872272,3872256,3872024,2253695,2253691,2253688,2153100,2153055,949063,949060,949055,949052,949050,949049,949048,542059,541481";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/maggit/images";break}switch(a){case 1:b="http://www1.clikpic.com/maggit/images";break}switch(a){case 2:b="http://admin.clikpic.com/maggit/images";break}switch(a){case 24:b="http://tpc15/clikpic/maggit/images";break}switch(a){case 4:b="http://www.clikchurch.com/maggit/images";break}switch(a){case 5:b="http://www2.clikpic.com/maggit/images";break}switch(a){case 22:b="http://tpc5/clikpic/maggit/images";break}switch(a){case 23:b="http://tpc10/clikpic/maggit/images";break}switch(a){case 25:b="http://tpc16/clikpic/maggit/images";break}switch(a){case 15:b="http://www3.clikpic.com/maggit/images";break}switch(a){case 18:b="http://www4.clikpic.com/maggit/images";break}switch(a){case 19:b="http://www5.clikpic.com/maggit/images";break}switch(a){case 31:b="http://www7.clikpic.com/maggit/images";break}switch(a){case 32:b="http://admin2.clikpic.com/maggit/images";break}switch(a){case 33:b="http://www8.clikpic.com/maggit/images";break}switch(a){case 34:b="http://www9.clikpic.com/maggit/images";break}switch(a){case 35:b="http://admin3.clikpic.com/maggit/images";break}switch(a){case 37:b="http://admin4.clikpic.com/maggit/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="Maggi Tillotson 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+'")'})}}};