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[144829]=new thumbnail(144829,"12841","Short Hedge in Snow<br>\r\n","ShortHedge in Snow_thumb.jpg",130,86,15);thumbnails[144830]=new thumbnail(144830,"12841","Weeping Ash in Snow<br>\r\n","Weeping ash in snow _thumb.jpg",130,87,15);thumbnails[144833]=new thumbnail(144833,"12841","Oak and Old Hedge<br>\r\n","Oak and old hedge_thumb.jpg",130,80,15);thumbnails[144834]=new thumbnail(144834,"12841","Perfect Marriage<br>\r\n","Perfect marriage t1_thumb.jpg",130,86,15);thumbnails[144836]=new thumbnail(144836,"12841","Single Tree<br>\r\n","Single tree_thumb.jpg",130,174,15);thumbnails[144843]=new thumbnail(144843,"12841","Single Old Oak<br>\r\n","Single old oak stretched_thumb.jpg",130,85,15);thumbnails[736365]=new thumbnail(736365,"12841","A Single Ash.<br>\r\n","A Single Ash_thumb.jpg",130,88,15);thumbnails[736381]=new thumbnail(736381,"12841","Two Ashes.<br>\r\n","Two Ashes_thumb.jpg",130,86,15);thumbnails[736418]=new thumbnail(736418,"12841","Single Oak in Summer.<br>\r\n","Single Old Oak in Summer_thumb.jpg",130,88,15);thumbnails[2533727]=new thumbnail(2533727,"12841","A Mighty Sycamore","A Mighty Sycamore1_thumb.jpg",130,78,15);thumbnails[3389389]=new thumbnail(3389389,"12841","Blown Barley","Blown-barly-mod_thumb.jpg",130,96,15);thumbnails[3389397]=new thumbnail(3389397,"12841"," Grasses in the Evening Sun","Backlit-grasses_thumb.jpg",130,94,15);thumbnails[144819]=new thumbnail(144819,"13384","Millfield Clump in Spring<br>\r\nRef. W0402","Millfield Spring_thumb.jpg",130,69,15);thumbnails[144821]=new thumbnail(144821,"13384","Millfield Clump in Summer<br>\r\n","Millfield Clump pan summer 04 24x36_thumb.jpg",130,65,15);thumbnails[144823]=new thumbnail(144823,"13384","Millfield Clump in Autumn<br>\r\n","Millfield clump autumn_thumb.jpg",130,65,15);thumbnails[144824]=new thumbnail(144824,"13384","Millfield Clump in Winter<br>\r\n","Millfield in mist_thumb.jpg",130,65,15);thumbnails[144825]=new thumbnail(144825,"13384","Millfield Clump in Winter (black)<br>\r\n","Millfield Clump in Winter 24x48_thumb.jpg",130,65,15);thumbnails[144826]=new thumbnail(144826,"13384","Severn Conifers on a Slope<br>\r\n","7 Conifers on a slope_thumb.jpg",130,86,15);thumbnails[144828]=new thumbnail(144828,"13384","Wood on a Hillock<br>\r\n","Wood on a hill_thumb.jpg",130,44,15);thumbnails[144839]=new thumbnail(144839,"13384","Three Chestnuts and an Ash<br>\r\n","Three Chestnuts and an Ash_thumb.jpg",130,87,15);thumbnails[736355]=new thumbnail(736355,"13384","A Group of Young Ashes.<br>\r\n","A Group of Young Ashes1_thumb.jpg",130,87,15);thumbnails[736356]=new thumbnail(736356,"13384","A Line of Trees in a Hedge.<br>\r\n","A Line of trees in a hedge 2_thumb.jpg",130,49,15);thumbnails[736361]=new thumbnail(736361,"13384","A Line of Trees with a Gap.<br>\r\n","A Line of trees with gap_thumb.jpg",130,60,15);thumbnails[736374]=new thumbnail(736374,"13384","Beeches on a Barrow.<br>\r\n","Beeches_on_a_Barrow_thumb.jpg",130,73,15);thumbnails[736376]=new thumbnail(736376,"13384","Double Oak and Hedge.<br>\r\n","double oak and hedge_thumb.jpg",130,56,15);thumbnails[5865536]=new thumbnail(5865536,"13384","Three Ashes","Three-Ashes-_thumb.jpg",130,92,15);thumbnails[6113845]=new thumbnail(6113845,"13384","Trees near St. Giles","Trees-near-St-Giles_thumb.jpg",130,174,15);thumbnails[144844]=new thumbnail(144844,"13385","Pollarded Chestnut 1<br>\r\n","Polladed Chestnut 1_thumb.jpg",130,130,15);thumbnails[144847]=new thumbnail(144847,"13385","Pollarded Chestnut 2B<br>\r\n","Pollarded chestnut 2B_thumb.jpg",130,130,15);thumbnails[144848]=new thumbnail(144848,"13385","Pollarded Chestnut 2C<br>\r\n","Pollarded Chestnut 2C_thumb.jpg",130,130,15);thumbnails[144850]=new thumbnail(144850,"13385","Lime Branches and Trunk<br>\r\n","Lime  Branches and Trunk_thumb.jpg",130,130,15);thumbnails[160489]=new thumbnail(160489,"13385","Pollarded Chestnut 2D<br>\r\n","Polladed Chestnut 2D_thumb.jpg",130,130,15);thumbnails[736570]=new thumbnail(736570,"13385","Trunks and Branches 2<br>\r\n","Trunks and branches 2_thumb.jpg",130,130,15);thumbnails[736574]=new thumbnail(736574,"13385","Trunks and Branches 3<br>\r\n","Trunks and branches 3_thumb.jpg",130,129,15);thumbnails[736586]=new thumbnail(736586,"13385","Trunks and Branches 4<br>\r\n","Trunks and branches 4_thumb.jpg",130,129,15);thumbnails[736590]=new thumbnail(736590,"13385","Pollarded Chestnut 5<br>\r\n","Pollarded Chestnut 5_thumb.jpg",130,129,15);thumbnails[736593]=new thumbnail(736593,"13385","Pollarded Chestnut 5A<br>\r\n","Pollarded Chestnut 5A_thumb.jpg",130,130,15);thumbnails[3378994]=new thumbnail(3378994,"13385","Chair Composition 1","Chair Composition 1_thumb.jpg",130,136,15);thumbnails[3379001]=new thumbnail(3379001,"13385","Cracked Mud 2","Cracked-mud-2_thumb.jpg",130,130,15);thumbnails[3379005]=new thumbnail(3379005,"13385","Cracked Mud 3D","Cracked-mud-mod-3d_thumb.jpg",130,130,15);thumbnails[3379011]=new thumbnail(3379011,"13385","Cracked Mud 6","Cracked-mud--6_thumb.jpg",130,130,15);thumbnails[3379015]=new thumbnail(3379015,"13385","Cracked Mud 8","Cracked-mud--8_thumb.jpg",130,130,15);thumbnails[3379016]=new thumbnail(3379016,"13385","Cracked Mud 9A","Cracked-mud--9A_thumb.jpg",130,130,15);thumbnails[3379024]=new thumbnail(3379024,"13385","FA 1","FA-1_thumb.jpg",130,130,15);thumbnails[3379063]=new thumbnail(3379063,"13385","Trunks and Branches 5","Trunks and Branches 5_thumb.jpg",130,130,15);thumbnails[4433033]=new thumbnail(4433033,"13385","Abstract from Cracked Mud 1","Abstract_from_Cracked_Mud_11_thumb.jpg",130,129,15);thumbnails[4433038]=new thumbnail(4433038,"13385","Abstract in space 2A","Abstract-in-Space-2A_thumb.jpg",130,129,15);thumbnails[6113855]=new thumbnail(6113855,"342694","ADS 1","ADS_1_thumb.jpg",130,103,15);thumbnails[6113859]=new thumbnail(6113859,"342695","Four Chairs","4_chairs_thumb.jpg",130,101,15);thumbnails[6113863]=new thumbnail(6113863,"342695","Six Painted Chairs","Six_Painted_Chairs_thumb.jpg",130,178,15);thumbnails[6113867]=new thumbnail(6113867,"342695","Orchestral rehearsal","Orchestral_rehearsal_thumb.jpg",130,90,15);thumbnails[6113883]=new thumbnail(6113883,"342695","Six Chairs in a Huddle","6_chairs_in_a_Huddle_thumb.jpg",130,89,15);thumbnails[6113887]=new thumbnail(6113887,"342698","Interacting Forms 1","IAF-1_thumb.jpg",130,91,15);thumbnails[160503]=new thumbnail(160503,"14923","A Long Wood in the Snow<br>\r\nP0503","Wood in the Snow  P0503_thumb.jpg",130,44,15);thumbnails[4433009]=new thumbnail(4433009,"14923","Lake Skadar 2","Lake_Skadar_2_P0403_thumb.jpg",130,60,15);thumbnails[4433352]=new thumbnail(4433352,"14923","A Reflection in Brugge","Bruges_reflection_P9401_thumb.jpg",130,60,15);thumbnails[1869229]=new thumbnail(1869229,"125553","Six Ashes in the Snow","Six-Ashes-in-the-Snow_thumb.jpg",130,170,15);thumbnails[1869242]=new thumbnail(1869242,"125553","Six Ashes Negative","Six-Ashes-negative_thumb.jpg",130,100,15);thumbnails[1869247]=new thumbnail(1869247,"125553","Four Ashes in the Snow","Four-Ashes-in-the-Snow_thumb.jpg",130,185,15);thumbnails[1869248]=new thumbnail(1869248,"125553","Four Ashes Negative.","4-Ashes-negative_thumb.jpg",130,184,15);thumbnails[1869259]=new thumbnail(1869259,"125553","Oak, Pine and Snow","Oak,-Pine-and-Snow_thumb.jpg",130,132,15);thumbnails[1869269]=new thumbnail(1869269,"125553","Split Willow","Split-Willow_thumb.jpg",130,130,15);thumbnails[1869273]=new thumbnail(1869273,"125553","Sun,trees and Snow","Back-lit-tree-in-snow_thumb.jpg",130,185,15);thumbnails[1869274]=new thumbnail(1869274,"125553","Trees after Snow","Trees-after-snow_thumb.jpg",130,215,15);thumbnails[3378732]=new thumbnail(3378732,"125553","Ash Twigs","Ash-Twigs_thumb.jpg",130,162,15);thumbnails[3378802]=new thumbnail(3378802,"125553","Ash Twigs reversed","Ash-Twigs-reversed_thumb.jpg",130,162,15);thumbnails[3378923]=new thumbnail(3378923,"125553","Cutout Trunk and Branches","Cutout-trunk-and-branches_thumb.jpg",130,183,15);thumbnails[3378965]=new thumbnail(3378965,"125553","Frost on Trees","Frost-on-Trees_thumb.jpg",130,174,15);thumbnails[3379245]=new thumbnail(3379245,"125553","Posterised Branch and Twigs","Posterised Branch and Twigs_thumb.jpg",130,182,15);thumbnails[3389117]=new thumbnail(3389117,"125553","Poplar Wood in Snow","Poplars-at-Kilby-4_thumb.jpg",130,192,15);thumbnails[4432924]=new thumbnail(4432924,"125553","Tracks in the Snow","Tracks-in-the-snow1_thumb.jpg",130,164,15);thumbnails[4432962]=new thumbnail(4432962,"125553","Snowey Trees with St. Giles","St-Giles-with-trees-in-the-Snow-sharp_thumb.jpg",130,163,15);thumbnails[4433001]=new thumbnail(4433001,"125553","St. Giles in the Snow","St-Giles-in-snow-1_thumb.jpg",130,76,15);thumbnails[1869319]=new thumbnail(1869319,"125555","Olive Tree 1","Olive-tree-in-Petrovac_thumb.jpg",130,182,15);thumbnails[3378927]=new thumbnail(3378927,"125555","Edge of a Wood","Edge of a Wood_thumb.jpg",130,188,15);thumbnails[3378976]=new thumbnail(3378976,"125555","Trees in a Park","Trees in a Park_thumb.jpg",130,83,15);thumbnails[4432486]=new thumbnail(4432486,"125555","Modern Cafe","-Modern-Cafe_thumb.jpg",130,102,15);thumbnails[4432510]=new thumbnail(4432510,"125555","Blue reflection","Blue-reflection1_thumb.jpg",130,97,15);thumbnails[4432526]=new thumbnail(4432526,"125555","Two Trunks over Barley","Two-Trunks-over-Barley_thumb.jpg",130,160,15);thumbnails[4432536]=new thumbnail(4432536,"125555","Street Lamp","Street-lamp-1_thumb.jpg",130,164,15);thumbnails[4432631]=new thumbnail(4432631,"125555","Chains","Chains_thumb.jpg",130,172,15);thumbnails[4432753]=new thumbnail(4432753,"125555","An Avenue of Limes","An-Avenue-of-Limes_thumb.jpg",130,173,15);thumbnails[3378668]=new thumbnail(3378668,"206372","Ash Leaves 1D1","Ash-Leaves-1a_thumb.jpg",130,130,15);thumbnails[3378674]=new thumbnail(3378674,"206372","Ash Leaves 1D2","Ash-Leaves-1D2_thumb.jpg",130,130,15);thumbnails[3378695]=new thumbnail(3378695,"206372","Ash Leaves 1","Ash-Leaves-11_thumb.jpg",130,130,15);thumbnails[3378708]=new thumbnail(3378708,"206372","Ash Leaves 1D3","Ash-Leaves-1D3_thumb.jpg",130,130,15);thumbnails[3378710]=new thumbnail(3378710,"206372","Ash Leaves 1D4","Ash-Leaves-1D4_thumb.jpg",130,130,15);thumbnails[3378810]=new thumbnail(3378810,"206372","Coloured Trunk and Branches D1","Coloured-trunk-and-branches-D1_thumb.jpg",130,173,15);thumbnails[3378860]=new thumbnail(3378860,"206372","Coloured Trunk and Branches D3","Coloured-trunks-and-branches-D3_thumb.jpg",130,171,15);thumbnails[3378866]=new thumbnail(3378866,"206372","Coloured Trunk and Branches D4","Coloured-Trunk-and-branches-D4_thumb.jpg",130,166,15);thumbnails[3378869]=new thumbnail(3378869,"206372","Coloured Trunk and Branches D5","Coloured-trunk-and-branches-D5_thumb.jpg",130,171,15);thumbnails[3378941]=new thumbnail(3378941,"206372","Pollarded Plane 1D3","Pollarded-plane-1D3_thumb.jpg",130,163,15);thumbnails[3378958]=new thumbnail(3378958,"206372","Pollarded Plane 1D4","Pollarded-plane-1D4_thumb.jpg",130,163,15);thumbnails[3378961]=new thumbnail(3378961,"206372","Pollarded Plane 1D5","Pollarded-plane-1D5_thumb.jpg",130,163,15);thumbnails[3379091]=new thumbnail(3379091,"206372","Willow Leaves 1","Willow-Leaves_thumb.jpg",130,130,15);thumbnails[3379227]=new thumbnail(3379227,"206372","Coulered Branch and Twigs V1","Coloured-Branch-and-Twiggs-v1-mod_thumb.jpg",130,179,15);thumbnails[3379233]=new thumbnail(3379233,"206372","Coloured Branch and Twigs V3","Coloured Branch ans Twigs V3_thumb.jpg",130,179,15);thumbnails[3379261]=new thumbnail(3379261,"206372","Willow Leaves1D4","Willow-Leaves-1D4_thumb.jpg",130,130,15);thumbnails[3379269]=new thumbnail(3379269,"206372","Willow Leaves 1D2","Willow-Leaves 1D2_thumb.jpg",130,130,15);thumbnails[3379279]=new thumbnail(3379279,"206372","Willow Leaves 1D1","Willow-Leaves 1D1_thumb.jpg",130,130,15);thumbnails[4432874]=new thumbnail(4432874,"206372","Pollarded Chestnut 6A","Pollarded-Chestnut-6A_thumb.jpg",130,164,15);thumbnails[3389171]=new thumbnail(3389171,"222069","Sunlit Leaves and Trunks","Sunlit-Leaves-and-Trunks_thumb.jpg",130,47,15);thumbnails[3631809]=new thumbnail(3631809,"222069","King's Norton. Leicestershire","Kings_Norton_P0501_thumb.jpg",130,60,15);thumbnails[3631812]=new thumbnail(3631812,"222069","Lake Skadar","Lake_Skadar_P0402_thumb.jpg",130,44,15);thumbnails[3631822]=new thumbnail(3631822,"222069","Landscape near Jerez","Landscape-nr-Jerez-P9301_thumb.jpg",130,43,15);thumbnails[3631829]=new thumbnail(3631829,"222069","Lollipops 2","Lollipops-2_thumb.jpg",130,37,15);thumbnails[3631842]=new thumbnail(3631842,"222069","One Way Traffic","One_way_traffic_P8501_thumb.jpg",130,60,15);var galleries=new Object();galleries[12841]=new gallery(12841,"2533727,736418,736381,736365,144843,144836,144834,144833,144830,144829","<span style='color:white'>TREES","gallery",[144829,144830,144833,144834,144836,144843,736365,736381,736418,2533727,3389389,3389397]);galleries[13384]=new gallery(13384,"5865536,736376,736374,736361,736356,736355,144839,144828,144826,144824,144823,144821,144819","<span style='color:white'>WOODS","gallery",[144819,144821,144823,144824,144825,144826,144828,144839,736355,736356,736361,736374,736376,5865536,6113845]);galleries[13385]=new gallery(13385,"4433038,3379063,3379024,3379016,3379015,3379011,3379001,3378994,736593,736590,736586,736574,736570,160489,144850,144848,144847,144844","<span style='color:white'>ABSTRACTS","gallery",[144844,144847,144848,144850,160489,736570,736574,736586,736590,736593,3378994,3379001,3379005,3379011,3379015,3379016,3379024,3379063,4433033,4433038]);galleries[342694]=new gallery(342694,"6113855","Assembled Drawn Shapes","gallery",[6113855]);galleries[342695]=new gallery(342695,"6113883,6113867,6113863,6113859","Chairs","gallery",[6113859,6113863,6113867,6113883]);galleries[342698]=new gallery(342698,"6113887","Interacting forms","gallery",[6113887]);galleries[14923]=new gallery(14923,"4433352,4433009,160503","<span style='color:white'>PANORAMAS","gallery",[160503,4433009,4433352]);galleries[206367]=new gallery(206367,"4432962,4432874,4432536,4432526,4432486,3631842,3631822,3631809,3389117,3379279,3379269,3379233,3378976,3378965,3378961,3378958,3378941,3378927,3378869,3378810,3378802,3378732,3378708,3378695,3378668,1869273,1869247,1869229","OPEN EDITIONS","gallery",[]);galleries[125553]=new gallery(125553,"4432962,3389117,3378965,3378802,3378732,1869273,1869247,1869229","<span style='color:white'> MONO","gallery",[1869229,1869242,1869247,1869248,1869259,1869269,1869273,1869274,3378732,3378802,3378923,3378965,3379245,3389117,4432924,4432962,4433001]);galleries[125555]=new gallery(125555,"4432536,4432526,4432486,3378976,3378927","<span style='color:white'>COLOUR","gallery",[1869319,3378927,3378976,4432486,4432510,4432526,4432536,4432631,4432753]);galleries[206372]=new gallery(206372,"4432874,3379279,3379269,3379233,3378961,3378958,3378941,3378869,3378810,3378708,3378695,3378668","DERIVATIONS","gallery",[3378668,3378674,3378695,3378708,3378710,3378810,3378860,3378866,3378869,3378941,3378958,3378961,3379091,3379227,3379233,3379261,3379269,3379279,4432874]);galleries[222069]=new gallery(222069,"3631842,3631822,3631809","PANORAMAS","gallery",[3389171,3631809,3631812,3631822,3631829,3631842]);var imageSets=new Object();imageSets[1]="4433038,4433033,4432924,4432753,4432510,3379227,3379091,3379063,3379024,3379015,3379011,3379001,3378976,3378866,3378732,3378710,3378695,3378674,2533727,1869259,1869242,736593,736590,736586,736574,736570,736418,736381,736376,736374,736365,736361,736356,736355,160489,144850,144848,144847,144844,144843,144839,144834,144833,144830,144828,144824,144823";imageSets[2]="5865536,4433352,4433038,4433009,4432962,4432874,4432536,4432526,4432486,3631842,3631822,3631809,3389117,3379279,3379269,3379233,3379063,3379024,3379016,3379015,3379011,3379001,3378994,3378976,3378965,3378961,3378958,3378941,3378927,3378869,3378810,3378802,3378732,3378708,3378695,3378668,2533727,1869273,1869247,1869229,736593,736590,736586,736574,736570,736418,736381,736376,736374,736365,736361,736356,736355,160503,160489,144850,144848,144847,144844,144843,144839,144836,144834,144833,144830,144829,144828,144826,144824,144823,144821,144819";imageSets[3]="6113887,6113883,6113867,6113863,6113859,6113855,6113845,5865536,4433352,4433038,4433033,4433009,4433001,4432962,4432924,4432874,4432753,4432631,4432536,4432526,4432510,4432486,3631842,3631829,3631822,3631812,3631809,3389397,3389389,3389171,3389117,3379279,3379269,3379261,3379245,3379233,3379227,3379091,3379063,3379024,3379016,3379015,3379011,3379005,3379001,3378994,3378976,3378965,3378961,3378958";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/peterrawson/images";break}switch(a){case 1:b="http://www1.clikpic.com/peterrawson/images";break}switch(a){case 2:b="http://admin.clikpic.com/peterrawson/images";break}switch(a){case 24:b="http://tpc15/clikpic/peterrawson/images";break}switch(a){case 4:b="http://www.clikchurch.com/peterrawson/images";break}switch(a){case 5:b="http://www2.clikpic.com/peterrawson/images";break}switch(a){case 22:b="http://tpc5/clikpic/peterrawson/images";break}switch(a){case 23:b="http://tpc10/clikpic/peterrawson/images";break}switch(a){case 25:b="http://tpc16/clikpic/peterrawson/images";break}switch(a){case 15:b="http://www3.clikpic.com/peterrawson/images";break}switch(a){case 18:b="http://www4.clikpic.com/peterrawson/images";break}switch(a){case 19:b="http://www5.clikpic.com/peterrawson/images";break}switch(a){case 31:b="http://www7.clikpic.com/peterrawson/images";break}switch(a){case 32:b="http://admin2.clikpic.com/peterrawson/images";break}switch(a){case 33:b="http://www8.clikpic.com/peterrawson/images";break}switch(a){case 34:b="http://www9.clikpic.com/peterrawson/images";break}switch(a){case 35:b="http://admin3.clikpic.com/peterrawson/images";break}switch(a){case 37:b="http://admin4.clikpic.com/peterrawson/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="'+escape(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="Trees, Abstracts and Panoramas: "+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;resizePhotoInfo();toggleAddToCartConfirm()}else{window.location="photo_"+photos[f].id+".html"}}function toggleAddToCartConfirm(){if($("#paymentConfirm").size()){$("#paymentConfirm").hide();$("#paymentAddButton").unbind().click(function(){form=document.getElementById("paymentForm");option_id=0;if(form.item_option.value){option_id=form.item_option.value}if(addItemToBasket(form.item_number.value,photos,form.site.value,parseInt(form.quantity.value,10),option_id)){if($.browser.msie){$("#paymentConfirm").text("Item added to cart").show()}else{$("#paymentConfirm").text("Item added to cart").fadeIn()}}else{$("#paymentConfirm").text("Item not added - check cookies are enabled in your browser.").fadeIn()}})}}function fnGetImageDetails(b){var a="";if(photos[b].description!=""){a=a+'<p id="imageDescription">'+photos[b].description+"</p>"}if(photos[b].photo_ref!=""){a=a+'<p class="imageinfo" id="imageRef"><strong>Ref: </strong>'+photos[b].photo_ref+"</p>"}if(photos[b].takendate!=""){a=a+'<p class="imageinfo" id="imageDate"><strong>Date: </strong>'+photos[b].takendate+"</p>"}if(photos[b].location!=""){a=a+'<p class="imageinfo" id="imageLocation"><strong>Location: </strong>'+photos[b].location+"</p>"}if(photos[b].photographer!=""){a=a+'<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>'+photos[b].photographer+"</p>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+(c.item_price).toFixed(2)+"</p>";var e=c.purchase_instruction;var d=(c.item_price).toFixed(2);var a=0}else{if(c.payment_groups_id!==""){b=b+"<p>Buy this print online:</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<select class="paymentlink" name="payment_options_id" onchange="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="PETERRAWSON">';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(b,a){imageID=randomListVal(galleries[b].featured_images);if(imageID!=0){a.src=thumbnails[imageID].src;a.width=thumbnails[imageID].width;a.height=thumbnails[imageID].height}}function showGalleries(a){if(!basic){temp="";for(i=0;i<galleries.length;i++){if(galleries[i].id!=a){if(temp!=""){temp=temp+" | "}temp=temp+'<a href="gallery_'+galleries[i].id+'.html">'+galleries[i].title+"</a>"}}document.all.galleryLinks.innerHTML="Other galleries: "+temp}}function resizePhotoInfo(n){var b=$.extend({centre:false},n||{});var d=3;$("div#photoPanelOuter").height("auto");$("div#infoWrap").width(200);$("div#photoDetail").css("width","auto");var h=$("div#maincolContent").width();var j=$("div#photoWrap").outerWidth(true);var m=$("div#infoWrap").outerWidth(true);var k=$("div#photoWrap").outerHeight();var f=$("div#infoWrap").outerHeight();var c=$("div#infoWrap").hasClass("empty");floatDrop=0;var g=j;if(!c){if(h<(j+m)){floatDrop=1}if(!floatDrop){var a=$("div#infoWrap").innerWidth();$("div#infoWrap").width(a+(h-j-m-d));m=$("div#infoWrap").outerWidth(true);g=j+m;if(k>f){var e=$("div#photoPanelOuter").height();$("div#photoPanelOuter").height(e+(k-f));var f=$("div#infoWrap").outerHeight()}}else{var l=$("div#photoWrap").outerWidth();$("div#infoWrap").width(l)}}if(b.centre){$("div#photoDetail").width(g);$("div#photoDetail").css("margin-left","auto");$("div#photoDetail").css("margin-right","auto")}else{$("div#photoDetail").css("margin-left","0");$("div#photoDetail").css("margin-right","0")}}function getArrayPos(c,b){for(var a=0;a<c.length;a++){if(c[a]==b){return a}}return -1}function changeBgImg(a,e){var c=randomListVal(imageSets[e]);var d=backgrounds[c].src;var b=$(a);if(b.size()>0){if(/\bimg$/.test(a)){b.attr({src:d})}else{b.css({"background-image":'url("'+d+'")'})}}};