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[2836345]=new thumbnail(2836345,"","Encourage",")-'Encourage'-Ceramic-Wall-_thumb.jpg",130,206,5);thumbnails[3299941]=new thumbnail(3299941,"","INSPIRAL DOORWAY I","InspiralDoorway_thumb.jpg",130,181,5);thumbnails[5370205]=new thumbnail(5370205,"","FURROW","Ceramic_2123_thumb.jpg",130,160,5);thumbnails[6396963]=new thumbnail(6396963,"","Six Small Pieces","Kaetsu_2_thumb.jpg",130,116,5);thumbnails[6397012]=new thumbnail(6397012,"","","Kaetsu_21_thumb.jpg",130,119,5);thumbnails[6397035]=new thumbnail(6397035,"","","Kaetsu_8_thumb.jpg",130,102,5);thumbnails[3300811]=new thumbnail(3300811,"","No.1","Relativity1_thumb.jpg",130,131,5);thumbnails[5370233]=new thumbnail(5370233,"","CONTACT I","Contact_1_thumb.jpg",130,182,5);thumbnails[3300817]=new thumbnail(3300817,"","No.2","Relativity2_thumb.jpg",130,130,5);thumbnails[5370216]=new thumbnail(5370216,"","CONTACT II","Contact_II_thumb.jpg",130,177,5);thumbnails[3300827]=new thumbnail(3300827,"","No.3","Relativity31_thumb.jpg",130,131,5);thumbnails[5370311]=new thumbnail(5370311,"","CONTACT III","Contact_III1_thumb.jpg",130,180,5);thumbnails[3300832]=new thumbnail(3300832,"","No.4","Relativity4_thumb.jpg",130,131,5);thumbnails[5426089]=new thumbnail(5426089,"","IMPRESSION I","occasions_photography_026_thumb.jpg",130,154,5);thumbnails[3301116]=new thumbnail(3301116,"","No.5","Relativity5_thumb.jpg",130,130,5);thumbnails[5426005]=new thumbnail(5426005,"","VERTICAL SERIES NO. 1","occasions_photography_0271_thumb.jpg",130,303,5);thumbnails[3301118]=new thumbnail(3301118,"","No.6","Relativity6_thumb.jpg",130,131,5);thumbnails[5419878]=new thumbnail(5419878,"","VERTICAL SERIES NO. 4","Vertical_Green_II_thumb.jpg",130,294,5);thumbnails[3301127]=new thumbnail(3301127,"","No.7","Relativity7_thumb.jpg",130,129,5);thumbnails[3301136]=new thumbnail(3301136,"","No.8","Relativity8_thumb.jpg",130,131,5);thumbnails[3301218]=new thumbnail(3301218,"","No.9","Relativity9_thumb.jpg",130,130,5);thumbnails[3301221]=new thumbnail(3301221,"","No.10","Relativity10_thumb.jpg",130,130,5);thumbnails[5561106]=new thumbnail(5561106,"","SYNTHESIS I","3_Synthesis_I_thumb.jpg",130,159,5);thumbnails[3301225]=new thumbnail(3301225,"","No.11","Relativity11_thumb.jpg",130,129,5);thumbnails[5561108]=new thumbnail(5561108,"","SYNTHESIS II","4_Synthesis_II_thumb.jpg",130,153,5);thumbnails[3301228]=new thumbnail(3301228,"","No.12","Relativity12_thumb.jpg",130,129,5);thumbnails[5561137]=new thumbnail(5561137,"","SYNTHESIS III","5_Synthesis_III_thumb.jpg",130,160,5);thumbnails[3301233]=new thumbnail(3301233,"","No.13","Relativity13_thumb.jpg",130,131,5);thumbnails[5561198]=new thumbnail(5561198,"","FURROW II","Ceramic_1_thumb.jpg",130,159,5);thumbnails[5370229]=new thumbnail(5370229,"","FOLLOW SERIES","Follow_Series1_thumb.jpg",130,125,5);thumbnails[3299851]=new thumbnail(3299851,"","Field I ","Encircle_thumb.jpg",130,184,5);thumbnails[3300687]=new thumbnail(3300687,"","Access","Access_thumb.jpg",130,181,5);thumbnails[2836004]=new thumbnail(2836004,"","Verge","Verge_thumb.jpg",130,174,5);thumbnails[3299861]=new thumbnail(3299861,"","Field II","Field II_thumb.jpg",130,186,5);thumbnails[5419858]=new thumbnail(5419858,"","ENCIRCLE","Circlular_thumb.jpg",130,177,5);thumbnails[3300706]=new thumbnail(3300706,"","Addition","Addition_thumb.jpg",130,132,5);thumbnails[5370237]=new thumbnail(5370237,"","OPENING SERIES","occasions_photography_051_thumb.jpg",130,88,5);thumbnails[5561084]=new thumbnail(5561084,"","WINDOW I","1_Window_I_thumb.jpg",130,160,5);thumbnails[2835997]=new thumbnail(2835997,"","Origin","Origon_thumb.jpg",130,135,5);thumbnails[5370235]=new thumbnail(5370235,"","SYNTHESIS SERIES","Synthesis1_thumb.jpg",130,55,5);thumbnails[5419862]=new thumbnail(5419862,"","ENCLOSURE","Enclosure_6B0D9744-1D09-001F-99D8218AA55A7312_thumb.jpg",130,170,5);thumbnails[3300586]=new thumbnail(3300586,"","Horizon","Horizon_thumb.jpg",130,158,5);thumbnails[5419870]=new thumbnail(5419870,"","SIMPLICITY III","Horizontal_Ceramic_thumb.jpg",130,99,5);thumbnails[5719158]=new thumbnail(5719158,"176685","SYNCHRONICITY I","Synchronicity_I12_thumb.jpg",130,171,5);thumbnails[5719171]=new thumbnail(5719171,"176685","SYNCHRONICITY II","Synchronicity_II1_thumb.jpg",130,171,5);thumbnails[5719174]=new thumbnail(5719174,"176685","INFLUX","Doorway_VI_thumb.jpg",130,179,5);thumbnails[6394261]=new thumbnail(6394261,"176685","Unity","Unity_thumb.jpg",130,176,5);thumbnails[5561188]=new thumbnail(5561188,"176685","TRAVERSE","Across_50_x_50_cm_thumb.jpg",130,131,5);thumbnails[2840251]=new thumbnail(2840251,"176685","INSPIRAL DOORWAY IV","DoorwayIV_thumb.jpg",130,127,5);thumbnails[5719176]=new thumbnail(5719176,"176685","TERRAIN","Terrain_70_x_70_cm_thumb.jpg",130,131,5);thumbnails[5561174]=new thumbnail(5561174,"176685","25 CIRCLES","7_25_Circles_thumb.jpg",130,129,5);thumbnails[5719241]=new thumbnail(5719241,"176685","SYSTEM SERIES I","System_Series_I1_thumb.jpg",130,194,5);thumbnails[5719243]=new thumbnail(5719243,"176685","SYSTEM SERIES II","System_Series_II_thumb.jpg",130,194,5);thumbnails[5719245]=new thumbnail(5719245,"176685","SYSTEM SERIES III","System_Series_III_thumb.jpg",130,194,5);thumbnails[5719249]=new thumbnail(5719249,"176685","SYSTEM SERIES IV","System_Series_IV_thumb.jpg",130,194,5);thumbnails[5719250]=new thumbnail(5719250,"176685","SYSTEM SERIES GROUP OF FOUR","System_Series_thumb.jpg",130,194,5);thumbnails[2835912]=new thumbnail(2835912,"176685","Quintessence - SOLD","Quintessence_thumb.jpg",130,189,5);thumbnails[2835976]=new thumbnail(2835976,"176685","INSPIRE ","2_Inspire_Ceramic_Wall_Panel_51_x_32_cm_thumb.jpg",130,204,5);thumbnails[6396940]=new thumbnail(6396940,"176685","FRAGMENT II","Fragment_II_thumb.jpg",130,188,5);thumbnails[2838572]=new thumbnail(2838572,"176685","Field Series","Fields1_thumb.jpg",130,175,5);thumbnails[2836346]=new thumbnail(2836346,"176685","12 Doorways","12-Doorways1_thumb.jpg",130,172,5);thumbnails[6396960]=new thumbnail(6396960,"176685","INFINITE CONNECTIONS","Infinite_Connections_thumb.jpg",130,130,5);thumbnails[6396971]=new thumbnail(6396971,"176685","Infinite Connections - Detail","Kaetsu_11_thumb.jpg",130,98,5);thumbnails[5370224]=new thumbnail(5370224,"176685","SCORE I","Score_I_thumb.jpg",130,131,5);thumbnails[3301236]=new thumbnail(3301236,"176685","Relativity No.14","Relativity14_thumb.jpg",130,130,5);thumbnails[3299762]=new thumbnail(3299762,"176685","Relativity No.15","Relativity15_thumb.jpg",130,131,5);thumbnails[3301240]=new thumbnail(3301240,"176685","Relativity No.16","Relativity16_thumb.jpg",130,130,5);thumbnails[6396966]=new thumbnail(6396966,"176685","Six small Pieces","Kaetsu_14_thumb.jpg",130,113,5);thumbnails[2836372]=new thumbnail(2836372,"176685","FRAGMENT","Fragment_thumb.jpg",130,75,5);thumbnails[6394212]=new thumbnail(6394212,"176685","Figure 1 Outdoor Ceramic Mural","Emmaus_1_FA0F5A70-1D09-001F-99B5CBA2BE46F9FD_thumb.jpg",130,67,5);thumbnails[6394222]=new thumbnail(6394222,"176685","Figure 2 Outdoor Ceramic Mural","Emmaus_2_FA115640-1D09-001F-99FD16CF69F206DC_thumb.jpg",130,66,5);thumbnails[2835862]=new thumbnail(2835862,"176687","Connection No.1","Connection1_thumb.jpg",130,129,5);thumbnails[2835686]=new thumbnail(2835686,"176687","Connection No.2","Connection2_thumb.jpg",130,131,5);thumbnails[2835863]=new thumbnail(2835863,"176687","Connection No.3","Connection3_thumb.jpg",130,131,5);thumbnails[2840249]=new thumbnail(2840249,"176687","Connection No.4","Connection43_thumb.jpg",130,131,5);thumbnails[2835965]=new thumbnail(2835965,"176687","Connection No.5","Connection5_thumb.jpg",130,131,5);thumbnails[2835968]=new thumbnail(2835968,"176687","Connection No.6","Connection6_thumb.jpg",130,131,5);thumbnails[2835969]=new thumbnail(2835969,"176687","Connection No.7","Connection7_thumb.jpg",130,131,5);thumbnails[2835973]=new thumbnail(2835973,"176687","Connection No.8","Connection8_thumb.jpg",130,129,5);thumbnails[2835985]=new thumbnail(2835985,"176687","Connection No.9","Connection9_thumb.jpg",130,131,5);thumbnails[2838708]=new thumbnail(2838708,"176687","Inspiral Doorway","Inspiral-Doorway-Linocut1_thumb.jpg",130,131,5);thumbnails[2836352]=new thumbnail(2836352,"176687","Exist I","Exist2_thumb.jpg",130,156,5);thumbnails[2836389]=new thumbnail(2836389,"176687","Exist II","Exist21_thumb.jpg",130,153,5);thumbnails[2840687]=new thumbnail(2840687,"176687","Simplicity I","Simplicity-I_thumb.jpg",130,110,5);thumbnails[2840689]=new thumbnail(2840689,"176687","Simplicity II","Simplicity-II_thumb.jpg",130,113,5);thumbnails[3439619]=new thumbnail(3439619,"210342","Saezuri","1AAA 'saezuri_thumb.jpg",130,128,5);thumbnails[3439617]=new thumbnail(3439617,"210342","Kozue","1AAA 'kozue'_thumb.JPG",130,130,5);thumbnails[3439611]=new thumbnail(3439611,"210342","Komorebi","1AAA 'komorebi'_thumb.JPG",130,131,5);thumbnails[3439632]=new thumbnail(3439632,"210342","Hidamari","1AAAA3_thumb. 'hidamari'.jpg",130,132,5);thumbnails[3439627]=new thumbnail(3439627,"210342","Seseragi","1AAA 'seseragi'_thumb.JPG",130,129,5);thumbnails[3439606]=new thumbnail(3439606,"210342","Kazehana","1AAA 'kazahana'_thumb.jpg",130,129,5);thumbnails[6173942]=new thumbnail(6173942,"344991","'An Uprising of Kindness'<br>\r\nFigure 1 - Outdoor Ceramic Floor Tiles 104 x 52 cm","Emmaus_1_thumb.jpg",130,67,5);thumbnails[6173947]=new thumbnail(6173947,"344991","'An Uprising of Kindness' Figure 1 (detail)","Emmaus_1_detail1_thumb.jpg",130,98,5);thumbnails[6173949]=new thumbnail(6173949,"344991","'An Uprising of Kindness' Figure 1","Emmaus_1_detail2_thumb.jpg",130,98,5);thumbnails[6173950]=new thumbnail(6173950,"344991","'An Uprising of Kindness' Figure 2 - Outdoor Ceramic Floor Tiles 104 x 52 cm","Emmaus_2_thumb.jpg",130,66,5);thumbnails[6173953]=new thumbnail(6173953,"344991","'An Uprising of Kindness' Figure 2 (detail)","Emmaus_2_detail_thumb.jpg",130,98,5);thumbnails[6173955]=new thumbnail(6173955,"344991","'An Uprising of Kindness' Figure 2 (detail)","Emmaus_2_detail2_thumb.jpg",130,98,5);thumbnails[6397015]=new thumbnail(6397015,"353440","","Kaetsu_3_thumb.jpg",130,98,5);thumbnails[6397009]=new thumbnail(6397009,"353440","","Kaetsu_1_thumb.jpg",130,102,5);thumbnails[6397029]=new thumbnail(6397029,"353440","","Kaetsu_5_thumb.jpg",130,98,5);thumbnails[6397044]=new thumbnail(6397044,"353440","","Kaetsu_141_thumb.jpg",130,113,5);thumbnails[6397031]=new thumbnail(6397031,"353440","","Kaetsu_6_thumb.jpg",130,95,5);thumbnails[6397033]=new thumbnail(6397033,"353440","Diversity Series","Kaetsu_7_thumb.jpg",130,75,5);thumbnails[6397042]=new thumbnail(6397042,"353440","","Kaetsu_13_thumb.jpg",130,98,5);thumbnails[6397041]=new thumbnail(6397041,"353440","","Kaetsu_12_thumb.jpg",130,130,5);thumbnails[6397036]=new thumbnail(6397036,"353440","","Kaetsu_9_thumb.jpg",130,159,5);thumbnails[6397038]=new thumbnail(6397038,"353440","","Kaetsu_10_thumb.jpg",130,183,5);thumbnails[6397019]=new thumbnail(6397019,"353440","","Kaetsu_4_thumb.jpg",130,88,5);thumbnails[6397070]=new thumbnail(6397070,"353440","Clare Crouchman","Me_thumb.jpg",130,131,5);thumbnails[2835741]=new thumbnail(2835741,"176686","20 piece ceramic wall panel commission for stairwell in Switzerland","Helens_Chalet_thumb.jpg",130,195,5);thumbnails[2835761]=new thumbnail(2835761,"176686","Commission for stairwell in Switzerland 2","Helen_2_thumb.jpg",130,150,5);thumbnails[3437361]=new thumbnail(3437361,"176686","Relativity Series 1 - 4.   Installation in the Elevation Halls of the Tower Condominium Project in Chiba, Japan.","CC1_thumb.jpg",130,87,5);thumbnails[3437375]=new thumbnail(3437375,"176686","Relativity Series 5 - 8.  Installation in the Elevation Halls of the Tower Condominium Project in Chiba, Japan.","CC2_thumb.jpg",130,82,5);thumbnails[3437379]=new thumbnail(3437379,"176686","Relativity Series 9 - 12.  Installation in the Elevation Halls of the Tower Condominium Project in Chiba, Japan.","CC3_thumb.jpg",130,87,5);thumbnails[3437384]=new thumbnail(3437384,"176686","Relativity Series 13 - 16.  Installation in the Elevation Halls of the Tower Condominium Project in Chiba, Japan.","CC4_thumb.jpg",130,87,5);thumbnails[3534742]=new thumbnail(3534742,"176686","Music In the Trees Commission,<br>\r\nKanazawa, Japan","Clare_Crouchman__Kanazawa_Door_Panels_thumb.JPG",130,156,5);var galleries=new Object();galleries[176685]=new gallery(176685,"6396966,6396960,6396940,5719250,5719241,5719176,5719171,5719158,5561188,3301240,3299762,2836372,2836346,2835976","Ceramic Gallery ","gallery",[5719158,5719171,5719174,6394261,5561188,2840251,5719176,5561174,5719241,5719243,5719245,5719249,5719250,2835912,2835976,6396940,2838572,2836346,6396960,6396971,5370224,3301236,3299762,3301240,6396966,2836372,6394212,6394222]);galleries[176687]=new gallery(176687,"2840249,2836352","Print Gallery","gallery",[2835862,2835686,2835863,2840249,2835965,2835968,2835969,2835973,2835985,2838708,2836352,2836389,2840687,2840689]);galleries[210342]=new gallery(210342,"3439632,3439627,3439619,3439617,3439611,3439606","Music in the Trees Commission","gallery",[3439619,3439617,3439611,3439632,3439627,3439606]);galleries[344991]=new gallery(344991,"6173955,6173953,6173950,6173949,6173947,6173942","Hampton Court Flower Show","gallery",[6173942,6173947,6173949,6173950,6173953,6173955]);galleries[353440]=new gallery(353440,"6397033","'New Work' Cambridge Open Studios Exhibition","gallery",[6397015,6397009,6397029,6397044,6397031,6397033,6397042,6397041,6397036,6397038,6397019,6397070]);galleries[176686]=new gallery(176686,"3437384,3437379,3437375,3437361,2835761","Commissions","gallery",[2835741,2835761,3437361,3437375,3437379,3437384,3534742]);var imageSets=new Object();imageSets[1]="6397070,6396966,6396960,6396940,5719250,5719241,5719176,5719171,5719158,5561188,3439619,3301240,3301116,3300827,3300817,3300811,3299762,2840687,2840249,2838572,2836372,2836352,2835976,2835969,2835968,2835686";imageSets[2]="6397033,6396966,6396960,6396940,5719250,5719241,5719176,5719171,5719158,5561188,3439632,3439627,3439619,3439617,3439611,3439606,3437384,3437379,3437375,3437361,3301240,3301218,3301136,3301127,3301118,3301116,3300827,3300817,3300811,3299762,2840249,2836372,2836352,2836346,2835976,2835761";imageSets[3]="6396966,6396960,6396940,5719250,5719176,5719171,5561188,2836372";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/Crouchman/images";break}switch(a){case 1:b="http://www1.clikpic.com/Crouchman/images";break}switch(a){case 2:b="http://admin.clikpic.com/Crouchman/images";break}switch(a){case 24:b="http://tpc15/clikpic/Crouchman/images";break}switch(a){case 4:b="http://www.clikchurch.com/Crouchman/images";break}switch(a){case 5:b="http://www2.clikpic.com/Crouchman/images";break}switch(a){case 22:b="http://tpc5/clikpic/Crouchman/images";break}switch(a){case 23:b="http://tpc10/clikpic/Crouchman/images";break}switch(a){case 25:b="http://tpc16/clikpic/Crouchman/images";break}switch(a){case 15:b="http://www3.clikpic.com/Crouchman/images";break}switch(a){case 18:b="http://www4.clikpic.com/Crouchman/images";break}switch(a){case 19:b="http://www5.clikpic.com/Crouchman/images";break}switch(a){case 31:b="http://www7.clikpic.com/Crouchman/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Crouchman/images";break}switch(a){case 33:b="http://www8.clikpic.com/Crouchman/images";break}switch(a){case 34:b="http://www9.clikpic.com/Crouchman/images";break}switch(a){case 35:b="http://admin3.clikpic.com/Crouchman/images";break}switch(a){case 37:b="http://admin4.clikpic.com/Crouchman/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="Clare Crouchman: "+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>Buy now using PayPal:</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="CROUCHMAN">';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(b,a){imageID=randomListVal(galleries[b].featured_images);if(imageID!=0){a.src=thumbnails[imageID].src;a.width=thumbnails[imageID].width;a.height=thumbnails[imageID].height}}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+'")'})}}};