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[852410]=new thumbnail(852410,"65708","Signal","beavertail 9 x 12_thumb.jpg",130,98,1);thumbnails[852450]=new thumbnail(852450,"65708","Castle Hill Regatta Race","IMG_0231_thumb.jpg",130,97,1);thumbnails[852453]=new thumbnail(852453,"65708","Gooseberry Island","gooseberry is_thumb..jpg",130,98,1);thumbnails[852455]=new thumbnail(852455,"65708"," Lobster Boats","green bridge_thumb.jpg",130,103,1);thumbnails[852467]=new thumbnail(852467,"65708","Rocks","rocks 9x12_thumb.jpg",130,98,1);thumbnails[852472]=new thumbnail(852472,"65708","Sandwash","photo contest 11x14_thumb.jpg",130,103,1);thumbnails[852614]=new thumbnail(852614,"65708","Goat Island Harbor","Untitled-1 copy click_thumb.jpg",130,105,1);thumbnails[1288665]=new thumbnail(1288665,"65708","North Lighthouse","northlight ariel_thumb.jpg",130,88,1);thumbnails[1669390]=new thumbnail(1669390,"65708","Tall Ship Mast ","lines_thumb.jpg",130,87,1);thumbnails[2346197]=new thumbnail(2346197,"65708","Green Rocks","green rocks 5489_thumb.jpg",130,94,1);thumbnails[2446336]=new thumbnail(2446336,"65708","Evening","Evening 6013_thumb.jpg",130,87,1);thumbnails[3043837]=new thumbnail(3043837,"65708","Morning Glow","beavertail (morning glow)_thumb.jpg",130,87,1);thumbnails[3312102]=new thumbnail(3312102,"65708","Days End","DAYS END_thumb.jpg",130,94,1);thumbnails[3316831]=new thumbnail(3316831,"65708","Tranquil","Castlehill silouette_thumb.jpg",130,94,1);thumbnails[3318762]=new thumbnail(3318762,"65708","Black Point Ruin","Black point 1938_thumb.jpg",130,94,1);thumbnails[3443032]=new thumbnail(3443032,"65708","Baileys Beach Sunset","EFP-36_thumb.jpg",130,87,1);thumbnails[4706213]=new thumbnail(4706213,"65708","Newport Bridge","Newport_Bridge_At_Twilight_5x10_thumb.jpg",130,65,1);thumbnails[5140558]=new thumbnail(5140558,"65708","Receding Tide","20080719-IMG_62751_thumb.jpg",130,87,1);thumbnails[5174698]=new thumbnail(5174698,"65708","Reef","20090501-EFP-0065_thumb.jpg",130,86,1);thumbnails[5744001]=new thumbnail(5744001,"65708","Castle Hill Lighthouse","EFP-4_thumb.jpg",130,90,1);thumbnails[5744126]=new thumbnail(5744126,"65708","Second Beach Sunrise 2","EFP-5_thumb.jpg",130,92,1);thumbnails[5811429]=new thumbnail(5811429,"65708","Ocean Drive Jetty","EFP-19_thumb.jpg",130,87,1);thumbnails[6009469]=new thumbnail(6009469,"65708","State Pier","EFP-21_thumb.jpg",130,85,1);thumbnails[6018107]=new thumbnail(6018107,"65708","Van Zandt Pier","EFP-33_thumb.jpg",130,88,1);thumbnails[852469]=new thumbnail(852469,"65708","Stormy","sum 076_thumb.jpg",130,172,1);thumbnails[1112804]=new thumbnail(1112804,"65708","Tall Ships 2007","mast_thumb.jpg",130,180,1);thumbnails[1134169]=new thumbnail(1134169,"65708","Land and Sea","LAND AND SEA_thumb.jpg",130,193,1);thumbnails[1671666]=new thumbnail(1671666,"65708","Low Tide","shell_thumb.jpg",130,193,1);thumbnails[2167073]=new thumbnail(2167073,"65708","Stream and Falls","copy 9877_thumb.jpg",130,193,1);thumbnails[2530001]=new thumbnail(2530001,"65708","Castlehill Lighthouse ","castle hdr 5x7_thumb.jpg",130,193,1);thumbnails[2613182]=new thumbnail(2613182,"65708","Mohegan Bluffs","mohegan bluffs 64161_thumb.jpg",130,193,1);thumbnails[3326780]=new thumbnail(3326780,"65708","Coastal","BEAVERTAIL REFLECTION1_thumb.jpg",130,180,1);thumbnails[5175609]=new thumbnail(5175609,"65708","After The Storm","20090502-EFP-0083_thumb.jpg",130,214,1);thumbnails[5175645]=new thumbnail(5175645,"65708","Ledge Rd. Sunset","20080302-IMG_4649_thumb.jpg",130,195,1);thumbnails[5418162]=new thumbnail(5418162,"65708","Second Beach Sunrise","EFP-1504_thumb.jpg",130,195,1);thumbnails[5794574]=new thumbnail(5794574,"65708","Ocean Drive Shoreline","EFP-16_thumb.jpg",130,196,1);thumbnails[6223061]=new thumbnail(6223061,"65936","Battle Ship Cove","EFP-2-2_thumb.jpg",130,88,1);thumbnails[6323894]=new thumbnail(6323894,"65936","Birds Eye View","EFP-29_thumb.jpg",130,91,1);thumbnails[6323901]=new thumbnail(6323901,"65936","Pell Bridge(Newport Bridge).","EFP-32_thumb.jpg",130,86,1);thumbnails[6646743]=new thumbnail(6646743,"65936","Indian Head","EFP-38_thumb.jpg",130,87,1);thumbnails[6646770]=new thumbnail(6646770,"65936","Ladys Bath Tub","EFP-5465_thumb.jpg",130,85,1);thumbnails[6646778]=new thumbnail(6646778,"65936","State Pier At Sunset","EFP-37_thumb.jpg",130,78,1);thumbnails[6691428]=new thumbnail(6691428,"65936","Surfers End","EFP-40_thumb.jpg",130,84,1);thumbnails[1656469]=new thumbnail(1656469,"351400","River Ripples","swell6x9_thumb.jpg",130,87,1);thumbnails[1856030]=new thumbnail(1856030,"351400","Subtle","river waves_thumb.jpg",130,88,1);thumbnails[5745181]=new thumbnail(5745181,"351400","Water Fall Close Up","EFP-7_thumb.jpg",130,87,1);thumbnails[6323917]=new thumbnail(6323917,"351400","Leaf","EFP-4967_thumb.jpg",130,84,1);thumbnails[852443]=new thumbnail(852443,"351400","Daisy Zoom","daizy zoom 11x14_thumb.jpg",130,164,1);thumbnails[2386538]=new thumbnail(2386538,"351400","Sailboat Reflection","sail reflection 5712_thumb.jpg",130,193,1);thumbnails[6323864]=new thumbnail(6323864,"351400","Green Light Reflection","EFP-34_thumb.jpg",130,188,1);thumbnails[852493]=new thumbnail(852493,"351439","Waterfires","IMG_5532_thumb.jpg",130,83,1);thumbnails[3024634]=new thumbnail(3024634,"351439","Streets Of Providence","-7063 streets of providence_thumb.jpg",130,87,1);thumbnails[5705874]=new thumbnail(5705874,"351439","Traffic Trail","EFP-2_thumb.jpg",130,76,1);thumbnails[5745461]=new thumbnail(5745461,"351439","Bellevue Traffic Trail 2","EFP-8_thumb.jpg",130,88,1);thumbnails[6215156]=new thumbnail(6215156,"351439","Queen  Anne Square","EFP-23_thumb.jpg",130,87,1);thumbnails[852478]=new thumbnail(852478,"351439","Carnival","IMG_5118_thumb.jpg",130,193,1);thumbnails[5747158]=new thumbnail(5747158,"351439","Wind Mill Reflection","EFP-9_thumb.jpg",130,196,1);thumbnails[1466724]=new thumbnail(1466724,"351399","Foliage","fall foliage_thumb.jpg",130,88,1);thumbnails[1681476]=new thumbnail(1681476,"351399","Splash","splash_thumb.jpg",130,87,1);thumbnails[1818292]=new thumbnail(1818292,"351399","Coconut Tide","coconut_thumb.jpg",130,88,1);thumbnails[2925066]=new thumbnail(2925066,"351399","Echo Lake","echo lake 6641 6642 hdr_thumb.jpg",130,87,1);thumbnails[2935847]=new thumbnail(2935847,"351399","RT.16","RT16 Pinkham Notch 6693_thumb.jpg",130,87,1);thumbnails[1628068]=new thumbnail(1628068,"351399","Rivermouth","rivermouth copy_thumb.jpg",130,193,1);thumbnails[1641189]=new thumbnail(1641189,"351399","Palm Sillhouette","palm pattern 5x7_thumb.jpg",130,193,1);thumbnails[2160355]=new thumbnail(2160355,"351399","Take Off","leaving costa rica_thumb.jpg",130,180,1);thumbnails[5154966]=new thumbnail(5154966,"351399","Cathedral Ledge","20091008-EFP-1085_thumb.jpg",130,196,1);thumbnails[5296070]=new thumbnail(5296070,"351399","The Tree","EFP-3778_thumb.jpg",130,201,1);var galleries=new Object();galleries[65708]=new gallery(65708,"5794574,5418162,5175645","Coastal","gallery",[852410,852450,852453,852455,852467,852472,852614,1288665,1669390,2346197,2446336,3043837,3312102,3316831,3318762,3443032,4706213,5140558,5174698,5744001,5744126,5811429,6009469,6018107,852469,1112804,1134169,1671666,2167073,2530001,2613182,3326780,5175609,5175645,5418162,5794574]);galleries[65936]=new gallery(65936,"6691428,6646778,6646770,6646743,6323901,6323894,6223061","Latest Work","gallery",[6223061,6323894,6323901,6646743,6646770,6646778,6691428]);galleries[351400]=new gallery(351400,"6323864,2386538","Abstract ","gallery",[1656469,1856030,5745181,6323917,852443,2386538,6323864]);galleries[351439]=new gallery(351439,"5747158","On Land","gallery",[852493,3024634,5705874,5745461,6215156,852478,5747158]);galleries[351399]=new gallery(351399,"1628068","Travel","gallery",[1466724,1681476,1818292,2925066,2935847,1628068,1641189,2160355,5154966,5296070]);var imageSets=new Object();imageSets[1]="5811429,5745181,5744126,5744001,5174698,5140558,4706213,3316831,3043837,3024634,2925066,2446336,1681476,852472,852467,852455";imageSets[2]="6323864,5794574,5747158,5418162,5175645,2386538,1628068";imageSets[3]="5140558,3443032,2446336,852472";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/ERICTFULL/images";break}switch(a){case 1:b="http://www1.clikpic.com/ERICTFULL/images";break}switch(a){case 2:b="http://admin.clikpic.com/ERICTFULL/images";break}switch(a){case 24:b="http://tpc15/clikpic/ERICTFULL/images";break}switch(a){case 4:b="http://www.clikchurch.com/ERICTFULL/images";break}switch(a){case 5:b="http://www2.clikpic.com/ERICTFULL/images";break}switch(a){case 22:b="http://tpc5/clikpic/ERICTFULL/images";break}switch(a){case 23:b="http://tpc10/clikpic/ERICTFULL/images";break}switch(a){case 25:b="http://tpc16/clikpic/ERICTFULL/images";break}switch(a){case 15:b="http://www3.clikpic.com/ERICTFULL/images";break}switch(a){case 18:b="http://www4.clikpic.com/ERICTFULL/images";break}switch(a){case 19:b="http://www5.clikpic.com/ERICTFULL/images";break}switch(a){case 31:b="http://www7.clikpic.com/ERICTFULL/images";break}switch(a){case 32:b="http://admin2.clikpic.com/ERICTFULL/images";break}switch(a){case 33:b="http://www8.clikpic.com/ERICTFULL/images";break}switch(a){case 34:b="http://www9.clikpic.com/ERICTFULL/images";break}switch(a){case 35:b="http://admin3.clikpic.com/ERICTFULL/images";break}switch(a){case 37:b="http://admin4.clikpic.com/ERICTFULL/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=" Photography By:Eric Full: "+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;resizePhotoInfo();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].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="ERICTFULL">';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+'")'})}}};