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[3107459]=new thumbnail(3107459,"","reflective hoodie","checked hoodie web_thumb.JPG",130,151,5);thumbnails[3119237]=new thumbnail(3119237,"","","ebay less dpi_thumb.jpg",130,119,5);thumbnails[3119488]=new thumbnail(3119488,"","Childrens or small persons skull hoodie","skulls hoodie web_thumb.JPG",130,94,5);thumbnails[3183608]=new thumbnail(3183608,"","party dress- Harris academy 28/11/08","dress_thumb.jpg",130,174,5);thumbnails[3183648]=new thumbnail(3183648,"","Cycling zip-up- Harris Academy 28/11/08","deke front_thumb.jpg",130,208,5);thumbnails[3183650]=new thumbnail(3183650,"","Hoodie- Harris Academy 28/11/08","hoodie_thumb.jpg",130,98,5);thumbnails[3183654]=new thumbnail(3183654,"","Ribbon tee- Harris Academy 28/11/08","mail_thumb.jpg",130,174,5);thumbnails[3183666]=new thumbnail(3183666,"","Girls t-shirt- Harris Academy 28/11/08","tshirt_thumb.jpg",130,174,5);thumbnails[3183733]=new thumbnail(3183733,"","T-shirt hoodie- Harris Academy 28/11/08","t-shirt_thumb.jpg",130,174,5);thumbnails[3184066]=new thumbnail(3184066,"","","Anna_02_thumb.jpg",130,187,5);thumbnails[3213057]=new thumbnail(3213057,"","","n202900933_34465997_5054_thumb.jpg",130,179,5);thumbnails[3213062]=new thumbnail(3213062,"","","n202900933_34465987_1973_thumb.jpg",130,112,5);thumbnails[3213063]=new thumbnail(3213063,"","","n202900933_34466000_5978_thumb.jpg",130,86,5);thumbnails[3213065]=new thumbnail(3213065,"","","n202900933_34466010_9201_thumb.jpg",130,195,5);thumbnails[3213066]=new thumbnail(3213066,"","","n202900933_34466013_173_thumb.jpg",130,195,5);thumbnails[3213067]=new thumbnail(3213067,"","","n202900933_34466004_7243_thumb.jpg",130,165,5);thumbnails[3213068]=new thumbnail(3213068,"","","n202900933_34466006_7916_thumb.jpg",130,172,5);thumbnails[3213069]=new thumbnail(3213069,"","","n202900933_34466014_496_thumb.jpg",130,176,5);thumbnails[3223875]=new thumbnail(3223875,"","","GetAttachment2_thumb.jpg",130,176,5);thumbnails[3223878]=new thumbnail(3223878,"","My Lovely Cycling Dress","DRESS WEB_thumb.JPG",130,117,5);thumbnails[3245587]=new thumbnail(3245587,"","Leather Belt Bag","anna leather bag_thumb.jpg",130,69,5);thumbnails[3246716]=new thumbnail(3246716,"","Soft Airy Silk skirt","silk skirt_thumb.JPG",130,92,5);thumbnails[3261682]=new thumbnail(3261682,"","","alex bike web_thumb.JPG",130,174,5);thumbnails[3261741]=new thumbnail(3261741,"","","jo and alex chat web_thumb.JPG",130,96,5);thumbnails[3261755]=new thumbnail(3261755,"","","alex dress web_thumb.JPG",130,197,5);thumbnails[3261761]=new thumbnail(3261761,"","","stand alex and jo web_thumb.JPG",130,172,5);thumbnails[3261771]=new thumbnail(3261771,"","","jo alone web_thumb.JPG",130,197,5);thumbnails[3261778]=new thumbnail(3261778,"","","the gang_thumb.JPG",130,97,5);thumbnails[3383913]=new thumbnail(3383913,"","Riding to the event on a mountain bike, BMX and racer- no bike snobbery here!","n512357162_1861184_9515_thumb.jpg",130,98,5);thumbnails[3383917]=new thumbnail(3383917,"","Deke gunning it","n512357162_1861190_851_thumb.jpg",130,98,5);thumbnails[3383920]=new thumbnail(3383920,"","The crowd","n512357162_1861209_5833_thumb.jpg",130,98,5);thumbnails[3383929]=new thumbnail(3383929,"","Anna, wearing green t-shirt with purple and reflective circle embroidery","n512357162_1861213_6899_thumb.jpg",130,98,5);thumbnails[3383934]=new thumbnail(3383934,"","Anna, not caring how she looks anymore, and just wishing she could be carried off the bike","n512357162_1861228_1170_thumb.jpg",130,98,5);thumbnails[3383940]=new thumbnail(3383940,"","","n512357162_1861232_2379_thumb.jpg",130,98,5);thumbnails[3383943]=new thumbnail(3383943,"","team green","n512357162_1861239_4244_thumb.jpg",130,98,5);thumbnails[3383981]=new thumbnail(3383981,"","Cycles sirius","C-295028_thumb.jpg",130,190,5);thumbnails[3383983]=new thumbnail(3383983,"","cycles perfecta","mucha_cycles_thumb.jpg",130,186,5);thumbnails[3385309]=new thumbnail(3385309,"","","jan janssen_thumb.JPG",130,66,5);thumbnails[3385394]=new thumbnail(3385394,"","","awf_thumb.JPG",130,72,5);thumbnails[3385478]=new thumbnail(3385478,"","","awf 2_thumb.JPG",130,67,5);thumbnails[3390866]=new thumbnail(3390866,"207093","","PICT00102_thumb.JPG",130,173,5);thumbnails[3390917]=new thumbnail(3390917,"","Midnight blue poncho","PICT0002_thumb.JPG",130,98,5);thumbnails[3390921]=new thumbnail(3390921,"","Midnight blue poncho","PICT0010_thumb.JPG",130,173,5);thumbnails[3390925]=new thumbnail(3390925,"","Midnight blue poncho","PICT0014_thumb.JPG",130,98,5);thumbnails[3708789]=new thumbnail(3708789,"","","stall_web_thumb.JPG",130,92,5);thumbnails[3708792]=new thumbnail(3708792,"","","torch_web_thumb.JPG",130,97,5);thumbnails[3708795]=new thumbnail(3708795,"","","newton_web_thumb.JPG",130,97,5);thumbnails[3708796]=new thumbnail(3708796,"","","edgar_web_thumb.JPG",130,97,5);thumbnails[3708797]=new thumbnail(3708797,"","","clancy_web1_thumb.JPG",130,97,5);thumbnails[3708800]=new thumbnail(3708800,"","","Hayles_web_thumb.JPG",130,97,5);thumbnails[3962360]=new thumbnail(3962360,"","Ed Clark Jnr","ed_AN_web_thumb.jpg",130,106,5);thumbnails[3962366]=new thumbnail(3962366,"","","bikehood_web_thumb.JPG",130,192,5);thumbnails[3962370]=new thumbnail(3962370,"","Anna G","anna_bmx_web_thumb.jpg",130,98,5);thumbnails[3962376]=new thumbnail(3962376,"","Cousin Alex","alex20bike20web_thumb.jpg",130,174,5);thumbnails[3962399]=new thumbnail(3962399,"","Shannon","shannon_web_thumb.jpg",130,98,5);thumbnails[3962406]=new thumbnail(3962406,"","Camille Chalk","camille_thumb.jpg",130,86,5);thumbnails[3962412]=new thumbnail(3962412,"","Joe Plommer","joe_web_thumb.jpg",130,229,5);thumbnails[3996331]=new thumbnail(3996331,"207093","","_DSC1114_thumb.JPG",130,196,5);thumbnails[3996434]=new thumbnail(3996434,"","","_DSC0890_thumb.JPG",130,196,5);thumbnails[3996435]=new thumbnail(3996435,"","","_DSC0904_thumb.JPG",130,196,5);thumbnails[3996444]=new thumbnail(3996444,"","","_DSC0964_thumb.JPG",130,196,5);thumbnails[3996445]=new thumbnail(3996445,"","","_DSC0980_thumb.JPG",130,196,5);thumbnails[3996452]=new thumbnail(3996452,"207093","","shrug_thumb.JPG",130,194,5);thumbnails[3996460]=new thumbnail(3996460,"","","_DSC1095_thumb.JPG",130,196,5);thumbnails[3996461]=new thumbnail(3996461,"207093","","_DSC1119_thumb.JPG",130,196,5);thumbnails[4937530]=new thumbnail(4937530,"280968","The Curve","anna_red_jacket_thumb.JPG",130,104,5);thumbnails[4938025]=new thumbnail(4938025,"280968","The Curve rear","red_jacket_back_thumb.JPG",130,125,5);thumbnails[4938041]=new thumbnail(4938041,"280968","The Curve arm","red_jacket_arm_thumb.JPG",130,161,5);thumbnails[4938073]=new thumbnail(4938073,"280968","The Military Ruffle Jacket","military_ruffle_thumb.JPG",130,140,5);thumbnails[4938088]=new thumbnail(4938088,"280968","The Military Ruffle Rear","military_rufflerear_thumb.JPG",130,165,5);thumbnails[4938132]=new thumbnail(4938132,"280968","The Ruffle","military_rufflerear1_thumb.JPG",130,106,5);thumbnails[4938140]=new thumbnail(4938140,"280968","The Ruffle Detail","the_ruffle_detail_thumb.JPG",130,159,5);thumbnails[4938193]=new thumbnail(4938193,"280980","","DSCF0114_thumb.JPG",130,98,5);thumbnails[4938210]=new thumbnail(4938210,"280980","Rob Hayles ","robhayles_buckle_thumb.JPG",130,193,5);thumbnails[4938219]=new thumbnail(4938219,"280980","","DSCF0117_thumb.JPG",130,98,5);thumbnails[4938242]=new thumbnail(4938242,"280980","","DSCF0121_thumb.JPG",130,98,5);thumbnails[4940404]=new thumbnail(4940404,"241668","","redtrouser_garters_thumb.JPG",130,99,5);thumbnails[4940407]=new thumbnail(4940407,"280980","","blue_buckle_thumb.JPG",130,89,5);thumbnails[4940412]=new thumbnail(4940412,"280980","","blue_bucklehope_thumb.JPG",130,116,5);thumbnails[4940418]=new thumbnail(4940418,"280980","","blue_bucklespoke_thumb.JPG",130,98,5);thumbnails[4940422]=new thumbnail(4940422,"280980","","blue_buckleblack_thumb.JPG",130,104,5);thumbnails[4940425]=new thumbnail(4940425,"280980","","blue_bucklebelt_thumb.JPG",130,100,5);thumbnails[5243035]=new thumbnail(5243035,"207093","","reflective_cape_thumb.JPG",130,62,5);thumbnails[5243123]=new thumbnail(5243123,"207093","","reflective_cape2_thumb.JPG",130,87,5);thumbnails[5243263]=new thumbnail(5243263,"280968","Sky Blue Curve","Harrods2_thumb.JPG",130,228,5);thumbnails[5243271]=new thumbnail(5243271,"280968","Royal Blue","blue_curve_thumb.JPG",130,166,5);thumbnails[5393248]=new thumbnail(5393248,"356784","Health and Fitness for cyclists","cycling_weekly_001_thumb.jpg",130,179,5);thumbnails[5393249]=new thumbnail(5393249,"356784","Health and Fitness for cyclists","cycling_weekly_00212_thumb.jpg",130,179,5);thumbnails[5393256]=new thumbnail(5393256,"356784",'CTC\'s "Cycle"<br>\r\nin Best of Show',"cycling_weekly_003_thumb.jpg",130,179,5);thumbnails[5393261]=new thumbnail(5393261,"356784","Cycling Weekly<br>\r\nFamous Last Words","cycling_weekly_thumb.jpg",130,179,5);thumbnails[5393265]=new thumbnail(5393265,"356784","The National Guardian","guardian_words_thumb.JPG",130,116,5);thumbnails[5393270]=new thumbnail(5393270,"356784","The National Guardian","guardian_thumb.jpg",130,179,5);thumbnails[5393274]=new thumbnail(5393274,"356784","The London Metro<br>\r\nAnna wearing the midnight blue cape","metro_thumb.jpg",130,179,5);thumbnails[5393279]=new thumbnail(5393279,"356784","Amelia's Magazine<br>\r\n","Anna_22_jpgweb_4BCD4FBA-1D09-001F-99A8D7BBF119725F_thumb.jpg",130,108,5);thumbnails[5393389]=new thumbnail(5393389,"356784","Road.cc Review 8/10","roadcc_thumb.JPG",130,117,5);thumbnails[5393393]=new thumbnail(5393393,"356784","Road.cc Pick of the Show","roadcc_2_thumb.JPG",130,174,5);thumbnails[5393406]=new thumbnail(5393406,"356784","Bike Radar","bikeradar1_thumb.JPG",130,124,5);thumbnails[5393417]=new thumbnail(5393417,"356784","Bike Radar Women's round-up","2_thumb.JPG",130,123,5);thumbnails[5420259]=new thumbnail(5420259,"207093","","RBK_Hood_4191_thumb.jpg",130,100,5);thumbnails[5448769]=new thumbnail(5448769,"356784","CTC Cycle","ctc_mag_thumb.JPG",130,144,5);thumbnails[5453875]=new thumbnail(5453875,"356784",'LCC\'s "London Cyclist" interview',"metro_001_thumb.jpg",130,179,5);thumbnails[5560914]=new thumbnail(5560914,"315396","","GetAttachmentaspx_1_thumb.jpg",130,97,5);thumbnails[5560915]=new thumbnail(5560915,"315396","","GetAttachmentaspx_thumb.jpg",130,98,5);thumbnails[5560917]=new thumbnail(5560917,"315396","","GetAttachmentaspx_3_thumb.jpg",130,94,5);thumbnails[5560918]=new thumbnail(5560918,"315396","","GetAttachmentaspx_4_thumb.jpg",130,97,5);thumbnails[5574309]=new thumbnail(5574309,"315396","","black_n_gold_brierly_thumb.JPG",130,96,5);thumbnails[5574312]=new thumbnail(5574312,"315396","","black_n_gold_brierlyfront_thumb.JPG",130,114,5);thumbnails[5705787]=new thumbnail(5705787,"315396","","bat_tape_thumb.JPG",130,111,5);thumbnails[5836274]=new thumbnail(5836274,"356784","SurfGirl Mag Review","surfgirl_thumb.jpg",130,114,5);thumbnails[6473983]=new thumbnail(6473983,"241668","","pink_head_scarf_thumb.jpg",130,87,5);thumbnails[6473985]=new thumbnail(6473985,"241668","","black_head_scarf_thumb.jpg",130,87,5);thumbnails[6473986]=new thumbnail(6473986,"241668","","blue_head_scarf_thumb.jpg",130,87,5);thumbnails[6473999]=new thumbnail(6473999,"315396","","brierley_bike_thumb.jpg",130,98,5);thumbnails[6474002]=new thumbnail(6474002,"315396","","flower_bike_thumb.jpg",130,173,5);thumbnails[6474414]=new thumbnail(6474414,"241668","","trouser_guard_thumb.jpg",130,151,5);thumbnails[6474430]=new thumbnail(6474430,"356784","Cooler Mag June 2010","cooler_thumb.jpg",130,183,5);thumbnails[6474434]=new thumbnail(6474434,"356784","Cooler Mag June 2010","cooler2_thumb.jpg",130,183,5);thumbnails[3261791]=new thumbnail(3261791,"190735","","jo cheeky_thumb.JPG",130,196,5);thumbnails[3996346]=new thumbnail(3996346,"190735","","_DSC0679_thumb.JPG",130,196,5);thumbnails[3996347]=new thumbnail(3996347,"190735","","_DSC0758_thumb.JPG",130,196,5);thumbnails[3996360]=new thumbnail(3996360,"190735","","Bec_thumb.JPG",130,89,5);thumbnails[3996365]=new thumbnail(3996365,"190735","","_DSC0700_thumb.JPG",130,196,5);thumbnails[3996408]=new thumbnail(3996408,"190735","","_DSC0729_thumb.JPG",130,196,5);thumbnails[3996426]=new thumbnail(3996426,"190735","","_DSC0861_thumb.JPG",130,196,5);thumbnails[3996439]=new thumbnail(3996439,"190735","","_DSC0937_thumb.JPG",130,196,5);thumbnails[3996446]=new thumbnail(3996446,"190735","","_DSC0993_thumb.JPG",130,196,5);thumbnails[3996448]=new thumbnail(3996448,"190735","","_DSC1007_thumb.JPG",130,196,5);thumbnails[3996454]=new thumbnail(3996454,"190738","","_DSC1083_thumb.JPG",130,86,5);thumbnails[3996455]=new thumbnail(3996455,"190738","","_DSC1085_thumb.JPG",130,196,5);thumbnails[3996456]=new thumbnail(3996456,"190738","","_DSC1087_thumb.JPG",130,86,5);thumbnails[3996457]=new thumbnail(3996457,"190738","","_DSC1091_thumb.JPG",130,196,5);thumbnails[3996459]=new thumbnail(3996459,"190738","","_DSC1093_thumb.JPG",130,86,5);thumbnails[3996254]=new thumbnail(3996254,"201424","","black_beads_thumb.jpg",130,86,5);thumbnails[3996266]=new thumbnail(3996266,"201424","","dice_thumb.jpg",130,195,5);thumbnails[3996270]=new thumbnail(3996270,"201424","","green_yellow_thumb.jpg",130,86,5);thumbnails[3996273]=new thumbnail(3996273,"201424","","skull_thumb.jpg",130,86,5);thumbnails[3996279]=new thumbnail(3996279,"201424","","star_thumb.jpg",130,86,5);thumbnails[3996288]=new thumbnail(3996288,"201424","","brcalet_thumb.jpg",130,195,5);thumbnails[3996295]=new thumbnail(3996295,"201424","","link_braclet_thumb.jpg",130,86,5);thumbnails[3996298]=new thumbnail(3996298,"201424","","mens_thumb.jpg",130,87,5);thumbnails[3996304]=new thumbnail(3996304,"201424","","necklace_thumb.jpg",130,86,5);thumbnails[4365934]=new thumbnail(4365934,"201424","","red_and_blue_earring_thumb.JPG",130,154,5);thumbnails[4365946]=new thumbnail(4365946,"201424","","chain_link_stud_thumb.JPG",130,127,5);thumbnails[3391150]=new thumbnail(3391150,"207114","High-heeled SPDs!!","PICT0024_thumb.JPG",130,98,5);thumbnails[4088188]=new thumbnail(4088188,"207114","","GetAttachment_thumb.jpg",130,97,5);var galleries=new Object();galleries[241668]=new gallery(241668,"6474414,6473986,6473985,6473983,4940404","Accessories","gallery",[4940404,6473983,6473985,6473986,6474414]);galleries[280980]=new gallery(280980,"4938193","Belt Buckles","gallery",[4938193,4938210,4938219,4938242,4940407,4940412,4940418,4940422,4940425]);galleries[315396]=new gallery(315396,"6474002,6473999,5705787,5574312,5574309,5560918,5560917,5560915,5560914","Brierley","section368351",[5560914,5560915,5560917,5560918,5574309,5574312,5705787,6473999,6474002]);galleries[280968]=new gallery(280968,"4937530","jackets","gallery",[4937530,4938025,4938041,4938073,4938088,4938132,4938140,5243263,5243271]);galleries[207093]=new gallery(207093,"5420259,3996331","Outer wear","gallery",[3390866,3996331,3996452,3996461,5243035,5243123,5420259]);galleries[356784]=new gallery(356784,"6474434,6474430,5836274,5453875,5448769,5393417,5393406,5393393,5393389,5393279","Press","section245038",[5393248,5393249,5393256,5393261,5393265,5393270,5393274,5393279,5393389,5393393,5393406,5393417,5448769,5453875,5836274,6474430,6474434]);galleries[190735]=new gallery(190735,"3996347","T-Shirts","gallery",[3261791,3996346,3996347,3996360,3996365,3996408,3996426,3996439,3996446,3996448]);galleries[190738]=new gallery(190738,"3996455","Lovelock","gallery",[3996454,3996455,3996456,3996457,3996459]);galleries[201424]=new gallery(201424,"3996266","Jewellery","gallery",[3996254,3996266,3996270,3996273,3996279,3996288,3996295,3996298,3996304,4365934,4365946]);galleries[207114]=new gallery(207114,"4088188,3391150","In Progress...","gallery",[3391150,4088188]);var imageSets=new Object();imageSets[1]="6473985";imageSets[2]="5420259,4938193,4937530,3996455,3996347,3996331,3996266,3245587,3223878";imageSets[3]="6474434,6474430,6474414,6474002,6473999,6473986,6473985,6473983,5836274,5705787,5574312,5574309,5560918,5560917,5560915,5560914,5453875,5448769,5420259,5393417,5393406,5393393,5393389,5393279,5393274,5393270,5393265,5393261,5393256,5393249,5393248,5243271,5243263,5243123,5243035,4940425,4940422,4940418,4940412,4940407,4940404,4938242,4938219,4938210,4938193,4938140,4938132,4938088,4938073,4938041";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/annag/images";break}switch(a){case 1:b="http://www1.clikpic.com/annag/images";break}switch(a){case 2:b="http://admin.clikpic.com/annag/images";break}switch(a){case 24:b="http://tpc15/clikpic/annag/images";break}switch(a){case 4:b="http://www.clikchurch.com/annag/images";break}switch(a){case 5:b="http://www2.clikpic.com/annag/images";break}switch(a){case 22:b="http://tpc5/clikpic/annag/images";break}switch(a){case 23:b="http://tpc10/clikpic/annag/images";break}switch(a){case 25:b="http://tpc16/clikpic/annag/images";break}switch(a){case 15:b="http://www3.clikpic.com/annag/images";break}switch(a){case 18:b="http://www4.clikpic.com/annag/images";break}switch(a){case 19:b="http://www5.clikpic.com/annag/images";break}switch(a){case 31:b="http://www7.clikpic.com/annag/images";break}switch(a){case 32:b="http://admin2.clikpic.com/annag/images";break}switch(a){case 33:b="http://www8.clikpic.com/annag/images";break}switch(a){case 34:b="http://www9.clikpic.com/annag/images";break}switch(a){case 35:b="http://admin3.clikpic.com/annag/images";break}switch(a){case 37:b="http://admin4.clikpic.com/annag/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="Ladies cycle clothing: "+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>"}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="ANNAG">';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(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+'")'})}}};