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[84319]=new thumbnail(84319,"","Jim Kayaking on Marshall Pond, Hebron, Maine USA<br>\r\nPhoto by Dan Marquis","PICT03291_thumb.jpg",130,90,1);thumbnails[475570]=new thumbnail(475570,"4812","President George H.W. Bush ","3488 George Bush 091606_thumb.jpg",130,104,1);thumbnails[69867]=new thumbnail(69867,"6780","Stacy and Chris","3444_640_thumb.jpg",130,195,1);thumbnails[46893]=new thumbnail(46893,"4811",'"Great Balls of Fire"',"Great Balls of Fire 0321 082004_thumb.JPG",130,87,1);thumbnails[46894]=new thumbnail(46894,"4810","Glen Cove","1449_04 Glen Cove_thumb.jpg",130,86,1);thumbnails[47274]=new thumbnail(47274,"4809","Bald Eagle ","Bald Eagle 0499_1b_thumb.jpg",130,163,1);thumbnails[92957]=new thumbnail(92957,"8831","Height of Land","3726 093005_thumb.jpg",130,87,1);thumbnails[5479760]=new thumbnail(5479760,"4809","Bald Eagle (Haliaeetus leucocephalus)","1247CP_thumb.jpg",130,87,1);thumbnails[1943263]=new thumbnail(1943263,"4809","Pine Grosbeak","9191 Pine Grosbeak 031008 72_thumb.jpg",130,87,1);thumbnails[69866]=new thumbnail(69866,"6780","Stacy and Chris","3400_640_thumb.jpg",130,87,1);thumbnails[1943266]=new thumbnail(1943266,"4809","Pine Grosbeak","9157 Pine Grosbeak 031008 72_thumb.jpg",130,195,1);thumbnails[2052440]=new thumbnail(2052440,"4809","Bohemian Waxwing (Bombycilla garrulus)","9185 Bohemian Waxwing 031008 721_thumb.jpg",130,87,1);thumbnails[4946220]=new thumbnail(4946220,"6780","Stacey and Chris","3446_640_thumb.jpg",130,195,1);thumbnails[3059655]=new thumbnail(3059655,"6780","Laura Lea and Matt","3797 100_thumb.jpg",130,195,1);thumbnails[2054899]=new thumbnail(2054899,"4809","Cedar Waxwing (Bombycilla cedrorum)","4687 Cedar Waxwing 040707A 72_thumb.jpg",130,92,1);thumbnails[475574]=new thumbnail(475574,"4812","First Lady Barbara Bush","3526 Barbara Bush 091606_thumb.jpg",130,87,1);thumbnails[4946214]=new thumbnail(4946214,"6780","Cora, Maid of Honor, and Bridesmaids","9641_640_thumb.jpg",130,87,1);thumbnails[1358863]=new thumbnail(1358863,"8831","Sunset on Lake Auburn","661208150772dpi_thumb.jpg",130,87,1);thumbnails[47275]=new thumbnail(47275,"4809","Atlantic Puffin","6182 Puffin 072907 72dpi_thumb.jpg",130,92,1);thumbnails[47282]=new thumbnail(47282,"4812","Jenna and Barbara Bush","0673 Barbara and Jenna 093004_thumb.jpg",130,93,1);thumbnails[47278]=new thumbnail(47278,"4810","Dingys in Rockport Harbor","Dingys in Rockport Harbor 1440_11jpg_thumb.JPG",130,86,1);thumbnails[48986]=new thumbnail(48986,"4811",'"Destiny"',"H049_thumb.jpg",130,103,1);thumbnails[4946215]=new thumbnail(4946215,"6780","Cora, Joshua, Best Man, and Groomsmen","9649_640_thumb.jpg",130,87,1);thumbnails[351575]=new thumbnail(351575,"4809","Widow Skimmer Dragonfly (Libellula luctuosa)","1972_thumb.jpg",130,104,1);thumbnails[4946216]=new thumbnail(4946216,"6780","Cora","9662_640_thumb.jpg",130,195,1);thumbnails[351576]=new thumbnail(351576,"4809","Widow Skimmer Dragonfly (Libellula luctuosa)","2018_thumb.jpg",130,104,1);thumbnails[47283]=new thumbnail(47283,"4812","Jenna Bush","0693 Jenna Bush 093004_thumb.jpg",130,87,1);thumbnails[4946218]=new thumbnail(4946218,"6780","Cora and Joshua","9667_640_thumb.jpg",130,87,1);thumbnails[4946219]=new thumbnail(4946219,"6780","Cora and Joshua","9670_640_thumb.jpg",130,87,1);thumbnails[47284]=new thumbnail(47284,"4812","Barbara Bush","0694 Barbara Bush 093004_thumb.jpg",130,87,1);thumbnails[47272]=new thumbnail(47272,"4809","Common Loon","7434-Edit_thumb.jpg",130,87,1);thumbnails[47276]=new thumbnail(47276,"4810","Early Morning in Rockport Harbor","Early Morning Rockport 1440_09_thumb.jpg",130,85,1);thumbnails[48998]=new thumbnail(48998,"4811",'"Highland Harmony"',"Highland Harmony 0403 0822041_thumb.JPG",130,195,1);thumbnails[2796469]=new thumbnail(2796469,"4809","Common Loon","2086 Loon 72_thumb.jpg",130,87,1);thumbnails[2387842]=new thumbnail(2387842,"4809","Northern River Otter (Lutra canadensis)","1039b_thumb.jpg",130,87,1);thumbnails[215917]=new thumbnail(215917,"4812","Senator Olympia Snowe (R-ME)","0037 Olympia Snowe 040806_thumb.jpg",130,87,1);thumbnails[2936938]=new thumbnail(2936938,"4809","Bull Moose (Alces alces)","2805 10042008 crop 72_thumb.jpg",130,86,1);thumbnails[4711192]=new thumbnail(4711192,"4809","Moose (Alces alces)","9106_6x4_thumb.jpg",130,87,1);thumbnails[4711201]=new thumbnail(4711201,"4809","Moose (Alces alces)","9108_6x4_thumb.jpg",130,87,1);thumbnails[246070]=new thumbnail(246070,"4812","Senator Susan Collins (R-ME)","0832 Susan Collins 050606_thumb.jpg",130,104,1);thumbnails[47273]=new thumbnail(47273,"4809","Great Blue Heron","2695 Great Blue Heron 080205_thumb.jpg",130,87,1);thumbnails[47277]=new thumbnail(47277,"4810","Camden Harbor","Camden 090401 7062_14_thumb.jpg",130,128,1);thumbnails[52735]=new thumbnail(52735,"4811","Ballooning with the clouds","3162082105_thumb.jpg",130,87,1);thumbnails[47287]=new thumbnail(47287,"4812","Governor George Pataki (R-NY)","1035 George Pataki 103104_thumb.jpg",130,87,1);thumbnails[47286]=new thumbnail(47286,"4812","Governor George Pataki (R-NY)","1027 George Pataki 103104_thumb.jpg",130,87,1);thumbnails[46892]=new thumbnail(46892,"4809","Mandarin Duck","1276 Mandarin 013005C_thumb.jpg",130,86,1);thumbnails[47281]=new thumbnail(47281,"4810","Lobster Boat","1956 Lobster Boat 042205_thumb.jpg",130,87,1);thumbnails[53854]=new thumbnail(53854,"4811","Gary's Balloon","Garys Balloon 0402 082204_thumb.JPG",130,195,1);thumbnails[3600222]=new thumbnail(3600222,"4809","Ring-neck Duck (Aythya collaris)","5612_Ring-neck_Duck_031709_6x4_thumb.jpg",130,87,1);thumbnails[47285]=new thumbnail(47285,"4812","Senator Zell Miller (D-GA)","0911 Zell Miller 102604_thumb.jpg",130,87,1);thumbnails[198053]=new thumbnail(198053,"4812","Ken Starr<br>\r\n","4905 Ken Starr 032206_thumb.jpg",130,87,1);thumbnails[47127]=new thumbnail(47127,"4809","Song Sparrow","1928 Song Sparrow 042205_thumb.jpg",130,87,1);thumbnails[47280]=new thumbnail(47280,"4810","Fishing Boat","2217 S Freeport 061905_thumb.jpg",130,195,1);thumbnails[55780]=new thumbnail(55780,"4811","America One","3086bAmericaOne082005_thumb.jpg",130,195,1);thumbnails[3942076]=new thumbnail(3942076,"4809","Osprey with Alewife","6466_Osprey_05292009_thumb.jpg",130,87,1);thumbnails[932123]=new thumbnail(932123,"4812","Sen John McCain Rep-AZ","5090 John McCain 042507_thumb.jpg",130,87,1);thumbnails[3059625]=new thumbnail(3059625,"4812","Governor Sarah Palin (R-AK)","3604A 100_thumb.jpg",130,87,1);thumbnails[47126]=new thumbnail(47126,"4809","American Black Duck","0156 Am Black Duck 080804_thumb.jpg",130,87,1);thumbnails[47279]=new thumbnail(47279,"4810","Lobster Boats","1315 Perkins Cove Ogunquit 013005_thumb.jpg",130,87,1);thumbnails[53845]=new thumbnail(53845,"4810","Belfast Harbor","2882Belfast081305_thumb.jpg",130,195,1);thumbnails[55779]=new thumbnail(55779,"4809","Female Bull Frog","3213 Female Bull Frog 082805b_thumb.jpg",130,90,1);thumbnails[478563]=new thumbnail(478563,"4809","Painted Turtle","3395 PaintedTurtle 090406_thumb.jpg",130,87,1);thumbnails[496500]=new thumbnail(496500,"4810","Calm Before The Storm","2378 Cutler Harbor 072206_thumb.jpg",130,87,1);thumbnails[813183]=new thumbnail(813183,"4810","Lobster Pots in the Fog","Jim_Walker_Lobster_Traps small_thumb.jpg",130,87,1);thumbnails[53844]=new thumbnail(53844,"4810","Cape Elizabeth Lighthouse (Two Lights)","1330TwoLights013005_thumb.jpg",130,87,1);thumbnails[228122]=new thumbnail(228122,"4810","HMS Bounty","0249 HMS Bounty 040906_thumb.jpg",130,87,1);thumbnails[230793]=new thumbnail(230793,"4809","Pileated Woodecker","0474 Pileated Woodpecker_thumb.jpg",130,163,1);thumbnails[351573]=new thumbnail(351573,"4812","New England Patriots Cheerleaders","2052_thumb.jpg",130,87,1);var galleries=new Object();galleries[4810]=new gallery(4810,"813183,496500,228122,53845,53844,47281,47280,47279,47278,47277","Coastal Scenes","gallery",[46894,47278,47276,47277,47281,47280,47279,53845,496500,813183,53844,228122]);galleries[4811]=new gallery(4811,"55780,53854,52735,48998,48986,46893","Hot Air Balloons","gallery",[46893,48986,48998,52735,53854,55780]);galleries[8831]=new gallery(8831,"1358863,92957","Landscapes","gallery",[92957,1358863]);galleries[4809]=new gallery(4809,"5479760,4711201,4711192,3942076,3600222,2936938,2796469,2387842,2054899,2052440","Nature & Wildlife","gallery",[47274,5479760,1943263,1943266,2052440,2054899,47275,351575,351576,47272,2796469,2387842,2936938,4711192,4711201,47273,46892,3600222,47127,3942076,47126,55779,478563,230793]);galleries[4812]=new gallery(4812,"3059625,932123,475574,475570,351573,246070,215917,198053,47287,47286","Special Events","gallery",[475570,475574,47282,47283,47284,215917,246070,47287,47286,47285,198053,932123,3059625,351573]);galleries[6780]=new gallery(6780,"4946220,4946219,4946218,4946216,4946215,4946214,3059655,69867,69866","Weddings","gallery",[69867,69866,4946220,3059655,4946214,4946215,4946216,4946218,4946219]);var imageSets=new Object();imageSets[1]="5479760,4946220,4946219,4946218,4946216,4946215,4946214,4711201,4711192,3942076,3600222,3059655,3059625,2936938,2796469,2387842,2054899,2052440,1943266,1943263,1358863,932123,813183,496500,478563,475574,475570,351576,351575,351573,246070,230793,228122,215917,198053,92957,84319,69867,69866,55780,55779,53854,53845,53844,52735,48998,48986,47287,47286,47285";imageSets[3]="5479760,4946220,4946219,4946218,4946216,4946215,4946214,4711201,4711192,3942076,3600222,3059655,3059625,2936938,2796469,2387842,2054899,2052440,1943266,1943263,1358863,932123,813183,496500,478563,475574,475570,351576,351575,351573,246070,230793,228122,215917,198053,92957,84319,69867,69866,55780,55779,53854,53845,53844,52735,48998,48986,47287,47286,47285";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/jwalker/images";break}switch(a){case 1:b="http://www1.clikpic.com/jwalker/images";break}switch(a){case 2:b="http://admin.clikpic.com/jwalker/images";break}switch(a){case 24:b="http://tpc15/clikpic/jwalker/images";break}switch(a){case 4:b="http://www.clikchurch.com/jwalker/images";break}switch(a){case 5:b="http://www2.clikpic.com/jwalker/images";break}switch(a){case 22:b="http://tpc5/clikpic/jwalker/images";break}switch(a){case 23:b="http://tpc10/clikpic/jwalker/images";break}switch(a){case 25:b="http://tpc16/clikpic/jwalker/images";break}switch(a){case 15:b="http://www3.clikpic.com/jwalker/images";break}switch(a){case 18:b="http://www4.clikpic.com/jwalker/images";break}switch(a){case 19:b="http://www5.clikpic.com/jwalker/images";break}switch(a){case 31:b="http://www7.clikpic.com/jwalker/images";break}switch(a){case 32:b="http://admin2.clikpic.com/jwalker/images";break}switch(a){case 33:b="http://www8.clikpic.com/jwalker/images";break}switch(a){case 34:b="http://www9.clikpic.com/jwalker/images";break}switch(a){case 35:b="http://admin3.clikpic.com/jwalker/images";break}switch(a){case 37:b="http://admin4.clikpic.com/jwalker/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="Jim Walker 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="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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="walkerj@megalink.net">';b=b+'<input type="hidden" name="currency_code" value="USD">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="walkerj@megalink.net">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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+'")'})}}};