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[2171853]=new thumbnail(2171853,"","Whistle Blower (Mexico City, 2008)","Wall_John_01_thumb.jpg",130,88,1);thumbnails[237353]=new thumbnail(237353,"","Thirty-Six Views of Jesus, #1 (2002)","B-Freezing-horizontal-web_thumb.jpg",130,88,1);thumbnails[238833]=new thumbnail(238833,"","Tulip #1 (2001)","Tulip 3_thumb.jpg",130,87,1);thumbnails[555459]=new thumbnail(555459,"","Mark's Barn (2005)","Mark-Hewett's-Barn-72-web_thumb.jpg",87,130,1);thumbnails[555462]=new thumbnail(555462,"","Boat at Rest (Scotland 2003)","Scotland-2003-72-for-web_thumb.jpg",86,130,1);thumbnails[946141]=new thumbnail(946141,"","Stringing Peppers","StringingPeppers-web1_thumb.jpg",88,130,1);thumbnails[237102]=new thumbnail(237102,"","Tulip #2 (2001)","Tulip_thumb.jpg",130,85,1);thumbnails[547146]=new thumbnail(547146,"","Venice #2","Venice---72-GS-crop_thumb.jpg",82,130,1);thumbnails[555476]=new thumbnail(555476,"","S&H (Boone 2005)","Barn-S&H-web_thumb.jpg",130,86,1);thumbnails[238782]=new thumbnail(238782,"","Tulip #3 (2001)","tulip 2_thumb.jpg",130,86,1);thumbnails[239306]=new thumbnail(239306,"","Cambridge Folly (2003)","RiverHouse_thumb.jpg",130,88,1);thumbnails[547147]=new thumbnail(547147,"","Venice #3","Venice---72-vertical-web-GS_thumb.jpg",88,130,1);thumbnails[780991]=new thumbnail(780991,"","New Market Generation","Market Smiling Child_thumb.jpg",130,87,1);thumbnails[946156]=new thumbnail(946156,"","Flower Sellers","FlowerSellers1_thumb.jpg",130,89,1);thumbnails[549507]=new thumbnail(549507,"","Doorway (Lucca, 2003)","DoorwayinLuccaforWWW1_thumb.jpg",87,130,1);thumbnails[946144]=new thumbnail(946144,"","Basket Maker","BasketMaker1_thumb.jpg",130,88,1);thumbnails[547145]=new thumbnail(547145,"","Venice #1","Venice-72-crouch-GS-web_thumb.jpg",86,130,1);thumbnails[549522]=new thumbnail(549522,"","Through the Arch (Louvre, 2005)","028-Louvre-Arch-Web_thumb.jpg",83,130,1);thumbnails[549516]=new thumbnail(549516,"","Untitled (Louvre, 2005)","LouvrefromMusee-Web_thumb.jpg",86,130,1);thumbnails[561031]=new thumbnail(561031,"","Untitled (Thirty-Six Views of Genatis #5, 2005)","Genatis-2004_thumb.web1.jpg",86,130,1);thumbnails[670759]=new thumbnail(670759,"","Venice #6","Venice veil horizontal GS 72 web1_thumb.jpg",130,85,1);thumbnails[237418]=new thumbnail(237418,"","Take that! (Streets of Washington #1, 2004)","StreetKidsgivetheFinger_thumb.jpg",130,89,1);thumbnails[547153]=new thumbnail(547153,"","Venice #8","Venice - 72 GS WEB _thumb.jpg",130,85,1);thumbnails[880225]=new thumbnail(880225,"","Barbie and Friend","Barbie-and-Santa-72 cleaned cropped_thumb.jpg",83,130,1);thumbnails[2201425]=new thumbnail(2201425,"","Calle della Botte (Italy, 2007)","Calle Delle Botte_thumb.jpg",86,130,1);thumbnails[555473]=new thumbnail(555473,"","Monk with Pigeons (Streets of Tokyo #1 2003)","Monk-72-web_thumb.jpg",84,130,1);thumbnails[670758]=new thumbnail(670758,"","Venice #5","Venice - mask canal 72 web GS1_thumb.jpg",130,85,1);thumbnails[2622372]=new thumbnail(2622372,"42726","The Price of His Art (Barcelona, 2005)","One Euro for Web_thumb.jpg",130,87,1);thumbnails[911858]=new thumbnail(911858,"21227","Quilt Seller ","Quilt-Seller11_thumb.jpg",130,87,1);thumbnails[2197093]=new thumbnail(2197093,"42726","You're Perfect (Paris, 2005)","Photographer and little man B&W for web_thumb.jpg",130,88,1);thumbnails[237360]=new thumbnail(237360,"21227","Flower Seller ","Flower Seller_thumb.jpg",130,90,1);thumbnails[237372]=new thumbnail(237372,"21227","Flower Seller with Child ","FlowerSellers_thumb.jpg",130,91,1);thumbnails[557999]=new thumbnail(557999,"42726","The Photographer Contemplates the SFMA (San Francisco, 2006)","Self-Portrait-San-Francisco_thumb.jpg",130,85,1);thumbnails[237365]=new thumbnail(237365,"21227","Change of Seasons ","Snowman_thumb.jpg",130,91,1);thumbnails[2622422]=new thumbnail(2622422,"42726","The Photographer Contemplates The Making of Art (Barcelona, 2005)","Wall_John_20_thumb.jpg",130,87,1);thumbnails[548888]=new thumbnail(548888,"21227","Stringing Peppers ","StringingPeppers1_thumb.jpg",89,130,1);thumbnails[2661308]=new thumbnail(2661308,"21227","Friends ","Two Girls with Umbrella border_thumb.jpg",86,130,1);thumbnails[2661309]=new thumbnail(2661309,"21227","Pea Seller ","woman with peas sized 12x18_thumb.jpg",88,130,1);thumbnails[2661306]=new thumbnail(2661306,"21227","Under the Umbrella ","Hispanic Woman with umbrella resized_thumb.jpg",88,130,1);thumbnails[238910]=new thumbnail(238910,"21227","Next Generation #1 ","Young Girl_thumb.jpg",130,84,1);thumbnails[753053]=new thumbnail(753053,"42726","Spark! (Streets of London # 2)","Spark! man 2 for WWW_thumb.jpg",77,130,1);thumbnails[238911]=new thumbnail(238911,"21227","New Potatoes ","New Potato Glowering Woman_thumb.jpg",130,83,1);thumbnails[1993130]=new thumbnail(1993130,"42726","The Photographer Contemplates the Metropolitan Museum (New York, 2008)","Metropolitan self portrait_thumb.jpg",87,130,1);thumbnails[236915]=new thumbnail(236915,"21227","Basket Maker ","BasketMaker_thumb.jpg",130,89,1);thumbnails[552139]=new thumbnail(552139,"42726","The Photographer Contemplates the High Museum of Art (Atlanta, 2006)","High-Museum-72-GS-Web_thumb.jpg",83,130,1);thumbnails[555470]=new thumbnail(555470,"42726","The photographer Contemplates a Strange Head in Tulsa (Oklahoma, 2002)","StrangeHead-72-web_thumb.jpg",88,130,1);thumbnails[565943]=new thumbnail(565943,"21227","Apple Seller ","Adult-Apple-Seller-Web_thumb.jpg",130,87,1);thumbnails[946168]=new thumbnail(946168,"21227","Next Generation ","Market Smiling Child 72_thumb.jpg",130,88,1);thumbnails[2621506]=new thumbnail(2621506,"21227","Buckets at the Market ","Buckets_thumb.jpg",130,89,1);thumbnails[2661332]=new thumbnail(2661332,"21227","Collard Man ","Collard Man luster border_thumb.jpg",130,87,1);thumbnails[2661335]=new thumbnail(2661335,"21227","Man in Stall ","Man in Stall_thumb.jpg",130,89,1);thumbnails[553348]=new thumbnail(553348,"42727","Circus Car (Paris, 2002)","03_wall_CircusCar_thumb.jpg",89,130,1);thumbnails[2622337]=new thumbnail(2622337,"166401","Welcome to the Street (Cambridge, 2005)","Wall_John_011_thumb.jpg",130,88,1);thumbnails[2621600]=new thumbnail(2621600,"42727","Walking in Mexico City (2008)","Stilts Guy Mexico City1_thumb.jpg",89,130,1);thumbnails[2622349]=new thumbnail(2622349,"42727","On a Roll (London, 2005)","Clown in London_thumb.jpg",88,130,1);thumbnails[237258]=new thumbnail(237258,"166401","Musician with Child (Streets of Valetta #1, 2001)","Wall_John_00_thumb.jpg",130,88,1);thumbnails[737549]=new thumbnail(737549,"166401","The Graces (after Botticelli's Primavera) Streets of Montpellier #1, 2003","Wall_John_000_thumb.jpg",130,87,1);thumbnails[547143]=new thumbnail(547143,"166401","Venice #4 (2003)","Wall_John_24_thumb.jpg",130,89,1);thumbnails[237001]=new thumbnail(237001,"166401","Reading in Paris (Streets of Paris #1, 2005)","Wall_John_25_thumb.jpg",130,87,1);thumbnails[557952]=new thumbnail(557952,"42727","Obo Hobo (Charlotte, 2002)","NASCAR-Clown-web1_thumb.jpg",88,130,1);thumbnails[237426]=new thumbnail(237426,"166401","Male Gaze (Streets of Valetta, 2001)","Wall_John_06_thumb.jpg",130,89,1);thumbnails[1302085]=new thumbnail(1302085,"166401","Male Gaze II (Washington, 2004)","Wall_John_07_thumb.jpg",130,88,1);thumbnails[237271]=new thumbnail(237271,"166401","Portobello Road (Streets of London #1, 2003)","Wall_John_27_thumb.jpg",130,87,1);thumbnails[549405]=new thumbnail(549405,"166401","Penelope (Streets of Paris Series, #2, 2005)","Wall_John_28_thumb.jpg",89,130,1);thumbnails[2643169]=new thumbnail(2643169,"166401","On a Roll (London, 2005)","Wall_John_051_thumb.jpg",88,130,1);thumbnails[1986024]=new thumbnail(1986024,"166401","Strolling in Mexico City (2008)","Stilts Guy Mexico City12_thumb.jpg",89,130,1);thumbnails[549468]=new thumbnail(549468,"166401","Circus Car (Streets of Paris Series #3, 2003)","03_wall_CircusCar1_thumb.jpg",89,130,1);thumbnails[1991508]=new thumbnail(1991508,"166401","Balloon Man (Actopan, Mexico 2008)","Wall_John_02_thumb.jpg",130,88,1);thumbnails[2622273]=new thumbnail(2622273,"166401","Balloon Woman (Cambridge, 2003)","Wall_John_031_thumb.jpg",130,89,1);thumbnails[2622334]=new thumbnail(2622334,"166401","Making a Woman (Bologna, 2007)","Wall_John_041_thumb.jpg",130,93,1);thumbnails[1985995]=new thumbnail(1985995,"166401","Police Woman (Mexico City, 2008)","Wall_John_32_thumb.jpg",130,88,1);thumbnails[3203565]=new thumbnail(3203565,"42734","","WallJohn-31_thumb.jpg",130,88,1);thumbnails[559950]=new thumbnail(559950,"42734","Musician with Child (Valetta, 2002)","Wall_John_03_thumb.jpg",130,88,1);thumbnails[2171854]=new thumbnail(2171854,"42734","The Graces, after Botticelli (Montpelier, 2003)","Wall_John_04_thumb.jpg",130,87,1);thumbnails[2621011]=new thumbnail(2621011,"42734","Male Gaze I (Valetta, 2000)","Wall_John_061_thumb.jpg",130,89,1);thumbnails[561025]=new thumbnail(561025,"42734","Stringing Peppers (Keith Allen, 2003)","StringingPeppers-web_thumb.jpg",89,130,1);thumbnails[552144]=new thumbnail(552144,"42734","Spark! (Streets of London #2)","Spark! man 2 for WWW1_thumb.jpg",77,130,1);thumbnails[560945]=new thumbnail(560945,"42734","Untitled (Thirty-Six Views of Genatis, #1)","Genatis-Old-Shot-72_thumb.jpg",89,130,1);thumbnails[560958]=new thumbnail(560958,"42734","Doorway in Lucca (Streets of Florence series #6)","DoorwayinLuccaforWWW_thumb.jpg",88,130,1);thumbnails[3203564]=new thumbnail(3203564,"21401","Man with Cap (Santiago de Anaya, 2008)","WallJohn-3_thumb.jpg",130,88,1);thumbnails[1986027]=new thumbnail(1986027,"21401","Two Guys (Santiago de Anaya, 2008)","Two guys Window_thumb.jpg",130,99,1);thumbnails[2683208]=new thumbnail(2683208,"21401","Thumbs Up (Cambridge, 2003)","Thumbs Up_thumb.jpg",130,89,1);thumbnails[2621775]=new thumbnail(2621775,"21401","Getting Back (Washington, 2005)","12WallTakeThatWhitey2002_thumb.jpg",130,90,1);thumbnails[549365]=new thumbnail(549365,"21401","Untitled (Thirty-Six views of Genatis, #3)","Genatis-Old-Shot-721_thumb.jpg",89,130,1);thumbnails[2698132]=new thumbnail(2698132,"21401","Tortilla Chef (Santiago, 2008)","Tortilla Chef B&W tint _thumb.jpg",91,130,1);thumbnails[552151]=new thumbnail(552151,"21401","Fair Vender #2 (Raleigh 2004)","FairVenderWeb_thumb.jpg",87,130,1);thumbnails[549390]=new thumbnail(549390,"21401","Untitled (Streets of Baltimore Series, #1)","Glassesman-72-Web_thumb.jpg",88,130,1);thumbnails[1991510]=new thumbnail(1991510,"21401","Woman with Child (Actopan, Mexico 2008)","Woman and child in Market_thumb.jpg",130,89,1);thumbnails[946174]=new thumbnail(946174,"21401","Quilt Seller (2002)","Quilt-Seller1_thumb.jpg",130,87,1);thumbnails[244136]=new thumbnail(244136,"21401","Fair Vendor #1 (Raleigh, 2005)","T jnwfair_thumb.002.jpg",130,86,1);thumbnails[946159]=new thumbnail(946159,"21401","Apple Seller (2001)","Market 5_thumb.jpg",130,87,1);thumbnails[2683232]=new thumbnail(2683232,"21650","Woah! (London Subway Poster, 2003)","WallJN_01_thumb.jpg",89,130,1);thumbnails[2688102]=new thumbnail(2688102,"21650","Male Gaze I (Valletta, 2000)","WallJN_06_thumb.jpg",130,89,1);thumbnails[2688163]=new thumbnail(2688163,"21650","Chicago Subway (London, 2003)","Chicago Poster B&W_thumb.jpg",130,89,1);thumbnails[2692554]=new thumbnail(2692554,"21650","Park Land (Montpellier, 2003)","Woman grafitti France B&W_thumb.jpg",87,130,1);thumbnails[2697349]=new thumbnail(2697349,"21650","Way of Life (Cambridge, 2003)","Flag Graffitti 2 B&W border_thumb.jpg",130,88,1);thumbnails[239598]=new thumbnail(239598,"21650","Live Your Life (Cambridge, 2003)","LiveYourLife_thumb.jpg",130,88,1);thumbnails[244131]=new thumbnail(244131,"21650","Untitled (Baton Rouge, 2006)","graffitti Baton Rouge_thumb.jpg",130,88,1);thumbnails[244132]=new thumbnail(244132,"21650","Your Time's Up (Cambridge, 2003)","Times up cleaned_thumb.jpg",130,89,1);var galleries=new Object();galleries[21227]=new gallery(21227,"236915","Documentary","gallery",[911858,237360,237372,237365,548888,2661308,2661309,2661306,238910,238911,236915,565943,946168,2621506,2661332,2661335]);galleries[42726]=new gallery(42726,"552139","Self-Portrait","section65388",[2622372,2197093,557999,2622422,753053,1993130,552139,555470]);galleries[42727]=new gallery(42727,"553348","Artist's Statement","section65388",[553348,2621600,2622349,557952]);galleries[166401]=new gallery(166401,"1985995","Street","gallery",[2622337,237258,737549,547143,237001,237426,1302085,237271,549405,2643169,1986024,549468,1991508,2622273,2622334,1985995]);galleries[42734]=new gallery(42734,"552144","History","section65388",[3203565,559950,2171854,2621011,561025,552144,560945,560958]);galleries[21401]=new gallery(21401,"3203564","Portraits","gallery",[3203564,1986027,2683208,2621775,549365,2698132,552151,549390,1991510,946174,244136,946159]);galleries[21650]=new gallery(21650,"239598","Found Art","gallery",[2683232,2688102,2688163,2692554,2697349,239598,244131,244132]);var imageSets=new Object();imageSets[1]="3203564,2622372,2622337,2622273,2197093,2171853,1985995,1302085,737549,559950,547143,244136,237426,237271,237001,236915";imageSets[2]="3203564,1985995,946141,555476,553348,552144,552139,239598,237102,236915";imageSets[3]="3203565,3203564,2698132,2697349,2692554,2688163,2688102,2683232,2683208,2661335,2661332,2661309,2661308,2661306,2643169,2622422,2622372,2622349,2622337,2622334,2622273,2621775,2621600,2621506,2621011,2201425,2197093,2171854,2171853,1993130,1991510,1991508,1986027,1986024,1985995,1302085,946174,946168,946159,946156,946144,946141,911858,880225,780991,753053,737549,670759,670758,565943";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/jnwallphoto/images";break}switch(a){case 1:b="http://www1.clikpic.com/jnwallphoto/images";break}switch(a){case 2:b="http://admin.clikpic.com/jnwallphoto/images";break}switch(a){case 4:b="http://www.clikchurch.com/jnwallphoto/images";break}switch(a){case 5:b="http://www2.clikpic.com/jnwallphoto/images";break}switch(a){case 15:b="http://www3.clikpic.com/jnwallphoto/images";break}switch(a){case 21:b="http://www6.clikpic.com/jnwallphoto/images";break}switch(a){case 18:b="http://www4.clikpic.com/jnwallphoto/images";break}switch(a){case 19:b="http://www5.clikpic.com/jnwallphoto/images";break}switch(a){case 22:b="http://tpc5/clikpic/jnwallphoto/images";break}switch(a){case 23:b="http://tpc10/clikpic/jnwallphoto/images";break}switch(a){case 24:b="http://tpc15/clikpic/jnwallphoto/images";break}switch(a){case 25:b="http://tpc16/clikpic/jnwallphoto/images";break}switch(a){case 31:b="http://www7.clikpic.com/jnwallphoto/images";break}switch(a){case 32:b="http://admin2.clikpic.com/jnwallphoto/images";break}switch(a){case 33:b="http://www8.clikpic.com/jnwallphoto/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="John N Wall | Photographer: "+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+"</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+'<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="jnwallphoto@gmail.com">';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="jnwallphoto@gmail.com">';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+'")'})}}};