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[3098603]=new thumbnail(3098603,"149781","Paxos Mood, shot for my longest standing client Greek Islands Club, hot work in a great office !","dendiatika_1RJ6285_thumb.jpg",130,200,5);thumbnails[3098608]=new thumbnail(3098608,"149781","Paxos Mood (2)","mood_1RJ6181_thumb.jpg",130,195,5);thumbnails[3098598]=new thumbnail(3098598,"149781","Villa Agathi in Paxos, for Greek Islands Club","agathi_1RJ6253_thumb.jpg",130,86,5);thumbnails[3098599]=new thumbnail(3098599,"149781","Villa Agathi (2)","agathi_1RJ6262_thumb.jpg",130,86,5);thumbnails[2279419]=new thumbnail(2279419,"149781","Wish I was there, Alonnissos, Greece","_1RJ3478_thumb.JPG",130,195,5);thumbnails[2279420]=new thumbnail(2279420,"149781","One reason I live in Cornwall","_2RJ0232_thumb.JPG",130,195,5);thumbnails[2279423]=new thumbnail(2279423,"149781","The beach for Villa Aquilo in Alonnissos, Greece","_2RJ2496_thumb.jpg",130,195,5);thumbnails[2279428]=new thumbnail(2279428,"149781","Great B&B in St Ives","_3RJ0331_thumb.JPG",130,210,5);thumbnails[2279429]=new thumbnail(2279429,"149781","St Ives B&B","_3RJ0376_thumb.JPG",130,195,5);thumbnails[2279433]=new thumbnail(2279433,"149780","Some of the best tea (a lot of ) money can buy, grown near Falmouth","_DSC4509_thumb.JPG",130,86,5);thumbnails[2279436]=new thumbnail(2279436,"149781","This is all about the place, but the people make it special","_DSC4945_thumb.JPG",130,195,5);thumbnails[2279465]=new thumbnail(2279465,"149781","Things to do in Falmouth","_RJP0637_thumb.JPG",130,195,5);thumbnails[2279470]=new thumbnail(2279470,"149781","My home beach, Gwithian, West Cornwall","_RJP4271_thumb.JPG",130,86,5);thumbnails[2279473]=new thumbnail(2279473,"149781","Greek nets, couldn't be Cornish","aloscbe6340_thumb.JPG",130,195,5);thumbnails[2279474]=new thumbnail(2279474,"149781","No surfers were harmed in the making of this picture","DSCF2968_thumb.JPG",130,194,5);thumbnails[2279476]=new thumbnail(2279476,"149781","Godrevy lighthouse at dusk","godrevy rjp 5_thumb.JPG",130,46,5);thumbnails[2279481]=new thumbnail(2279481,"149781","You can't walk the Towans without playing spot the lighthouse","gwithian evening_thumb.JPG",130,47,5);thumbnails[2279482]=new thumbnail(2279482,"149781","Gwithian Towans, full of life and adventure","gwithian paragliders_thumb.JPG",130,45,5);thumbnails[2279483]=new thumbnail(2279483,"149781","Really, it was this colour !","gwithian pink dusk_thumb.JPG",130,45,5);thumbnails[2279484]=new thumbnail(2279484,"149781","It's going to get wet very soon...","gwithianshower_thumb.JPG",130,46,5);thumbnails[2279487]=new thumbnail(2279487,"149781","The perfect olive grove is elusive, this one on Lefkas is pretty close","OLIVE_thumb.JPG",130,48,5);thumbnails[2279491]=new thumbnail(2279491,"149780","I like to shoot food !","_1RJ2835_thumb.JPG",130,195,5);thumbnails[2279494]=new thumbnail(2279494,"149780","It's a product, and great fun !","_1RJ2857_thumb.JPG",130,195,5);thumbnails[2279495]=new thumbnail(2279495,"149780","Chocolate pour.","_1RJ6102_thumb.JPG",130,195,5);thumbnails[2279497]=new thumbnail(2279497,"149780","This sheep did not die in vain !","_DSC2704_thumb.JPG",130,195,5);thumbnails[2279498]=new thumbnail(2279498,"149780","A slice of easy life in the name of work.","_DSC2735_thumb.JPG",130,86,5);thumbnails[2279502]=new thumbnail(2279502,"149780","Specially grown, shot in the studio","_RJP1279_thumb.JPG",130,195,5);thumbnails[2279566]=new thumbnail(2279566,"149780","It is a product, the whole kitchen","_RJP5267_thumb.JPG",130,203,5);thumbnails[2279568]=new thumbnail(2279568,"149780","Beautiful furniture","_RJP8338_thumb.JPG",130,195,5);thumbnails[2279570]=new thumbnail(2279570,"149780","The miracles of modern light","DSCF9888_thumb.JPG",130,194,5);thumbnails[2279572]=new thumbnail(2279572,"149780","I like shooting kitchens","DSCF9900_thumb.JPG",130,194,5);thumbnails[2279573]=new thumbnail(2279573,"149780","Another favourite product, and you should taste the wine...","pv0095_thumb.jpg",130,195,5);thumbnails[2279576]=new thumbnail(2279576,"149780","Artist jewellery","ringp_thumb.JPG",130,187,5);thumbnails[2279578]=new thumbnail(2279578,"149780","Artist jewellery again, I love original design","rings_thumb.JPG",130,101,5);thumbnails[2279580]=new thumbnail(2279580,"149780","The pattern is a cloth imprint, clever.","rk000070_thumb.jpg",130,195,5);thumbnails[2279584]=new thumbnail(2279584,"149780","Suspended finery","rk000192_thumb.jpg",130,313,5);thumbnails[2279585]=new thumbnail(2279585,"149780","Wonderful stone well set","rk000234_thumb.JPG",130,85,5);thumbnails[2279587]=new thumbnail(2279587,"149780","A delicate touch","rk000249_thumb.jpg",130,195,5);thumbnails[2279589]=new thumbnail(2279589,"149780","One of my best food shoots if only because I had to eat the product !","scallops_thumb.JPG",130,86,5);thumbnails[2476059]=new thumbnail(2476059,"149781","A great arrival at Alonnissos","_1RJ3355_thumb.JPG",130,81,5);thumbnails[2476060]=new thumbnail(2476060,"149781","Could it be anywhere else ?","_1RJ3507_thumb.JPG",130,195,5);thumbnails[2476062]=new thumbnail(2476062,"149781","Cornish Rock","_RJP1144_thumb.JPG",130,86,5);thumbnails[2476064]=new thumbnail(2476064,"149781","Footpath to the beach","_RJP6680_thumb.JPG",130,206,5);thumbnails[2476066]=new thumbnail(2476066,"149781","Porth Kidney towards Gwithian","_RJP6702_thumb.JPG",130,195,5);thumbnails[2476067]=new thumbnail(2476067,"149781","Mad fun shoot !","cam cov_thumb.jpg",130,195,5);thumbnails[2476068]=new thumbnail(2476068,"149780","B&Q summer shoot, magical light on a rainy autumn day !","_1RJ1757_thumb.JPG",130,195,5);thumbnails[2476069]=new thumbnail(2476069,"149780","I like movement in a picture !","_2RJ2179_thumb.JPG",130,88,5);thumbnails[2476070]=new thumbnail(2476070,"149780","Mmmm !  Cookies !","DSCF1061_thumb.JPG",130,196,5);thumbnails[2476071]=new thumbnail(2476071,"149780","Mouth watering yet ?","DSCF1090_thumb.JPG",130,196,5);thumbnails[2476072]=new thumbnail(2476072,"149780","Cold fruit for ice cream.","DSCF1444_thumb.JPG",130,194,5);thumbnails[2476073]=new thumbnail(2476073,"149780","Yum !","DSCF1486_thumb.JPG",130,194,5);thumbnails[2476074]=new thumbnail(2476074,"149780","Flavourings","DSCF1513_thumb.JPG",130,194,5);thumbnails[2476076]=new thumbnail(2476076,"149780","It's all about light... and ice cream !","DSCF1596_thumb.JPG",130,87,5);thumbnails[2476079]=new thumbnail(2476079,"149780","Cornish gold ?","DSCF1752_thumb.JPG",130,194,5);thumbnails[2476080]=new thumbnail(2476080,"149780","Revealing detail","DSCF1882_thumb.JPG",130,194,5);thumbnails[2476081]=new thumbnail(2476081,"149780","One of five","DSCF1903_thumb.JPG",130,194,5);thumbnails[4369156]=new thumbnail(4369156,"256742","","je042_thumb.jpg",130,195,5);thumbnails[4369201]=new thumbnail(4369201,"256742","","je001_thumb.jpg",130,195,5);thumbnails[4369202]=new thumbnail(4369202,"256742","","je079_thumb.jpg",130,195,5);thumbnails[4369203]=new thumbnail(4369203,"256742","","je061_thumb.jpg",130,195,5);thumbnails[4369205]=new thumbnail(4369205,"256742","","je082_thumb.jpg",130,195,5);thumbnails[3766271]=new thumbnail(3766271,"149781","Golitha Falls, near Liskeard","_2RJ0304_thumb.jpg",130,196,5);thumbnails[4369206]=new thumbnail(4369206,"256742","","defacto14311_thumb.jpg",130,194,5);thumbnails[4369207]=new thumbnail(4369207,"256742","","defacto14401_thumb.jpg",130,194,5);thumbnails[4369208]=new thumbnail(4369208,"256742","","defacto16171_thumb.jpg",130,194,5);thumbnails[4369210]=new thumbnail(4369210,"256742","","jb0144_thumb.jpg",130,195,5);thumbnails[4369211]=new thumbnail(4369211,"256742","","jb0162_thumb.jpg",130,195,5);thumbnails[4369212]=new thumbnail(4369212,"256742","","jj048_thumb.jpg",130,195,5);thumbnails[4369213]=new thumbnail(4369213,"256742","","jj068-2_thumb.jpg",130,195,5);thumbnails[3766279]=new thumbnail(3766279,"","As principal photographer for the Cornish Bluegrass Association I've discovered the joys of photo books","ebt063_thumb.jpg",130,196,5);thumbnails[3766280]=new thumbnail(3766280,"","Water is another favourite theme for me, and getting in the water with a waterproof housing is often fun","ebt065_thumb.jpg",130,188,5);thumbnails[2279322]=new thumbnail(2279322,"148799","Musician Gordon Giltrap at home in his studio on a recent shoot","_1RJ1311_thumb.JPG",130,195,5);thumbnails[2279327]=new thumbnail(2279327,"148799","Zapcats in St Ives Bay","inboat_thumb.JPG",130,81,5);thumbnails[2279330]=new thumbnail(2279330,"148799","Dick Plank in full voice - I like to shoot the local music scene","_1RJ7678_thumb.JPG",130,195,5);thumbnails[2279334]=new thumbnail(2279334,"148799","Falmouth therapy to promote thte location","_DSC0131_thumb.JPG",130,195,5);thumbnails[2279337]=new thumbnail(2279337,"148799","Kite surfer at Gwithian beach","_DSC5539_thumb.JPG",130,92,5);thumbnails[2279344]=new thumbnail(2279344,"148799","Kite surfer Mike Smith ripping at Gwithian","_DSC5545_thumb.JPG",130,195,5);thumbnails[2279347]=new thumbnail(2279347,"148799","Lucy Silvas at Falmouth Week","_RJP1733_thumb.JPG",130,195,5);thumbnails[2279349]=new thumbnail(2279349,"148799","Jo shot for fitness magazine cover","_RJP2303_thumb.JPG",130,195,5);thumbnails[2279352]=new thumbnail(2279352,"148799","Models shot for BLue Reef Aquarium in Newquay","_RJP2479_thumb.JPG",130,86,5);thumbnails[2279356]=new thumbnail(2279356,"148799","Underwater life","_RJP2485_thumb.JPG",130,86,5);thumbnails[2279363]=new thumbnail(2279363,"148799","I'm not beyond a special effect when it works","_RJP3874_thumb.JPG",130,195,5);thumbnails[2279364]=new thumbnail(2279364,"148799","Local clothing shoot","_RJP7722_thumb.JPG",130,195,5);thumbnails[2279367]=new thumbnail(2279367,"148799","Local clothing shoot","_RJP9244_thumb.JPG",130,195,5);thumbnails[2279368]=new thumbnail(2279368,"148799","The Wiyos, visiting from New York","_RJP9397_thumb.JPG",130,195,5);thumbnails[2279397]=new thumbnail(2279397,"148799","I started out shooting windsurfing, and I still like to shoot watersports","ashley buxton 551 2_thumb.jpg",130,182,5);thumbnails[2279403]=new thumbnail(2279403,"148799","Ben Skinner hangs five","ben skinner 687 2_thumb.JPG",130,88,5);thumbnails[2279406]=new thumbnail(2279406,"148799","Seasafe water safety gear shoot, great product, long standing client","boat7749_thumb.JPG",130,195,5);thumbnails[2279407]=new thumbnail(2279407,"148799","Amateur model doing well for the client","boat8197_thumb.JPG",130,195,5);thumbnails[2279409]=new thumbnail(2279409,"148799","Such joy !","dpt2336_thumb.JPG",130,195,5);thumbnails[2279411]=new thumbnail(2279411,"148799","They say never work with children and animals, there's little difference, I'm happy with both","fwc2639_thumb.JPG",130,195,5);thumbnails[2279417]=new thumbnail(2279417,"148799","O J throwing shapes","O J 432 2_thumb.JPG",130,137,5);thumbnails[2279418]=new thumbnail(2279418,"148799","How can you be unhappy hanging five !","shag265 2_thumb.jpg",130,168,5);thumbnails[2475999]=new thumbnail(2475999,"148799","Joe Bonamassa bluesin' at Falmouth Princess Pavilion","_RJP4866_thumb.JPG",130,195,5);thumbnails[2476000]=new thumbnail(2476000,"148799","Gary at full bluegrass festival flow","_RJP5791_thumb.JPG",130,195,5);thumbnails[2476021]=new thumbnail(2476021,"159133","My best boy, alas no more.","DSCF7654_thumb.JPG",130,194,5);thumbnails[2476023]=new thumbnail(2476023,"159133","St Ives on a late pass through","jewellr03_thumb.jpg",130,195,5);thumbnails[2476024]=new thumbnail(2476024,"159133","Godrevy light, you can't get away from it.","jewellr04_thumb.jpg",130,85,5);thumbnails[2476050]=new thumbnail(2476050,"159133","Cot Valley","jewellr06_thumb.jpg",130,86,5);thumbnails[2476052]=new thumbnail(2476052,"159133","Cot Valley again","jewellr07_thumb.jpg",130,195,5);thumbnails[2476054]=new thumbnail(2476054,"159133","Leave only footprints...","jewellr09_thumb.jpg",130,195,5);thumbnails[2476057]=new thumbnail(2476057,"159133","There's no one I trust as much here !","zapcat inboat wave final_thumb.jpg",130,91,5);thumbnails[4047665]=new thumbnail(4047665,"243801","Becky Boorman","bb0823_2_thumb.jpg",130,260,5);thumbnails[4047663]=new thumbnail(4047663,"243801","Becky Boorman","bb0819_2_thumb.jpg",130,65,5);thumbnails[4047921]=new thumbnail(4047921,"243801","Nicola Hancox","nh006_2_thumb.jpg",130,84,5);thumbnails[4368980]=new thumbnail(4368980,"243801","Lisa Wright","Still_Waters_1_CCtweaked-2_thumb.jpg",130,120,5);thumbnails[4368983]=new thumbnail(4368983,"243801","Kathy Todd","kt155_thumb.jpg",130,100,5);thumbnails[4047730]=new thumbnail(4047730,"243801","Emma Jeffryes","ej211_2_thumb.jpg",130,84,5);thumbnails[4047739]=new thumbnail(4047739,"243801","Gary Long","gl174_2_thumb.jpg",130,175,5);thumbnails[4368979]=new thumbnail(4368979,"243801","Lisa Wright","_RJP2066_thumb.jpg",130,129,5);thumbnails[4368984]=new thumbnail(4368984,"243801","Kathy Todd","kt156_thumb.jpg",130,101,5);thumbnails[4368981]=new thumbnail(4368981,"243801","Kathy Todd","kt150_thumb.jpg",130,176,5);thumbnails[4047979]=new thumbnail(4047979,"243801","Sue Kinley","sk023_2_thumb.jpg",130,190,5);thumbnails[4047992]=new thumbnail(4047992,"243801","Sue Kinley","sk029_2_thumb.jpg",130,86,5);thumbnails[4047919]=new thumbnail(4047919,"243801","Morrab Studio","mo079_2_thumb.jpg",130,85,5);thumbnails[4047777]=new thumbnail(4047777,"243801","Jen Hall","jh013_2_thumb.jpg",130,95,5);thumbnails[4047667]=new thumbnail(4047667,"243801","Claire Winterton","cw0049_2_thumb.jpg",130,195,5);thumbnails[4047724]=new thumbnail(4047724,"243801","Claire Winterton","cw0074_2_thumb.jpg",130,195,5);thumbnails[4047726]=new thumbnail(4047726,"243801","Claire Winterton","cw0185_2_thumb.jpg",130,195,5);thumbnails[4047916]=new thumbnail(4047916,"243801","Abbott & Ellwood","mk013_2_thumb.jpg",130,151,5);thumbnails[4047917]=new thumbnail(4047917,"243801","Abbott & Ellwood","mk015_2_thumb.jpg",130,195,5);thumbnails[4047923]=new thumbnail(4047923,"243801","Nic Harrison","nh564_2_thumb.jpg",130,104,5);thumbnails[4047971]=new thumbnail(4047971,"243801","Nic Harrison","nh572_2_thumb.jpg",130,86,5);thumbnails[4047974]=new thumbnail(4047974,"243801","Nic Harrison","nh590_2_thumb.jpg",130,86,5);thumbnails[4047976]=new thumbnail(4047976,"243801","Nic Harrison","nh596_2_thumb.jpg",130,86,5);var galleries=new Object();galleries[149781]=new gallery(149781,"2476067,2476066,2476064,2476062,2476060,2476059,2279484,2279483,2279482,2279481,2279476,2279474,2279473,2279470,2279465,2279436,2279429,2279428,2279423,2279420,2279419","Places","gallery",[3098603,3098608,3098598,3098599,2279419,2279420,2279423,2279428,2279429,2279436,2279465,2279470,2279473,2279474,2279476,2279481,2279482,2279483,2279484,2279487,2476059,2476060,2476062,2476064,2476066,2476067,3766271]);galleries[149780]=new gallery(149780,"2476081,2476080,2476079,2476076,2476074,2476073,2476072,2476071,2476070,2476069,2476068,2279589,2279587,2279585,2279584,2279580,2279578,2279576,2279573,2279572,2279570,2279568,2279566,2279502,2279498,2279497,2279495,2279494,2279491,2279433","Products","gallery",[2279433,2279491,2279494,2279495,2279497,2279498,2279502,2279566,2279568,2279570,2279572,2279573,2279576,2279578,2279580,2279584,2279585,2279587,2279589,2476068,2476069,2476070,2476071,2476072,2476073,2476074,2476076,2476079,2476080,2476081]);galleries[256742]=new gallery(256742,"4369213,4369212,4369211,4369210,4369208,4369207,4369206,4369205,4369203,4369202","Spotlight","section310059",[4369156,4369201,4369202,4369203,4369205,4369206,4369207,4369208,4369210,4369211,4369212,4369213]);galleries[148799]=new gallery(148799,"2476000,2475999,2279418,2279417,2279411,2279409,2279407,2279406,2279403,2279397,2279368,2279367,2279356,2279352,2279344,2279337,2279334,2279330,2279327,2279322","People","gallery",[2279322,2279327,2279330,2279334,2279337,2279344,2279347,2279349,2279352,2279356,2279363,2279364,2279367,2279368,2279397,2279403,2279406,2279407,2279409,2279411,2279417,2279418,2475999,2476000]);galleries[159133]=new gallery(159133,"2476057,2476054,2476052,2476050,2476024,2476023,2476021","Personal","gallery",[2476021,2476023,2476024,2476050,2476052,2476054,2476057]);galleries[243801]=new gallery(243801,"4368984,4368983,4368981,4368980,4368979,4047992,4047979,4047976,4047974,4047971","Art","section296082",[4047665,4047663,4047921,4368980,4368983,4047730,4047739,4368979,4368984,4368981,4047979,4047992,4047919,4047777,4047667,4047724,4047726,4047916,4047917,4047923,4047971,4047974,4047976]);var imageSets=new Object();imageSets[1]="2476081,2476079,2476074,2476073,2476071,2476070,2476060,2476059,2476057,2476054,2476052,2476050,2476024,2476023,2279589,2279566,2279498,2279497,2279494,2279491,2279484,2279483,2279482,2279481,2279476,2279474,2279470,2279465,2279433,2279423,2279327";imageSets[2]="2476081,2476080,2476079,2476076,2476074,2476073,2476072,2476071,2476070,2476069,2476068,2476067,2476066,2476064,2476062,2476060,2476059,2476057,2476054,2476052,2476050,2476024,2476023,2476021,2476000,2475999,2279589,2279587,2279585,2279584,2279580,2279578,2279576,2279573,2279572,2279570,2279568,2279566,2279502,2279498,2279497,2279495,2279494,2279491,2279484,2279483,2279482,2279481,2279476,2279474,2279473,2279470,2279465,2279436,2279433,2279429,2279428,2279423,2279420,2279419,2279418,2279417,2279411,2279409,2279407,2279406,2279403,2279397,2279368,2279367,2279356,2279352,2279344,2279337,2279334,2279330,2279327,2279322";imageSets[3]="4369213,4369212,4369211,4369210,4369208,4369207,4369206,4369205,4369203,4369202,4369201,4369156,4368984,4368983,4368981,4368980,4368979,4047992,4047979,4047976,4047974,4047971,4047923,4047921,4047919,4047917,4047916,4047777,4047739,4047730,4047726,4047724,4047667,4047665,4047663,3766280,3766279,3766271,3098608,3098603,3098599,3098598,2476081,2476080,2476079,2476076,2476074,2476073,2476072,2476071";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/rjphoto/images";break}switch(a){case 1:b="http://www1.clikpic.com/rjphoto/images";break}switch(a){case 2:b="http://admin.clikpic.com/rjphoto/images";break}switch(a){case 24:b="http://tpc15/clikpic/rjphoto/images";break}switch(a){case 4:b="http://www.clikchurch.com/rjphoto/images";break}switch(a){case 5:b="http://www2.clikpic.com/rjphoto/images";break}switch(a){case 22:b="http://tpc5/clikpic/rjphoto/images";break}switch(a){case 23:b="http://tpc10/clikpic/rjphoto/images";break}switch(a){case 25:b="http://tpc16/clikpic/rjphoto/images";break}switch(a){case 15:b="http://www3.clikpic.com/rjphoto/images";break}switch(a){case 18:b="http://www4.clikpic.com/rjphoto/images";break}switch(a){case 19:b="http://www5.clikpic.com/rjphoto/images";break}switch(a){case 31:b="http://www7.clikpic.com/rjphoto/images";break}switch(a){case 32:b="http://admin2.clikpic.com/rjphoto/images";break}switch(a){case 33:b="http://www8.clikpic.com/rjphoto/images";break}switch(a){case 34:b="http://www9.clikpic.com/rjphoto/images";break}switch(a){case 35:b="http://admin3.clikpic.com/rjphoto/images";break}switch(a){case 37:b="http://admin4.clikpic.com/rjphoto/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="Rob Jewell 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+'")'})}}};