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[5828986]=new thumbnail(5828986,"329896","West Toward the Evening Sun<br>Sonoma County, CA","Ocean1_thumb.jpg",130,100,1);thumbnails[5828988]=new thumbnail(5828988,"329896","Footsteps in My Dream<br>Sonoma County, CA","Ocean2_thumb.jpg",130,100,1);thumbnails[5828994]=new thumbnail(5828994,"329896","Celebrating Being Alive<br>Sonoma County, CA","sunsetsillouhette_thumb.jpg",130,100,1);thumbnails[5828976]=new thumbnail(5828976,"329896","Sand in Between My Toes<br>Sonoma County, CA","Footsteps_thumb.jpg",130,100,1);thumbnails[5828992]=new thumbnail(5828992,"329896","Time For Myself<br>Sonoma County, CA","Sunset2_thumb.jpg",130,100,1);thumbnails[5828972]=new thumbnail(5828972,"329896","You Came to Me in a Dream<br>Sonoma County, CA","Creek_thumb.jpg",130,100,1);thumbnails[5828993]=new thumbnail(5828993,"329896","Pretending to Work<br>Sonoma County, CA","Sunset_thumb.jpg",130,100,1);thumbnails[5828975]=new thumbnail(5828975,"329896","Double Love<br>Sonoma County, CA","Love2_thumb.jpg",130,100,1);thumbnails[5828991]=new thumbnail(5828991,"329896","Gateway to the Secret Crab Graveyard<br>Sonoma County, CA","RockyBeach_thumb.jpg",130,100,1);thumbnails[5828989]=new thumbnail(5828989,"329896","Full Moon Fog<br>Sonoma County, CA","Rocky1_thumb.jpg",130,100,1);thumbnails[5828973]=new thumbnail(5828973,"329896","Flying<br>Santa Rosa, CA","Fair1_thumb.jpg",130,100,1);thumbnails[5828974]=new thumbnail(5828974,"329896","The Scent of Summer<br>Santa Rosa, CA","Fair2_thumb.jpg",130,100,1);thumbnails[5828971]=new thumbnail(5828971,"329896","Golden Fields and Invisible Cows<br>Sonoma County, CA","Coleman_Valley_1_thumb.jpg",130,100,1);thumbnails[5828977]=new thumbnail(5828977,"329896","Lynmar's Truck<br>Sebastopol, CA","Lynmar2_thumb.jpg",130,100,1);thumbnails[5828978]=new thumbnail(5828978,"329896","Leeks on the Farm<br>Sebastopol, CA","Lynmar4_thumb.jpg",130,100,1);thumbnails[5828979]=new thumbnail(5828979,"329896","Out of the Gray of Winter You Came...<br>Santa Rosa, CA","MustardField1_thumb.jpg",130,100,1);thumbnails[5828980]=new thumbnail(5828980,"329896","Vibrant Fresh Fabulous<br>Santa Rosa, CA","MustardField2_thumb.jpg",130,100,1);thumbnails[5828982]=new thumbnail(5828982,"329896","Through the Walnut Grove<br>Calistoga, CA","MustardGrove1_thumb.jpg",130,100,1);thumbnails[5828983]=new thumbnail(5828983,"329896","Walk with me Through the Mustard Grove<br>Calistoga, CA","MustardGrove2_thumb.jpg",130,100,1);thumbnails[457584]=new thumbnail(457584,"329897","Stag's Leap Cellars<br>Napa Valley, CA","StagsLeapT.jpg",130,100,1);thumbnails[457570]=new thumbnail(457570,"329897","Volker's Spring Vines<br>Napa, CA","EiseleT.jpg",130,100,1);thumbnails[1681576]=new thumbnail(1681576,"329897","Sculptures Series #1<br>Napa, CA","Chihuly Printfull_thumb.jpg",130,100,1);thumbnails[457569]=new thumbnail(457569,"329897","Old Vines and Fog<br>Healdsburg, CA","CS VinesWhole1T.jpg",130,100,1);thumbnails[1681569]=new thumbnail(1681569,"329897","Salmon Creek Sunrise<br>Sonoma, CA","ocean 20mm 1 take 3v2Full_thumb.jpg",130,100,1);thumbnails[457557]=new thumbnail(457557,"329897","New Vines on the Mountain<br>St Helena, CA","CainT.jpg",130,100,1);thumbnails[3165689]=new thumbnail(3165689,"329897","Fay's Vineyard<br>Yountville, CA","StagsLeapPrintB_thumb.jpg",130,100,1);thumbnails[457556]=new thumbnail(457556,"329897","Tank Room<br>Rutherford, CA","BV-T.jpg",130,100,1);thumbnails[3191589]=new thumbnail(3191589,"329897","Why I Love California<br>Sonoma, CA","Untitled take 3_thumb.jpg",130,100,1);thumbnails[457573]=new thumbnail(457573,"329897","Keenan's View<br>St Helena, CA","KeenanT.jpg",130,100,1);thumbnails[1681580]=new thumbnail(1681580,"329897","Above Goat Rock<br> Sonoma, CA","Goat3full_thumb.jpg",130,100,1);thumbnails[1681575]=new thumbnail(1681575,"329897","Apple in Bloom<br>Sebastopol, CA","Apple Print v3full_thumb.jpg",130,100,1);thumbnails[457585]=new thumbnail(457585,"329897","Chardonnay Sunrise<br>St Helena, CA","Stony HillT.jpg",130,100,1);thumbnails[457576]=new thumbnail(457576,"329897","Live Oak<br>Santa Rosa, CA ","MCW VinesT.jpg",130,100,1);thumbnails[457583]=new thumbnail(457583,"329897","Smith's Road<br>St Helena, CA","SmithMadroneT.jpg",130,100,1);thumbnails[457579]=new thumbnail(457579,"329897","Moon Mountain<br>Sonoma, CA","MoonMountainT.jpg",130,100,1);thumbnails[457580]=new thumbnail(457580,"329897","Tiny Bubbles<br>Napa, CA","SchramsT.jpg",130,100,1);thumbnails[1681582]=new thumbnail(1681582,"329897","Sandra's Garden<br>Santa Rosa, CA","MCW Gardenfull_thumb.jpg",130,100,1);thumbnails[535541]=new thumbnail(535541,"329897","Deb's Lavender<br>Santa Rosa, CA","05-Deb's lavT.jpg",130,100,1);thumbnails[3165683]=new thumbnail(3165683,"329898","A Beautiful Morning #3<br>Napa, CA","TRIP- Vines _thumb.jpg",130,100,1);thumbnails[457574]=new thumbnail(457574,"329898","Dew Drops on Grape Vines<br>Napa, CA","leavesT.jpg",130,100,1);thumbnails[457572]=new thumbnail(457572,"329898","Sunrise Pruning<br>Napa, CA","homewoodT.jpg",130,100,1);thumbnails[3165633]=new thumbnail(3165633,"329898","Mountain Cabernet<br>Napa, CA","7- Chateau Potelle001_thumb.jpg",130,100,1);thumbnails[457571]=new thumbnail(457571,"329898","Carneros Vines <br>Sonoma, CA","GFT.jpg",130,100,1);thumbnails[3165650]=new thumbnail(3165650,"329898","Above Berryessa<br>Napa, CA","13- Amizetta001_thumb.jpg",130,100,1);thumbnails[457586]=new thumbnail(457586,"329898","Kobler's View<br>Sebastopol, CA","VineyardTreeT.jpg",130,100,1);thumbnails[3165667]=new thumbnail(3165667,"329898","Summit at Sunset<br>Angwin, CA","summit lake001_thumb.jpg",130,100,1);thumbnails[3165653]=new thumbnail(3165653,"329898","Valley Vines<br>Oakville, CA","CAY_0610 B_thumb.jpg",130,100,1);thumbnails[3165643]=new thumbnail(3165643,"329898","Sonoma Merlot<br>Sonoma, CA","8- cohn f8 take 002 v2_thumb.jpg",130,100,1);thumbnails[5829017]=new thumbnail(5829017,"329898","Mustard & Vine<br>St Helena, CA","41270027_mustard_thumb.jpg",130,100,1);thumbnails[5829018]=new thumbnail(5829018,"329898","Ehler's Spring<br>St. Helena, CA","41270035v2_mustard_thumb.jpg",130,100,1);thumbnails[5829025]=new thumbnail(5829025,"329898","Beauty & Tragedy<br>Healdsburg, CA","Amphora_thumb.jpg",130,100,1);thumbnails[3165665]=new thumbnail(3165665,"329899","Rockwall<br>Santa Rosa, CA","ROCKWALL W_thumb.jpg",130,100,1);thumbnails[3165697]=new thumbnail(3165697,"329899","Luscious<br>Santa Rosa, CA","Untitled-Lav1_thumb.jpg",130,100,1);thumbnails[5829000]=new thumbnail(5829000,"329899","Sweet Summer's Eve<br>Santa Rosa, CA","4204_008_HOLGA_LAV_BIG_thumb.jpg",130,100,1);thumbnails[5829001]=new thumbnail(5829001,"329899","Stung<br>Santa Rosa, CA","DSC_0018_stung_thumb.jpg",130,100,1);thumbnails[5829003]=new thumbnail(5829003,"329899","Renee's Lavender<br>Santa Rosa, CA","DSC_0025_ReneLav_thumb.jpg",130,100,1);thumbnails[5829005]=new thumbnail(5829005,"329899","Umbrella in the Lavender Field<br>Santa Rosa, CA","DSC_0037v2_umbrelLavPano_thumb.jpg",130,100,1);thumbnails[5829006]=new thumbnail(5829006,"329899","Golden Grass with the Bees<br>Santa Rosa, CA","DSC_0057_lav_and_gold_grass_thumb.jpg",130,100,1);thumbnails[5829007]=new thumbnail(5829007,"329899","Lavender & Vine<br>Santa Rosa, CA","DSC_0081_LavVine_thumb.jpg",130,100,1);thumbnails[5829008]=new thumbnail(5829008,"329899","Lavender & Olive<br>Santa Rosa, CA","DSC_0154_LavOlive_thumb.jpg",130,100,1);thumbnails[5829009]=new thumbnail(5829009,"329899","Harvested<br>Santa Rosa, CA","DSC_0727_LavHarv_thumb.jpg",130,100,1);thumbnails[5829010]=new thumbnail(5829010,"329899","In the Barn<br>Santa Rosa, CA","DSC_0813_LavHarv_thumb.jpg",130,100,1);thumbnails[5829011]=new thumbnail(5829011,"329899","Simple and yet Complex<br>Santa Rosa, CA","LAV_4204_004_bench_thumb.jpg",130,100,1);thumbnails[5829012]=new thumbnail(5829012,"329899","Molly's Lavender Sunset<br>Santa Rosa, CA","LAV_4204_010_sunset_thumb.jpg",130,100,1);thumbnails[3165660]=new thumbnail(3165660,"329899","Lavender Bed<br>Santa Rosa, CA","Lav Pano B_thumb.jpg",130,100,1);thumbnails[3191553]=new thumbnail(3191553,"329900","Heading North<br>San Francisco, CA","bridge take 2 SQ_thumb.jpg",130,100,1);thumbnails[1681573]=new thumbnail(1681573,"329900","Ocean Rock<br>Sonoma, CA","OceanRockFull_thumb.jpg",130,100,1);thumbnails[1681583]=new thumbnail(1681583,"329900","Amazing Grace<br>Sonoma, CA","OceanPrint12-2007full copy_thumb.jpg",130,100,1);thumbnails[3161757]=new thumbnail(3161757,"329900","Ocean Sunrise<br>Sonoma, CA","ocean 20mm 1 take 5mini_thumb.jpg",130,100,1);thumbnails[3161758]=new thumbnail(3161758,"329900","Finally Friday, Image 1<br>Sonoma, CA","SC1 take 2 B_thumb.jpg",130,100,1);thumbnails[3226175]=new thumbnail(3226175,"329900","Julia's Print","Untitled take 3post_thumb.jpg",130,100,1);thumbnails[5829020]=new thumbnail(5829020,"329900","The Secret Crab Graveyard<br>Sonoma County, CA","44700013_thumb.jpg",130,100,1);thumbnails[5829022]=new thumbnail(5829022,"329900","The Dock of the Bay<br>Bodega Bay, CA","44840002-dock_thumb.jpg",130,100,1);thumbnails[5829023]=new thumbnail(5829023,"329900","The Surfer's Dilemma<br>Sonoma County, CA","44840022-surfer_thumb.jpg",130,100,1);thumbnails[5829036]=new thumbnail(5829036,"329900","The Start of a New Day<br>Sonoma County, CA","surf_2_thumb.jpg",130,100,1);thumbnails[457544]=new thumbnail(457544,"329901","Olives & Irises<br>Napa Valley, CA","3 IrisesT.jpg",130,100,1);thumbnails[457550]=new thumbnail(457550,"329901","Carneros in the Morning<br>Napa, CA","ArtesaT.jpg",130,100,1);thumbnails[3165656]=new thumbnail(3165656,"329901","Creekbed<br>Napa, CA","creekbed B_thumb.jpg",130,100,1);thumbnails[3191555]=new thumbnail(3191555,"329901","In the Spring<br>Napa, CA","Mustard2001_thumb.jpg",130,100,1);thumbnails[5829027]=new thumbnail(5829027,"329901","Turn Toward the Sun<br>Santa Rosa, CA","DSC_0106_-_GRASS_thumb.jpg",130,100,1);thumbnails[5829029]=new thumbnail(5829029,"329901","Rustic Chic<br>Santa Rosa, CA","DSC_0110_Rustic_thumb.jpg",130,100,1);thumbnails[5829030]=new thumbnail(5829030,"329901","In Denial, v1<br>Santa Rosa, CA","spring1_thumb.jpg",130,100,1);thumbnails[5829033]=new thumbnail(5829033,"329901","In Denial, v2<br>Santa Rosa, CA","spring2_thumb.jpg",130,100,1);thumbnails[6127559]=new thumbnail(6127559,"343399","Viansa Sunset","58480033_thumb.jpg",130,100,1);thumbnails[6127561]=new thumbnail(6127561,"343399","Vine Row","58480029_thumb.jpg",130,100,1);thumbnails[6127564]=new thumbnail(6127564,"343399","In the Vineyard","58480008_thumb.jpg",130,100,1);thumbnails[6127566]=new thumbnail(6127566,"343399","Sonoma Spring","58450034_thumb.jpg",130,100,1);thumbnails[6127570]=new thumbnail(6127570,"343399","Tuscan Spring","58450030_thumb.jpg",130,100,1);thumbnails[6269678]=new thumbnail(6269678,"348477","Vanessa #1","70290013_thumb.jpg",130,100,1);thumbnails[6269679]=new thumbnail(6269679,"348477","Vanessa #2","70290016_thumb.jpg",130,100,1);thumbnails[6269681]=new thumbnail(6269681,"348477","Vanessa #3","70290031_thumb.jpg",130,100,1);var galleries=new Object();galleries[329896]=new gallery(329896,"5828994,5828993,5828992,5828991,5828989,5828988,5828986,5828983,5828982,5828980,5828979,5828978,5828977,5828976,5828975,5828974,5828973,5828972,5828971","Polaroids","gallery",[5828986,5828988,5828994,5828976,5828992,5828972,5828993,5828975,5828991,5828989,5828973,5828974,5828971,5828977,5828978,5828979,5828980,5828982,5828983]);galleries[329897]=new gallery(329897,"3191589,3165689,1681582,1681580,1681576,1681575,1681569,457585,457584,457583,457580,457579,457576,457573,457570,457569,457557,457556","Panoramics","gallery",[457584,457570,1681576,457569,1681569,457557,3165689,457556,3191589,457573,1681580,1681575,457585,457576,457583,457579,457580,1681582,535541]);galleries[329898]=new gallery(329898,"3165683,3165667,3165653,3165650,3165643,3165633,457586,457574,457572,457571","Vineyards at Dawn","gallery",[3165683,457574,457572,3165633,457571,3165650,457586,3165667,3165653,3165643,5829017,5829018,5829025]);galleries[329899]=new gallery(329899,"3165697,3165665,3165660","Lavender in June","gallery",[3165665,3165697,5829000,5829001,5829003,5829005,5829006,5829007,5829008,5829009,5829010,5829011,5829012,3165660]);galleries[329900]=new gallery(329900,"3191553,1681583,1681573","Day at the Sea","gallery",[3191553,1681573,1681583,3161757,3161758,3226175,5829020,5829022,5829023,5829036]);galleries[329901]=new gallery(329901,"3191555,3165656,457550,457544","Other Delights","gallery",[457544,457550,3165656,3191555,5829027,5829029,5829030,5829033]);galleries[343399]=new gallery(343399,"6127570,6127566,6127564,6127561,6127559","Viansa's Vineyard","gallery",[6127559,6127561,6127564,6127566,6127570]);galleries[348477]=new gallery(348477,"6269681,6269679,6269678","Vanessa & Lavender","gallery",[6269678,6269679,6269681]);var imageSets=new Object();imageSets[1]="6127559,5829025,5829018,5829017,5829009,5829001,3165683,3165665,3165650,3165633,457574,457572,457550";imageSets[2]="6269681,6269679,6269678,6127570,6127566,6127564,6127561,6127559,5828994,5828993,5828992,5828991,5828989,5828988,5828986,5828983,5828982,5828980,5828979,5828978,5828977,5828976,5828975,5828974,5828973,5828972,5828971,3191589,3191555,3191553,3165697,3165689,3165683,3165667,3165665,3165660,3165656,3165653,3165650,3165643,3165633,1681583,1681582,1681580,1681576,1681575,1681573,1681569,457586,457585,457584,457583,457580,457579,457576,457574,457573,457572,457571,457570,457569,457557,457556,457550,457544";imageSets[3]="6269681,6269679,6269678,6127570,6127566,6127564,6127561,6127559,5829036,5829033,5829030,5829029,5829027,5829025,5829023,5829022,5829020,5829018,5829017,5829012,5829011,5829010,5829009,5829008,5829007,5829006,5829005,5829003,5829001,5829000,5828994,5828993,5828992,5828991,5828989,5828988,5828986,5828983,5828982,5828980,5828979,5828978,5828977,5828976,5828975,5828974,5828973,5828972,5828971,3226175";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/mrhodes/images";break}switch(a){case 1:b="http://www1.clikpic.com/mrhodes/images";break}switch(a){case 2:b="http://admin.clikpic.com/mrhodes/images";break}switch(a){case 24:b="http://tpc15/clikpic/mrhodes/images";break}switch(a){case 4:b="http://www.clikchurch.com/mrhodes/images";break}switch(a){case 5:b="http://www2.clikpic.com/mrhodes/images";break}switch(a){case 22:b="http://tpc5/clikpic/mrhodes/images";break}switch(a){case 23:b="http://tpc10/clikpic/mrhodes/images";break}switch(a){case 25:b="http://tpc16/clikpic/mrhodes/images";break}switch(a){case 15:b="http://www3.clikpic.com/mrhodes/images";break}switch(a){case 18:b="http://www4.clikpic.com/mrhodes/images";break}switch(a){case 19:b="http://www5.clikpic.com/mrhodes/images";break}switch(a){case 31:b="http://www7.clikpic.com/mrhodes/images";break}switch(a){case 32:b="http://admin2.clikpic.com/mrhodes/images";break}switch(a){case 33:b="http://www8.clikpic.com/mrhodes/images";break}switch(a){case 34:b="http://www9.clikpic.com/mrhodes/images";break}switch(a){case 35:b="http://admin3.clikpic.com/mrhodes/images";break}switch(a){case 37:b="http://admin4.clikpic.com/mrhodes/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="Megan Rhodes 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>Type </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="MRHODES">';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+'")'})}}};