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[3580619]=new thumbnail(3580619,"341296","Spitfire","Photos040_thumb.jpg",130,102,15);thumbnails[6079544]=new thumbnail(6079544,"341296","Spitfire Taxi","Spit-5_thumb.jpg",130,86,15);thumbnails[6079546]=new thumbnail(6079546,"341296","Spitfire Approach","Spit-6_thumb.jpg",130,86,15);thumbnails[6079547]=new thumbnail(6079547,"341296","Spitfire Peel off","Spit-3_thumb.jpg",130,86,15);thumbnails[3578801]=new thumbnail(3578801,"218746","Winter Reeds","Photos047_thumb.jpg",130,87,15);thumbnails[3578806]=new thumbnail(3578806,"218746","La Conner and Mt. baker","Photos021_thumb.jpg",130,87,15);thumbnails[3580943]=new thumbnail(3580943,"218746","Snow melt in Spring","Photos045_thumb.jpg",102,130,15);thumbnails[3655909]=new thumbnail(3655909,"218746","Butterfly","Photos007_thumb.jpg",98,130,15);thumbnails[3764573]=new thumbnail(3764573,"218746","Very Green","Photos092_thumb.jpg",130,87,15);thumbnails[4551015]=new thumbnail(4551015,"218746","Sails and Mt. Baker","Photos0012_thumb.jpg",130,87,15);thumbnails[3655975]=new thumbnail(3655975,"324108","Rock Water","Photos034_thumb.jpg",130,98,15);thumbnails[3722105]=new thumbnail(3722105,"324108","Red Rock Crossing","Photos032_thumb.jpg",98,130,15);thumbnails[3890523]=new thumbnail(3890523,"324108","West fork, Oak Creek Reflections","West-Fork-Reflections_thumb.jpg",130,98,15);thumbnails[5723371]=new thumbnail(5723371,"324108","Courthouse Butte","Courthouse-Butte_thumb.jpg",130,98,15);thumbnails[5723373]=new thumbnail(5723373,"324108","Devil's Bridge","Devils-Arch_thumb.jpg",130,98,15);thumbnails[5723374]=new thumbnail(5723374,"324108","Vultee Arch ","Red-Arch_thumb.jpg",130,98,15);thumbnails[5723375]=new thumbnail(5723375,"324108","Oak Creek Canyon","Red-Rock_thumb.jpg",98,130,15);thumbnails[5723376]=new thumbnail(5723376,"324108","The Roadkill Café","Roadkill-Cafe_thumb.gif",130,98,15);thumbnails[3883089]=new thumbnail(3883089,"324991","Pink and Purple Tulips","Photos149_thumb.jpg",130,87,15);thumbnails[3655923]=new thumbnail(3655923,"324991","Daffodils","Photos011_thumb.jpg",130,102,15);thumbnails[3580942]=new thumbnail(3580942,"324991","Spring Tulips and Mt. Baker","Photos044_thumb.jpg",130,101,15);thumbnails[3716360]=new thumbnail(3716360,"324991","Primary Colors","Photos017_thumb.jpg",130,90,15);thumbnails[3764584]=new thumbnail(3764584,"324991","Tulip Shadows","Photos089_thumb.jpg",130,87,15);thumbnails[3890295]=new thumbnail(3890295,"324991","Fringed Tulip (Fabio)","Tulip_Time_09_132_thumb.jpg",130,87,15);thumbnails[3890318]=new thumbnail(3890318,"324991","Pink Tulips and barn","Tulip_Time_09_048_thumb.jpg",130,87,15);thumbnails[3890333]=new thumbnail(3890333,"324991","Blue Parrot Tulips","Tulip_Time_09_075_thumb.jpg",130,87,15);thumbnails[3890421]=new thumbnail(3890421,"324991","Greigii Tulips (Oriental Splendor)","Tulip_Time_09_117_thumb.jpg",130,87,15);thumbnails[4067595]=new thumbnail(4067595,"324991","Oriental Sky","Photos106_thumb.jpg",87,130,15);thumbnails[5735952]=new thumbnail(5735952,"324991"," Professor Blaauw  Dutch Iris","Photos058_thumb.jpg",130,107,15);thumbnails[5735963]=new thumbnail(5735963,"324991","Purple Tulip","Photos148_thumb.jpg",87,130,15);thumbnails[5735965]=new thumbnail(5735965,"324991","Rain Drops and Tulips","Photos095_thumb.jpg",104,130,15);thumbnails[5735972]=new thumbnail(5735972,"324991","Purple Rain Tulip ","Photos151_thumb.jpg",130,87,15);thumbnails[5804804]=new thumbnail(5804804,"324991","Pink Field","Tulip-4_thumb.jpg",130,86,15);thumbnails[5804805]=new thumbnail(5804805,"324991","Orange and Blue","Tulip-5_thumb.jpg",130,86,15);thumbnails[5804806]=new thumbnail(5804806,"324991","Tulip Portrait","Tulip-2_thumb.jpg",86,130,15);thumbnails[5552221]=new thumbnail(5552221,"314683","Haleakala Crater","Haleakala_thumb.jpg",130,86,15);thumbnails[3655968]=new thumbnail(3655968,"314683","Maui Sunrise","Photos024_thumb.jpg",130,98,15);thumbnails[3716361]=new thumbnail(3716361,"314683","Ripping!","Photos023_thumb.jpg",130,98,15);thumbnails[5723227]=new thumbnail(5723227,"314683","Cattle Egret (Bubulcus ibis)","Cattle-Egret_thumb.jpg",130,86,15);thumbnails[5723230]=new thumbnail(5723230,"314683","Citrus Swallowtail Butterfly (Papilio demodocus)","Citrus-Swallowtail_thumb.jpg",130,86,15);thumbnails[5723231]=new thumbnail(5723231,"314683","Common Myna or Indian Myna (Acridotheres tristis)","Common-Myna_thumb.jpg",130,86,15);thumbnails[5723322]=new thumbnail(5723322,"314683","Pacific Golden Plover (Pluvialis fulva)","Golden-Plover_thumb.jpg",130,86,15);thumbnails[5723324]=new thumbnail(5723324,"314683","Hawaiian Coot or ?alae ke?oke?o  (Fulica alai)","Hawaiian-Coot_thumb.jpg",130,86,15);thumbnails[5723344]=new thumbnail(5723344,"314683","Japanese White-eye (Zosterops japonicus)","Japanese-White-Eye_thumb.jpg",130,86,15);thumbnails[5723345]=new thumbnail(5723345,"314683","Java Sparrow  (Padda oryzivora) ","Java-Finch_thumb.jpg",130,86,15);thumbnails[5723346]=new thumbnail(5723346,"314683","Black-crowned Night Heron (Nycticorax nycticorax)","Night-Heron_thumb.jpg",130,86,15);thumbnails[5723347]=new thumbnail(5723347,"314683","Northern Cardinal or Redbird (Cardinalis)","North-American-Cardinal_thumb.jpg",130,86,15);thumbnails[5723348]=new thumbnail(5723348,"314683","Red-crested Cardinal (Paroaria coronata)   ","Scarlet-Crested-Cardinal_thumb.jpg",130,86,15);thumbnails[5723350]=new thumbnail(5723350,"314683","Wandering Tattler  (Tringa incana) ","Wandering-Tattler_thumb.jpg",130,86,15);thumbnails[5723352]=new thumbnail(5723352,"314683","Zebra Dove (Geopelia striata)","Zebra-Dove_thumb.jpg",130,86,15);thumbnails[5723354]=new thumbnail(5723354,"314683","Spotted Dove (Streptopelia chinensis)","Spotted-Dove_thumb.jpg",130,86,15);thumbnails[5723355]=new thumbnail(5723355,"314683","Honolua Bay - Into the Barrel","Into-the-cave_thumb.jpg",130,86,15);thumbnails[5723357]=new thumbnail(5723357,"314683","Slaughterhouse - Maui ","Surfer_thumb.jpg",130,86,15);thumbnails[3716358]=new thumbnail(3716358,"227059","Fireworks Feathers","Photos004_thumb.jpg",130,102,15);thumbnails[3655905]=new thumbnail(3655905,"227059","Cityscape","Photos027_thumb.jpg",130,102,15);thumbnails[3716363]=new thumbnail(3716363,"227059","Transamerica","Photos043_thumb.jpg",98,130,15);thumbnails[3722217]=new thumbnail(3722217,"227059","Seattle Perspective","Photos078_thumb.jpg",130,87,15);thumbnails[4481245]=new thumbnail(4481245,"227059","Sunset on the inner harbor","Photos0271_thumb.jpg",130,87,15);thumbnails[4481355]=new thumbnail(4481355,"227059","BC Parliament Building","Photos0351_thumb.jpg",130,87,15);thumbnails[4481364]=new thumbnail(4481364,"227059","Horses Head Bridge","Photos0341_thumb.jpg",130,87,15);thumbnails[4482159]=new thumbnail(4482159,"227059","Pike Place Market","Photos073_thumb.jpg",130,99,15);thumbnails[3580623]=new thumbnail(3580623,"227061","Snow Geese (Chen caerulescens)","Photos028_thumb.jpg",130,102,15);thumbnails[3580674]=new thumbnail(3580674,"227061","Sharp-shinned Hawk (Accipiter striatus)","Photos038_thumb.jpg",130,102,15);thumbnails[3580939]=new thumbnail(3580939,"227061","Snow Goose Mosaic","Photos008_thumb.jpg",130,102,15);thumbnails[3716365]=new thumbnail(3716365,"227061","Whimbrel (Numenius phaeopus)                                                                                                   ","Photos039_thumb.jpg",130,102,15);thumbnails[3889983]=new thumbnail(3889983,"227061","Great Blue Heron (Ardea berodias)","Birds_09_020_thumb.jpg",130,87,15);thumbnails[3890066]=new thumbnail(3890066,"227061","Common Loon (Gavia immer) Breeding form","Birds_09_030_copy_thumb.jpg",130,87,15);thumbnails[4481204]=new thumbnail(4481204,"227061","Flamingo","Photos0171_thumb.jpg",130,87,15);thumbnails[4481227]=new thumbnail(4481227,"227061","Glossy Ibis","Photos0191_thumb.jpg",130,87,15);thumbnails[4481232]=new thumbnail(4481232,"227061","Whistling-Duck","Photos0201_thumb.jpg",130,87,15);thumbnails[3893827]=new thumbnail(3893827,"236185","Two on a pole","Two_on_a_pole_thumb.jpg",130,102,15);thumbnails[3578807]=new thumbnail(3578807,"236185","Bald Eagle (Haliaeetus leucocepbalus)","Photos014_thumb.jpg",130,102,15);thumbnails[4482314]=new thumbnail(4482314,"261350","Tiger Longwing (Heliconius hecale) ","Photos0161_thumb.jpg",130,87,15);thumbnails[4482315]=new thumbnail(4482315,"261350","Scarlett Swallowtail  (Papilio rumanzovia)","Photos0181_thumb.jpg",130,87,15);thumbnails[4482333]=new thumbnail(4482333,"261350","Zebra Longwing   (Heliconius charitonius)","Photos0211_thumb.jpg",130,87,15);thumbnails[4482335]=new thumbnail(4482335,"261350","Atlas moth (Attacus atlas) ","Photos0141_thumb.jpg",130,87,15);thumbnails[3764501]=new thumbnail(3764501,"218747","E-75 Stearman Close Up","Photos101_thumb.jpg",130,87,15);thumbnails[3764504]=new thumbnail(3764504,"218747","T-6 Texan","Photos111_thumb.jpg",130,102,15);thumbnails[3624719]=new thumbnail(3624719,"218747","Lycoming Radial","Photos022_thumb.jpg",87,130,15);thumbnails[3722091]=new thumbnail(3722091,"218747","Messerschmidt 109E","Photos001_thumb.jpg",130,93,15);thumbnails[3722098]=new thumbnail(3722098,"218747","Messerschmidt 109E Nose 50 Caliber Cannon","Photos002_thumb.jpg",130,87,15);thumbnails[3722103]=new thumbnail(3722103,"218747","T-6 Texan Pratt & Whitney Radial","Photos031_thumb.jpg",130,87,15);thumbnails[3722110]=new thumbnail(3722110,"218747","Polikarpov I-16 Type Rata","Photos020_thumb.jpg",130,102,15);thumbnails[3883081]=new thumbnail(3883081,"232706","HELL-ER BUST Flyby","Photos140_thumb.jpg",130,87,15);thumbnails[3883083]=new thumbnail(3883083,"232706","Flaps Down","Photos141_thumb.jpg",130,87,15);thumbnails[3883085]=new thumbnail(3883085,"232706","Val-Halla runup","Photos118_thumb.jpg",130,87,15);thumbnails[3624716]=new thumbnail(3624716,"232706","P-51 Mustang Val Halla","Back_Safe_thumb.jpg",130,102,15);thumbnails[3624717]=new thumbnail(3624717,"232706","P-51 Hell-er Bust","Photos018_thumb.jpg",130,87,15);thumbnails[3624718]=new thumbnail(3624718,"232706","Merlin","Photos035_thumb.jpg",130,87,15);thumbnails[3624715]=new thumbnail(3624715,"232706","P-51 Val Halla ","Photos016_thumb.jpg",130,102,15);thumbnails[3764519]=new thumbnail(3764519,"232706","P-51 UPUPA EPOPS","Photos091_thumb.jpg",130,102,15);thumbnails[3765580]=new thumbnail(3765580,"232706","P-51B  Impatient Virgin","Photos094_thumb.jpg",130,87,15);thumbnails[4067601]=new thumbnail(4067601,"232706","Take Off","Photos104_thumb.jpg",130,87,15);thumbnails[4072675]=new thumbnail(4072675,"232706","Intimidating","Photos110_thumb.jpg",130,87,15);thumbnails[4482567]=new thumbnail(4482567,"232706","Just Waiting","Photos0361_thumb.jpg",130,87,15);thumbnails[4482568]=new thumbnail(4482568,"232706","Very Fast and Low","Photos0251_thumb.jpg",130,87,15);thumbnails[4482570]=new thumbnail(4482570,"232706","Taxi Out","Photos0321_thumb.jpg",130,87,15);thumbnails[4482571]=new thumbnail(4482571,"232706","Out with a Friend","Photos0261_thumb.jpg",130,87,15);thumbnails[4067659]=new thumbnail(4067659,"244620","At Speed","Photos109_thumb.jpg",130,87,15);thumbnails[4067660]=new thumbnail(4067660,"244620","Great Pair","Photos107_thumb.jpg",130,87,15);thumbnails[4481600]=new thumbnail(4481600,"261335","Flying Tiger","Photos0281_thumb.jpg",130,87,15);thumbnails[4481604]=new thumbnail(4481604,"261335","Starting a run","Photos0081_thumb.jpg",130,87,15);thumbnails[4481605]=new thumbnail(4481605,"261335","At speed","Photos009_thumb.jpg",130,87,15);thumbnails[4481609]=new thumbnail(4481609,"261335","Another pass","P-40_thumb.jpg",130,86,15);thumbnails[4481612]=new thumbnail(4481612,"261335","Ready for Combat","Photos0061_thumb.jpg",130,87,15);thumbnails[6079548]=new thumbnail(6079548,"261335","P-40","P-40-2_thumb.jpg",130,86,15);thumbnails[6079549]=new thumbnail(6079549,"261335","Out with a friend","Spit-31_thumb.jpg",130,86,15);thumbnails[6079550]=new thumbnail(6079550,"261335","Flying Tiger Nose Art","P-40-3_thumb.jpg",130,86,15);thumbnails[4481631]=new thumbnail(4481631,"261342","1919 over France","Photos0051_thumb.jpg",130,87,15);thumbnails[4481634]=new thumbnail(4481634,"261342","Hello","Photos0041_thumb.jpg",130,87,15);thumbnails[4482273]=new thumbnail(4482273,"261342","Into the Blue","Photos067_thumb.jpg",130,102,15);thumbnails[3655943]=new thumbnail(3655943,"227060","Odessay","Photos026_thumb.jpg",130,102,15);thumbnails[3655961]=new thumbnail(3655961,"227060","Real Wood Hull","Photos048_thumb.jpg",104,130,15);thumbnails[3716364]=new thumbnail(3716364,"227060","Deer Leap Wheelhouse","Photos046_thumb.jpg",87,130,15);thumbnails[3722108]=new thumbnail(3722108,"227060","End of Day","Photos025_thumb.jpg",98,130,15);thumbnails[3655935]=new thumbnail(3655935,"227062","After the Turn","Photos005_thumb.jpg",130,87,15);thumbnails[3655938]=new thumbnail(3655938,"227062","Stealing Wind","Photos041_thumb.jpg",102,130,15);thumbnails[4551014]=new thumbnail(4551014,"227062","All to port","Photos0062_thumb.jpg",130,87,15);thumbnails[3722218]=new thumbnail(3722218,"227383","Little Deuce Coupe","Photos085_thumb.jpg",130,98,15);thumbnails[3722219]=new thumbnail(3722219,"227383","1929 Packard Ornament","Photos050_thumb.jpg",130,87,15);thumbnails[4482276]=new thumbnail(4482276,"227383","1914 Cadillac brass and copper outfitted engine ","Photos0011_thumb.jpg",130,87,15);thumbnails[4482278]=new thumbnail(4482278,"227383","Retired 39","Photos0231_thumb.jpg",130,93,15);thumbnails[3580608]=new thumbnail(3580608,"227069","Pale Peach Rose","Photos030_thumb.jpg",130,102,15);thumbnails[3580669]=new thumbnail(3580669,"227069","Red Rose","Photos036_thumb.jpg",130,98,15);thumbnails[3716362]=new thumbnail(3716362,"227069","Orange","Photos019_thumb.jpg",130,104,15);thumbnails[3765622]=new thumbnail(3765622,"227069","Thistle Honey","Photos053_thumb.jpg",130,104,15);thumbnails[5735953]=new thumbnail(5735953,"227069","Dahlia (disambiguation)","Photos064_thumb.jpg",130,102,15);thumbnails[5735960]=new thumbnail(5735960,"227069","Lavenders (Lavandula)","Photos081_thumb.jpg",130,98,15);thumbnails[5735961]=new thumbnail(5735961,"227069","Rose","Roses004_thumb.jpg",130,87,15);thumbnails[3722216]=new thumbnail(3722216,"227375","109E heading home","Photos049_thumb.jpg",130,87,15);thumbnails[4482577]=new thumbnail(4482577,"227375","Beautiful View","Photos075_thumb.jpg",130,102,15);thumbnails[3582905]=new thumbnail(3582905,"227375","Out of the sun","Photos006_thumb.jpg",130,87,15);thumbnails[3716357]=new thumbnail(3716357,"227382","Black & White Tree","Photos042_thumb.jpg",98,130,15);thumbnails[3722215]=new thumbnail(3722215,"227382","Climbing Fun","Photos056_thumb.jpg",98,130,15);thumbnails[3765591]=new thumbnail(3765591,"227382","Sepia Sailboat","Photos057_thumb.jpg",130,98,15);var galleries=new Object();galleries[341296]=new gallery(341296,"3580619","Supermarine Spitfire Mk. Vc","gallery",[3580619,6079544,6079546,6079547]);galleries[218746]=new gallery(218746,"3580943","Landscapes","gallery",[3578801,3578806,3580943,3655909,3764573,4551015]);galleries[324108]=new gallery(324108,"5723376,5723375,5723374,5723373,5723371,3890523,3722105,3655975","Sedona","gallery",[3655975,3722105,3890523,5723371,5723373,5723374,5723375,5723376]);galleries[324991]=new gallery(324991,"5804806,5804805,5804804,5735972,5735965,5735963,5735952,4067595,3890421,3890333","Skagit Valley Tulip Festival","gallery",[3883089,3655923,3580942,3716360,3764584,3890295,3890318,3890333,3890421,4067595,5735952,5735963,5735965,5735972,5804804,5804805,5804806]);galleries[314683]=new gallery(314683,"5723357,5723355,5723354,5723352,5723350,5723348,5723347,5723346,5723345,5723344","Maui","gallery",[5552221,3655968,3716361,5723227,5723230,5723231,5723322,5723324,5723344,5723345,5723346,5723347,5723348,5723350,5723352,5723354,5723355,5723357]);galleries[227059]=new gallery(227059,"3655905","CityScapes","gallery",[3716358,3655905,3716363,3722217,4481245,4481355,4481364,4482159]);galleries[227061]=new gallery(227061,"4481232,4481227,4481204,3890066,3889983,3716365,3580939,3580674,3580623","Birds and Wildlife","gallery",[3580623,3580674,3580939,3716365,3889983,3890066,4481204,4481227,4481232]);galleries[236185]=new gallery(236185,"3578807","Bald Eagle","gallery",[3893827,3578807]);galleries[261350]=new gallery(261350,"4482335,4482333,4482315,4482314","Butterflies and Moths","gallery",[4482314,4482315,4482333,4482335]);galleries[218747]=new gallery(218747,"3624719","WWII Warbirds","gallery",[3764501,3764504,3624719,3722091,3722098,3722103,3722110]);galleries[232706]=new gallery(232706,"3883081","P-51 Mustang","gallery",[3883081,3883083,3883085,3624716,3624717,3624718,3624715,3764519,3765580,4067601,4072675,4482567,4482568,4482570,4482571]);galleries[244620]=new gallery(244620,"4067659","P-47 Thunderbolt","gallery",[4067659,4067660]);galleries[261335]=new gallery(261335,"6079550,6079549,6079548,4481612,4481609,4481605,4481604,4481600","P-40 Tomahawk","gallery",[4481600,4481604,4481605,4481609,4481612,6079548,6079549,6079550]);galleries[261342]=new gallery(261342,"4482273,4481634,4481631",'Curtiss JN-4 "Jenny"',"gallery",[4481631,4481634,4482273]);galleries[227060]=new gallery(227060,"3655961","Wooden Boats","gallery",[3655943,3655961,3716364,3722108]);galleries[227062]=new gallery(227062,"4551014,3655938,3655935","Sailing Reggatta","gallery",[3655935,3655938,4551014]);galleries[227383]=new gallery(227383,"3722218","Cars","gallery",[3722218,3722219,4482276,4482278]);galleries[227069]=new gallery(227069,"3580608","Flowers","gallery",[3580608,3580669,3716362,3765622,5735953,5735960,5735961]);galleries[227375]=new gallery(227375,"3582905","Digital Art","gallery",[3722216,4482577,3582905]);galleries[227382]=new gallery(227382,"3722215","Black and White","gallery",[3716357,3722215,3765591]);var imageSets=new Object();imageSets[1]="3890295,3883081,3722218,3655935,3582905,3580942,3580623,3580619,3580608,3578807,3578806";imageSets[2]="4067659,3883081,3722218,3722215,3655961,3655905,3624719,3582905,3580943,3580619,3580608,3578807";imageSets[3]="6079550,6079549,6079548,6079547,6079546,6079544,5804806,5804805,5804804,5735972,5735965,5735963,5735961,5735960,5735953,5735952,5723376,5723375,5723374,5723373,5723371,5723357,5723355,5723354,5723352,5723350,5723348,5723347,5723346,5723345,5723344,5723324,5723322,5723231,5723230,5723227,5552221,4551015,4551014,4482577,4482571,4482570,4482568,4482567,4482335,4482333,4482315,4482314,4482278,4482276";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/dgschultz/images";break}switch(a){case 1:b="http://www1.clikpic.com/dgschultz/images";break}switch(a){case 2:b="http://admin.clikpic.com/dgschultz/images";break}switch(a){case 24:b="http://tpc15/clikpic/dgschultz/images";break}switch(a){case 4:b="http://www.clikchurch.com/dgschultz/images";break}switch(a){case 5:b="http://www2.clikpic.com/dgschultz/images";break}switch(a){case 22:b="http://tpc5/clikpic/dgschultz/images";break}switch(a){case 23:b="http://tpc10/clikpic/dgschultz/images";break}switch(a){case 25:b="http://tpc16/clikpic/dgschultz/images";break}switch(a){case 15:b="http://www3.clikpic.com/dgschultz/images";break}switch(a){case 18:b="http://www4.clikpic.com/dgschultz/images";break}switch(a){case 19:b="http://www5.clikpic.com/dgschultz/images";break}switch(a){case 31:b="http://www7.clikpic.com/dgschultz/images";break}switch(a){case 32:b="http://admin2.clikpic.com/dgschultz/images";break}switch(a){case 33:b="http://www8.clikpic.com/dgschultz/images";break}switch(a){case 34:b="http://www9.clikpic.com/dgschultz/images";break}switch(a){case 35:b="http://admin3.clikpic.com/dgschultz/images";break}switch(a){case 37:b="http://admin4.clikpic.com/dgschultz/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="David Schultz Photography: "+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="DGSCHULTZ">';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+'")'})}}};