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[5170667]=new thumbnail(5170667,"","","Red_Throat_on_black_background_reduced_size_thumb.jpg",130,168,5);thumbnails[5224427]=new thumbnail(5224427,"291374","Silica Jasper; Turquoise; African Glass Beads; Hand-cut copper rounds; Crazy Lace Agate; Dyed Agate; Evil Eye (to ward off bad luck); Copper Toggle; 23 inches<br>\r\n$125.00<br>\r\n(#2)","2_thumb.jpg",130,206,5);thumbnails[5224442]=new thumbnail(5224442,"291374","Goldstone; Onyx; Czech Glass Beads; Dream Agate; Carnelian; Fresh Water Pearls; Evil Eye (to ward off bad luck); Copper Clasp; 17 inches<br>\r\n$175.00<br>\r\n (#7)","7_thumb.jpg",130,206,5);thumbnails[5224447]=new thumbnail(5224447,"291374","Goldstone; Garnet; Onyx; Brown Glass Bead from Java; Czech Glass Beads; Dream Agate; Carnelian; Fresh Water Pearls; Evil Eye (to ward off bad luck); Copper Clasp; 16 1/2 inches<br>\r\n$175.00<br>\r\n (#8)","8_thumb.jpg",130,206,5);thumbnails[5224451]=new thumbnail(5224451,"291374","African Turquoise; Rock Crystal; Fresh Water Pearls; Fluorite; Turquoise; Faceted Crystal Beads; Hand Blown Lampwork Czech Beads; Glass Beads; Evil Eye (to ward off bad luck); Green Seaweed Quartz Stone Toggle; 20 inches<br>\r\n$135.00<br>\r\n(#9)","9_thumb.jpg",130,206,5);thumbnails[5400310]=new thumbnail(5400310,"291374",'Agate Slab; Handblown Lampwork Glass Beads; Fluorite; Quartz Crystal; Faceted Glass Beads; Evil Eye (to ward off bad luck); Copper "S" Hook; 21 inches<br>\r\n$175.00  (#26)',"26_thumb.jpg",130,206,5);thumbnails[5400317]=new thumbnail(5400317,"291374",'Sodalite; Blue coral; Pewter Rounds; Czech Glass Beads; Grey Quartz; Evil Eye (to ward off bad luck); Sterling Silver "S" Hook; 21 inches<br>\r\n$150.00<br>\r\n (#27)',"27_thumb.jpg",130,206,5);thumbnails[5400322]=new thumbnail(5400322,"291374","Sodalite; Faceted Grey Quartz; Agate; Blue Coral; Czech Glass Beads; Faceted Chinese glass; Gold Lace Agate; Evil Eye (to ward off bad luck); Sterling Silver Toggle; 21 inches<br>\r\n$150<br>\r\n (#28)","28_thumb.jpg",130,206,5);thumbnails[5400333]=new thumbnail(5400333,"291374","Agate; Tiger Coral; Soo Chow Jade: Carnelian; Evil Eye (to ward off bad luck); Stone Toggle - Scenic Jasper; 19 1/2 inches <br>\r\n$125.00<br>\r\n(#29)","29_thumb.jpg",130,206,5);thumbnails[5400348]=new thumbnail(5400348,"291374",'Red Tiger Eye; Czech Faceted Crystal; Evil Eye (to ward off bad luck); Copper "S" Hook; 16 inches<br>\r\n$135.00 (#30)',"30_thumb.jpg",130,206,5);thumbnails[5817107]=new thumbnail(5817107,"291374","Rose Quartz; Czech glass Beads; Handblown Lampwork Glass Beads; Evil Eye (to ward off bad luck); Rose Quartz Toggle; 21 inches; $150.00 (#31)","311_thumb.jpg",130,196,5);thumbnails[5817142]=new thumbnail(5817142,"291374","Carnelian; Dream Agate; Evil eye (to ward off bad luck); Hand Carved Dragon Carnelian Clasp; 31 inches; $250.00 (#33)","33_thumb.jpg",130,196,5);thumbnails[5817145]=new thumbnail(5817145,"291374","New Jade; Glass Beads; Carved Jade; 26 inches; $225.00 (#34)","34_thumb.jpg",130,196,5);thumbnails[5817156]=new thumbnail(5817156,"291374",'Red Tiger Eye; Mahogany Obsidian; Hurricane Pinch Glass Beads; Agate; Evil Eye (to ward off bad luck); Copper "S" Hook; $95.00; (#36)',"36_thumb.jpg",130,196,5);thumbnails[5858180]=new thumbnail(5858180,"291374","Agate Beads; Agate Roundel; Fresh Water Pearls; Stone Toggle; 21 inches; $175.00 (#48)","48_thumb.jpg",130,196,5);thumbnails[5858246]=new thumbnail(5858246,"291374","Ruby Zoisite Donut; Ruby Zoisite Beads; Handblown Lampwork Glass Beads; Silver Clasp; 16 inches; $175.00 (#51)","51_thumb.jpg",130,196,5);thumbnails[5858249]=new thumbnail(5858249,"291374","Agate; Hematite; Lave Stone; Mother of Pearl; Evil Eye (to ward off bad luck); Pewter Clasp; 19 inches; $135.00; (#52)","52_thumb.jpg",130,196,5);thumbnails[5858254]=new thumbnail(5858254,"291374","Hemimorphite - polished and rough; Beach Glass; Glass Beads; Amazonite Donut; Pewter Toggles; 25 inches; $175.00 (#53)","53_thumb.jpg",130,196,5);thumbnails[5858272]=new thumbnail(5858272,"291374","Egyptian Scarabs (Clay); Turquoise; Ceramic Beads (Change Color with body warmth); Evil Eye (to ward off bad luck); Sterling Silver Toggle; 18 inches; $150.00 (#56)","56_thumb.jpg",130,196,5);thumbnails[5858280]=new thumbnail(5858280,"291374",'Coral; Tumbled Sea Glass; Evil Eye (to ward off bad luck); Sterling Silver "S" Hook; 19 inches; $135.00 (#57)',"57_thumb.jpg",130,196,5);thumbnails[5858295]=new thumbnail(5858295,"291374",'Black Mother of Pearl; Czech Crystals; Evil Eye (to ward off bad luck); Sterling Silver "S" Hook; 19 inches; $150.00 (#58)',"58_thumb.jpg",130,196,5);thumbnails[6336747]=new thumbnail(6336747,"291374","Rose Quartz; Crackle Glass; Evil Eye (to ward off Bad Luck); Sterling Silver with Amethyst Clasp; 19 inches; $175.00 (#67)","67_thumb.jpg",130,196,5);thumbnails[6336761]=new thumbnail(6336761,"291374","Frosted Onyx; Hematite; Evil Eye (to ward off Bad Luck); Sterling Silver Clasp; 17 1/2 inches; $90.00 (#68)","68_thumb.jpg",130,196,5);thumbnails[6336771]=new thumbnail(6336771,"291374","Amethyst Quartz; Sterling Silver Flower (Thai Hill Tribe); Faceted Crystal; Evil Eye (to ward off Bad Luck); Sterling Silver Toggle; 17 inches; $250.00 (#69)","69_thumb.jpg",130,196,5);thumbnails[6336794]=new thumbnail(6336794,"291374","Three Handmade Glass Beads - Spring Peepers on log; Freshwater Pearls; Evil Eye (to ward off Bad Luck); Copper Toggle; 18 inches; Earrings to Match; $75.00 (#70)","70_thumb.jpg",130,196,5);thumbnails[6390223]=new thumbnail(6390223,"291374",'Moonstone; Zebra Jasper; Copper Spacers; Evil Eye (to ward off bad luck); Copper "S" Hook; 18 inches; $90.00 (#71)',"71_thumb.jpg",130,196,5);thumbnails[6390242]=new thumbnail(6390242,"291374","Bloodstone Pendant; Bloodstone Lozenges; Evil Eye (to ward off Bad Luck); Copper Beads; Copper Toggle; 23 inches; $75.00 (#72)","72_thumb.jpg",130,196,5);thumbnails[6390243]=new thumbnail(6390243,"291374","Quartz Crystal; Faceted Bright Blue Glass Beads and Drops; Evil Eye (to ward off Bad Luck); Sterling Silver Toggle; 19 1/2 inches; $95.00 (#73)","73_thumb.jpg",130,196,5);thumbnails[6390261]=new thumbnail(6390261,"291374","Green Recycled Glass from Java; Handblown Lampwork Glass Beads; Pewter; Chrysoprase; Evil Eye (to ward off Bad Luck); Sterling Silver Toggle; 23 inches; $180.00; (#74)","74_thumb.jpg",130,196,5);thumbnails[6397371]=new thumbnail(6397371,"291374","Mauve Handmade (Recycled) Glass from Java; Lepidolite; Faceted Czech Glass Beads; Iridescent Czech Glass Beads - Stars; Czech Seed and other Shaped Beads; Evil Eye (to ward off Bad Luck); Sterling Silver Toggle; 21 inches; $200.00 (#59)","59-copy_thumb.jpg",130,196,5);thumbnails[6397374]=new thumbnail(6397374,"291374","Green Java Glass; Sterling Silver Shell; Sterling Silver Beads; Evil Eye (to ward off Bad Luck); Sterling Silver Toggle; 22 inches; $200.00 (#60)","60-copy_thumb.jpg",130,198,5);thumbnails[6397378]=new thumbnail(6397378,"291374","Chalcedony; Opalescent Glass; Evil Eye (to ward off Bad Luck); Sterling Silver Clasp; 20 inches; $150.00 (#61)","61-copy_thumb.jpg",130,198,5);thumbnails[6397381]=new thumbnail(6397381,"291374","Rock Crystal; Fresh Water Pearls; Evil Eye (to ward off Bad Luck); Mother of Pearl Clasp; 23 inches; $160.00 (#62)","62_thumb.jpg",130,196,5);thumbnails[6397387]=new thumbnail(6397387,"291374","Calcite; Crystal Beads;Glass Beads; Evil Eye (to ward off Bad Luck); Sterling Silver Clasp; 16 inches; $75.00 (#63)","63-copy_thumb.jpg",130,196,5);thumbnails[6397390]=new thumbnail(6397390,"291374","Agate; Afghani Seed Beads; Evil Eye (to ward off Bad Luck); Sterling Silver Clasp; 20 inches; $60.00 (#64)","64-copy2_thumb.jpg",130,196,5);thumbnails[6397392]=new thumbnail(6397392,"291374","Bleached Coral; Chinese Ceramic Beads; Evil Eye (to ward off Bad Luck); Sterling Silver Clasp; 25 inches; $95.00 (#65)","65-copy_thumb.jpg",130,196,5);thumbnails[5224439]=new thumbnail(5224439,"294653","Dyed Agate; Quartz Crystal; Brown Glass Beads from Java; Gold Stone; Hand Etched Chinese Bone Bead;  Evil Eye (to ward off bad luck); 21 inches<br>\r\n$150.00<br>\r\n (#3)","3_thumb.jpg",130,206,5);thumbnails[5224441]=new thumbnail(5224441,"294653","Olive Jade; Glass Beads; Synthetic Cats Eye; Evil Eye (to ward off bad luck); Sterling Silver Toggle; 19 inches<br>\r\n$125.00<br>\r\n(#6)","6_thumb.jpg",130,206,5);thumbnails[5224456]=new thumbnail(5224456,"294653","Fluorite; Evil Eye (to Ward off bad luck); Pewter S Hook (#10)","10_thumb.jpg",130,206,5);thumbnails[5224457]=new thumbnail(5224457,"294653","Agate; Wooden Beads; Antique Chinese Foo Dog; Hand Carved Carnelian Hook in shape of Dragon (#11)","11_thumb.jpg",130,206,5);thumbnails[5224458]=new thumbnail(5224458,"294653",'Turquoise; Hand Blown Lampwork Beads; Glass Beads; Evil Eye (to ward off bad luck); Sterling Silver "S" Hook (#12)',"12_thumb.jpg",130,206,5);thumbnails[5224459]=new thumbnail(5224459,"294653","Czech Glass Beads; Fresh Water Pearls; Evil Eye (to ward off bad luck); Sterling Silver S Hook (#13)","13_thumb.jpg",130,206,5);thumbnails[5224460]=new thumbnail(5224460,"294653","Fire Agate; Hand Blown Lampwork Beads; Rose Crystal; Evil Eye (to ward off bad luck); Copper Toggle (#14)","14_thumb.jpg",130,206,5);thumbnails[5224464]=new thumbnail(5224464,"294653","Soo Chow Jade; Gold Leaf Glass Beads; Hand Blown Lampwork Glass Bead; Polished River Rock; Glass Beads; Copper Collectors; Evil Eye (to ward off bad luck); Stone Toggle (#15)","15_thumb.jpg",130,206,5);thumbnails[5224466]=new thumbnail(5224466,"294653","Fluorite; Glass Beads; Evil Eye (to ward off bad luck); Sterling Silver S Hook (#16)","16_thumb.jpg",130,206,5);thumbnails[5224470]=new thumbnail(5224470,"294653","Yellow Jade; Fresh Water Pearls; Glass Beads; Copper Collectors; Evil Eye (to ward off bad luck); Copper Toggle (#17)","17_thumb.jpg",130,206,5);thumbnails[5224471]=new thumbnail(5224471,"294653","Rock Crystal; Fresh Water Pearls; Sterling Silver Toggle (#18)","18_thumb.jpg",130,206,5);thumbnails[5224474]=new thumbnail(5224474,"294653","Gold Stone; Agate; Copper/Sterling Silver Beads; Glass Beads; Fresh Water Pearls; Copper Beads; Evil Eye (to ward off bad luck); Copper Toggle (#19)","19_thumb.jpg",130,206,5);thumbnails[5224475]=new thumbnail(5224475,"294653","Amazonite; Glass Beads; Hand Carved Effigy from Costa Rica; Evil Eye (to ward off bad luck); Sterling Silver S Hook (#20)","20_thumb.jpg",130,206,5);thumbnails[5224477]=new thumbnail(5224477,"294653",'Turquoise; Pewter Beads; Glass Beads; Amazonite; Sterling Silver Beads; Rock Crystal; Hand Carved Crocodile from Costa Rica; Evil Eye (to ward off bad luck); Sterling Silver "S" Hook (#21)',"21_thumb.jpg",130,206,5);thumbnails[5224478]=new thumbnail(5224478,"294653","Agate; Base Metal Three Dimensional Flower Basket from Mexico; Sterling Silver S Hook (#22)","22_thumb.jpg",130,206,5);thumbnails[5224496]=new thumbnail(5224496,"294653","Handblown Glass Heart; Gold Foil Glass Beads; Hand Blown Lampwork Glass Beads; Glass Beads; Agate; Rock Crystal; Sterling Silver Toggle (#1)","1_thumb.jpg",130,206,5);thumbnails[5817139]=new thumbnail(5817139,"294653","Hypersten; Pyrite (Fools Gold); Glass Beads; Evil Eye (to ward off bad luck); Sterling Silver Clasp; 25 inches; $150.00 (#32)","32_thumb.jpg",130,196,5);thumbnails[5817158]=new thumbnail(5817158,"294653","Moukaite Jasper; Hill Tribe Silver Bead; Sterling Silver Toggle; (#37)","37_thumb.jpg",130,196,5);thumbnails[5817165]=new thumbnail(5817165,"294653","Mother of Pearl; Rock Crystal; Sterling Silver Toggle; (#38)","38_thumb.jpg",130,196,5);thumbnails[5817166]=new thumbnail(5817166,"294653",'Fluorite; Glass Beads; Sterling Silver "S" Hook; (#39)',"39_thumb.jpg",130,196,5);thumbnails[5817176]=new thumbnail(5817176,"294653",'Olive Jade; Sterling Silver "S" Hook; (#40)',"40_thumb.jpg",130,196,5);thumbnails[5817184]=new thumbnail(5817184,"294653","Blue Jasper; Sterling Silver Toggle; (#41)","41_thumb.jpg",130,196,5);thumbnails[5817186]=new thumbnail(5817186,"294653","Dyed Mother of Pearl; Glass Beads; Copper Toggle; (#42)","42_thumb.jpg",130,196,5);thumbnails[5817188]=new thumbnail(5817188,"294653","Agate; Sterling Silver Beads; Jade; Malachite; Hand Carved Ecuadorian Jade Mayan King Mask; Sterling Silver Toggle; (#43)","43_thumb.jpg",130,196,5);thumbnails[5824651]=new thumbnail(5824651,"294653","Hand Blown Glass Beads; Sterling Silver Clasp; (#44)","44_thumb.jpg",130,195,5);thumbnails[5825643]=new thumbnail(5825643,"294653","Smoky Quartz; Sterling Silver Toggle; (#45)","45_thumb.jpg",130,196,5);thumbnails[5858168]=new thumbnail(5858168,"294653","Picture Jasper; Sterling Silver Toggle; (#46)","46_thumb.jpg",130,196,5);thumbnails[5858173]=new thumbnail(5858173,"294653","Jasper; Turquoise; (#47)","47_thumb.jpg",130,196,5);thumbnails[5858188]=new thumbnail(5858188,"294653","Amazonite; Mille Fleur Glass Beads; Sterling Silver Toggle; 21 inches; $100.00 (#49)","49_thumb.jpg",130,196,5);thumbnails[5858240]=new thumbnail(5858240,"294653","Agate; Sterling Silver; Hematite; 23 inches; (#50)","50_thumb.jpg",130,196,5);thumbnails[5858260]=new thumbnail(5858260,"294653","Handblown Lampwork Glass Beads (Spring Peepers); Fresh Water Pearls; Evil Eye (to ward off bad luck); Sterling Silver Toggle; 17 inches; $100.00 (#54)","54_thumb.jpg",130,196,5);thumbnails[5858264]=new thumbnail(5858264,"294653","Hand Carved Bone Horse; Goldstone; Bone Beads; Glass Seed Beads; Evil Eye (to ward off bad luck); Pewter Clasp; 19 inches; (#55)","55_thumb.jpg",130,196,5);thumbnails[5858307]=new thumbnail(5858307,"294653","Kyanite; Fresh Water Pearls; Evil Eye (to ward off bad luck); Sterling Silver Clasp ","59_thumb.jpg",130,196,5);thumbnails[6397360]=new thumbnail(6397360,"294653","Rose Quartz; Fresh Water Pearls; Czech Glass Beads; Evil Eye (to ward off Bad Luck); Sterling Silver Toggle; 20 inches; $150.00 (#35)","35-copy_thumb.jpg",130,196,5);thumbnails[6397394]=new thumbnail(6397394,"294653",'Hand Carved Bone Horse; Bone Beads; Tiger Eye Barrel and Elliptical Beads; Evil Eye (to ward off Bad Luck); Sterling Silver "S" Hook; 22 inches; $90.00 (#66)',"66-copy_thumb.jpg",130,196,5);var galleries=new Object();galleries[291374]=new gallery(291374,"5400310","Ready to Fly","gallery",[5224427,5224442,5224447,5224451,5400310,5400317,5400322,5400333,5400348,5817107,5817142,5817145,5817156,5858180,5858246,5858249,5858254,5858272,5858280,5858295,6336747,6336761,6336771,6336794,6390223,6390242,6390243,6390261,6397371,6397374,6397378,6397381,6397387,6397390,6397392]);galleries[294653]=new gallery(294653,"5224458","Fully Fledged","gallery",[5224439,5224441,5224456,5224457,5224458,5224459,5224460,5224464,5224466,5224470,5224471,5224474,5224475,5224477,5224478,5224496,5817139,5817158,5817165,5817166,5817176,5817184,5817186,5817188,5824651,5825643,5858168,5858173,5858188,5858240,5858260,5858264,5858307,6397360,6397394]);var imageSets=new Object();imageSets[1]="5170667";imageSets[2]="5400310,5224458";imageSets[3]="6397394,6397392,6397390,6397387,6397381,6397378,6397374,6397371,6397360,6390261,6390243,6390242,6390223,6336794,6336771,6336761,6336747,5858307,5858295,5858280,5858272,5858264,5858260,5858254,5858249,5858246,5858240,5858188,5858180,5858173,5858168,5825643,5824651,5817188,5817186,5817184,5817176,5817166,5817165,5817158,5817156,5817145,5817142,5817139,5817107,5400348,5400333,5400322,5400317,5400310";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/tortrefarm1/images";break}switch(a){case 1:b="http://www1.clikpic.com/tortrefarm1/images";break}switch(a){case 2:b="http://admin.clikpic.com/tortrefarm1/images";break}switch(a){case 24:b="http://tpc15/clikpic/tortrefarm1/images";break}switch(a){case 4:b="http://www.clikchurch.com/tortrefarm1/images";break}switch(a){case 5:b="http://www2.clikpic.com/tortrefarm1/images";break}switch(a){case 22:b="http://tpc5/clikpic/tortrefarm1/images";break}switch(a){case 23:b="http://tpc10/clikpic/tortrefarm1/images";break}switch(a){case 25:b="http://tpc16/clikpic/tortrefarm1/images";break}switch(a){case 15:b="http://www3.clikpic.com/tortrefarm1/images";break}switch(a){case 18:b="http://www4.clikpic.com/tortrefarm1/images";break}switch(a){case 19:b="http://www5.clikpic.com/tortrefarm1/images";break}switch(a){case 31:b="http://www7.clikpic.com/tortrefarm1/images";break}switch(a){case 32:b="http://admin2.clikpic.com/tortrefarm1/images";break}switch(a){case 33:b="http://www8.clikpic.com/tortrefarm1/images";break}switch(a){case 34:b="http://www9.clikpic.com/tortrefarm1/images";break}switch(a){case 35:b="http://admin3.clikpic.com/tortrefarm1/images";break}switch(a){case 37:b="http://admin4.clikpic.com/tortrefarm1/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="Ruby Throated Sparrow: "+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> 				$"+(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="TORTREFARM1">';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+'")'})}}};