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[2781850]=new thumbnail(2781850,"145167","Cuauhtemoc Yards","DSC_8041a-Cuauhtemoc-yards_thumb.jpg",130,195,18);thumbnails[2781856]=new thumbnail(2781856,"145167","Mir","DSC_8089-Mir_thumb.jpg",130,88,18);thumbnails[2781898]=new thumbnail(2781898,"145167","Mir","DSC_8100a-Mir_thumb.jpg",130,88,18);thumbnails[2781904]=new thumbnail(2781904,"145167","Astrid","DSC_8118a-Astrid_thumb.jpg",130,185,18);thumbnails[2781907]=new thumbnail(2781907,"145167","Capitan Miranda","DSC_8143-Capitan-Miranda_thumb.jpg",130,87,18);thumbnails[2781924]=new thumbnail(2781924,"145167","Alexander Von Humbolt","DSC_8150a-AVH_thumb.jpg",130,91,18);thumbnails[2781928]=new thumbnail(2781928,"145167","Shabab Oman","DSC_8255-Shabab-Oman_thumb.jpg",130,194,18);thumbnails[2781957]=new thumbnail(2781957,"145167","Challenger 1 and 2","DSC_8264a-Challeneger-1-and_thumb.jpg",130,87,18);thumbnails[2781963]=new thumbnail(2781963,"145167","Sedov","DSC_8274a-Sedov-2_thumb.jpg",130,88,18);thumbnails[2781991]=new thumbnail(2781991,"145167","Mir and Sedov","DSC_8308a-Mir-and-Sedov_thumb.jpg",130,87,18);thumbnails[2782023]=new thumbnail(2782023,"145167","Shabab Oman ","DSC_8366a-Shabab-leading_thumb.jpg",130,88,18);thumbnails[2782037]=new thumbnail(2782037,"145167","Alexander Von Humbolt away !","DSC_8439-AVH-2_thumb.jpg",130,87,18);thumbnails[2782137]=new thumbnail(2782137,"145167","Sedov","DSC_8286-Sedov1_thumb.jpg",130,89,18);thumbnails[1340196]=new thumbnail(1340196,"186349","Arti & Matt","Arti-&-Matt-1_thumb.jpg",130,194,18);thumbnails[529705]=new thumbnail(529705,"186349","All tied up !","m+t-dressing1_thumb.jpg",130,86,18);thumbnails[555053]=new thumbnail(555053,"186349","Girls and bubbles","girls-&-bubbles3_thumb.jpg",130,135,18);thumbnails[523789]=new thumbnail(523789,"186349","The happy couple","F+C1_thumb.jpg",130,98,18);thumbnails[554770]=new thumbnail(554770,"186349","F&C 10","Fleur-on-stairs-web1_thumb.jpg",130,173,18);thumbnails[2815806]=new thumbnail(2815806,"145167","Cuauhtemoc","DSC_8182-Photo-Filter-Cuaha1_thumb.jpg",130,86,18);thumbnails[2815941]=new thumbnail(2815941,"145167","Pelican","DSC_8130-PelicaN_thumb.jpg",130,88,18);thumbnails[2709438]=new thumbnail(2709438,"","w Rescue 1","SLSGB-DSC_5580_thumb.jpg",130,86,18);thumbnails[2944887]=new thumbnail(2944887,"128434","Fun Girls","Girls-1_thumb.jpg",130,181,18);thumbnails[1915374]=new thumbnail(1915374,"128434","Fashion Shoot","Fashion-Shoot-1_thumb.jpg",130,194,18);thumbnails[1994318]=new thumbnail(1994318,"128434","Dog Agility 1","DG-dog-agility-1_thumb.jpg",130,98,18);thumbnails[2283433]=new thumbnail(2283433,"128434","Girls 1","Event-1-girls_thumb.jpg",130,86,18);thumbnails[2944889]=new thumbnail(2944889,"128434","007s ??","Guys-007_thumb.jpg",130,86,18);thumbnails[3421010]=new thumbnail(3421010,"128434","","DSC_9647a Rotary 1_thumb.jpg",130,93,18);thumbnails[2360285]=new thumbnail(2360285,"128434","Relay For Life St Agnes","Relay-for-Life-St-Agnes---S_thumb.jpg",130,86,18);thumbnails[2382630]=new thumbnail(2382630,"128434","Portreath Surf Life Saving Club 50th","Portreath-3_thumb.jpg",130,86,18);thumbnails[2366646]=new thumbnail(2366646,"128434","Portreath Surf Life Saving Club","Portreath-1_thumb.jpg",130,86,18);thumbnails[2366660]=new thumbnail(2366660,"128434","Portreath Surf Life Saving Club","Portreath-2_thumb.jpg",130,86,18);thumbnails[2692979]=new thumbnail(2692979,"170021","Mens Board Rescue 1 22/08/08","DSC_5371-M-Board-Rescue-1_thumb.jpg",130,89,18);thumbnails[2692982]=new thumbnail(2692982,"170021","Womens Board 1","DSC_5375-W-Board-5375_thumb.jpg",130,86,18);thumbnails[2693347]=new thumbnail(2693347,"170021","Surf Boat 1","DSC_5930-Surf-Boat-1_thumb.jpg",130,61,18);thumbnails[2692958]=new thumbnail(2692958,"170021","Mens Ski 21/08/08","DSC_4626-Mens-Ski-2_thumb.jpg",130,85,18);thumbnails[2745957]=new thumbnail(2745957,"170021","U19 Mens Flags","DSC_7316-U19-M-Flags_thumb.jpg",130,86,18);thumbnails[2745958]=new thumbnail(2745958,"170021","Mens Relay","DSC_5892-Sprints-M-ds_thumb.jpg",130,108,18);thumbnails[2746196]=new thumbnail(2746196,"170021","Womens Board","DSC_5403-W-Board_thumb.jpg",130,86,18);thumbnails[4543244]=new thumbnail(4543244,"170021","2009 SLSGB Youth Champions - Woolacombe","DSC_9962a_Woolacombe_Group_thumb.jpg",130,91,18);thumbnails[2750718]=new thumbnail(2750718,"170021","Saunton Surfer","DSC_5564-Saunton_thumb.jpg",130,86,18);thumbnails[3027687]=new thumbnail(3027687,"40473","Mandy & Jon - Look","MJ-Look_thumb.jpg",130,194,18);thumbnails[3027689]=new thumbnail(3027689,"40473","Mandy & Jon Happy<br>\r\n","MJ-Happy_thumb.jpg",130,195,18);thumbnails[3027691]=new thumbnail(3027691,"40473","Mandy & Jon Jump","MJ-Jump_thumb.jpg",130,86,18);thumbnails[3027692]=new thumbnail(3027692,"40473","Mandy & Jon Crew1<br>\r\n","MJ-Crew-1_thumb.jpg",130,86,18);thumbnails[3027693]=new thumbnail(3027693,"40473","Mandy & Jon Crew2","MJ-Crew2_thumb.jpg",130,195,18);thumbnails[3027694]=new thumbnail(3027694,"40473","Mandy & Jon Crew3","MJ-Crew3_thumb.jpg",130,86,18);thumbnails[3027695]=new thumbnail(3027695,"40473","Mandy & Jon Crew4","MJ-Crew4_thumb.jpg",130,195,18);thumbnails[3027696]=new thumbnail(3027696,"40473","Mandy & Jon Lifeboat1","MJ-Lifeboat1_thumb.jpg",130,195,18);thumbnails[3027698]=new thumbnail(3027698,"40473","Mandy & Jon Lifeboat2","MJ-Lifeboat2_thumb.jpg",130,86,18);thumbnails[3027699]=new thumbnail(3027699,"40473","Mandy & Jon Family1","MJ-Family_thumb.jpg",130,86,18);thumbnails[3027700]=new thumbnail(3027700,"40473","Mandy & Jon Pals1","MJ-Pals1_thumb.jpg",130,86,18);thumbnails[3027705]=new thumbnail(3027705,"40473","Mandy & Jon Pals2","MJ-Girls1_thumb.jpg",130,86,18);thumbnails[3027706]=new thumbnail(3027706,"40473","Mandy & Jon Mums and Dads","MJ-Mums-and-Dads_thumb.jpg",130,86,18);thumbnails[3027707]=new thumbnail(3027707,"40473","Mandy & Jon + Dad","MJ-+-Dad_thumb.jpg",130,130,18);thumbnails[3027688]=new thumbnail(3027688,"40473","Mandy & Jon Church","MJ-Church-1_thumb.jpg",130,87,18);thumbnails[1650083]=new thumbnail(1650083,"111485","Glass Paperweight","Light-tent-4_thumb.jpg",130,130,18);thumbnails[2002798]=new thumbnail(2002798,"111485","Dress 2 back detail<br>\r\n","Bird-Sample-Dress-Back-Deta_thumb.jpg",130,87,18);thumbnails[2002805]=new thumbnail(2002805,"111485","Knitted toy","Bird-Sample-Knitted-Toy_thumb.jpg",130,87,18);thumbnails[2002808]=new thumbnail(2002808,"111485",'"Welly"',"Bird-Sample-Welly_thumb.jpg",130,87,18);thumbnails[1658284]=new thumbnail(1658284,"73666","Saguaro detail","Saguaro-arm_thumb.jpg",130,87,18);thumbnails[1781590]=new thumbnail(1781590,"73666","Red Tow Truck","Red-tow-truck_thumb.jpg",130,87,18);thumbnails[1781632]=new thumbnail(1781632,"73666","Monument Valley sunrise","Monument-Valley-1_thumb.jpg",130,87,18);thumbnails[2110998]=new thumbnail(2110998,"73666","Monument to a Navajo","Monument-to-a-Navajo_thumb.jpg",130,87,18);thumbnails[1608325]=new thumbnail(1608325,"73666","Sedona 1","Gifts-DeeGee-2_thumb.jpg",130,102,18);thumbnails[1608327]=new thumbnail(1608327,"73666","Sedona 3","Gifts-DeeGee-3_thumb.jpg",130,102,18);thumbnails[1608346]=new thumbnail(1608346,"73666","Sedona 6","Gifts-DeeGee-6_thumb.jpg",130,194,18);thumbnails[1608360]=new thumbnail(1608360,"73666","Sedona 8","Gifts-DeeGee-8_thumb.jpg",130,180,18);thumbnails[1608361]=new thumbnail(1608361,"73666","Sedona 9","Gifts-DeeGee-9_thumb.jpg",130,87,18);thumbnails[1608380]=new thumbnail(1608380,"73666","Sedona 11","Gifts-DeeGee-11_thumb.jpg",130,87,18);thumbnails[1622039]=new thumbnail(1622039,"73666","Long Canyon Panoramic","Gifts-Long-Canyon-Pan2_thumb.jpg",130,33,18);thumbnails[1608387]=new thumbnail(1608387,"73666","Antelope Canyon 1","Antelope-1_thumb.jpg",130,87,18);thumbnails[1608391]=new thumbnail(1608391,"73666","Antelope Canyon 2","Antelope-2_thumb.jpg",130,194,18);thumbnails[1695939]=new thumbnail(1695939,"73666","Grand Canyon Dawn 2","Grand-Canyon-Dawn2_thumb.jpg",130,88,18);thumbnails[1695983]=new thumbnail(1695983,"73666","Grand Canyon View 1","Grand-Canyon-View_thumb.jpg",130,89,18);thumbnails[1055754]=new thumbnail(1055754,"73666","Monument Valley 2","Monument-2_thumb.jpg",130,87,18);thumbnails[1055756]=new thumbnail(1055756,"73666","Bryce  1","Bryce-1_thumb.jpg",130,87,18);thumbnails[980337]=new thumbnail(980337,"73666","Saguaro 3","Tonto-Saguaro-3_thumb.jpg",130,194,18);thumbnails[980339]=new thumbnail(980339,"73666","The Weaver's Needle 1","Weaver's-Needle---Tonto_thumb.jpg",130,194,18);thumbnails[980378]=new thumbnail(980378,"73666","Saguaro Skeleton","Saguaro-skeleton1_thumb.jpg",130,194,18);thumbnails[2192705]=new thumbnail(2192705,"43789","910a","Clark-DSC_0910a1_thumb.jpg",130,195,18);thumbnails[2192861]=new thumbnail(2192861,"43789","1051","Clark-DSC_1051_thumb.jpg",130,195,18);thumbnails[2207272]=new thumbnail(2207272,"43789","978","Clark-DSC_0978_thumb.jpg",130,86,18);thumbnails[2207372]=new thumbnail(2207372,"43789","992","Clark-DSC_0992_thumb.jpg",130,195,18);thumbnails[2207411]=new thumbnail(2207411,"43789","1006","Clark-DSC_1006_thumb.jpg",130,85,18);thumbnails[2207413]=new thumbnail(2207413,"43789","1020","Clark-DSC_1020_thumb.jpg",130,86,18);thumbnails[2207509]=new thumbnail(2207509,"43789","1049","Clark-DSC_1049_thumb.jpg",130,195,18);thumbnails[1650437]=new thumbnail(1650437,"43789","Katy 2","Katy-2_thumb.jpg",130,87,18);thumbnails[2426988]=new thumbnail(2426988,"43789","Daydreaming","Roya_thumb.jpg",130,194,18);thumbnails[1649529]=new thumbnail(1649529,"43789","Katy 1","Katy-1_thumb.jpg",130,87,18);thumbnails[1036284]=new thumbnail(1036284,"43789",'"I\'m at work..."',"I'm-at-work_thumb.jpg",130,208,18);thumbnails[1622263]=new thumbnail(1622263,"43789","Randy","Randy_thumb.jpg",130,194,18);thumbnails[2779069]=new thumbnail(2779069,"111449","Cuauhtemoc ","DSC_8182-Photo-Filter-Cuaha_thumb.jpg",130,86,18);thumbnails[1904142]=new thumbnail(1904142,"111449","Kitesurfer 1","Kitesurfer-1_thumb.jpg",130,90,18);thumbnails[1649545]=new thumbnail(1649545,"111449","Red & Blue","Red-&-Blue---St-Ives1_thumb.jpg",130,196,18);thumbnails[1658351]=new thumbnail(1658351,"111449","Moorland winter 1","Cornwall-Bodmin-Moor_thumb.jpg",130,56,18);thumbnails[1661579]=new thumbnail(1661579,"111449","Bassett Monument","Cornwall-Carn-Brea-and-Bass_thumb.jpg",130,194,18);thumbnails[1661580]=new thumbnail(1661580,"111449","Nine Maidens","Cornwall-nine-maidens_thumb.jpg",130,56,18);thumbnails[1661583]=new thumbnail(1661583,"111449","Busy Harbour","Cornwall-harbour-scene_thumb.jpg",130,88,18);thumbnails[2362935]=new thumbnail(2362935,"111449","Trevose Head Lighthouse","Cornwall-Trevose-Head_thumb.jpg",130,86,18);thumbnails[2779052]=new thumbnail(2779052,"111449","Sedov","DSC_8286-Sedov_thumb.jpg",130,89,18);thumbnails[554784]=new thumbnail(554784,"42782","Spooky Churchyard","Spooky-churchyard-1_thumb.jpg",130,173,18);thumbnails[554785]=new thumbnail(554785,"42782","Sun Print 1","Sun-print-1_thumb.jpg",130,173,18);thumbnails[554790]=new thumbnail(554790,"42782","Hermit's church","Spooky-churchyard-11_thumb.jpg",130,98,18);thumbnails[1116440]=new thumbnail(1116440,"42782","Weather Project","weather-project_thumb.jpg",130,208,18);thumbnails[1774582]=new thumbnail(1774582,"42782","Seedhead","Seedhead-Old-Paper_thumb.jpg",130,88,18);thumbnails[1781582]=new thumbnail(1781582,"42782","Leaping Deer","Leaping-deer_thumb.jpg",130,87,18);thumbnails[2509993]=new thumbnail(2509993,"42782","Pak Choi","Pak-Choi_thumb.jpg",130,86,18);thumbnails[524785]=new thumbnail(524785,"39569","An old Chevy truck","Chevy-1_thumb.jpg",130,98,18);thumbnails[529264]=new thumbnail(529264,"39569","Three Horseshoes","3-horseshoes_thumb.jpg",130,98,18);thumbnails[554764]=new thumbnail(554764,"39569","Abandoned Car & Barn","Abandoned-1_thumb.jpg",130,98,18);thumbnails[1116463]=new thumbnail(1116463,"39569","Old Cornish Range","Range-and-bedstead1_thumb.jpg",130,98,18);thumbnails[1036232]=new thumbnail(1036232,"77248","Branston 7","branston-7a_thumb.jpg",130,87,18);thumbnails[1654547]=new thumbnail(1654547,"77248","Jan & Branston - St Ives","Jan-&Bran-St-Ives_thumb.jpg",130,87,18);thumbnails[1658283]=new thumbnail(1658283,"77248","Jan at St Ives","Jan-St-Ives1_thumb.jpg",130,194,18);thumbnails[1658353]=new thumbnail(1658353,"77248","Family 1","M,V-&-P2_thumb.jpg",130,98,18);thumbnails[1774559]=new thumbnail(1774559,"77248","Blue book","Fleur-&-blue-book_thumb.jpg",130,98,18);thumbnails[1830544]=new thumbnail(1830544,"77248","New arrival Lewis 2","Chris-Fleur-Lewis-2_thumb.jpg",130,194,18);thumbnails[1830547]=new thumbnail(1830547,"77248","Lewis 3","Chris-Fleur-Lewis-4_thumb.jpg",130,87,18);thumbnails[1830550]=new thumbnail(1830550,"77248","Lewis & Chris","Chris-Lewis-1_thumb.jpg",130,87,18);thumbnails[2295587]=new thumbnail(2295587,"77248","Fleur & Lewis","Fleur-&-Lewis-0508_thumb.jpg",130,195,18);var galleries=new Object();galleries[145167]=new gallery(145167,"2815941,2815806,2782137,2782037,2782023,2781991,2781963,2781957,2781928,2781924","TALL SHIPS","gallery",[2781850,2781856,2781898,2781904,2781907,2781924,2781928,2781957,2781963,2781991,2782023,2782037,2782137,2815806,2815941]);galleries[186349]=new gallery(186349,"1340196,555053,554770,529705,523789","Wedding Archive","gallery",[1340196,529705,555053,523789,554770]);galleries[128434]=new gallery(128434,"2382630,2366646","EVENTS","gallery",[2944887,1915374,1994318,2283433,2944889,3421010,2360285,2382630,2366646,2366660]);galleries[170021]=new gallery(170021,"4543244,2750718","GB SURF LIFE SAVING CHAMPIONSHIPS","gallery",[2692979,2692982,2693347,2692958,2745957,2745958,2746196,4543244,2750718]);galleries[40473]=new gallery(40473,"3027707,3027706,3027705,3027700,3027699,3027698,3027696,3027695,3027694,3027693","Weddings","gallery",[3027687,3027689,3027691,3027692,3027693,3027694,3027695,3027696,3027698,3027699,3027700,3027705,3027706,3027707,3027688]);galleries[111485]=new gallery(111485,"2002808,2002805,2002798,1650083","Product Photography","gallery",[1650083,2002798,2002805,2002808]);galleries[73666]=new gallery(73666,"1608380","Travel","gallery",[1658284,1781590,1781632,2110998,1608325,1608327,1608346,1608360,1608361,1608380,1622039,1608387,1608391,1695939,1695983,1055754,1055756,980337,980339,980378]);galleries[43789]=new gallery(43789,"1036284","People","gallery",[2192705,2192861,2207272,2207372,2207411,2207413,2207509,1650437,2426988,1649529,1036284,1622263]);galleries[111449]=new gallery(111449,"2779069,2779052,2362935,1904142,1661583,1661580,1661579,1658351,1649545","Cornwall & Tall Ships","gallery",[2779069,1904142,1649545,1658351,1661579,1661580,1661583,2362935,2779052]);galleries[42782]=new gallery(42782,"1116440","Creative","gallery",[554784,554785,554790,1116440,1774582,1781582,2509993]);galleries[39569]=new gallery(39569,"529264","Abandoned","gallery",[524785,529264,554764,1116463]);galleries[77248]=new gallery(77248,"2295587,1830550,1830547,1830544,1774559,1658353,1658283,1654547,1036232","Family","gallery",[1036232,1654547,1658283,1658353,1774559,1830544,1830547,1830550,2295587]);var imageSets=new Object();imageSets[129375]="4543244";imageSets[1]="4543244,2750718,2746196,2709438,2382630,2366646,1915374,1781632,1608380,1608325";imageSets[2]="4543244,2750718,2709438,2382630,2366646,1608380,1116440,1036284,529264";imageSets[3]="4543244,3421010,3027707,3027706,3027705,3027700,3027699,3027698,3027696,3027695,3027694,3027693,3027692,3027691,3027689,3027688,3027687,2944889,2944887,2815941,2815806,2782137,2782037,2782023,2781991,2781963,2781957,2781928,2781924,2781907,2781904,2781898,2781856,2781850,2779069,2779052,2750718,2746196,2745958,2745957,2709438,2693347,2692982,2692979,2692958,2509993,2426988,2382630,2366660,2366646";imageSets[106883]="4543244";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 34:b="http://www9.clikpic.com/deegeephoto/images";break}switch(a){case 1:b="http://www1.clikpic.com/deegeephoto/images";break}switch(a){case 2:b="http://admin.clikpic.com/deegeephoto/images";break}switch(a){case 4:b="http://www.clikchurch.com/deegeephoto/images";break}switch(a){case 5:b="http://www2.clikpic.com/deegeephoto/images";break}switch(a){case 15:b="http://www3.clikpic.com/deegeephoto/images";break}switch(a){case 21:b="http://www6.clikpic.com/deegeephoto/images";break}switch(a){case 18:b="http://www4.clikpic.com/deegeephoto/images";break}switch(a){case 19:b="http://www5.clikpic.com/deegeephoto/images";break}switch(a){case 22:b="http://tpc5/clikpic/deegeephoto/images";break}switch(a){case 23:b="http://tpc10/clikpic/deegeephoto/images";break}switch(a){case 24:b="http://tpc15/clikpic/deegeephoto/images";break}switch(a){case 25:b="http://tpc16/clikpic/deegeephoto/images";break}switch(a){case 31:b="http://www7.clikpic.com/deegeephoto/images";break}switch(a){case 32:b="http://admin2.clikpic.com/deegeephoto/images";break}switch(a){case 33:b="http://www8.clikpic.com/deegeephoto/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="DeeGee Photo: "+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+"</p>";var e=c.purchase_instruction;var d=c.item_price;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+'")'})}}};