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[3504151]=new thumbnail(3504151,"214255","","dog1_thumb.JPG",130,125,15);thumbnails[3504157]=new thumbnail(3504157,"214255","","dogs 1a 05_thumb.jpg",130,132,15);thumbnails[3504165]=new thumbnail(3504165,"214255","","4-picture3_thumb.JPG",130,200,15);thumbnails[3504172]=new thumbnail(3504172,"214255","","horses_thumb.jpg",130,81,15);thumbnails[3504191]=new thumbnail(3504191,"214255","","dogs 3 05_thumb.jpg",130,108,15);thumbnails[3504204]=new thumbnail(3504204,"214255","","dogs 1_thumb.jpg",130,93,15);thumbnails[3504213]=new thumbnail(3504213,"214255","","dogs 1 06_thumb.jpg",130,131,15);thumbnails[3504247]=new thumbnail(3504247,"214254",'"Nan"',"nan 04_thumb.jpg",130,174,15);thumbnails[3504262]=new thumbnail(3504262,"214254","","group_thumb.JPG",130,96,15);thumbnails[3504340]=new thumbnail(3504340,"214254","","boy 05_thumb.jpg",130,171,15);thumbnails[3504342]=new thumbnail(3504342,"214254","","c&o_thumb.jpg",130,125,15);thumbnails[3504351]=new thumbnail(3504351,"214254","","girl 1 06_thumb.jpg",130,186,15);thumbnails[3504357]=new thumbnail(3504357,"214254","","triple portrait 003_thumb.jpg",130,98,15);thumbnails[3504933]=new thumbnail(3504933,"214440","FOR SALE  £130.00<br>\r\nMale nude #1","001_thumb.JPG",130,99,15);thumbnails[3504936]=new thumbnail(3504936,"214440","FOR SALE  £130.00<br>\r\nMale nude #2","DSC01915_thumb.JPG",130,103,15);thumbnails[3504945]=new thumbnail(3504945,"214440","","DSC01742_thumb.JPG",130,97,15);thumbnails[3505036]=new thumbnail(3505036,"214442","","DSC015201_thumb.JPG",130,94,15);thumbnails[3505039]=new thumbnail(3505039,"214442","SOLD","DSC01745_thumb.JPG",130,98,15);thumbnails[3505042]=new thumbnail(3505042,"214442","","oct 07 007 - Copy_thumb.jpg",130,94,15);thumbnails[3505047]=new thumbnail(3505047,"214442","","lifeboat 06_thumb.jpg",130,85,15);thumbnails[3507235]=new thumbnail(3507235,"214254","","DSC00098_thumb.JPG",130,178,15);thumbnails[3507269]=new thumbnail(3507269,"214254","","Robbie & lifeboats 0021_thumb.jpg",130,80,15);thumbnails[3507282]=new thumbnail(3507282,"214255","","horse 1 06_thumb.jpg",130,195,15);thumbnails[3507294]=new thumbnail(3507294,"214442","SOLD","sea_thumb.jpg",130,132,15);thumbnails[3507298]=new thumbnail(3507298,"214442","","needles_thumb.jpg",130,98,15);thumbnails[3507356]=new thumbnail(3507356,"214526","","bf 2_thumb.jpg",130,93,15);thumbnails[3507913]=new thumbnail(3507913,"214255","FOR SALE  130.00","DSC00035_thumb.JPG",130,180,15);thumbnails[3508426]=new thumbnail(3508426,"214442","","seascape 05_thumb.jpg",130,50,15);thumbnails[3508556]=new thumbnail(3508556,"214255","","dog2_thumb.JPG",130,124,15);thumbnails[3508575]=new thumbnail(3508575,"214255","","dogs 05_thumb.jpg",130,119,15);thumbnails[3508613]=new thumbnail(3508613,"214526",'"Judge Jeffry\'s" Dorchester',"Judge Jefferies_thumb.jpg",130,174,15);thumbnails[3510784]=new thumbnail(3510784,"214644","","beekeeper_thumb.jpg",130,180,15);thumbnails[3511207]=new thumbnail(3511207,"214644","","sea vix_thumb.jpg",130,93,15);thumbnails[3511214]=new thumbnail(3511214,"214644","","seaside 2_thumb.jpg",130,94,15);thumbnails[3511225]=new thumbnail(3511225,"214644","","p mills 21_thumb.jpg",130,100,15);thumbnails[3511227]=new thumbnail(3511227,"214526","","pmills5_thumb.jpg",130,94,15);thumbnails[3511231]=new thumbnail(3511231,"214254","","portrait2_thumb.JPG",130,76,15);thumbnails[3511243]=new thumbnail(3511243,"214254","","portrait_thumb.JPG",130,209,15);thumbnails[3511271]=new thumbnail(3511271,"214644",'"Amsterdam"',"amsterdam_thumb.JPG",130,95,15);thumbnails[3511273]=new thumbnail(3511273,"214255",'"Old Lab"',"dog 1 06_thumb.jpg",130,161,15);thumbnails[3511277]=new thumbnail(3511277,"214255",'"Freddie"',"dog 3_thumb.jpg",130,166,15);thumbnails[3525463]=new thumbnail(3525463,"214254",'"Jake"',"DSC01919_thumb.JPG",130,166,15);thumbnails[3525470]=new thumbnail(3525470,"226806",'"Conger Party"<br>\r\nShortlisted for DSWLF Wildlife Artist of the Year 2009.<br>\r\nWatercolour.<br>\r\n<br>\r\nA3 Limited Edition 250 prints , framed- £45.00<br>\r\n                                            unframed - £20.00 <br>\r\nA2 Limited Edition 50 Prints , framed- £95.00<br>\r\n                                           mounted- £75.00<br>\r\n',"DSC01921_thumb.JPG",130,98,15);thumbnails[3553863]=new thumbnail(3553863,"214254",'"Tim & Angela"',"DSC01948_-_Copy_thumb.JPG",130,110,15);thumbnails[3553872]=new thumbnail(3553872,"214255","FOR SALE £100.00","DSC01811_thumb.JPG",130,98,15);thumbnails[3555493]=new thumbnail(3555493,"214255",'"Playmates"',"DSC01482_thumb.JPG",130,90,15);thumbnails[3560724]=new thumbnail(3560724,"214442",'"Evening Sun"<br>\r\nFOR SALE £110.00',"DSC01950_thumb.JPG",130,84,15);thumbnails[3576606]=new thumbnail(3576606,"214442",'"Almorah Too"',"DSC01955_thumb.JPG",130,100,15);thumbnails[3576612]=new thumbnail(3576612,"214526",'"Monster Towers-Olympic View,Portland"',"DSC01952_thumb.JPG",130,95,15);thumbnails[3711857]=new thumbnail(3711857,"226806",'"Home Sweet Home"<br>\r\nAccepted for the SWLA Anual Exhibition at the Mall Galleries in London 23rd Sept. - 4th Oct <br>\r\n2009.<br>\r\n<br>\r\nA3 limited Edition 250 prints , framed- £45.00<br>\r\n                                            unframed - £20.00',"DSC01964_thumb.JPG",130,106,15);thumbnails[3730745]=new thumbnail(3730745,"214254","Family Portrait","sarah_painting_002_thumb.jpg",130,212,15);thumbnails[3820957]=new thumbnail(3820957,"214442",'"Fiona Mary,"<br>\r\n',"DSC01988_thumb.JPG",130,99,15);thumbnails[4013354]=new thumbnail(4013354,"214254","50th Birthday commission.<br>\r\nWatercolour","DSC01961_thumb.JPG",130,94,15);thumbnails[4029147]=new thumbnail(4029147,"226806",'"Old Man of the Sea" .<br>\r\n<br>\r\nA3 Limited Edition 250 prints , framed -  £45.00<br>\r\n                                             unframed - £20.00',"DSC02078_thumb.JPG",130,103,15);thumbnails[4247759]=new thumbnail(4247759,"226806",'"The Protector"<br>\r\n<br>\r\nA3 Limited Edition 250 Prints,  framed - £45.00<br>\r\n                                            unframed - £20.00',"DSC02082_thumb.JPG",130,98,15);thumbnails[4248053]=new thumbnail(4248053,"226806","","DSC02090_thumb.JPG",130,174,15);thumbnails[4248060]=new thumbnail(4248060,"226806",'"Old Man of the Sea" - detail',"DSC02089_thumb.JPG",130,173,15);thumbnails[4344179]=new thumbnail(4344179,"","","DSC02100_thumb.JPG",130,98,15);thumbnails[4411841]=new thumbnail(4411841,"214442","SOLD","DSC00431_thumb.JPG",130,42,15);thumbnails[4590835]=new thumbnail(4590835,"214254",'"Meggy"',"n1125627247_30025710_79911_thumb.jpg",130,173,15);thumbnails[4590841]=new thumbnail(4590841,"214254",'"Prom Day"',"5300_1192074918447_1125627247_30597473_7515515_n1_thumb.jpg",130,173,15);thumbnails[4590847]=new thumbnail(4590847,"214442",'"Olympic Harbour" <br>\r\nSOLD',"6580_1165003761685_1125627247_30495677_3123543_n1_thumb.jpg",130,98,15);thumbnails[4647257]=new thumbnail(4647257,"214442","Weymouth Harbour Commission<br>\r\n","7719_1198517279502_1125627247_30621789_8087067_n1_thumb.jpg",130,98,15);thumbnails[4656571]=new thumbnail(4656571,"214442",'"Who Pays the Ferryman"<br>\r\nFor Sale<br>\r\n£120.00<br>\r\n',"Who_pays_the_ferryman_thumb.jpg",130,158,15);thumbnails[4810286]=new thumbnail(4810286,"226806",'"Camouflage"<br>\r\nFor Sale £240.00',"7719_1213956625476_1125627247_30669727_4067858_n1_thumb.jpg",130,85,15);thumbnails[4862098]=new thumbnail(4862098,"277112","","7719_1219296358966_1125627247_30688185_4366871_n1_thumb.jpg",130,98,15);thumbnails[4862103]=new thumbnail(4862103,"277112","","7719_1219296438968_1125627247_30688187_870994_n1_thumb.jpg",130,98,15);thumbnails[4868217]=new thumbnail(4868217,"226806",'"Resting - Plaice"<br>\r\nShortlisted for the David Shepherd Wildlife Artist of the Year Award 2010.',"DSC02124_thumb.JPG",130,98,15);thumbnails[5089352]=new thumbnail(5089352,"","","PM_2_thumb.jpg",130,95,15);thumbnails[5182482]=new thumbnail(5182482,"214254","Triple portrait commission","DSC02129_thumb.JPG",130,98,15);thumbnails[5182491]=new thumbnail(5182491,"214254","Wedding portrait commission","DSC02130_thumb.JPG",130,182,15);thumbnails[5262568]=new thumbnail(5262568,"214255",'"Collie" commission.<br>\r\nWatercolour<br>\r\n20"x27"',"DSC02132_thumb.JPG",130,98,15);thumbnails[5291381]=new thumbnail(5291381,"214644",'"Chilli Pepper" commission.<br>\r\nwatercolour',"DSC02134_thumb.JPG",130,129,15);thumbnails[5424475]=new thumbnail(5424475,"214255",'"Roy"',"DSC02137_thumb.JPG",130,139,15);thumbnails[5471453]=new thumbnail(5471453,"214255","","DSC02138_thumb.JPG",130,138,15);thumbnails[5623839]=new thumbnail(5623839,"214644","Globe commission.<br>\r\nEnamel paints on brass.","DSC02147_thumb.JPG",130,173,15);thumbnails[5623844]=new thumbnail(5623844,"214644","","DSC02148_thumb.JPG",130,98,15);thumbnails[5623846]=new thumbnail(5623846,"214644","","DSC02149_thumb.JPG",130,98,15);thumbnails[5623848]=new thumbnail(5623848,"214644","","DSC02150_thumb.JPG",130,98,15);thumbnails[5623850]=new thumbnail(5623850,"214644","","DSC02151_thumb.JPG",130,98,15);thumbnails[5623853]=new thumbnail(5623853,"214644","","DSC02152_thumb.JPG",130,98,15);thumbnails[5623854]=new thumbnail(5623854,"214644","","DSC02153_thumb.JPG",130,98,15);thumbnails[5623858]=new thumbnail(5623858,"214644","","DSC02154_thumb.JPG",130,98,15);thumbnails[5814370]=new thumbnail(5814370,"226806",'"Mullet - Mush"<br>\r\nSOLD',"DSC021561_thumb.JPG",130,128,15);thumbnails[5814394]=new thumbnail(5814394,"214442","The Fleet.<br>\r\nSOLD","DSC02158_thumb.JPG",130,100,15);thumbnails[5859103]=new thumbnail(5859103,"214254",'"Geoff" <br>\r\nPortrait Commission',"DSC02159_thumb.JPG",130,184,15);thumbnails[5865040]=new thumbnail(5865040,"226806",'"Flat-Face"<br>\r\nFor Sale £45.00',"DSC02162_thumb.JPG",130,97,15);thumbnails[5984740]=new thumbnail(5984740,"214442",'" Wreck at the Fleet "<br>\r\nFor Sale £45.00',"DSC02164_thumb.JPG",130,93,15);thumbnails[6068733]=new thumbnail(6068733,"214442",'Sunrise - Portland Harbour<br>\r\nAcrylic, framed<br>\r\n9x7"<br>\r\nFor Sale £45.00',"DSC02167_thumb.JPG",130,98,15);thumbnails[6275723]=new thumbnail(6275723,"214255",'"Bracken"',"DSC02168_thumb.JPG",130,173,15);thumbnails[6292936]=new thumbnail(6292936,"214442","Blue Boat<br>\r\nSOLD","DSC02170_thumb.JPG",130,96,15);thumbnails[6355629]=new thumbnail(6355629,"214254",'" Old Friends"',"DSC02172_thumb.JPG",130,172,15);thumbnails[6371272]=new thumbnail(6371272,"214254",'"Old Friends" -  Detail<br>\r\nCommission',"37635_143857722293072_122547841090727_410811_7683414_n1_thumb.jpg",130,199,15);thumbnails[6371273]=new thumbnail(6371273,"214254",'"Old Friends" - Detail',"37635_143857728959738_122547841090727_410813_7318787_n1_thumb.jpg",130,186,15);thumbnails[6371274]=new thumbnail(6371274,"214254",'" Old Friends " - Detail',"37635_143857725626405_122547841090727_410812_5002054_n1_thumb.jpg",130,115,15);thumbnails[6599400]=new thumbnail(6599400,"214255",'"Merlion"',"46152_152731054739072_122547841090727_466740_6463707_n1_thumb.jpg",130,103,15);thumbnails[6604928]=new thumbnail(6604928,"226806",'"Cuttle"<br>\r\nFor Sale £48.00',"39874_154159724596205_122547841090727_477572_429674_n1_thumb.jpg",130,98,15);thumbnails[6612539]=new thumbnail(6612539,"214254",'"Jake" - at sea.',"40968_154460777899433_122547841090727_479064_4513558_n1_thumb.jpg",130,173,15);var galleries=new Object();galleries[277112]=new gallery(277112,"4862103,4862098",'"The Painting Shed"',"gallery",[4862098,4862103]);galleries[214255]=new gallery(214255,"6599400,6275723,5471453,5424475,5262568,3555493,3553872,3511277,3511273,3508575","Animals","gallery",[3504151,3504157,3504165,3504172,3504191,3504204,3504213,3507282,3507913,3508556,3508575,3511273,3511277,3553872,3555493,5262568,5424475,5471453,6275723,6599400]);galleries[214526]=new gallery(214526,"3576612,3511227,3508613,3507356","Buildings","gallery",[3507356,3508613,3511227,3576612]);galleries[214440]=new gallery(214440,"3504945","Life Painting","gallery",[3504933,3504936,3504945]);galleries[226806]=new gallery(226806,"6604928,5865040,5814370,4868217,4810286,4248060,4248053,4247759,4029147,3711857","Marine WildLife","gallery",[3525470,3711857,4029147,4247759,4248053,4248060,4810286,4868217,5814370,5865040,6604928]);galleries[214644]=new gallery(214644,"5623858,5623854,5623853,5623850,5623848,5623846,5623844,5623839,5291381,3511271","Miscellaneous","gallery",[3510784,3511207,3511214,3511225,3511271,5291381,5623839,5623844,5623846,5623848,5623850,5623853,5623854,5623858]);galleries[214254]=new gallery(214254,"3525463","Portraits","gallery",[3504247,3504262,3504340,3504342,3504351,3504357,3507235,3507269,3511231,3511243,3525463,3553863,3730745,4013354,4590835,4590841,5182482,5182491,5859103,6355629,6371272,6371273,6371274,6612539]);galleries[214442]=new gallery(214442,"3820957","Seascapes","gallery",[3505036,3505039,3505042,3505047,3507294,3507298,3508426,3560724,3576606,3820957,4411841,4590847,4647257,4656571,5814394,5984740,6068733,6292936]);var imageSets=new Object();imageSets[1]="4344179";imageSets[2]="3820957,3525463,3504945";imageSets[3]="6612539,6604928,6599400,6371274,6371273,6371272,6355629,6292936,6275723,6068733,5984740,5865040,5859103,5814394,5814370,5623858,5623854,5623853,5623850,5623848,5623846,5623844,5623839,5471453,5424475,5291381,5262568,5182491,5182482,5089352,4868217,4862103,4862098,4810286,4656571,4647257,4590847,4590841,4590835,4411841,4344179,4248060,4248053,4247759,4029147,4013354,3820957,3730745,3711857,3576612";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/catht/images";break}switch(a){case 1:b="http://www1.clikpic.com/catht/images";break}switch(a){case 2:b="http://admin.clikpic.com/catht/images";break}switch(a){case 24:b="http://tpc15/clikpic/catht/images";break}switch(a){case 4:b="http://www.clikchurch.com/catht/images";break}switch(a){case 5:b="http://www2.clikpic.com/catht/images";break}switch(a){case 22:b="http://tpc5/clikpic/catht/images";break}switch(a){case 23:b="http://tpc10/clikpic/catht/images";break}switch(a){case 25:b="http://tpc16/clikpic/catht/images";break}switch(a){case 15:b="http://www3.clikpic.com/catht/images";break}switch(a){case 18:b="http://www4.clikpic.com/catht/images";break}switch(a){case 19:b="http://www5.clikpic.com/catht/images";break}switch(a){case 31:b="http://www7.clikpic.com/catht/images";break}switch(a){case 32:b="http://admin2.clikpic.com/catht/images";break}switch(a){case 33:b="http://www8.clikpic.com/catht/images";break}switch(a){case 34:b="http://www9.clikpic.com/catht/images";break}switch(a){case 35:b="http://admin3.clikpic.com/catht/images";break}switch(a){case 37:b="http://admin4.clikpic.com/catht/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="Weymouth Portraits - Cathy Taylor - Paintings: "+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].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><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"></p>';b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+(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="CATHT">';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+'")'})}}};