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[2519696]=new thumbnail(2519696,"","","wedding3web1_thumb.jpg",130,87,32);thumbnails[2942030]=new thumbnail(2942030,"","","-10881_thumb.jpg",90,134,32);thumbnails[6150463]=new thumbnail(6150463,"","","LONDON-1005_352327BD-24E8-5EC4-4F735551CAD31505_thumb.jpg",90,60,32);thumbnails[6150465]=new thumbnail(6150465,"","","LONDON-1007_352396D3-24E8-5EC4-4F7604EC977E7A5B_thumb.jpg",90,135,32);thumbnails[5633033]=new thumbnail(5633033,"","Herringfleet windmill, Suffolk","SUFFOLK-1023-of-34web_thumb.jpg",90,60,32);thumbnails[5065526]=new thumbnail(5065526,"","Dungeness fishing boats","DUNGENESS-1006-web_thumb.jpg",90,135,32);thumbnails[2954382]=new thumbnail(2954382,"","","web-3008a_thumb.jpg",90,135,32);thumbnails[5555666]=new thumbnail(5555666,"","","SHARAN-1092_thumb.jpg",90,135,32);thumbnails[4798894]=new thumbnail(4798894,"","BATTERSEA POWER STATION","london-1015_thumb.jpg",90,60,32);thumbnails[2519764]=new thumbnail(2519764,"","","wedding5web1_thumb.jpg",130,195,32);thumbnails[4834402]=new thumbnail(4834402,"","","london-2001_thumb.jpg",90,60,32);thumbnails[2528232]=new thumbnail(2528232,"","","2001-(7)_thumb.jpg",130,85,32);thumbnails[2528310]=new thumbnail(2528310,"","","3001-(72)_thumb.jpg",130,170,32);thumbnails[2955879]=new thumbnail(2955879,"","","web-3001a_thumb.jpg",90,135,32);thumbnails[5665757]=new thumbnail(5665757,"","busy day?","LONDON-1022web_thumb.jpg",90,135,32);thumbnails[2954392]=new thumbnail(2954392,"","","web-3015a_thumb.jpg",90,60,32);thumbnails[5665758]=new thumbnail(5665758,"","DON'T TOUCH!!!","LONDON-1024web_thumb.jpg",90,60,32);thumbnails[4871547]=new thumbnail(4871547,"","TOWER BRIDGE","London-October-1110a_thumb.jpg",90,60,32);thumbnails[4871622]=new thumbnail(4871622,"","SOUTHWARK STREET","London-October-1024a_thumb.jpg",90,60,32);thumbnails[2528221]=new thumbnail(2528221,"","","1001-(3)_thumb.jpg",130,86,32);thumbnails[2527362]=new thumbnail(2527362,"","","WEDDING-WORKSHOP-10333_thumb.jpg",130,195,32);thumbnails[2528237]=new thumbnail(2528237,"","","2001-(124)_thumb.jpg",130,86,32);thumbnails[2528258]=new thumbnail(2528258,"","","2001-(209)_thumb.jpg",130,195,32);thumbnails[2528262]=new thumbnail(2528262,"","","2001-(229)_thumb.jpg",130,195,32);thumbnails[2527382]=new thumbnail(2527382,"","","WEDDING-WORKSHOP-11131_thumb.jpg",130,86,32);thumbnails[4798891]=new thumbnail(4798891,"274574","SOUTHBANK","london-1013_thumb.jpg",90,135,32);thumbnails[5555558]=new thumbnail(5555558,"181448","","SHARAN-1075_thumb.jpg",90,60,32);thumbnails[5603204]=new thumbnail(5603204,"317788","Porth Nanven, Cornwall","CORNWALL-GOOD-3170_thumb.jpg",90,135,32);thumbnails[2953970]=new thumbnail(2953970,"181448","","web-1010a_thumb.jpg",90,60,32);thumbnails[4798892]=new thumbnail(4798892,"274574","SOUTHWARK CATHEDRAL","london-1007_thumb.jpg",90,135,32);thumbnails[5603206]=new thumbnail(5603206,"317788","Land's end, Cornwall","CORNWALL-1059_thumb.jpg",90,135,32);thumbnails[2953972]=new thumbnail(2953972,"181448","","web-1015a_thumb.jpg",90,60,32);thumbnails[4798893]=new thumbnail(4798893,"274574","REFLECTION OF ST PAUL'S CATHEDRAL","london-1012_thumb.jpg",90,135,32);thumbnails[5603211]=new thumbnail(5603211,"317788","Crown Mines, Bottalack, Cornwall","CORNWALL-1081_thumb.jpg",90,135,32);thumbnails[2953908]=new thumbnail(2953908,"181448","","web-1008a_thumb.jpg",90,60,32);thumbnails[5603329]=new thumbnail(5603329,"317788","St Michael's Mount, Cornwall","CORNWALL-30621_thumb.jpg",90,135,32);thumbnails[2954210]=new thumbnail(2954210,"181448","","web-2001a1_thumb.jpg",90,60,32);thumbnails[4798895]=new thumbnail(4798895,"274574","MILLENIUM BRIDGE","london-1021_thumb.jpg",90,60,32);thumbnails[5603437]=new thumbnail(5603437,"317788","Godrevy Lighthouse, Cornwall","CORNWALL-3104_thumb.jpg",90,135,32);thumbnails[2954350]=new thumbnail(2954350,"181448","","web-2017a_thumb.jpg",90,60,32);thumbnails[4834355]=new thumbnail(4834355,"274574","MILLENIUM BRIDGE AND TATE MODERN","MILLENIUM-BRIDGE-AND-TATE-MODERN-1002_thumb.jpg",90,60,32);thumbnails[5603515]=new thumbnail(5603515,"317788","Porth Nanven, Cornwall","CORNWALL-3141_thumb.jpg",90,135,32);thumbnails[2954332]=new thumbnail(2954332,"181448","","web-2008a_thumb.jpg",90,135,32);thumbnails[5603537]=new thumbnail(5603537,"317788","Laynon Quoit, Corwall","CORNWALL-2137web_thumb.jpg",90,60,32);thumbnails[5872149]=new thumbnail(5872149,"274574","Battersea power station","LONDON-1039web_thumb.jpg",90,60,32);thumbnails[2953794]=new thumbnail(2953794,"181448","","web-1003a1_thumb.jpg",90,135,32);thumbnails[5558472]=new thumbnail(5558472,"181448","","SHARAN-1090_thumb.jpg",90,135,32);thumbnails[2953812]=new thumbnail(2953812,"181448","","web-1011a_thumb.jpg",90,135,32);thumbnails[4804684]=new thumbnail(4804684,"274574","THAMES BARRIER","london-2027_thumb.jpg",90,60,32);thumbnails[2954310]=new thumbnail(2954310,"181448","","web-2012a1_thumb.jpg",90,135,32);thumbnails[4834365]=new thumbnail(4834365,"274574","CANARY WHARF AND MILLENIUM DOME","london-20371_thumb.jpg",90,60,32);thumbnails[4804688]=new thumbnail(4804688,"274574","WOOLWICH STATUE","london-2022_thumb.jpg",90,60,32);thumbnails[5555634]=new thumbnail(5555634,"181448","","SHARAN-1058_thumb.jpg",90,135,32);thumbnails[2954388]=new thumbnail(2954388,"181448","","web-5002a_thumb.jpg",90,60,32);thumbnails[4834388]=new thumbnail(4834388,"274574","WOOLWICH STATUE","london-2021_thumb.jpg",90,60,32);thumbnails[5558509]=new thumbnail(5558509,"181448","","SHARAN-1038_thumb.jpg",90,60,32);thumbnails[2955837]=new thumbnail(2955837,"181448","","web-2009a_thumb.jpg",90,60,32);thumbnails[4815357]=new thumbnail(4815357,"274574","THAMES BARRIER","london-2034_thumb.jpg",90,60,32);thumbnails[2953894]=new thumbnail(2953894,"181448","","web-1017a_thumb.jpg",90,135,32);thumbnails[2954386]=new thumbnail(2954386,"181448","","web-3012a_thumb.jpg",90,60,32);thumbnails[6148622]=new thumbnail(6148622,"274574","PARTY ON THE BRIDGE, CAMDEN LOCK","LONDON-1005_thumb.jpg",90,60,32);thumbnails[2953886]=new thumbnail(2953886,"181448","","web-10012_thumb.jpg",90,60,32);thumbnails[2955873]=new thumbnail(2955873,"181448","","web-2018a_thumb.jpg",90,135,32);thumbnails[2955872]=new thumbnail(2955872,"181448","","web-2004b_thumb.jpg",90,135,32);thumbnails[4755112]=new thumbnail(4755112,"272591","","wedding-1001_thumb.jpg",90,135,32);thumbnails[5105102]=new thumbnail(5105102,"296626","A windy day in Dungenes, Kent","DUNGENESS-NOV-1013-WEB_thumb.jpg",90,135,32);thumbnails[5471866]=new thumbnail(5471866,"309651","","LONDON-FEB-2010-1106_thumb.jpg",90,60,32);thumbnails[4754500]=new thumbnail(4754500,"272591","","4121-of-172try_thumb.jpg",90,135,32);thumbnails[5471672]=new thumbnail(5471672,"309651","","LONDON-FEB-2010-1091_thumb.jpg",90,60,32);thumbnails[4755137]=new thumbnail(4755137,"272591","","wedding-1016A_thumb.jpg",90,135,32);thumbnails[4804661]=new thumbnail(4804661,"309651","<br>\r\n","london-2002_thumb.jpg",90,60,32);thumbnails[5105125]=new thumbnail(5105125,"296626","Shipwreck, Dungeness, Kent","DUNGENESS-NOV-1021WEB_thumb.jpg",90,135,32);thumbnails[4755243]=new thumbnail(4755243,"272591","","wedding-1015A_thumb.jpg",90,135,32);thumbnails[4804673]=new thumbnail(4804673,"309651","","london-2012-copy_thumb.jpg",90,60,32);thumbnails[4754540]=new thumbnail(4754540,"272591","","4042-of-172_thumb.jpg",90,135,32);thumbnails[5472106]=new thumbnail(5472106,"309651","","LONDON-FEB-2010-1109_thumb.jpg",90,60,32);thumbnails[4754510]=new thumbnail(4754510,"272591","","lifestyle-4071-of-163try_thumb.jpg",90,135,32);thumbnails[4804675]=new thumbnail(4804675,"309651","","london-2014_thumb.jpg",90,60,32);thumbnails[4755340]=new thumbnail(4755340,"272591","","wedding-1010A_thumb.jpg",90,60,32);thumbnails[5471981]=new thumbnail(5471981,"309651","","LONDON-FEB-2010-1065_thumb.jpg",90,135,32);thumbnails[4755345]=new thumbnail(4755345,"272591","","wedding-1007_thumb.jpg",90,60,32);thumbnails[5472162]=new thumbnail(5472162,"309651","","LONDON-FEB-2010-1086_thumb.jpg",90,135,32);thumbnails[4754531]=new thumbnail(4754531,"272591","","4090-of-172try_thumb.jpg",90,60,32);thumbnails[5472145]=new thumbnail(5472145,"309651","","LONDON-FEB-2010-1073_thumb.jpg",90,135,32);thumbnails[4755394]=new thumbnail(4755394,"272591","","wedding-1009_thumb.jpg",90,60,32);thumbnails[5472107]=new thumbnail(5472107,"309651","","LONDON-FEB-2010-1092_thumb.jpg",90,135,32);thumbnails[4755400]=new thumbnail(4755400,"272591","","wedding-1005_thumb.jpg",90,60,32);thumbnails[4754437]=new thumbnail(4754437,"272591","","lifestyle-4042-of-163try_thumb.jpg",90,60,32);thumbnails[4755359]=new thumbnail(4755359,"272591","","wedding-1002_thumb.jpg",90,135,32);thumbnails[4755361]=new thumbnail(4755361,"272591","","wedding-1019A_thumb.jpg",90,135,32);thumbnails[4755364]=new thumbnail(4755364,"272591","","wedding-1013A_thumb.jpg",90,135,32);thumbnails[4755422]=new thumbnail(4755422,"272591","","wedding-1008_thumb.jpg",90,135,32);thumbnails[4755424]=new thumbnail(4755424,"272591","","wedding-1018_thumb.jpg",90,135,32);thumbnails[4754497]=new thumbnail(4754497,"272591","","4015-of-172try123_thumb.jpg",90,135,32);thumbnails[4736778]=new thumbnail(4736778,"182422","","aya-1001_thumb.jpg",90,135,32);thumbnails[4983317]=new thumbnail(4983317,"296625","Morning at Happisburg, Norfolk","NORFOLK-12051WEB1_thumb.jpg",90,135,32);thumbnails[5178401]=new thumbnail(5178401,"309649","WESTMINSTER <br>\r\n","CNV00006_thumb.JPG",90,60,32);thumbnails[2953832]=new thumbnail(2953832,"182422","","web-1020a_thumb.jpg",90,135,32);thumbnails[4983350]=new thumbnail(4983350,"296625","Cromer's Pier, Norfolk","NORFOLK-1205WEB_thumb.jpg",90,135,32);thumbnails[5178407]=new thumbnail(5178407,"309649","THAMES RIVER","CNV00009_thumb.JPG",90,60,32);thumbnails[2954231]=new thumbnail(2954231,"182422","","web-1026a_thumb.jpg",90,135,32);thumbnails[4983353]=new thumbnail(4983353,"296625","Happisburgh Lighthouse","NORFOLK-1163WEB_thumb.jpg",90,135,32);thumbnails[5178413]=new thumbnail(5178413,"309649","LONDON EYE AND WESTMINSTER <br>\r\n","CNV00011_thumb.JPG",90,60,32);thumbnails[2955761]=new thumbnail(2955761,"182422","","web-1022a_thumb.jpg",90,60,32);thumbnails[4983358]=new thumbnail(4983358,"296625","Happisburgh Landscape","NORFOLK-1070aWEB_thumb.jpg",90,135,32);thumbnails[5178526]=new thumbnail(5178526,"309649","THE MAGIC ROUNDABOUT<br>\r\n","bessa_L__1_of_1_thumb.jpg",90,60,32);thumbnails[2954228]=new thumbnail(2954228,"182422","","web-1024a_thumb.jpg",90,60,32);thumbnails[4983515]=new thumbnail(4983515,"296625","A Vision of Cromer","NORFOLK-111WEB_thumb.jpg",90,135,32);thumbnails[5178428]=new thumbnail(5178428,"309649","TOYS STALL - BANKSIDE<br>\r\n","CNV00020_thumb.JPG",90,60,32);thumbnails[4753593]=new thumbnail(4753593,"182422","","kids-1001_thumb.jpg",90,95,32);thumbnails[4991975]=new thumbnail(4991975,"296625","Happisburgh","NORFOLK-11291web_thumb.jpg",90,135,32);thumbnails[5178531]=new thumbnail(5178531,"309649","ART - BANKSIDE<br>\r\n","bessa_L__2_of_1_thumb.jpg",90,67,32);thumbnails[5472542]=new thumbnail(5472542,"309649","","CNV00007_thumb.jpg",90,57,32);thumbnails[5472545]=new thumbnail(5472545,"309649","","CNV00011_A977DC43-1EC9-D45B-1CE1A6E8B2E98A29_thumb.JPG",90,60,32);thumbnails[5472569]=new thumbnail(5472569,"309649","A CAT IN TRAFALGAR SQUARE","CNV00020_A979C13F-1EC9-D45B-1CF41BDF2347D1D8_thumb.JPG",90,60,32);thumbnails[5472583]=new thumbnail(5472583,"309649","","CNV00027_thumb.JPG",90,60,32);thumbnails[5472606]=new thumbnail(5472606,"309649","RAINY DAYS IN CANARY WHARF","CNV00028_thumb.jpg",90,60,32);thumbnails[5472627]=new thumbnail(5472627,"309649","","25580009_thumb.jpg",90,60,32);thumbnails[5472634]=new thumbnail(5472634,"309649","","CNV00014_thumb.jpg",90,60,32);thumbnails[5472653]=new thumbnail(5472653,"309649","","CNV00022_thumb.jpg",90,134,32);thumbnails[5960516]=new thumbnail(5960516,"319449","Herringfleet, Suffolk","SUFFOLK-1023-of-34-web_thumb.jpg",90,60,32);thumbnails[5960599]=new thumbnail(5960599,"336438","","LONDON-1023_thumb.jpg",90,60,32);thumbnails[5633034]=new thumbnail(5633034,"319449","Herringfleet windmill, Suffolk","SUFFOLK-web_thumb.jpg",90,135,32);thumbnails[5960601]=new thumbnail(5960601,"336438","","LONDON-1016_thumb.jpg",90,60,32);thumbnails[5960602]=new thumbnail(5960602,"336438","","LONDON-1026_thumb.jpg",90,60,32);thumbnails[5960604]=new thumbnail(5960604,"336438","","LONDON-1028_thumb.jpg",90,60,32);thumbnails[5960605]=new thumbnail(5960605,"336438","","LONDON-1038_thumb.jpg",90,60,32);thumbnails[5960608]=new thumbnail(5960608,"336438","","LONDON-1005traf_thumb.jpg",90,60,32);thumbnails[5960609]=new thumbnail(5960609,"336438","","LONDON-2060_thumb.jpg",90,60,32);thumbnails[5270039]=new thumbnail(5270039,"296627","Llanberis Pass, Snowdonia","SNOWDONIA-webclikpic22_thumb.jpg",90,135,32);thumbnails[5270794]=new thumbnail(5270794,"296627","Llanberis Pass, Snowdonia","Tone_mappedlayersclonedmountedweb_thumb.jpg",90,135,32);thumbnails[5271485]=new thumbnail(5271485,"296627","Waterfalls, Snowdonia","SNOWDONIA-86bandwweb1_thumb.jpg",90,135,32);thumbnails[5271026]=new thumbnail(5271026,"296627","Llyn Idwal, Snowdonia","SNOWDONIA-142-Panorama-finished2_thumb.jpg",90,40,32);thumbnails[5271363]=new thumbnail(5271363,"296627","Llanberis Pass, Snowdonia","SNOWDONIA-218_21_22_23_24_tonemapped-Panoramafinished-frameweb_thumb.jpg",90,40,32);thumbnails[5272567]=new thumbnail(5272567,"296627","Llyn Idwal, Snowdonia","SNOWDONIA-107-Panoramaretouchedfinishedweb_thumb.jpg",90,40,32);thumbnails[5960221]=new thumbnail(5960221,"336431","Brentwood, Essex","ESSEX-1035web_thumb.jpg",90,135,32);var galleries=new Object();galleries[309648]=new gallery(309648,"5472653,5472107,4798893","London","gallery",[]);galleries[274574]=new gallery(274574,"4798893","Cityscapes","gallery",[4798891,4798892,4798893,4798895,4834355,5872149,4804684,4834365,4804688,4834388,4815357,6148622]);galleries[317788]=new gallery(317788,"5603537,5603515,5603437,5603329,5603211,5603206,5603204","Cornwall","gallery",[5603204,5603206,5603211,5603329,5603437,5603515,5603537]);galleries[181448]=new gallery(181448,"5555634","Lifestyle","gallery",[5555558,2953970,2953972,2953908,2954210,2954350,2954332,2953794,5558472,2953812,2954310,5555634,2954388,5558509,2955837,2953894,2954386,2953886,2955873,2955872]);galleries[296626]=new gallery(296626,"5105125,5105102","Kent","gallery",[5105102,5105125]);galleries[272591]=new gallery(272591,"4754540","Wedding","gallery",[4755112,4754500,4755137,4755243,4754540,4754510,4755340,4755345,4754531,4755394,4755400,4754437,4755359,4755361,4755364,4755422,4755424,4754497]);galleries[309651]=new gallery(309651,"5472107","x press yourself","gallery",[5471866,5471672,4804661,4804673,5472106,4804675,5471981,5472162,5472145,5472107]);galleries[182422]=new gallery(182422,"2954231","Children","gallery",[4736778,2953832,2954231,2955761,2954228,4753593]);galleries[309649]=new gallery(309649,"5472653","London in film","gallery",[5178401,5178407,5178413,5178526,5178428,5178531,5472542,5472545,5472569,5472583,5472606,5472627,5472634,5472653]);galleries[296625]=new gallery(296625,"4983317","Norfolk","gallery",[4983317,4983350,4983353,4983358,4983515,4991975]);galleries[336438]=new gallery(336438,"5960609,5960608,5960605,5960604,5960602,5960601,5960599","London in black and white","gallery",[5960599,5960601,5960602,5960604,5960605,5960608,5960609]);galleries[319449]=new gallery(319449,"5633034","Suffolk","gallery",[5960516,5633034]);galleries[296624]=new gallery(296624,"5960221,5633034,5270039,4983317","Landscapes","gallery",[]);galleries[296627]=new gallery(296627,"5270039","Wales","gallery",[5270039,5270794,5271485,5271026,5271363,5272567]);galleries[336431]=new gallery(336431,"5960221","Essex","gallery",[5960221]);var imageSets=new Object();imageSets[1]="5960602,5960601,5960516,5960221,5872149,5271363,2953970";imageSets[2]="5960221,5633034,5555634,5472653,5472107,5270039,4983317,4798893,4754540,2954231,2942030,2528258,2519764";imageSets[3]="5472107,4815357,4804688,4804684,4804675,4804673,4804661,4798894,4798893,4798892,4798891";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/maracalvi1/images";break}switch(a){case 1:b="http://www1.clikpic.com/maracalvi1/images";break}switch(a){case 2:b="http://admin.clikpic.com/maracalvi1/images";break}switch(a){case 24:b="http://tpc15/clikpic/maracalvi1/images";break}switch(a){case 4:b="http://www.clikchurch.com/maracalvi1/images";break}switch(a){case 5:b="http://www2.clikpic.com/maracalvi1/images";break}switch(a){case 22:b="http://tpc5/clikpic/maracalvi1/images";break}switch(a){case 23:b="http://tpc10/clikpic/maracalvi1/images";break}switch(a){case 25:b="http://tpc16/clikpic/maracalvi1/images";break}switch(a){case 15:b="http://www3.clikpic.com/maracalvi1/images";break}switch(a){case 18:b="http://www4.clikpic.com/maracalvi1/images";break}switch(a){case 19:b="http://www5.clikpic.com/maracalvi1/images";break}switch(a){case 31:b="http://www7.clikpic.com/maracalvi1/images";break}switch(a){case 32:b="http://admin2.clikpic.com/maracalvi1/images";break}switch(a){case 33:b="http://www8.clikpic.com/maracalvi1/images";break}switch(a){case 34:b="http://www9.clikpic.com/maracalvi1/images";break}switch(a){case 35:b="http://admin3.clikpic.com/maracalvi1/images";break}switch(a){case 37:b="http://admin4.clikpic.com/maracalvi1/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("section204323"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section204323.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("section204323"!=""){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="Mara Calvi 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].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="maracalvi1@hotmail.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="maracalvi1@hotmail.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<90){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+'")'})}}};