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[3042168]=new thumbnail(3042168,"","","XPB_05XNKLD0T39EV405AG0010Z508E8_HiRes_thumb.jpg",130,87,5);thumbnails[4640850]=new thumbnail(4640850,"267758","Bernie Ecclestone","ARH_5601_web_thumb.jpg",130,87,5);thumbnails[4640851]=new thumbnail(4640851,"267758","Scuderia Ferrari","ARH_5611_web_thumb.jpg",58,87,5);thumbnails[4640853]=new thumbnail(4640853,"267758","Giancarlo Fisichella (ITA), Force India F1 Team ","ARH_5818_web_thumb.jpg",130,87,5);thumbnails[4640856]=new thumbnail(4640856,"267758","Giancarlo Fisichella (ITA), Force India F1 Team ","ARH_6094_web4_thumb.jpg",130,87,5);thumbnails[4640857]=new thumbnail(4640857,"267758","Luca Badoer (ITA), Scuderia Ferrari ","ARH_6347_web1_thumb.jpg",130,87,5);thumbnails[4640858]=new thumbnail(4640858,"267758","Nico Rosberg (GER), WilliamsF1 Team ","HRA_4401_web_thumb.jpg",130,87,5);thumbnails[4640861]=new thumbnail(4640861,"267758","Heikki Kovalainen (FIN), McLaren Mercedes ","HRA_4412_web_thumb.jpg",130,87,5);thumbnails[4640863]=new thumbnail(4640863,"267758","Jaime Alguersuari (ESP), Scuderia Toro Rosso","HRA_4932_web_thumb.jpg",130,87,5);thumbnails[4640865]=new thumbnail(4640865,"267758","Sebastian Vettel (GER), Red Bull Racing ","HRA_5418_web_thumb.jpg",130,87,5);thumbnails[4640868]=new thumbnail(4640868,"267758","Rubens Barrichello (BRA), BrawnGP ","HRA_5469_web_thumb.jpg",130,87,5);thumbnails[4640869]=new thumbnail(4640869,"267758","Giancarlo Fisichella (ITA), Force India F1 Team ","HRA_5560_web_thumb.jpg",130,87,5);thumbnails[4640871]=new thumbnail(4640871,"267758","Podium","HRA_6034_web1_thumb.jpg",130,87,5);thumbnails[4808525]=new thumbnail(4808525,"274970","","HRA_6245_thumb.jpg",130,87,5);thumbnails[5107727]=new thumbnail(5107727,"287569","","ARH_3241_thumb.jpg",130,87,5);thumbnails[5107728]=new thumbnail(5107728,"287569","","ARH_3680_thumb.jpg",130,87,5);thumbnails[5107729]=new thumbnail(5107729,"287569","","ARH_3878_thumb.jpg",130,87,5);thumbnails[5400042]=new thumbnail(5400042,"287569","","ARH_4054_thumb.jpg",130,87,5);thumbnails[5400047]=new thumbnail(5400047,"287569","","ARH_4355_thumb.jpg",130,87,5);thumbnails[5400048]=new thumbnail(5400048,"287569","","HRA_2803_thumb.jpg",130,87,5);thumbnails[5400049]=new thumbnail(5400049,"287569","","HRA_3327_thumb.jpg",130,87,5);thumbnails[5400051]=new thumbnail(5400051,"287569","","HRA_3700_thumb.jpg",130,87,5);thumbnails[5400052]=new thumbnail(5400052,"287569","","HRA_3717_thumb.jpg",130,87,5);thumbnails[5400053]=new thumbnail(5400053,"287569","","HRA_3999_thumb.jpg",130,87,5);thumbnails[5400061]=new thumbnail(5400061,"287569","","HRA_40252_thumb.jpg",130,87,5);thumbnails[5400063]=new thumbnail(5400063,"287569","","HRA_4037_thumb.jpg",130,87,5);thumbnails[5400065]=new thumbnail(5400065,"287569","","HRA_4086_thumb.jpg",130,87,5);thumbnails[5433742]=new thumbnail(5433742,"307104","","HA136396_thumb.jpg",130,87,5);thumbnails[5433817]=new thumbnail(5433817,"307104","","HA136574_thumb.jpg",130,87,5);thumbnails[5433820]=new thumbnail(5433820,"307104","","HA136634_thumb.jpg",130,87,5);thumbnails[5433821]=new thumbnail(5433821,"307104","","HA136874_thumb.jpg",130,87,5);thumbnails[5456463]=new thumbnail(5456463,"307104","","0201_ANDY_HONE_062_thumb.jpg",130,87,5);thumbnails[5456465]=new thumbnail(5456465,"307104","","0202_ANDY_HONE_052_thumb.jpg",130,87,5);thumbnails[5456466]=new thumbnail(5456466,"307104","","0203_ANDY_HONE_031_thumb.jpg",130,87,5);thumbnails[5456470]=new thumbnail(5456470,"307104","","0203_ANDY_HONE_052_thumb.jpg",130,87,5);thumbnails[5456472]=new thumbnail(5456472,"307104","","0203_ANDY_HONE_057_thumb.jpg",130,87,5);thumbnails[5498753]=new thumbnail(5498753,"307104","","HRA_9213_thumb.jpg",130,87,5);thumbnails[5580454]=new thumbnail(5580454,"307104","","HRA_9650_thumb.jpg",130,87,5);thumbnails[5580458]=new thumbnail(5580458,"307104","","ARH_0049_thumb.jpg",130,87,5);thumbnails[5580460]=new thumbnail(5580460,"307104","","ARH_9928_thumb.jpg",130,87,5);thumbnails[5580462]=new thumbnail(5580462,"307104","","ARH_9959_thumb.jpg",130,87,5);thumbnails[5580474]=new thumbnail(5580474,"307104","","HRA_1101_thumb.jpg",130,87,5);thumbnails[5580485]=new thumbnail(5580485,"307104","","HRA_9321_thumb.jpg",130,87,5);thumbnails[3580965]=new thumbnail(3580965,"218902","Robert Kubica, F1 Testing","AH135046_thumb.jpg",130,87,5);thumbnails[3544443]=new thumbnail(3544443,"218902","Felipe Massa, F1 Testing","AH134942_thumb.jpg",130,87,5);thumbnails[4165488]=new thumbnail(4165488,"248473","","ARH_0919_thumb.jpg",130,87,5);thumbnails[4640831]=new thumbnail(4640831,"267758","Scuderia Toro Rosso, Bodywork","ARH_3946_web_thumb.jpg",130,87,5);thumbnails[4808504]=new thumbnail(4808504,"274970","","ARH_6659_thumb.jpg",130,87,5);thumbnails[3580972]=new thumbnail(3580972,"218902","Timo Glock, F1 Testing","HA135883_thumb.jpg",130,87,5);thumbnails[3544460]=new thumbnail(3544460,"218902","Nico Rosberg, F1 Testing","web_thumb.jpg",130,87,5);thumbnails[4165489]=new thumbnail(4165489,"248473","","r_ARH_2779_thumb.jpg",130,87,5);thumbnails[4640838]=new thumbnail(4640838,"267758","","ARH_4273_web_thumb.jpg",58,87,5);thumbnails[4808514]=new thumbnail(4808514,"274970","","ARH_7816_thumb.jpg",130,87,5);thumbnails[3581011]=new thumbnail(3581011,"218902","Fernando Alonso, F1 Testing","HA136033_thumb.jpg",130,87,5);thumbnails[4165456]=new thumbnail(4165456,"248473","","r_HRA_3492_thumb.jpg",130,87,5);thumbnails[3575469]=new thumbnail(3575469,"218902","Jarno Trulli, Toyota","HA136708_thumb.jpg",130,87,5);thumbnails[4165448]=new thumbnail(4165448,"248473","","r_ARH_1108_thumb.jpg",130,87,5);thumbnails[4640845]=new thumbnail(4640845,"267758","","ARH_4762_web_thumb.jpg",130,87,5);thumbnails[4808516]=new thumbnail(4808516,"274970","","ARH_7817_thumb.jpg",130,87,5);thumbnails[3581023]=new thumbnail(3581023,"218902","Sebastien Bourdais, Scuderia Toro Rosso","HA135981_thumb.jpg",130,87,5);thumbnails[3580865]=new thumbnail(3580865,"218902","Sebastian Vettel, F1 Testing","HA135776_thumb.jpg",130,79,5);thumbnails[3575473]=new thumbnail(3575473,"218902","Robert Kubica, BMW Sauber","HA136921_thumb.jpg",130,87,5);thumbnails[4165450]=new thumbnail(4165450,"248473","","r_ARH_2389_thumb.jpg",130,87,5);thumbnails[4808528]=new thumbnail(4808528,"274970","","HRA_6663_thumb.jpg",130,87,5);thumbnails[3581002]=new thumbnail(3581002,"218902","Lewis Hamilton, F1 Testing","HA136986_thumb.jpg",130,87,5);thumbnails[3575470]=new thumbnail(3575470,"218902","Timo Glock, Toyota","HA136630_thumb.jpg",130,87,5);thumbnails[4165452]=new thumbnail(4165452,"248473","","r_ARH_3276_thumb.jpg",130,87,5);thumbnails[4808509]=new thumbnail(4808509,"274970","","ARH_7019_thumb.jpg",130,87,5);thumbnails[4808579]=new thumbnail(4808579,"274970","","HRA_71341_thumb.jpg",130,87,5);thumbnails[4165454]=new thumbnail(4165454,"248473","","r_HRA_2700_thumb.jpg",130,87,5);thumbnails[3575472]=new thumbnail(3575472,"218902","Sebastien Buemi, Toro Rosso","HA136816_thumb.jpg",130,82,5);thumbnails[4165453]=new thumbnail(4165453,"248473","","r_ARH_3331_thumb.jpg",130,87,5);thumbnails[4640841]=new thumbnail(4640841,"267758","","ARH_4370_web_thumb.jpg",130,87,5);thumbnails[4808510]=new thumbnail(4808510,"274970","","ARH_7475_thumb.jpg",130,87,5);thumbnails[4808527]=new thumbnail(4808527,"274970","","HRA_6338_thumb.jpg",130,87,5);thumbnails[4808507]=new thumbnail(4808507,"274970","","ARH_6775_thumb.jpg",130,87,5);thumbnails[4165457]=new thumbnail(4165457,"248473","","r_HRA_3785_thumb.jpg",130,87,5);thumbnails[4808666]=new thumbnail(4808666,"274970","","HRA_6875_thumb.jpg",130,87,5);thumbnails[4165458]=new thumbnail(4165458,"248473","","r_HRA_3809_thumb.jpg",130,87,5);thumbnails[4808518]=new thumbnail(4808518,"274970","","ARH_8065_thumb.jpg",130,87,5);thumbnails[4165459]=new thumbnail(4165459,"248473","","r_HRA_3925_thumb.jpg",130,87,5);thumbnails[4808523]=new thumbnail(4808523,"274970","","HRA_6215_thumb.jpg",130,87,5);thumbnails[4165460]=new thumbnail(4165460,"248473","","r_HRA_4091_thumb.jpg",130,87,5);thumbnails[4808600]=new thumbnail(4808600,"274970","","HRA_6577_thumb.jpg",130,87,5);thumbnails[4808530]=new thumbnail(4808530,"274970","","HRA_6766_thumb.jpg",130,87,5);thumbnails[4808534]=new thumbnail(4808534,"274970","","HRA_6913_thumb.jpg",130,87,5);thumbnails[4808536]=new thumbnail(4808536,"274970","","HRA_7831_thumb.jpg",130,87,5);thumbnails[4808520]=new thumbnail(4808520,"274970","","ARH_9081_thumb.jpg",130,87,5);thumbnails[3042188]=new thumbnail(3042188,"187071","Jarno Trulli - Spanish Grand Prix","ANDY_HONE_01_thumb.jpg",130,87,5);thumbnails[3042474]=new thumbnail(3042474,"187071","Heikki Kovalainen, Hungarian Grand Prix","ANDY_HONE_25_preview_thumb.jpg",130,87,5);thumbnails[3042207]=new thumbnail(3042207,"187071","Kimi Raikkonen - Monaco Grand Prix","ANDY_HONE_26_thumb.jpg",130,87,5);thumbnails[3042524]=new thumbnail(3042524,"187071","Start of the Race, Turkish Grand Prix","ANDY_HONE_35_preview_thumb.jpg",130,87,5);thumbnails[3042308]=new thumbnail(3042308,"187071","Fernando Alonso, European Grand Prix","ANDY_HONE_39_thumb.jpg",130,87,5);thumbnails[3042385]=new thumbnail(3042385,"187071","Barcelona Sunset, F1 Testing","andy_hone_33_preview_thumb.jpg",130,87,5);thumbnails[3042418]=new thumbnail(3042418,"187071","David Coulthard, Brazilian Grand Prix","XPB_0HP0GZL0Q3B81S0F3Y41T0TUGA68_HiRes_thumb.jpg",130,87,5);thumbnails[3042211]=new thumbnail(3042211,"187071","Sebastian Vettel - Canadian Grand Prix","XPB_0V4D69S0S6PUV40EVX3B503GBP1D_HiRes_thumb.jpg",130,87,5);thumbnails[3042432]=new thumbnail(3042432,"187071","Nick Heidfeld, Singapore Grand Prix","ANDY_HONEb_33_thumb.jpg",130,87,5);thumbnails[3042442]=new thumbnail(3042442,"187071","Fire Marshall, Monaco Grand Prix","ANDY_HONE_46_thumb.jpg",130,87,5);thumbnails[3042449]=new thumbnail(3042449,"187071","Kimi Raikkonen, Spanish Grand Prix","ANDY_HONE_47_preview_thumb.jpg",130,87,5);thumbnails[3042461]=new thumbnail(3042461,"187071","Barcelona Sunrise, F1 Testing","ANDY_HONE_22_preview_thumb.jpg",130,87,5);thumbnails[3042196]=new thumbnail(3042196,"187071","Heikki Kovalainen - Turkish Grand Prix","ANDY_HONE_12_thumb.jpg",130,87,5);thumbnails[3042710]=new thumbnail(3042710,"187071","Felipe Massa, Turkish Grand Prix","ANDY_HONE_41_thumb.jpg",130,87,5);thumbnails[3042498]=new thumbnail(3042498,"187071","Kazuki Nakajima, Japanese Grand Prix","XPB_0RPTEDC0CO82V505F8MPT0V5PBWG_HiRes_thumb.jpg",130,87,5);thumbnails[3042217]=new thumbnail(3042217,"187071","Scuderia Ferrari","ANDY_HONE_14_thumb.jpg",130,87,5);thumbnails[3046568]=new thumbnail(3046568,"187071","Fernando Alonso, Italian Grand Prix","AH131750_thumb.jpg",58,87,5);thumbnails[3042525]=new thumbnail(3042525,"187071","David Coulthard, F1 Testing","XPB_0C0YI9T03W98CH0CUCLJ50L8K4G0_HiRes_thumb.jpg",130,87,5);thumbnails[3042538]=new thumbnail(3042538,"187071","Sebastian Vettel, F1 Testing","XPB_0WG5MDC0HPS7410S0Y8W00PI9YIO_HiRes_thumb.jpg",130,87,5);thumbnails[3042543]=new thumbnail(3042543,"187071","Kazuki Nakajima, F1 Testing","ANDY_HONE_231_thumb.jpg",130,87,5);thumbnails[3042553]=new thumbnail(3042553,"187071","Fernando Alonso, Singapore Grand Prix","XPB_0DUKGZL05XQUM901Y77Y90EY7S01_HiRes_thumb.jpg",130,87,5);thumbnails[3042609]=new thumbnail(3042609,"187071","Nico Rosberg, Malaysian Grand Prix","XPB_0Q6HRB40HSUFI80LS2KCG002IWHT_HiRes_thumb.jpg",130,87,5);thumbnails[3042613]=new thumbnail(3042613,"187071","Kimi Raikkonen, French Grand Prix","XPB_0AUCM4H0309EO10STSKXS04CYP35_HiRes_thumb.jpg",130,83,5);thumbnails[3042509]=new thumbnail(3042509,"187071","Jenson Button, F1 Testing","XPB_01BGJ9D0U3SHS0030K2GX0ASQBK1_HiRes_thumb.jpg",130,87,5);thumbnails[3042603]=new thumbnail(3042603,"187071","Lewis Hamilton, Monaco Grand Prix","ANDY_HONE_36_thumb.jpg",130,87,5);thumbnails[3046598]=new thumbnail(3046598,"187426","Alexandre Premat, DTM, Brands Hatch","ANDY_HONE_40_preview_thumb.jpg",130,87,5);thumbnails[3046600]=new thumbnail(3046600,"187426","Start of the Race, A1GP, Durban","ANDY_HONE_37_preview_thumb.jpg",130,87,5);thumbnails[3046603]=new thumbnail(3046603,"187426","Jeroen Bleekemolen, Porsche Supercup","ANDY_HONE_09_preview_thumb.jpg",130,87,5);thumbnails[3046605]=new thumbnail(3046605,"187426","Danny Watts, Porsche Supercup","ANDY_HONE_44_preview_thumb.jpg",130,87,5);thumbnails[3043852]=new thumbnail(3043852,"187072","Stuart Pearce, England U21 vs Wales U21","AH139962_thumb.jpg",130,87,5);thumbnails[3043856]=new thumbnail(3043856,"187072","Thomas Sorenson, Stoke City vs Tottenham Hotspur","SPT_STOKE_SPURS_006_thumb.jpg",130,87,5);thumbnails[3043863]=new thumbnail(3043863,"187072","Joey Barton, Sunderland vs Newcastle United","SPT_SUNDERLAND_NEWCASTLE_019_thumb.jpg",130,87,5);thumbnails[3043878]=new thumbnail(3043878,"187072","Andy Murray, Davis Cup Tennis, Great Britain vs Austria","ANDY_HONE_30_thumb.jpg",130,87,5);thumbnails[3043887]=new thumbnail(3043887,"187072","Valeri Bojinov, Manchester City vs AC Milan","ANDY_HONE_45_thumb.jpg",130,87,5);thumbnails[3045787]=new thumbnail(3045787,"187072","Newcastle Fans, Sunderland vs Newcastle United","HA131598_thumb.jpg",130,87,5);thumbnails[3334884]=new thumbnail(3334884,"187072","Carlos Tevez, Manchester United vs Aalborg","ANDY_HONE_24_thumb.jpg",130,87,5);var galleries=new Object();galleries[218902]=new gallery(218902,"3581023,3581011,3581002,3580972,3580965,3580865,3575473,3575472,3575470,3575469"," Formula 1 - 09 - Pre Season","gallery",[3580965,3544443,3580972,3544460,3581011,3575469,3581023,3580865,3575473,3581002,3575470,3575472]);galleries[307103]=new gallery(307103,"5580485,5580474,5580462,5580460,5580458,5580454,5498753,5456472,5456470,5456466","2010","gallery",[]);galleries[307104]=new gallery(307104,"5580485,5580474,5580462,5580460,5580458,5580454,5498753,5456472,5456470,5456466","Formula 1 - 2010 Pre-Season","gallery",[5433742,5433817,5433820,5433821,5456463,5456465,5456466,5456470,5456472,5498753,5580454,5580458,5580460,5580462,5580474,5580485]);galleries[267758]=new gallery(267758,"4640871,4640869,4640868,4640865,4640863,4640861,4640858,4640857,4640856,4640853","Formula 1 - Belgian Grand Prix","gallery",[4640850,4640851,4640853,4640856,4640857,4640858,4640861,4640863,4640865,4640868,4640869,4640871,4640831,4640838,4640845,4640841]);galleries[248473]=new gallery(248473,"4165489,4165488,4165460,4165459,4165458,4165457,4165456,4165454,4165453,4165452","Formula 1 - British Grand Prix","gallery",[4165488,4165489,4165456,4165448,4165450,4165452,4165454,4165453,4165457,4165458,4165459,4165460]);galleries[274970]=new gallery(274970,"4808666,4808600,4808579,4808536,4808534,4808530,4808528,4808527,4808525,4808523","Formula 1 - Italian Grand Prix","gallery",[4808525,4808504,4808514,4808516,4808528,4808509,4808579,4808510,4808527,4808507,4808666,4808518,4808523,4808600,4808530,4808534,4808536,4808520]);galleries[287569]=new gallery(287569,"5400065,5400063,5400061,5400053,5400052,5400051,5400049,5400048,5400047,5400042","Williams F1 / Philips Driving Academy","gallery",[5107727,5107728,5107729,5400042,5400047,5400048,5400049,5400051,5400052,5400053,5400061,5400063,5400065]);galleries[187067]=new gallery(187067,"3334884,3046605,3046603,3046600,3046598,3046568,3045787,3043887,3043878,3043863","2008","gallery",[]);galleries[217043]=new gallery(217043,"5400065,5400063,5400061,5400053,5400052,5400051,5400049,5400048,5400047,5400042","2009","gallery",[]);galleries[187071]=new gallery(187071,"3046568,3042710,3042613,3042609,3042603,3042553,3042543,3042538,3042525,3042524","Formula 1 - 08","gallery",[3042188,3042474,3042207,3042524,3042308,3042385,3042418,3042211,3042432,3042442,3042449,3042461,3042196,3042710,3042498,3042217,3046568,3042525,3042538,3042543,3042553,3042609,3042613,3042509,3042603]);galleries[187426]=new gallery(187426,"3046605,3046603,3046600,3046598","Motorsport","gallery",[3046598,3046600,3046603,3046605]);galleries[187072]=new gallery(187072,"3334884,3045787,3043887,3043878,3043863,3043856,3043852","Other Sport","gallery",[3043852,3043856,3043863,3043878,3043887,3045787,3334884]);var imageSets=new Object();imageSets[1]="4808536,3580865,3042418,3042385";imageSets[3]="5580485,5580474,5580462,5580460,5580458,5580454,5498753,5456472,5456470,5456466,5456465,5456463,5433821,5433820,5433817,5433742,5400065,5400063,5400061,5400053,5400052,5400051,5400049,5400048,5400047,5400042,5107729,5107728,5107727,4808666,4808600,4808579,4808536,4808534,4808530,4808528,4808527,4808525,4808523,4808520,4808518,4808516,4808514,4808510,4808509,4808507,4808504,4640871,4640869,4640868";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/andy_hone/images";break}switch(a){case 1:b="http://www1.clikpic.com/andy_hone/images";break}switch(a){case 2:b="http://admin.clikpic.com/andy_hone/images";break}switch(a){case 24:b="http://tpc15/clikpic/andy_hone/images";break}switch(a){case 4:b="http://www.clikchurch.com/andy_hone/images";break}switch(a){case 5:b="http://www2.clikpic.com/andy_hone/images";break}switch(a){case 22:b="http://tpc5/clikpic/andy_hone/images";break}switch(a){case 23:b="http://tpc10/clikpic/andy_hone/images";break}switch(a){case 25:b="http://tpc16/clikpic/andy_hone/images";break}switch(a){case 15:b="http://www3.clikpic.com/andy_hone/images";break}switch(a){case 18:b="http://www4.clikpic.com/andy_hone/images";break}switch(a){case 19:b="http://www5.clikpic.com/andy_hone/images";break}switch(a){case 31:b="http://www7.clikpic.com/andy_hone/images";break}switch(a){case 32:b="http://admin2.clikpic.com/andy_hone/images";break}switch(a){case 33:b="http://www8.clikpic.com/andy_hone/images";break}switch(a){case 34:b="http://www9.clikpic.com/andy_hone/images";break}switch(a){case 35:b="http://admin3.clikpic.com/andy_hone/images";break}switch(a){case 37:b="http://admin4.clikpic.com/andy_hone/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="Andrew Hone, Sports Photographer: "+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+'")'})}}};