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[766001]=new thumbnail(766001,"57898","aged wood","200_thumb.jpg",130,86,1);thumbnails[766081]=new thumbnail(766081,"57898","Tree Reflections ","treereflections_thumb.JPG",130,195,1);thumbnails[1296075]=new thumbnail(1296075,"57898","ever green","001_thumb.jpg",130,86,1);thumbnails[3875837]=new thumbnail(3875837,"57898","","IMG_0033_thumb.JPG",130,87,1);thumbnails[3875840]=new thumbnail(3875840,"57898","","IMG_0041_thumb.JPG",130,87,1);thumbnails[3875844]=new thumbnail(3875844,"57898","","IMG_0043_thumb.JPG",130,195,1);thumbnails[3875850]=new thumbnail(3875850,"57898","","IMG_0071_thumb.JPG",130,195,1);thumbnails[3875856]=new thumbnail(3875856,"57898","","IMG_0075_thumb.JPG",130,87,1);thumbnails[3875857]=new thumbnail(3875857,"57898","","IMG_0078_thumb.JPG",130,87,1);thumbnails[4304808]=new thumbnail(4304808,"347748","","IMG_0062-1_thumb.JPG",130,195,1);thumbnails[4304809]=new thumbnail(4304809,"","","IMG_0251_thumb.JPG",130,163,1);thumbnails[4325688]=new thumbnail(4325688,"","","IMG_0049-1_thumb.JPG",130,195,1);thumbnails[4345764]=new thumbnail(4345764,"255697","","IMG_0009CR2_thumb.jpg",130,195,1);thumbnails[4359357]=new thumbnail(4359357,"","","_MG_8924_thumb.jpg",130,195,1);thumbnails[4359360]=new thumbnail(4359360,"","","_MG_8927_thumb.jpg",130,194,1);thumbnails[4359361]=new thumbnail(4359361,"","","IMG_8658_thumb.jpg",130,87,1);thumbnails[4359364]=new thumbnail(4359364,"","","IMG_8691_thumb.jpg",130,87,1);thumbnails[4359365]=new thumbnail(4359365,"","","IMG_8715_thumb.jpg",130,195,1);thumbnails[4359373]=new thumbnail(4359373,"","","IMG_8956_thumb.jpg",130,195,1);thumbnails[4359374]=new thumbnail(4359374,"","","IMG_8966_thumb.jpg",130,87,1);thumbnails[4359388]=new thumbnail(4359388,"","","IMG_9037_thumb.jpg",130,87,1);thumbnails[4359465]=new thumbnail(4359465,"","","IMG_9380_thumb.jpg",130,87,1);thumbnails[4363688]=new thumbnail(4363688,"57898","","DSC_0147_thumb.JPG",130,196,1);thumbnails[4363689]=new thumbnail(4363689,"57898","","DSC_0163_thumb.JPG",130,86,1);thumbnails[4375540]=new thumbnail(4375540,"","","IMG_8740_thumb.JPG",130,195,1);thumbnails[4457803]=new thumbnail(4457803,"255697","","IMG_0001_thumb.JPG",130,87,1);thumbnails[4457806]=new thumbnail(4457806,"255697","","IMG_0039-1_thumb.JPG",130,194,1);thumbnails[4457807]=new thumbnail(4457807,"255697","","IMG_0070_thumb.JPG",130,194,1);thumbnails[4457808]=new thumbnail(4457808,"255697","","IMG_0077CR2_thumb.jpg",130,52,1);thumbnails[4457809]=new thumbnail(4457809,"255697","","IMG_0081_thumb.jpg",130,106,1);thumbnails[4457810]=new thumbnail(4457810,"255697","","IMG_0061_thumb.jpg",130,195,1);thumbnails[4646113]=new thumbnail(4646113,"255697","","IMG_0006_thumb.JPG",130,87,1);thumbnails[4646117]=new thumbnail(4646117,"255697","","IMG_0038_1_thumb.JPG",130,195,1);thumbnails[4646119]=new thumbnail(4646119,"255697","","IMG_0016_1_thumb.JPG",130,87,1);thumbnails[4646121]=new thumbnail(4646121,"255697","","IMG_0046_thumb.JPG",130,195,1);thumbnails[4646124]=new thumbnail(4646124,"255697","","IMG_0065_thumb.JPG",130,149,1);thumbnails[4646126]=new thumbnail(4646126,"255697","","IMG_0152_thumb.JPG",130,101,1);thumbnails[4697245]=new thumbnail(4697245,"57898","","wind_trees_thumb.JPG",130,87,1);thumbnails[4701939]=new thumbnail(4701939,"","","Glasgow_University_thumb.jpg",130,163,1);thumbnails[4725452]=new thumbnail(4725452,"57898","","spiral_water_thumb.JPG",130,87,1);thumbnails[4743549]=new thumbnail(4743549,"57898","","wonderwall_thumb.jpg",130,86,1);thumbnails[4877286]=new thumbnail(4877286,"","","IMG_0134-1_thumb.JPG",130,195,1);thumbnails[4897476]=new thumbnail(4897476,"347748","","IMG_0146-2_thumb.JPG",130,87,1);thumbnails[4897536]=new thumbnail(4897536,"347748","","IMG_0096_thumb.JPG",130,195,1);thumbnails[4897894]=new thumbnail(4897894,"347748","","IMG_0323_thumb.JPG",130,87,1);thumbnails[5001571]=new thumbnail(5001571,"347748","","IMG_0217-1_thumb.JPG",130,87,1);thumbnails[5001581]=new thumbnail(5001581,"347748","","IMG_0085-1_thumb.JPG",130,87,1);thumbnails[5394341]=new thumbnail(5394341,"347748","","IMG_0070_4CC1B74B-1D09-001F-99707C8438C9083F_thumb.JPG",130,87,1);thumbnails[5394344]=new thumbnail(5394344,"347748","","IMG_0226_thumb.JPG",130,195,1);thumbnails[5394349]=new thumbnail(5394349,"347748","","IMG_0241_thumb.JPG",130,87,1);thumbnails[5394357]=new thumbnail(5394357,"347748","","IMG_0439_thumb.JPG",130,195,1);thumbnails[5394362]=new thumbnail(5394362,"347748","","IMG_0301_thumb.JPG",130,195,1);thumbnails[5394383]=new thumbnail(5394383,"347748","","IMG_0044_thumb.JPG",130,87,1);thumbnails[5836077]=new thumbnail(5836077,"347748","","IMG_0002-1_thumb.jpg",130,87,1);thumbnails[5836080]=new thumbnail(5836080,"347748","","IMG_0444_thumb.jpg",130,87,1);thumbnails[5836082]=new thumbnail(5836082,"347748","","IMG_0314_thumb.jpg",130,195,1);thumbnails[5836087]=new thumbnail(5836087,"347748","","IMG_0078_254EC24B-1D09-001F-9934906855D2D4F6_thumb.jpg",130,87,1);thumbnails[5836096]=new thumbnail(5836096,"347748","","IMG_0103_thumb.jpg",130,87,1);thumbnails[5836181]=new thumbnail(5836181,"347748","","IMG_0205_thumb.jpg",130,87,1);thumbnails[5836182]=new thumbnail(5836182,"347748","","IMG_0080-1_thumb.jpg",130,87,1);thumbnails[5836184]=new thumbnail(5836184,"347748","","IMG_0066_thumb.jpg",130,87,1);thumbnails[5836186]=new thumbnail(5836186,"347748","","IMG_0033_256B03E0-1D09-001F-990810A5D0805758_thumb.jpg",130,87,1);thumbnails[5836218]=new thumbnail(5836218,"347748","","IMG_0134_thumb.JPG",130,87,1);thumbnails[5836222]=new thumbnail(5836222,"347748","","IMG_0001-1_thumb.JPG",130,87,1);thumbnails[6254409]=new thumbnail(6254409,"347748","","IMG_0192_thumb.JPG",130,87,1);thumbnails[6254410]=new thumbnail(6254410,"347748","","IMG_0225-1_thumb.JPG",130,87,1);thumbnails[6254411]=new thumbnail(6254411,"347748","","IMG_0106-2_thumb.JPG",130,173,1);thumbnails[6254412]=new thumbnail(6254412,"347748","","IMG_0115_thumb.JPG",130,87,1);thumbnails[6254413]=new thumbnail(6254413,"347748","","IMG_0292_thumb.JPG",130,70,1);thumbnails[6254415]=new thumbnail(6254415,"347748","","IMG_0139-2_thumb.JPG",130,87,1);thumbnails[6254417]=new thumbnail(6254417,"347748","","IMG_0047-1_thumb.JPG",130,195,1);thumbnails[6254418]=new thumbnail(6254418,"347748","","IMG_0203-1_thumb.JPG",130,195,1);thumbnails[6254422]=new thumbnail(6254422,"347748","","IMG_0141-11_thumb.JPG",130,87,1);thumbnails[6254423]=new thumbnail(6254423,"347748","","IMG_0191_thumb.jpg",130,195,1);thumbnails[6254425]=new thumbnail(6254425,"347748","","IMG_0033_88CF01F4-24E8-5EC4-4F11BDDCCAC7955A_thumb.jpg",130,87,1);thumbnails[6254427]=new thumbnail(6254427,"347748","","IMG_0103_88CF7417-24E8-5EC4-4F79452DA05B07DD_thumb.jpg",130,87,1);thumbnails[6320079]=new thumbnail(6320079,"347748","","IMG_0390-1_thumb.JPG",130,87,1);thumbnails[6320080]=new thumbnail(6320080,"347748","","IMG_0256-1_thumb.JPG",130,87,1);thumbnails[6320082]=new thumbnail(6320082,"347748","","IMG_0345-1_thumb.JPG",130,87,1);thumbnails[6320086]=new thumbnail(6320086,"347748","","IMG_0320_thumb.JPG",130,87,1);thumbnails[6320099]=new thumbnail(6320099,"347748","","IMG_0197_thumb.JPG",130,54,1);thumbnails[6320109]=new thumbnail(6320109,"347748","","IMG_0272_thumb.JPG",130,87,1);thumbnails[6320110]=new thumbnail(6320110,"347748","","IMG_0404_thumb.JPG",130,87,1);thumbnails[6320112]=new thumbnail(6320112,"347748","","IMG_0312-1_thumb.JPG",130,87,1);thumbnails[6320115]=new thumbnail(6320115,"347748","","IMG_0036-1_thumb.JPG",130,87,1);thumbnails[6320972]=new thumbnail(6320972,"347748","","IMG_0046-1_thumb.JPG",130,87,1);thumbnails[6320974]=new thumbnail(6320974,"347748","","IMG_0192-1_thumb.JPG",130,87,1);thumbnails[6320977]=new thumbnail(6320977,"347748","","IMG_0098-1_thumb.JPG",130,87,1);thumbnails[6320990]=new thumbnail(6320990,"347748","","IMG_0100_thumb.JPG",130,87,1);thumbnails[6320994]=new thumbnail(6320994,"347748","","IMG_0196-1_thumb.JPG",130,195,1);thumbnails[6329022]=new thumbnail(6329022,"347748","","IMG_0149-1_thumb.JPG",130,87,1);thumbnails[6329033]=new thumbnail(6329033,"347748","","IMG_0125-2_thumb.JPG",130,87,1);thumbnails[6437465]=new thumbnail(6437465,"255697","","paddington_thumb.jpg",130,87,1);thumbnails[5836100]=new thumbnail(5836100,"","","IMG_0013-2_thumb.jpg",130,87,1);thumbnails[5836185]=new thumbnail(5836185,"","","IMG_0028-1_thumb.jpg",130,87,1);thumbnails[4325695]=new thumbnail(4325695,"","","IMG_0073-1_thumb.JPG",130,89,1);thumbnails[4110082]=new thumbnail(4110082,"57909","","Albufeira4_Portugal_thumb.JPG",130,86,1);thumbnails[4110092]=new thumbnail(4110092,"57909","","Albufeira5_Portugal_thumb.JPG",130,86,1);thumbnails[4110096]=new thumbnail(4110096,"57909","","Albufeira7_Portugal_thumb.JPG",130,86,1);thumbnails[4110101]=new thumbnail(4110101,"57909","","Albufeira8_Portugal_thumb.JPG",130,196,1);thumbnails[4110104]=new thumbnail(4110104,"57909","","Albufeira9_Portugal_thumb.JPG",130,196,1);thumbnails[4110106]=new thumbnail(4110106,"57909","","Albufeira10_Portugal_thumb.JPG",130,196,1);thumbnails[4110120]=new thumbnail(4110120,"57909","","Albufeira16_Portugal_thumb.JPG",130,86,1);thumbnails[765957]=new thumbnail(765957,"57909","violet","violet_thumb.JPG",130,59,1);thumbnails[765961]=new thumbnail(765961,"57909","autumn trees","autumntrees_thumb.JPG",130,86,1);thumbnails[765963]=new thumbnail(765963,"57909","garden wall","gardenwall_thumb.JPG",130,86,1);thumbnails[765972]=new thumbnail(765972,"57909","sun lit wood","sunlitwood_thumb.JPG",130,87,1);thumbnails[765973]=new thumbnail(765973,"57909","lake glistening","lakeglistening_thumb.JPG",130,87,1);thumbnails[765979]=new thumbnail(765979,"57909","old rivers edge","oldriversedge_thumb.JPG",130,87,1);thumbnails[765989]=new thumbnail(765989,"57909","autunm leaves","autumn_leaves_thumb.JPG",130,196,1);thumbnails[765995]=new thumbnail(765995,"57909","beach hut view","beachhutview_thumb.JPG",130,87,1);thumbnails[765998]=new thumbnail(765998,"57909","sunset seagull","seagull_sunset_thumb.JPG",130,87,1);thumbnails[766005]=new thumbnail(766005,"57909","drift wood","driftwood_thumb.JPG",130,87,1);thumbnails[766010]=new thumbnail(766010,"57909","kayak view","205_thumb.jpg",130,86,1);thumbnails[766023]=new thumbnail(766023,"57909","the essence of canada","theessenceofcanada_thumb.JPG",130,87,1);thumbnails[766034]=new thumbnail(766034,"57909","tidy mill","woodbridge_tidemill_thumb.JPG",130,98,1);thumbnails[766062]=new thumbnail(766062,"57909","patience","patience_thumb.JPG",130,195,1);thumbnails[766089]=new thumbnail(766089,"57909","wall fall","wallfall_thumb.JPG",130,195,1);thumbnails[766180]=new thumbnail(766180,"57909","kayack heaven ","kayakheaven_thumb.JPG",130,195,1);thumbnails[1135482]=new thumbnail(1135482,"57909","a garden wall ","agardenwall_thumb.JPG",130,86,1);thumbnails[1882762]=new thumbnail(1882762,"57909","Poppy fields","poppyfields_thumb.JPG",130,87,1);thumbnails[3106093]=new thumbnail(3106093,"57909","cloudy waters ","cloudywaters_thumb.JPG",130,197,1);thumbnails[3106094]=new thumbnail(3106094,"57909","a distant ben lomond","adistantbenlomond_thumb.JPG",130,86,1);thumbnails[3106095]=new thumbnail(3106095,"57909","misty ben","mistyben_thumb.JPG",130,86,1);thumbnails[3106098]=new thumbnail(3106098,"57909","kayak view","kayakview_thumb.JPG",130,195,1);thumbnails[3106099]=new thumbnail(3106099,"57909","gartloch sunset","gartlochsunset_thumb.JPG",130,87,1);thumbnails[3106101]=new thumbnail(3106101,"57909","loch ard","lochard_thumb.JPG",130,87,1);thumbnails[3106102]=new thumbnail(3106102,"57909","mor row ","morrow_thumb.JPG",130,87,1);thumbnails[3106103]=new thumbnail(3106103,"57909","autunm turn","001111_thumb.jpg",130,86,1);thumbnails[3106733]=new thumbnail(3106733,"57909","riverside ","riverside_thumb.JPG",130,195,1);thumbnails[3106734]=new thumbnail(3106734,"57909","a rivers edge","ariversedge_thumb.JPG",130,87,1);thumbnails[3875824]=new thumbnail(3875824,"57909","","IMG_0002_thumb.JPG",130,87,1);thumbnails[3875828]=new thumbnail(3875828,"57909","","IMG_0016_thumb.JPG",130,87,1);thumbnails[3875836]=new thumbnail(3875836,"57909","","IMG_0023_thumb.JPG",130,87,1);thumbnails[4725335]=new thumbnail(4725335,"57909","","sandcastles_thumb.JPG",130,87,1);thumbnails[4743700]=new thumbnail(4743700,"57909","","dazygate_thumb.JPG",130,173,1);thumbnails[4743704]=new thumbnail(4743704,"57909","","reflections_thumb.JPG",130,87,1);thumbnails[4743706]=new thumbnail(4743706,"57909","","shell_thumb.JPG",130,87,1);thumbnails[766032]=new thumbnail(766032,"57909","Cascade","cascade_thumb.JPG",130,87,1);thumbnails[766058]=new thumbnail(766058,"57909","Red Rock Reflections ","redrockreflection_thumb.JPG",130,195,1);thumbnails[4110118]=new thumbnail(4110118,"57909","","Albufeira15_Portugal_thumb.JPG",130,86,1);thumbnails[4110110]=new thumbnail(4110110,"56495","","Albufeira11_Portugal_thumb.JPG",130,196,1);thumbnails[4110111]=new thumbnail(4110111,"56495","","Albufeira12_Portugal_thumb.JPG",130,86,1);thumbnails[4110113]=new thumbnail(4110113,"56495","","Albufeira13_Portugal_thumb.JPG",130,86,1);thumbnails[765958]=new thumbnail(765958,"56495","skimming stones(colour)","skimmingstonescolour_thumb.JPG",130,87,1);thumbnails[765965]=new thumbnail(765965,"56495","a fishermans day off","afishermansdayoff_thumb.JPG",130,87,1);thumbnails[765969]=new thumbnail(765969,"56495","storm clouds gathering ","stormcloudsgathering_thumb.JPG",130,87,1);thumbnails[765971]=new thumbnail(765971,"56495","beach hut coast","beachhutcoast_thumb.JPG",130,87,1);thumbnails[765981]=new thumbnail(765981,"56495","sunset tide ","sunsettide_thumb.JPG",130,195,1);thumbnails[766000]=new thumbnail(766000,"56495","dawn sailing","dawnsailing_thumb.JPG",130,87,1);thumbnails[766017]=new thumbnail(766017,"56495","sunset sailing","sunsetsailing_thumb.JPG",130,87,1);thumbnails[766033]=new thumbnail(766033,"56495","sun beam beach","sunbeambeach_thumb.JPG",130,98,1);thumbnails[766056]=new thumbnail(766056,"56495","skimming stones","skimmingstones_thumb.JPG",130,195,1);thumbnails[766057]=new thumbnail(766057,"56495","low tide ","lowtideJPG_thumb.JPG",130,195,1);thumbnails[766075]=new thumbnail(766075,"56495","coastal curves","coastalcurves_thumb.JPG",130,195,1);thumbnails[766077]=new thumbnail(766077,"56495","southwold peir","southwoldpeir_thumb.JPG",130,195,1);thumbnails[766088]=new thumbnail(766088,"56495","kayack reflection ","kayakreflection_thumb.JPG",130,87,1);thumbnails[3106105]=new thumbnail(3106105,"56495","niagra falls","niagrafalls_thumb.JPG",130,197,1);thumbnails[4725331]=new thumbnail(4725331,"56495","","lochdusk_thumb.JPG",130,95,1);thumbnails[4725458]=new thumbnail(4725458,"56495","","sunsetpeir_thumb.JPG",130,87,1);thumbnails[4743547]=new thumbnail(4743547,"56495","","allaboard_thumb.jpg",130,86,1);thumbnails[4743710]=new thumbnail(4743710,"56495","","washwood_thumb.JPG",130,195,1);var galleries=new Object();galleries[57898]=new gallery(57898,"4743549,4725452,4697245,4363689,4363688,3875857,3875856,3875850,3875844,3875840","Abstract","gallery",[766001,766081,1296075,3875837,3875840,3875844,3875850,3875856,3875857,4363688,4363689,4697245,4725452,4743549]);galleries[255697]=new gallery(255697,"6437465,4646126,4646124,4646121,4646119,4646117,4646113,4457810,4457809,4457808","Portrait","section308779",[4345764,4457803,4457806,4457807,4457808,4457809,4457810,4646113,4646117,4646119,4646121,4646124,4646126,6437465]);galleries[347748]=new gallery(347748,"6329033,6329022,6320994,6320990,6320977,6320974,6320972,6320115,6320112,6320110","Wedding ","section415087",[4304808,4897476,4897536,4897894,5001571,5001581,5394341,5394344,5394349,5394357,5394362,5394383,5836077,5836080,5836082,5836087,5836096,5836181,5836182,5836184,5836186,5836218,5836222,6254409,6254410,6254411,6254412,6254413,6254415,6254417,6254418,6254422,6254423,6254425,6254427,6320079,6320080,6320082,6320086,6320099,6320109,6320110,6320112,6320115,6320972,6320974,6320977,6320990,6320994,6329022,6329033]);galleries[57909]=new gallery(57909,"4743706,4743704,4743700,4725335,4110120,4110118,4110106,4110104,4110101,4110096","Landscapes","gallery",[4110082,4110092,4110096,4110101,4110104,4110106,4110120,765957,765961,765963,765972,765973,765979,765989,765995,765998,766005,766010,766023,766034,766062,766089,766180,1135482,1882762,3106093,3106094,3106095,3106098,3106099,3106101,3106102,3106103,3106733,3106734,3875824,3875828,3875836,4725335,4743700,4743704,4743706,766032,766058,4110118]);galleries[56495]=new gallery(56495,"4743710,4743547,4725458,4725331,4110113,4110111,4110110,3106105,766088,766077","Waterscapes","gallery",[4110110,4110111,4110113,765958,765965,765969,765971,765981,766000,766017,766033,766056,766057,766075,766077,766088,3106105,4725331,4725458,4743547,4743710]);var imageSets=new Object();imageSets[1]="4701939";imageSets[3]="4697245,4646126,4646124,4646121,4646119,4646117,4646113,4457810,4457809,4457808,4457807,4457806,4457803,4375540,4363689,4363688,4359465,4359388,4359374,4359373,4359365,4359364,4359361,4359360,4359357,4345764,4325695";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/karlspics/images";break}switch(a){case 1:b="http://www1.clikpic.com/karlspics/images";break}switch(a){case 2:b="http://admin.clikpic.com/karlspics/images";break}switch(a){case 24:b="http://tpc15/clikpic/karlspics/images";break}switch(a){case 4:b="http://www.clikchurch.com/karlspics/images";break}switch(a){case 5:b="http://www2.clikpic.com/karlspics/images";break}switch(a){case 22:b="http://tpc5/clikpic/karlspics/images";break}switch(a){case 23:b="http://tpc10/clikpic/karlspics/images";break}switch(a){case 25:b="http://tpc16/clikpic/karlspics/images";break}switch(a){case 15:b="http://www3.clikpic.com/karlspics/images";break}switch(a){case 18:b="http://www4.clikpic.com/karlspics/images";break}switch(a){case 19:b="http://www5.clikpic.com/karlspics/images";break}switch(a){case 31:b="http://www7.clikpic.com/karlspics/images";break}switch(a){case 32:b="http://admin2.clikpic.com/karlspics/images";break}switch(a){case 33:b="http://www8.clikpic.com/karlspics/images";break}switch(a){case 34:b="http://www9.clikpic.com/karlspics/images";break}switch(a){case 35:b="http://admin3.clikpic.com/karlspics/images";break}switch(a){case 37:b="http://admin4.clikpic.com/karlspics/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("section415087"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section415087.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("section415087"!=""){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="karl double 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>"}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="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="KARLSPICS">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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+'")'})}}};