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[3668922]=new thumbnail(3668922,"149087",'"Dark and Gloomy"',"Dark_and_Gloomy1_thumb.jpg",130,87,1);thumbnails[3695437]=new thumbnail(3695437,"149087",'"Scorhill Circle"',"ScorhillCircle_thumb.jpg",130,92,1);thumbnails[4884603]=new thumbnail(4884603,"149087",'"The Visitor"',"The-Visitor_thumb.jpg",130,139,1);thumbnails[4884606]=new thumbnail(4884606,"149087",'"Boys in Fountain"',"Boys_in_the_Fountain_thumb.jpg",130,98,1);thumbnails[4904414]=new thumbnail(4904414,"149087",'"Crash Box"',"Crash_Box_015sepia_printed_mounted_thumb.jpg",130,75,1);thumbnails[5009001]=new thumbnail(5009001,"149087",'"Hold on Tight"',"Hold_on_tight_thumb.jpg",130,156,1);thumbnails[5183776]=new thumbnail(5183776,"149087",'"Fernworthy Reservoir"',"Fernsworthy_lake_a_thumb.jpg",130,87,1);thumbnails[5187624]=new thumbnail(5187624,"149087",'"Tinside Pool"',"Tinside20Pool20Mono20for20gallery1_thumb.jpg",130,96,1);thumbnails[5196507]=new thumbnail(5196507,"149087",'"Red Spectre"',"red_figure_in_window_thumb.jpg",130,172,1);thumbnails[5231252]=new thumbnail(5231252,"149087",'"Station In Time"',"Station_in_time_thumb.jpg",130,85,1);thumbnails[5231287]=new thumbnail(5231287,"149087",'"Vulcan with the Reds"',"Vulcan_with_Reds1_thumb.jpg",130,63,1);thumbnails[5232527]=new thumbnail(5232527,"149087",'"Fighting The Power of The River Dart"',"IMG_0697_thumb.jpg",130,87,1);thumbnails[5235901]=new thumbnail(5235901,"149087",'"Power 1"',"POWER__Winning_entry_in_Advanced_mono_thumb.jpg",130,86,1);thumbnails[5258898]=new thumbnail(5258898,"149087",'"Amber Sky"',"Amber-Sky_Image_1_Member_1261_thumb.jpg",130,61,1);thumbnails[5398297]=new thumbnail(5398297,"149087",'"The Elusive Leopard"',"The_Elusive_Leopard_copy_thumb.jpg",130,82,1);thumbnails[5416738]=new thumbnail(5416738,"149087",'"Modern Art"',"13ModernArt_thumb.jpg",130,106,1);thumbnails[5582270]=new thumbnail(5582270,"149087",'"Street life Barcelona"',"StreetLifeBarcelona_thumb.jpg",130,122,1);thumbnails[5626265]=new thumbnail(5626265,"149087",'"Storm Clouds, Dawlish Warren"',"Dawlish_Warren_thumb.jpg",130,51,1);thumbnails[5700022]=new thumbnail(5700022,"149087",'"A Quiet Spot In Malcesene"',"A_quiet_spot_in_Malcesene_for_Richard_Potts_thumb.JPG",130,181,1);thumbnails[5731890]=new thumbnail(5731890,"149087",'"Queen of the Savannah"',"41_Queen_of_theSavanah_thumb.jpg",130,196,1);thumbnails[5731981]=new thumbnail(5731981,"149087",'"Stained Wine Glass"',"stained_wine_glass_square_crop_thumb.jpg",130,117,1);thumbnails[5739093]=new thumbnail(5739093,"149087",'"Top of the Teign"',"Top_of_the_Teign_thumb.jpg",130,194,1);thumbnails[1874979]=new thumbnail(1874979,"136602",'"Snow Patrol"',"Snow-Patrol_thumb.jpg",130,60,1);thumbnails[5700104]=new thumbnail(5700104,"136602",'"Babtcha"',"BABTCHAGRADMOTHER_POLAND1_thumb.jpg",130,195,1);thumbnails[6555487]=new thumbnail(6555487,"136602",'"Wet Day in Exeter"',"Silver-A-Wet-Day-in-Exeter-_thumb.jpg",130,103,1);thumbnails[6567270]=new thumbnail(6567270,"136602",'"Alone"',"Alone_thumb.jpg",130,173,1);thumbnails[6567271]=new thumbnail(6567271,"136602",'"High Tide Venice"',"High_Tide_Venice_thumb.jpg",130,98,1);thumbnails[6567274]=new thumbnail(6567274,"136602",'"Ruins At Foggintor"',"Ruins_At_Foggintor_thumb.jpg",130,98,1);thumbnails[6567275]=new thumbnail(6567275,"136602",'"Three Sheep"',"Three_Sheep_thumb.jpg",130,173,1);thumbnails[6593370]=new thumbnail(6593370,"136602",'"Notre Dame"',"Notre_Dame_thumb.jpg",130,195,1);thumbnails[6628460]=new thumbnail(6628460,"136602",'"Man & Child"',"Man_and_child12345_thumb.jpg",130,195,1);thumbnails[1544699]=new thumbnail(1544699,"310011",'"Jetski"',"jetski_thumb.jpg",130,65,1);thumbnails[3314516]=new thumbnail(3314516,"310011",'"Roses & Hydrangea"',"Roses_and_hydrangea_thumb.jpg",130,159,1);thumbnails[3781560]=new thumbnail(3781560,"310011",'"Roses"',"Roses_thumb.jpg",130,148,1);thumbnails[3781574]=new thumbnail(3781574,"310011",'"The Three Graces"',"The_Three_Graces_from_The_Mersey_thumb.jpg",130,56,1);thumbnails[1555932]=new thumbnail(1555932,"106593",'"Fire Escape"',"13FireEscape_thumb.jpg",130,98,1);thumbnails[1556028]=new thumbnail(1556028,"106593",'"Vultures"',"Vultures13_thumb.jpg",130,152,1);thumbnails[1832057]=new thumbnail(1832057,"106593",'"Grand Canal, Venice"',"13GrandCanalVenice_thumb.jpg",130,88,1);thumbnails[3106117]=new thumbnail(3106117,"106593",'"Good To talk"',"ItsGoodToTalk_thumb.jpg",130,82,1);thumbnails[1546789]=new thumbnail(1546789,"107174",'"Elephant & Warthog""',"04_Elephant_and_warthog_Sabi_copy_thumb.jpg",130,86,1);thumbnails[1546791]=new thumbnail(1546791,"107174",'"Sunset & Impala"',"63_Sunset_and_impalas_Sabi_thumb.jpg",130,86,1);thumbnails[1588678]=new thumbnail(1588678,"107174",'"Blyde River Canyon"',"24__Blyde_River_Canyon_thumb.jpg",130,80,1);thumbnails[1588686]=new thumbnail(1588686,"107174",'"Zebras Kicking up Dust"',"07_Zebras_kicking_up_a_dust_thumb.jpg",130,68,1);thumbnails[1588663]=new thumbnail(1588663,"105986",'"Impala"',"09_Impala_thumb.jpg",130,86,1);thumbnails[1588669]=new thumbnail(1588669,"105986",'"Banana Bill ,Horn Bill"',"17_Banana_bill_horn_bill_thumb.jpg",130,72,1);thumbnails[5553174]=new thumbnail(5553174,"105986",'"Hippo Family"',"18_Hippo_family_thumb.jpg",130,86,1);thumbnails[5553464]=new thumbnail(5553464,"105986",'"Buffalo"',"32_Buffalo_thumb.jpg",130,75,1);thumbnails[1691103]=new thumbnail(1691103,"168071",'"Red Cabbage"',"red Cabbage_thumb.jpg",130,136,1);thumbnails[1691129]=new thumbnail(1691129,"168071",'"Steam Engine Wheel Close Up"',"Spokes and Circles_thumb.jpg",130,83,1);thumbnails[3217993]=new thumbnail(3217993,"168071",'"sunset Peek Hill, Dartmoor"',"Sunset Peek Hill Dartmoor_thumb.jpg",130,86,1);thumbnails[3468933]=new thumbnail(3468933,"168071",'"East Dart, Dartmoor"',"East Dart Dartmoor_thumb.jpg",130,86,1);thumbnails[4435647]=new thumbnail(4435647,"283860",'"Hay Field"',"Byron_field_thumb.jpg",130,90,1);thumbnails[2120485]=new thumbnail(2120485,"141067",'"Watching You"',"SUNBATHING_ON_ACLOUDY_DAY_1_thumb.jpg",130,173,1);thumbnails[2121889]=new thumbnail(2121889,"141067",'"Gaudi Gates"',"Gaudi_Gates1_thumb.jpg",130,195,1);thumbnails[2123054]=new thumbnail(2123054,"141067",'"Christian Dovehouse"',"CHRISTIAN_DOVEHOUSE_thumb.jpg",130,87,1);thumbnails[5264019]=new thumbnail(5264019,"141067",'"I Love Eavis"',"I_love_Eaves_thumb.jpg",130,89,1);thumbnails[3630169]=new thumbnail(3630169,"221998",'"Leaf shadow"',"_5220002_thumb.jpg",130,169,1);thumbnails[3630215]=new thumbnail(3630215,"221998",'  "Upper Teign"',"_7170015_-_Copy_thumb.jpg",130,180,1);thumbnails[3630222]=new thumbnail(3630222,"221998",'"Solitary tree"',"_7170044_-_Copy_thumb.jpg",130,169,1);thumbnails[4454214]=new thumbnail(4454214,"221998",'"Scorhill circle"',"_7170075_-_Copy_thumb.jpg",130,94,1);thumbnails[4811288]=new thumbnail(4811288,"221998",'"Tree Tops"',"Tree_tops12_thumb.jpg",130,99,1);thumbnails[1556050]=new thumbnail(1556050,"106595",'"Leopard"',"Leopard_thumb.jpg",130,130,1);thumbnails[1556057]=new thumbnail(1556057,"106595",'"All the Saints"',"All the Saints 75_thumb.jpg",130,203,1);thumbnails[1556064]=new thumbnail(1556064,"106595",'"Plymouth Inner Harbour"',"Plymouth20Inner20Harbour_thumb.jpg",130,91,1);thumbnails[1556090]=new thumbnail(1556090,"106595",'"water Lily"',"Water20Lily_thumb.jpg",130,90,1);thumbnails[1543689]=new thumbnail(1543689,"105764",'"Blowing in The wind"',"Blowing_in_the_wind_thumb.jpg",130,188,1);thumbnails[1543700]=new thumbnail(1543700,"105764",'"Girl With Red Lips"',"Girl_with_red_lips_thumb.jpg",130,142,1);thumbnails[1543703]=new thumbnail(1543703,"105764",'"The Big One"',"BigOneRollercoaste2_thumb.jpg",130,195,1);thumbnails[1862863]=new thumbnail(1862863,"105764",'"No Entry"',"No_Entry_thumb.jpg",130,143,1);thumbnails[4732324]=new thumbnail(4732324,"105764",'"Blind Faith"',"Untitled-1_thumb.jpg",130,96,1);thumbnails[5337225]=new thumbnail(5337225,"300523",'"Fritillary"',"Fritiliari_thumb.jpg",130,195,1);thumbnails[5337230]=new thumbnail(5337230,"300523",'"Cogs"',"Cogs_thumb.jpg",130,98,1);thumbnails[5337243]=new thumbnail(5337243,"300523",'"Joint The Queue"',"S148_Join_the_queue_thumb.jpg",130,98,1);thumbnails[5337267]=new thumbnail(5337267,"300523",'"Tornado"',"S148_Tornado_thumb.jpg",130,87,1);thumbnails[1556126]=new thumbnail(1556126,"106594",'"Trocadero"',"Trocadero_thumb.jpg",130,98,1);thumbnails[1957776]=new thumbnail(1957776,"106594",'"Les Invalides"',"Les20Invalides1_thumb.jpg",130,172,1);thumbnails[1957781]=new thumbnail(1957781,"106594",'"Water reflections"',"Water20Reflections_thumb.jpg",130,98,1);thumbnails[1957782]=new thumbnail(1957782,"106594",'"Reflections La Defence"',"Reflections20at20La20Defence_thumb.jpg",130,173,1);thumbnails[2024035]=new thumbnail(2024035,"135666",'"Steam Up"',"Power_1comp_pic_Placed_third_Ad_Col_jpg_thumb.jpg",130,83,1);thumbnails[2025825]=new thumbnail(2025825,"135666",'"Irises on the style of Van Gough"',"Irises in the style of Van Gough_thumb.jpg",130,96,1);thumbnails[2025827]=new thumbnail(2025827,"135666",'"Umbrellas"',"Umbrellas_thumb.jpg",130,173,1);thumbnails[2025831]=new thumbnail(2025831,"135666",'"Le Ballet"',"Le Ballet_thumb.jpg",130,98,1);thumbnails[1688318]=new thumbnail(1688318,"113742",'"Apples"',"Apples_thumb.jpg",130,102,1);thumbnails[1688349]=new thumbnail(1688349,"113742",'"Buskers"',"BusKers_thumb.jpg",130,108,1);thumbnails[1688352]=new thumbnail(1688352,"113742",'"Christmas Table"',"Christmas_Table_thumb.jpg",130,98,1);thumbnails[5232481]=new thumbnail(5232481,"113742",'"Tree on The Green"',"tree_on_the_Green_thumb.jpg",130,98,1);thumbnails[3776854]=new thumbnail(3776854,"230359",'"The Corner Kick"',"The_corner_kick_edited-1_thumb.jpg",130,85,1);thumbnails[3776866]=new thumbnail(3776866,"230359",'Laxby Wheel"',"Laxby-wheel_thumb.jpg",130,98,1);thumbnails[3776871]=new thumbnail(3776871,"230359","The Salty, Teignmouth","The-Salty-Teignmouth_thumb.jpg",130,74,1);thumbnails[5906688]=new thumbnail(5906688,"230359",'"Winter Sun Rise"',"Winter-sun-rise_thumb.jpg",130,98,1);thumbnails[1541740]=new thumbnail(1541740,"105624",'"Drinks on Board"',"Drinks_on_Board_96_thumb.jpg",130,95,1);thumbnails[1541741]=new thumbnail(1541741,"105624",' "Just Cruising"',"Just_Cruising_98_thumb.jpg",130,95,1);thumbnails[1541742]=new thumbnail(1541742,"105624",'"Evening Sail"',"Evening_Sail_97_thumb.jpg",130,95,1);thumbnails[1541743]=new thumbnail(1541743,"105624",'"Broads at Dusk"',"Broads_at_Dusk_95_thumb.jpg",130,182,1);thumbnails[1544608]=new thumbnail(1544608,"105840",'"Fuschia"',"Fuschia_thumb.jpg",130,197,1);thumbnails[1544614]=new thumbnail(1544614,"105840",'"Candle Barrow"',"Candle barrow digital_thumb.jpg",130,195,1);thumbnails[1544619]=new thumbnail(1544619,"105840",'"Surfer"',"surfer_thumb.jpg",130,133,1);thumbnails[1544623]=new thumbnail(1544623,"105840",'"New Growth"',"New growth_thumb.jpg",130,184,1);thumbnails[1874977]=new thumbnail(1874977,"126049",'"Two Horse Race"',"Two-Horse-Race_thumb.jpg",130,87,1);thumbnails[1874983]=new thumbnail(1874983,"126049",'"Stage Fright"',"Stage_Fright_thumb.jpg",130,184,1);thumbnails[1874985]=new thumbnail(1874985,"126049",'"Curved Seat"',"Curved-Seat_thumb.jpg",130,195,1);thumbnails[5209756]=new thumbnail(5209756,"294046",'"Ella"',"Ella_final_print_BW_831_thumb.jpg",130,187,1);thumbnails[5210378]=new thumbnail(5210378,"294046","","Combe_Cellars_Sunset_8212_thumb.jpg",130,91,1);thumbnails[5210473]=new thumbnail(5210473,"294046",'"Notre Dame"',"2_Cathedral_copy_thumb.jpg",130,195,1);thumbnails[5210764]=new thumbnail(5210764,"294046",'"Vancover Vamp"',"Vancouver_Vamp_891_thumb.jpg",130,174,1);thumbnails[5210987]=new thumbnail(5210987,"294046",'"Rolling"',"Rolling_in_871_thumb.jpg",130,192,1);var galleries=new Object();galleries[149087]=new gallery(149087,"5739093,5731981,5731890,5700022,5626265,5582270,5416738,5398297,5258898,5235901","Competition Honours ","gallery",[3668922,3695437,4884603,4884606,4904414,5009001,5183776,5187624,5196507,5231252,5231287,5232527,5235901,5258898,5398297,5416738,5582270,5626265,5700022,5731890,5731981,5739093]);galleries[136602]=new gallery(136602,"6628460,6593370,6567275,6567274,6567271,6567270,6555487,5700104,1874979","WCPF Members Exhibition 2010","gallery",[1874979,5700104,6555487,6567270,6567271,6567274,6567275,6593370,6628460]);galleries[310011]=new gallery(310011,"3781574","Ken Bradley","gallery",[1544699,3314516,3781560,3781574]);galleries[106593]=new gallery(106593,"3106117","Ken Holland","gallery",[1555932,1556028,1832057,3106117]);galleries[107174]=new gallery(107174,"1588678","Jean King","gallery",[1546789,1546791,1588678,1588686]);galleries[105986]=new gallery(105986,"5553464","Ernie King","gallery",[1588663,1588669,5553174,5553464]);galleries[168071]=new gallery(168071,"3468933","John Thompson","gallery",[1691103,1691129,3217993,3468933]);galleries[283860]=new gallery(283860,"4435647","Byron Carnell","gallery",[4435647]);galleries[141067]=new gallery(141067,"5264019","Edward Crawford","gallery",[2120485,2121889,2123054,5264019]);galleries[221998]=new gallery(221998,"4454214","Roger Smart","gallery",[3630169,3630215,3630222,4454214,4811288]);galleries[106595]=new gallery(106595,"1556064","Shirley Boulton","gallery",[1556050,1556057,1556064,1556090]);galleries[105764]=new gallery(105764,"4732324","Richard Potts","gallery",[1543689,1543700,1543703,1862863,4732324]);galleries[300523]=new gallery(300523,"5337230","Jon Pitt","gallery",[5337225,5337230,5337243,5337267]);galleries[106594]=new gallery(106594,"1556126","Terry Boulton","gallery",[1556126,1957776,1957781,1957782]);galleries[135666]=new gallery(135666,"2025825","Tony Wilson","gallery",[2024035,2025825,2025827,2025831]);galleries[113742]=new gallery(113742,"1688352","Barbara Todd","gallery",[1688318,1688349,1688352,5232481]);galleries[230359]=new gallery(230359,"3776866","David Renhard","gallery",[3776854,3776866,3776871,5906688]);galleries[105624]=new gallery(105624,"1541742","Peter Sillifant","gallery",[1541740,1541741,1541742,1541743]);galleries[105840]=new gallery(105840,"1544619","Rosemary Bradley","gallery",[1544608,1544614,1544619,1544623]);galleries[126049]=new gallery(126049,"1874985,1874983,1874977","Paul Lawson","gallery",[1874977,1874983,1874985]);galleries[294046]=new gallery(294046,"5210473","Bob Clowes","gallery",[5209756,5210378,5210473,5210764,5210987]);var imageSets=new Object();imageSets[1]="6628460,6567275,6567274,6567271,6567270,6555487,5906688,5739093,5731981,5731890,5700104,5700022,5626265,5553464,5553174,5416738,5398297,5337267,5337243,5337230,5337225,5264019,5258898,5235901,5232527,5232481,5231287,5231252,5210987,5210764,5210473,5210378,5209756,5196507,5187624,5183776,5009001,4904414,4884606,4884603,4811288,4732324,4454214,4435647,3781574,3781560,3776871,3776866,3776854,3695437,3668922,3630222,3630215,3630169,3468933,3314516,3217993,3106117,2123054,2121889,2120485,2025831,2025827,2025825,2024035,1957782,1957781,1957776,1874985,1874983,1874979,1874977,1862863,1832057,1691129,1691103,1688352,1688349,1688318,1588686,1588678,1588669,1588663,1556126,1556090,1556064,1556057,1556050,1556028,1555932,1546791,1546789,1544699,1544623,1544619,1544614,1544608,1543703,1543700,1543689,1541743,1541742,1541741,1541740";imageSets[2]="5553464,5337230,5264019,5210473,4732324,4454214,3781574,3776866,3468933,3106117,2025825,1688352,1588678,1556126,1556064,1544619,1541742";imageSets[3]="6628460,6567275,6567274,6567271,6567270,6555487,5258898,5232481,5231287,5231252,5187624,5183776,5009001,4904414,4884606,4884603,4811288,4732324,4454214,4435647,3781574,3781560,3776871,3776866,3776854,3695437,3668922,3630222,3630215,3630169,3468933,3314516,3217993,3106117,2123054,2121889,2120485,2025831,2025827,2025825,2024035,1957782,1957781,1957776,1874985,1874983";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/Camera2007/images";break}switch(a){case 1:b="http://www1.clikpic.com/Camera2007/images";break}switch(a){case 2:b="http://admin.clikpic.com/Camera2007/images";break}switch(a){case 24:b="http://tpc15/clikpic/Camera2007/images";break}switch(a){case 4:b="http://www.clikchurch.com/Camera2007/images";break}switch(a){case 5:b="http://www2.clikpic.com/Camera2007/images";break}switch(a){case 22:b="http://tpc5/clikpic/Camera2007/images";break}switch(a){case 23:b="http://tpc10/clikpic/Camera2007/images";break}switch(a){case 25:b="http://tpc16/clikpic/Camera2007/images";break}switch(a){case 15:b="http://www3.clikpic.com/Camera2007/images";break}switch(a){case 18:b="http://www4.clikpic.com/Camera2007/images";break}switch(a){case 19:b="http://www5.clikpic.com/Camera2007/images";break}switch(a){case 31:b="http://www7.clikpic.com/Camera2007/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Camera2007/images";break}switch(a){case 33:b="http://www8.clikpic.com/Camera2007/images";break}switch(a){case 34:b="http://www9.clikpic.com/Camera2007/images";break}switch(a){case 35:b="http://admin3.clikpic.com/Camera2007/images";break}switch(a){case 37:b="http://admin4.clikpic.com/Camera2007/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="DAWLISH & TEIGNMOUTH CAMERA CLUB: "+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>"}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+'")'})}}};