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[3834215]=new thumbnail(3834215,"233376","Summer Rally 2009","P7200033_thumb.JPG",130,98,1);thumbnails[3834265]=new thumbnail(3834265,"233376","Roadchasers Summer Rally 2009","P7200034_thumb.JPG",130,98,1);thumbnails[3834275]=new thumbnail(3834275,"233376","Roadchasers Summer Rally 2009","P7200035_thumb.JPG",130,98,1);thumbnails[3834294]=new thumbnail(3834294,"233376","Come On Pimmer Lets Rock This Place.........","P7200036_thumb.JPG",130,98,1);thumbnails[3834361]=new thumbnail(3834361,"233376","Let The Games Begin....","P7200040_thumb.JPG",130,98,1);thumbnails[3834370]=new thumbnail(3834370,"233376","Put It Away!!!!!!!!!!!!","P7200041_thumb.JPG",130,98,1);thumbnails[3834395]=new thumbnail(3834395,"233376","Where Am I........","P7200042_thumb.JPG",130,98,1);thumbnails[3834414]=new thumbnail(3834414,"233376","There's No Where To Hide Boys.....","P7200043_thumb.JPG",130,98,1);thumbnails[3834430]=new thumbnail(3834430,"233376","A Small Refreshment Lads....","P7200044_thumb.JPG",130,98,1);thumbnails[3834453]=new thumbnail(3834453,"233376","Keep Going, Were Not Finished With You Yet!!!","P7200045_thumb.JPG",130,98,1);thumbnails[3834460]=new thumbnail(3834460,"233376","Go Luke Go...............","P7200046_thumb.JPG",130,98,1);thumbnails[3834471]=new thumbnail(3834471,"233376","More Victims..........","P7200047_thumb.JPG",130,98,1);thumbnails[3834475]=new thumbnail(3834475,"233376","Through The Hoop....","P7200048_thumb.JPG",130,98,1);thumbnails[3834589]=new thumbnail(3834589,"233376","Put A Can Of Strongbow Out For Fish And Look What Happens...","P7200049_thumb.JPG",130,98,1);thumbnails[3834609]=new thumbnail(3834609,"233376","No Sharing Now Phil..","P7200051_thumb.JPG",130,98,1);thumbnails[3834620]=new thumbnail(3834620,"233376","Fish Wins!!!!!","P7200052_thumb.JPG",130,98,1);thumbnails[3845802]=new thumbnail(3845802,"233376","And There Of....Where To Im Not Sure But There Going....","_MG_9902_thumb.jpg",130,87,1);thumbnails[3845825]=new thumbnail(3845825,"233376","Ready, Set & Drink...................","_MG_9839_thumb.jpg",130,87,1);thumbnails[4221770]=new thumbnail(4221770,"178235","The Roadchasers And MAD At Chesham Carnival 2009 ","4811_1154148206336_1006598179_30483388_4397696_n1_thumb.jpg",130,87,1);thumbnails[4221773]=new thumbnail(4221773,"178235","Ratty At Chesham Carnival 2009 ","4811_1154148406341_1006598179_30483393_5705363_n1_thumb.jpg",130,195,1);thumbnails[1304752]=new thumbnail(1304752,"","Roadchasers","logo 3d flat 600 web_thumb.jpg",130,121,1);thumbnails[2855882]=new thumbnail(2855882,"177664","Animal<br>\r\nPresident","_MG_4220_thumb.jpg",130,195,1);thumbnails[2856054]=new thumbnail(2856054,"177665","Air Ambulance Presentation At The Waggon & Horses Public House Chesham.","Air Ambulace Presentation1_thumb.jpg",130,159,1);thumbnails[2967883]=new thumbnail(2967883,"178235","Jungle <br>\r\nIs this the right way?? Who No's !!","Jungle Jim_thumb.JPG",130,98,1);thumbnails[2855210]=new thumbnail(2855210,"177664","Ratty<br>\r\nVice President","_MG_4226_thumb.jpg",130,195,1);thumbnails[2915214]=new thumbnail(2915214,"177665","The Legionnaires Party 2008<br>\r\nThere's a first for everything Animal!!","Legionnaires Party Sept 2008 001 Test_thumb.JPG",130,173,1);thumbnails[2967888]=new thumbnail(2967888,"178235","Some Of The Mentals, Only Aloud Out For The Day!!!","Some of the Mentals!!_thumb.JPG",130,98,1);thumbnails[2855194]=new thumbnail(2855194,"177664","Carol<br>\r\nSecretary & Treasurer","_MG_4208_thumb.jpg",130,195,1);thumbnails[2915225]=new thumbnail(2915225,"177665","The Legionnaires Party 2008<br>\r\nRoo with a bear on his head!!","Legionnaires Party Sept 2008 007_thumb.jpg",130,173,1);thumbnails[2967892]=new thumbnail(2967892,"178235","Animals Wasted Again !!","Aminal Wasted!!_thumb.JPG",130,98,1);thumbnails[2855202]=new thumbnail(2855202,"177664","Dave<br>\r\nRoad Captain","_MG_4238_thumb.jpg",130,195,1);thumbnails[2856071]=new thumbnail(2856071,"177665","Southend Runout Aborted, Only Made The A41!!!<br>\r\nBack To The Waggon For Breakfast Then.","Aborted rideout Easter Monday 24 03 08 003_thumb.jpg",130,98,1);thumbnails[2967898]=new thumbnail(2967898,"178235","Bob The Worm's Grave :-(<br>\r\nOh How We Will Miss Him x","Bob The Worm_thumb.JPG",130,98,1);thumbnails[2855213]=new thumbnail(2855213,"177664","Zoe","_MG_4263_thumb.jpg",130,195,1);thumbnails[2856134]=new thumbnail(2856134,"177665","Southend Run Aborted!!!","Aborted rideout Easter Monday 24 03 08 001_thumb.jpg",130,98,1);thumbnails[2967902]=new thumbnail(2967902,"178235","Ben Standing Guard Of The Penthouses.","Ben 1_thumb.JPG",130,98,1);thumbnails[2855207]=new thumbnail(2855207,"177664","Jungle","_MG_4189_thumb.jpg",130,195,1);thumbnails[2865615]=new thumbnail(2865615,"177665","Zoe's Mum got a big surprise for her birthday when The Roadchasers went to visit.","Mum's Birthday Bikers_thumb.JPG",130,97,1);thumbnails[2967930]=new thumbnail(2967930,"178235","You Can Wear It Like This ...............","Ben 2_thumb.JPG",130,98,1);thumbnails[2855179]=new thumbnail(2855179,"177664","Ben<br>\r\n","_MG_4252_thumb.jpg",130,195,1);thumbnails[2915349]=new thumbnail(2915349,"177665","The Legionnaires Party 2008<br>\r\nWatch those hands Mr President!!","Legionnaires Party Sept 2008 008_thumb.JPG",130,97,1);thumbnails[2967932]=new thumbnail(2967932,"178235","Or This.................","Ben 3_thumb.JPG",130,98,1);thumbnails[2967952]=new thumbnail(2967952,"178235","What A Bride ......","Jim_thumb.JPG",130,98,1);thumbnails[2855230]=new thumbnail(2855230,"177664","Charly","_MG_4244_thumb.jpg",130,195,1);thumbnails[2915489]=new thumbnail(2915489,"177665","The Legionnaires Party 2008. Zoe & Ratty with Best Bike Award For Ratty's Streetfighter.","Legionnaires Party Sept 2008 011_thumb.JPG",130,97,1);thumbnails[2967970]=new thumbnail(2967970,"178235","Bosted Bladder 2008","Bosted Bladder Rally18-20th April 001_thumb.jpg",130,98,1);thumbnails[2855227]=new thumbnail(2855227,"177664","Chris","_MG_4230_thumb.jpg",130,195,1);thumbnails[2915494]=new thumbnail(2915494,"177665","The Legionnaires Party 2008. Carol keeping warm in Ratty's hat.","Legionnaires Party Sept 2008 012_thumb.JPG",130,97,1);thumbnails[2915500]=new thumbnail(2915500,"177665","The Legionnaires Party 2008. <br>\r\nZoe & Kat.","zoe and kat leigionares_thumb.jpg",130,97,1);thumbnails[2967975]=new thumbnail(2967975,"178235","Ratty & Charly<br>\r\nBosted Bladder 2008","Bosted Bladder Rally18-20th April 006_thumb.jpg",130,98,1);thumbnails[2855228]=new thumbnail(2855228,"177664","Steve","_MG_4257_thumb.jpg",130,195,1);thumbnails[2967978]=new thumbnail(2967978,"178235","Ben & Zoe<br>\r\nBosted Bladder 2008","Bosted Bladder Rally18-20th April 008_thumb.jpg",130,98,1);thumbnails[4274008]=new thumbnail(4274008,"177665","Jester Receiving His Full Members Patch From Animal At The Waggon & Horses On 8/7/2009.","P9260040_thumb.JPG",130,98,1);thumbnails[2967988]=new thumbnail(2967988,"178235","Ratty & Zoe<br>\r\nEnjoying The Bosted Bladder 2008.","Bosted Bladder Rally18-20th April 011_thumb.jpg",130,98,1);thumbnails[3013298]=new thumbnail(3013298,"177664","Jester","_MG_4196_thumb.jpg",130,195,1);thumbnails[4619954]=new thumbnail(4619954,"177665","Kinky receiving his full members patch from Animal At The Waggon & Horses","PA170043_thumb.JPG",130,98,1);thumbnails[2855225]=new thumbnail(2855225,"177664","Steve","Steve_thumb.jpg",130,121,1);thumbnails[2968061]=new thumbnail(2968061,"178235","Morning Carol ..<br>\r\nDrink Drop & Doss 2007.","Drink Drop and Doss September 2007 016_thumb.jpg",130,98,1);thumbnails[4619960]=new thumbnail(4619960,"177665","Pinky receiving her full members patch from Animal At The Waggon & Horses","PA170044_thumb.JPG",130,98,1);thumbnails[2967972]=new thumbnail(2967972,"178235","Albert At Bosted Bladder 2008.","Bosted Bladder Rally18-20th April 004_thumb.jpg",130,173,1);thumbnails[4746477]=new thumbnail(4746477,"177664","Pinky","Pinky_thumb.jpg",130,98,1);thumbnails[5198295]=new thumbnail(5198295,"177665","Bam-Bam receiving his full members patch from ratty at the waggon & horses","bam_bam_made_up_to_full_patch_thumb.jpg",130,100,1);thumbnails[2968017]=new thumbnail(2968017,"178235","Animal At The Bosted Bladder 2008.","Bosted Bladder Rally18-20th April 012_thumb.jpg",130,173,1);thumbnails[4746483]=new thumbnail(4746483,"177664","Kinky","Kinky_thumb.jpg",130,98,1);thumbnails[5497700]=new thumbnail(5497700,"177665","Foxy receiving his full members patch from Animal at the waggon & horses<br>\r\n<br>\r\n","004_thumb.JPG",130,98,1);thumbnails[2968043]=new thumbnail(2968043,"178235","Dave At Rally.","Dave At Rally_thumb.jpg",130,173,1);thumbnails[4746485]=new thumbnail(4746485,"177664","Foxy","Foxy_thumb.jpg",130,98,1);thumbnails[5513275]=new thumbnail(5513275,"177665","Jimbo receiving his full members patch from Ratty at the waggon & horses ","03022010078_thumb.jpg",130,98,1);thumbnails[2968046]=new thumbnail(2968046,"178235","Animal & Carol <br>\r\nAt Drink Drop & Doss 2007","Drink Drop and Doss September 2007 006_thumb.jpg",130,98,1);thumbnails[4746491]=new thumbnail(4746491,"177664","Bam-Bam","Bam_Bam_thumb.jpg",130,98,1);thumbnails[5513283]=new thumbnail(5513283,"177665","Caspa receiving his full members patch from Animal at the waggon & horses ","03022010079_thumb.jpg",130,98,1);thumbnails[2967987]=new thumbnail(2967987,"178235","Charly's Belly Button After Having It Pierced At The Bosted Bladder 2008.","Bosted Bladder Rally18-20th April 010_thumb.jpg",130,98,1);thumbnails[4221759]=new thumbnail(4221759,"178235","Southend 2009","Southend_2009_thumb.JPG",130,98,1);thumbnails[5010106]=new thumbnail(5010106,"177664","Caspa ","Caspa_thumb.jpg",130,173,1);thumbnails[2968057]=new thumbnail(2968057,"178235","Ben On Guitar At Drink Drop & Doss 2007.","Drink Drop and Doss September 2007 015_thumb.jpg",130,173,1);thumbnails[3845789]=new thumbnail(3845789,"233376","Don't Waste Any Now!!","_MG_9951_thumb.jpg",130,195,1);thumbnails[5010111]=new thumbnail(5010111,"177664","Jimbo ","Jimbo_thumb.jpg",130,173,1);thumbnails[2855254]=new thumbnail(2855254,"177664","Chicken","Chicken_thumb.jpg",130,121,1);thumbnails[2968049]=new thumbnail(2968049,"178235","Sleeping Beauty At Drink Drop & Doss 2007","Drink Drop and Doss September 2007 008_thumb.jpg",130,173,1);thumbnails[3845795]=new thumbnail(3845795,"233376","How Sick Is Jester Feeling.............","_MG_9914_thumb.jpg",130,195,1);thumbnails[2855264]=new thumbnail(2855264,"177664","Tess<br>\r\n","Tess_thumb.jpg",130,121,1);thumbnails[3800994]=new thumbnail(3800994,"178235","Evil Found Himself A New Bike At Bum In The Mud 2009!!","P2240001_thumb.JPG",130,98,1);thumbnails[3845829]=new thumbnail(3845829,"233376","They Don't Call Him Fish For Nothing....LOL","_MG_9777_thumb.jpg",130,195,1);thumbnails[3801004]=new thumbnail(3801004,"178235","He Even Test Rode It And Found It Rides Better Than His Own....................","P2240002_thumb.JPG",130,173,1);thumbnails[3834301]=new thumbnail(3834301,"233376","Ben Looking Very Cool","P7200038_thumb.JPG",130,173,1);thumbnails[3801016]=new thumbnail(3801016,"178235","The New Bike Draws In A Crowd..","P2240003_thumb.JPG",130,98,1);thumbnails[3845863]=new thumbnail(3845863,"233376","Pink Dave... Not Really Your Colour!!","_MG_9718_thumb.jpg",130,195,1);thumbnails[3801024]=new thumbnail(3801024,"178235","Ben At Bum In The Mud 2009","P2240007_thumb.JPG",130,98,1);thumbnails[3845875]=new thumbnail(3845875,"233376","Drunk Every Drop!!!!!!","_MG_9733_thumb.jpg",130,195,1);thumbnails[3845882]=new thumbnail(3845882,"233376","Oh No Big Balls......","_MG_0205_thumb.jpg",130,195,1);thumbnails[3845908]=new thumbnail(3845908,"233376","Go Gangster Go.......","_MG_0193_thumb.jpg",130,195,1);thumbnails[3845965]=new thumbnail(3845965,"233376","Jester Thinks The Hat Will Help With The Bounce.....","_MG_0171_thumb.jpg",130,195,1);thumbnails[3845967]=new thumbnail(3845967,"233376","Jungle Jim Was Giving It His All........","_MG_0055_thumb.jpg",130,195,1);thumbnails[3845969]=new thumbnail(3845969,"233376","That's Your Own Team Mate Jungle, Get The Other One!!!!!","_MG_0184_thumb.jpg",130,195,1);thumbnails[3845971]=new thumbnail(3845971,"233376","Colin Has His Own Way Of Dealing with His Big Balls..........","_MG_0117_thumb.jpg",130,195,1);thumbnails[3845974]=new thumbnail(3845974,"233376","Mr Happy...","_MG_0067_thumb.jpg",130,195,1);thumbnails[3845977]=new thumbnail(3845977,"233376","It's Head To Head And The Tensions In The Air...","_MG_0158_thumb.jpg",130,195,1);thumbnails[3845990]=new thumbnail(3845990,"233376","He Man Is Back Again.....","_MG_0101_thumb.jpg",130,195,1);thumbnails[3845991]=new thumbnail(3845991,"233376","It's Supposed To Be The Other Way Round... You Need To Ride The Ball....","_MG_0054_thumb.jpg",130,87,1);thumbnails[3845995]=new thumbnail(3845995,"233376","Jester Is The Original Duracell Bunny.....","_MG_0183_thumb.jpg",130,87,1);thumbnails[3846000]=new thumbnail(3846000,"233376","Close Knockings.................","_MG_0131_thumb.jpg",130,87,1);thumbnails[3846010]=new thumbnail(3846010,"233376","Fish & Sam Get A Hip Flask Full Of Goodies For Winning The Drinking Games, Well Done Lads You Done Us Proud...","_MG_0224_thumb.jpg",130,87,1);thumbnails[3846012]=new thumbnail(3846012,"233376","Gangster & Jester Won A Hip Flask Full Of Goodies For Wining The Space Hoppers Races. Well Done Boys You Did Good.....","_MG_0227_thumb.jpg",130,87,1);thumbnails[3846083]=new thumbnail(3846083,"233376","Our Old Mate Pimmer Get's A Little Something From The Roadchasers To Say Thank You For Being An Absolute Star And Being Our DJ For The Weekend. Thanks Again Pimmer.","_MG_0328_thumb.jpg",130,87,1);thumbnails[3846088]=new thumbnail(3846088,"233376","DJ Pimmer And His Mad Gold But That Didn't Stay Full For Long ........","_MG_0334_thumb.jpg",130,195,1);thumbnails[3846093]=new thumbnail(3846093,"233376","Zoe Gives Out The Trophy To The Winner Of The Best Streetfighter.","_MG_0277_thumb.jpg",130,195,1);thumbnails[3846096]=new thumbnail(3846096,"233376","Evil Presents Ontow With His Trophy For Hardest Ridden Bike.","_MG_0282_thumb.jpg",130,195,1);thumbnails[3013313]=new thumbnail(3013313,"233376","Aminal Presents The Trophy For Best Classic Bike","_MG_0287_thumb.jpg",130,195,1);thumbnails[3013315]=new thumbnail(3013315,"233376","Chris Presents The Trophy For Best Peoples Choice Bike","_MG_0296_thumb.jpg",130,195,1);thumbnails[2967946]=new thumbnail(2967946,"233376","Jester Presents The Legionnaires With The Trophy For Furthest Travelled ","_MG_0301_thumb.jpg",130,195,1);thumbnails[4019849]=new thumbnail(4019849,"233376","Ratty Presents The Fuel Burners With The Trophy For Best Turn Out Club.","_MG_0317_thumb.jpg",130,87,1);var galleries=new Object();galleries[177665]=new gallery(177665,"5513283,5513275,5497700,5198295,4619960,4619954,4274008,2915500,2915494,2915489","Gallery 1","section220876",[2856054,2915214,2915225,2856071,2856134,2865615,2915349,2915489,2915494,2915500,4274008,4619954,4619960,5198295,5497700,5513275,5513283]);galleries[178235]=new gallery(178235,"4221773,4221770,4221759,3801024,3801016,3801004,3800994,2968061,2968057,2968049","Gallery 2","section221591",[4221770,4221773,2967883,2967888,2967892,2967898,2967902,2967930,2967932,2967952,2967970,2967975,2967978,2967988,2968061,2967972,2968017,2968043,2968046,2967987,4221759,2968057,2968049,3800994,3801004,3801016,3801024]);galleries[177664]=new gallery(177664,"5010111,5010106,4746491,4746485,4746483,4746477,3013298,2855882,2855264,2855254","Members","section220874",[2855882,2855210,2855194,2855202,2855213,2855207,2855179,2855230,2855227,2855228,3013298,2855225,4746477,4746483,4746485,4746491,5010106,5010111,2855254,2855264]);galleries[233376]=new gallery(233376,"4019849,3846096,3846093,3846088,3846083,3846012,3846010,3846000,3845995,3845991","Rally Photos","section284717",[3834215,3834265,3834275,3834294,3834361,3834370,3834395,3834414,3834430,3834453,3834460,3834471,3834475,3834589,3834609,3834620,3845802,3845825,3845789,3845795,3845829,3834301,3845863,3845875,3845882,3845908,3845965,3845967,3845969,3845971,3845974,3845977,3845990,3845991,3845995,3846000,3846010,3846012,3846083,3846088,3846093,3846096,3013313,3013315,2967946,4019849]);var imageSets=new Object();imageSets[1]="1304752";imageSets[3]="5513283,5513275,5497700,5198295,5010111,5010106,4746491,4746485,4746483,4746477,4619960,4619954,4274008,4221773,4221770,4221759,4019849,3846096,3846093,3846088,3846083,3846012,3846010,3846000,3845995,3845991,3845990,3845977,3845974,3845971,3845969,3845967,3845965,3845908,3845882,3845875,3845863,3845829,3845825,3845802,3845795,3845789,3834620,3834609,3834589,3834475,3834471,3834460,3834453,3834430";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/roadchases/images";break}switch(a){case 1:b="http://www1.clikpic.com/roadchases/images";break}switch(a){case 2:b="http://admin.clikpic.com/roadchases/images";break}switch(a){case 24:b="http://tpc15/clikpic/roadchases/images";break}switch(a){case 4:b="http://www.clikchurch.com/roadchases/images";break}switch(a){case 5:b="http://www2.clikpic.com/roadchases/images";break}switch(a){case 22:b="http://tpc5/clikpic/roadchases/images";break}switch(a){case 23:b="http://tpc10/clikpic/roadchases/images";break}switch(a){case 25:b="http://tpc16/clikpic/roadchases/images";break}switch(a){case 15:b="http://www3.clikpic.com/roadchases/images";break}switch(a){case 18:b="http://www4.clikpic.com/roadchases/images";break}switch(a){case 19:b="http://www5.clikpic.com/roadchases/images";break}switch(a){case 31:b="http://www7.clikpic.com/roadchases/images";break}switch(a){case 32:b="http://admin2.clikpic.com/roadchases/images";break}switch(a){case 33:b="http://www8.clikpic.com/roadchases/images";break}switch(a){case 34:b="http://www9.clikpic.com/roadchases/images";break}switch(a){case 35:b="http://admin3.clikpic.com/roadchases/images";break}switch(a){case 37:b="http://admin4.clikpic.com/roadchases/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("section220874"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section220874.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("section220874"!=""){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="Roadchasers: "+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+'")'})}}};