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[2748969]=new thumbnail(2748969,"361783","Getting Undressed. 1983. Phill Hopkins.","Getting undressed phill hopkins 1_thumb.jpg",130,191,18);thumbnails[2748980]=new thumbnail(2748980,"361783","Getting Undressed 2. 1983. Phill Hopkins.<br>\r\n","getting undressed phill hopkins2_thumb.jpg",130,200,18);thumbnails[2748990]=new thumbnail(2748990,"361783","Getting Undressed 3. 1983. Phill Hopkins.<br>\r\n","getting undressed phill hopkins 3_thumb.jpg",130,187,18);thumbnails[6513380]=new thumbnail(6513380,"353594","'Parent/Guardian' Phill Hopkins 2010","_Guardian_Phill_Hopkins_2010_thumb.jpg",130,98,18);thumbnails[6513347]=new thumbnail(6513347,"353594","'Untitled (cut out)' Phill Hopkins 2010","Untitled_thumb.jpg",130,206,18);thumbnails[6513364]=new thumbnail(6513364,"353594","'Woodpecker' Phill Hopkins 2010","Woodpecker_thumb.jpg",130,173,18);thumbnails[6513401]=new thumbnail(6513401,"353594","'Untitled (made from)' Phill Hopkins 2010","Untitled_Made_from_thumb.jpg",130,178,18);thumbnails[6513421]=new thumbnail(6513421,"353594","'I fall to pieces (again)' Phill Hopkins 2010","I_fall_to_pieces_again_Phill_Hopkins_thumb.jpg",130,197,18);thumbnails[6513603]=new thumbnail(6513603,"353594","'Untitled (balanced)' Phill Hopkins 2010","Untitled_balanced_thumb.jpg",130,433,18);thumbnails[6513717]=new thumbnail(6513717,"353594","'Untitled' Phill Hopkins 2010","Untitled_holes_thumb.jpg",130,208,18);thumbnails[6534154]=new thumbnail(6534154,"353594","Studio summer 2010","studio_thumb.JPG",130,98,18);thumbnails[6647680]=new thumbnail(6647680,"353594","Untitled (flowers & birds) 2010 Phill Hopkins","Untitled_flowers_and_birds_Phill_Hopkins_2010_thumb.jpg",130,382,18);thumbnails[6690926]=new thumbnail(6690926,"353594","Studio 09.10","Studio_09_thumb.jpg",130,173,18);thumbnails[2398821]=new thumbnail(2398821,"353594","Bundle (Blue Cherry Tree) 2007. Phill Hopkins","Bundle (Blue Cherry Tree) 2007 Phill Hopkins_thumb.jpg",130,289,18);thumbnails[2398825]=new thumbnail(2398825,"353594","Bundle (Cherry Tree) 2007. Phill Hopkins.","Bundle (Cherry Tree) 2007 Phill Hopkins_thumb.jpg",130,236,18);thumbnails[2536063]=new thumbnail(2536063,"353594","Locks & Bolts Table<br>\r\n2008<br>\r\nPhill Hopkins","Locksandboltssculpture_thumb.JPG",130,149,18);thumbnails[2539212]=new thumbnail(2539212,"353594","Bold Sir Rylas Table<br>\r\n2008<br>\r\nPhill Hopkins","BSR1_thumb.JPG",130,175,18);thumbnails[2557903]=new thumbnail(2557903,"353594","The Servants Field Table 2008 Phill Hopkins","Theservantsfieldphillhopkins_thumb.JPG",130,155,18);thumbnails[2557922]=new thumbnail(2557922,"353594","Who Do They Say I Am? Table 2008 Phill Hopkins","Whodoyousayiam1phillhopkins_thumb.JPG",130,156,18);thumbnails[2563871]=new thumbnail(2563871,"353594","Who do You Say I am? Table 2008 Phill Hopkins","Whodotheysayiamtable_thumb.JPG",130,170,18);thumbnails[2041426]=new thumbnail(2041426,"353594","'Gulf Table' 1991. Phill Hopkins","Gulf Table 1991 Phill Hopkins_thumb.jpg",130,106,18);thumbnails[2055104]=new thumbnail(2055104,"353594","'1 Kings Wall' 2007. Phill Hopkins ","'1 Kings Wall' 2007 Phill Hopkins[1]_thumb. Faith Lodeg leeds.jpg",130,98,18);thumbnails[2055109]=new thumbnail(2055109,"353594","'Three Cherry Trees' 2007 Phill Hopkins. ","'Three Cherry Trees' 2007 Phill Hopkins[1]_thumb. Installation view Faith Lodge Leeds.jpg",130,62,18);thumbnails[2562805]=new thumbnail(2562805,"353594","House 1988 Phill Hopkins","House 1988 Phill Hopkins2_thumb.jpg",130,258,18);thumbnails[2562985]=new thumbnail(2562985,"353594","The Man in the Moon 1987 Phill Hopkins<br>\r\nBrahm Collection, Leeds","The Man in the Moon 1987 Phill Hopkins4_thumb.jpg",130,82,18);thumbnails[2562996]=new thumbnail(2562996,"353594","Bowling in the Gulf 1990 Phill Hopkins","1_thumb.jpg",130,109,18);thumbnails[2563006]=new thumbnail(2563006,"353594","Jumping Feet 1991 Phill Hopkins<br>\r\n","2_thumb.jpg",130,81,18);thumbnails[2563026]=new thumbnail(2563026,"353594","The Cowboys Dream 1987 Phill Hopkins","cowboysdream_thumb.jpg",130,192,18);thumbnails[2563048]=new thumbnail(2563048,"353594","Mother & Child 1991 Phill Hopkins","Phill Hopkins with 'Mother & Child' Flyers Exhibition2_thumb.jpg",130,198,18);thumbnails[2504091]=new thumbnail(2504091,"62424","Locks & Bolts. 2008. Phill Hopkins","nailscrew_thumb.JPG",130,173,18);thumbnails[2522974]=new thumbnail(2522974,"62424","Young Man from Hunting Faint and Weary. Oh, What Ails my Lord, my Deary? - Guard. 2008. Phill Hopkins","Guard_thumb.JPG",130,176,18);thumbnails[2522988]=new thumbnail(2522988,"62424","Chasing the Hounds of Self Doubt - Dido, Bendigo, Gentry. 2008. Phill Hopkins. Private Collection.","Chasing_thumb.JPG",130,177,18);thumbnails[2522994]=new thumbnail(2522994,"62424","Calling to His Horses, He Gently Bid Them Stand - Holt. 2008. Phill Hopkins","Holt_thumb.JPG",130,172,18);thumbnails[2546191]=new thumbnail(2546191,"62424","What is it That You are Looking for? - Headland<br>\r\n2008<br>\r\nPhill Hopkins","Headland_thumb.JPG",130,173,18);thumbnails[2550925]=new thumbnail(2550925,"62424","Running on Water 2008 Phill Hopkins<br>\r\nPrivate Collection","Running on water phill hopkins_thumb.JPG",130,177,18);thumbnails[6676343]=new thumbnail(6676343,"62424","Untitled (Ceiling) Phill Hopkins 2010","Finished_work_for_web_thumb.jpg",130,199,18);thumbnails[6676375]=new thumbnail(6676375,"62424","Untitled (Balanced) Phill Hopkins 2010","Untitled_Balanced_Phill_Hopkins_2010_thumb.jpg",130,200,18);thumbnails[6676383]=new thumbnail(6676383,"62424","Untitled (Bricks) Phill Hopkins 2010","Untitled_Bricks_Phill_Hopkins_2010_thumb.jpg",130,200,18);thumbnails[6676392]=new thumbnail(6676392,"62424","Untitled (Fablon) Phill Hopkins 2010","Untitled_Fablon_Phill_Hopkins_2010_thumb.jpg",130,200,18);thumbnails[6676398]=new thumbnail(6676398,"62424","Untitled (Felt tip) Phill Hopkins 2010","Untitled_Felt_tip_Phill_Hopkins_2010_thumb.jpg",130,198,18);thumbnails[6676403]=new thumbnail(6676403,"62424","Untitled (Stilts) Phill Hopkins 2010","Untitled_Phill_Hopkins_2010_thumb.jpg",130,199,18);thumbnails[6676405]=new thumbnail(6676405,"62424","Untitled (Eleven houses) Phill Hopkins 2010","Untitled_eleven_houses_Phill_Hopkins_2010_thumb.jpg",130,198,18);thumbnails[2729052]=new thumbnail(2729052,"171575","Wine & Beer / Oak & Bread - A performance piece. 2008. Phill Hopkins","wine & beer oak & bread phill hopkins_thumb.jpg",130,87,18);thumbnails[6605330]=new thumbnail(6605330,"361959","Untitled (dropping a house from the window I) 1. 2010 Phill Hopkins.","Untitled_dropping_a_house_from_the_window_I_1_2010_Phill_Hopkins_thumb.JPG",130,98,18);thumbnails[2729053]=new thumbnail(2729053,"171575","Wine & Beer / Oak & Bread - A performance piece. 2008. Phill Hopkins<br>\r\n","wine & beer oak & bread phill hopkins 1_thumb.jpg",130,195,18);thumbnails[6606302]=new thumbnail(6606302,"361959","Untitled (dropping a house from the window I) 2. 2010 Phill Hopkins.","Untitled_dropping_a_house_from_the_window_I_2_2010_Phill_Hopkins_thumb.JPG",130,98,18);thumbnails[2729105]=new thumbnail(2729105,"171575","Wine & Beer / Oak & Bread - A performance piece. 2008. Phill Hopkins<br>\r\n","wine & beer oak & bread phill hopkins 2_thumb.jpg",130,195,18);thumbnails[6606307]=new thumbnail(6606307,"361959","Untitled (dropping a house from the window I) 3. 2010 Phill Hopkins.","Untitled_dropping_a_house_from_the_window_I_3_2010_Phill_Hopkins_thumb.JPG",130,98,18);thumbnails[2729209]=new thumbnail(2729209,"171575","Wine & Beer / Oak & Bread - A performance piece. 2008. Phill Hopkins<br>\r\n","wine & beer oak & bread phill hopkins 3_thumb.jpg",130,118,18);thumbnails[2729367]=new thumbnail(2729367,"171575","Wine & Beer / Oak & Bread - A performance piece. 2008. Phill Hopkins<br>\r\n","wine & beer oak & bread phill hopkins4_thumb.jpg",130,102,18);thumbnails[2729416]=new thumbnail(2729416,"171575","Wine & Beer / Oak & Bread - A performance piece. 2008. Phill Hopkins<br>\r\n","wine & beer oak & bread phill hopkins 5_thumb.jpg",130,135,18);thumbnails[2729424]=new thumbnail(2729424,"171575","Wine & Beer / Oak & Bread - A performance piece. 2008. Phill Hopkins<br>\r\n","wine & beer oak & bread phill hopkins 6_thumb.jpg",130,75,18);thumbnails[2729432]=new thumbnail(2729432,"171575","Wine & Beer / Oak & Bread - A performance piece. 2008. Phill Hopkins<br>\r\n","wine & beer oak & bread phill hopkins 7_thumb.JPG",130,86,18);thumbnails[2747747]=new thumbnail(2747747,"171575","Wine & Beer / Oak & Bread - A performance piece.<br>\r\n2008. Phill Hopkins<br>\r\nGreenbelt Festival 08. Cheltenham, UK.","wine & beer oak & bread phill hopkins 8_thumb.jpg",130,195,18);thumbnails[2748275]=new thumbnail(2748275,"171575","Wine & Beer / Oak & Bread - A performance piece.<br>\r\n2008. Phill Hopkins<br>\r\nGreenbelt Festival 08. Cheltenham, UK.","wine & beer oak & bread phill hopkins 9_thumb.jpg",130,87,18);thumbnails[2394520]=new thumbnail(2394520,"171121","'Three Scarecrows' (detail)2008. Phill Hopkins","scar_thumb.JPG",130,207,18);thumbnails[2431591]=new thumbnail(2431591,"171121","'Three Scarecrows'. 2008. Phill Hopkins","Three-Scarecrows_thumb.jpg",130,101,18);thumbnails[6499900]=new thumbnail(6499900,"171121","Pilgrimage to Hailes 2010: '14:22-33' 2010 Phill Hopkins ","_PR10857_thumb.JPG",130,87,18);thumbnails[2717370]=new thumbnail(2717370,"171121","Pilgrimage to Hailes 2008: Three Scarecrows 2008 Phill Hopkins<br>\r\n","three scarecrows pilgrimage to hailes phill hopkins_thumb.JPG",130,173,18);thumbnails[2728829]=new thumbnail(2728829,"171121","Pilgrimage to Hailes 2008: 'Three Scarecrows' 2008. Phill Hopkins.<br>\r\n","three scarecrows pilgrimage to hailes phill hopkins3_thumb.JPG",130,87,18);thumbnails[2708429]=new thumbnail(2708429,"170516","'Seven Drunken Nights' Installation view","installation view seven drunken nights phill hopkins sdn gb 08 001_thumb.jpg",130,60,18);thumbnails[2708476]=new thumbnail(2708476,"170516","'Seven Drunken Nights' Installation view","installation view seven drunken nights phill hopkins 2 sdn gb 08 017_thumb.jpg",130,117,18);thumbnails[2708479]=new thumbnail(2708479,"170516","'Seven Drunken Nights' an installation","installation view seven drunken nights phill hopkins 3 sdn gb 08 016_thumb.jpg",130,85,18);thumbnails[2708418]=new thumbnail(2708418,"170516","Three Scarecrows 2008 Phill Hopkins","threescarecrowsphillhopkins sdn gb 08 010_thumb.jpg",130,96,18);thumbnails[2716452]=new thumbnail(2716452,"170516","'Seven Drunken Nights' an installation by Phill Hopkins' ","installation view seven drunken nights phill hopkins 4  sdn gb 08 020_thumb.jpg",130,121,18);thumbnails[2717259]=new thumbnail(2717259,"170516","'Seven Drunken Nights' an installation by Phill Hopkins' ","installation view seven drunken nights phill hopkins 5 sdn gb 08 003_thumb.jpg",130,101,18);var galleries=new Object();galleries[361783]=new gallery(361783,"2748990,2748980,2748969","Getting Undressed","gallery",[2748969,2748980,2748990]);galleries[353594]=new gallery(353594,"6690926,6647680,6534154,6513717,6513603,6513421,6513401,6513380,6513364,6513347,2563048,2563026,2563006,2562996,2562985,2562805,2557922,2557903,2539212,2536063,2398825,2398821,2055109,2055104,2041426","Sculpture","gallery",[6513380,6513347,6513364,6513401,6513421,6513603,6513717,6534154,6647680,6690926,2398821,2398825,2536063,2539212,2557903,2557922,2563871,2041426,2055104,2055109,2562805,2562985,2562996,2563006,2563026,2563048]);galleries[62424]=new gallery(62424,"6676405,6676403,6676398,6676392,6676383,6676375,6676343,2550925,2522974,2504091","Drawing","gallery",[2504091,2522974,2522988,2522994,2546191,2550925,6676343,6676375,6676383,6676392,6676398,6676403,6676405]);galleries[361959]=new gallery(361959,"6606307,6606302,6605330","Dropping a House","gallery",[6605330,6606302,6606307]);galleries[162263]=new gallery(162263,"2748275,2747747,2729432,2729424,2729416,2729367,2729209,2729105,2729053,2729052","Perfomance","gallery",[]);galleries[171575]=new gallery(171575,"2748275,2747747,2729432,2729424,2729416,2729367,2729209,2729105,2729053,2729052","Wine & Beer / Oak & Bread","gallery",[2729052,2729053,2729105,2729209,2729367,2729416,2729424,2729432,2747747,2748275]);galleries[357853]=new gallery(357853,"2728829,2717370,2717259,2716452,2708476,2708429,2708418,2431591,2394520","Exhibitions","gallery",[]);galleries[171121]=new gallery(171121,"2728829,2717370,2431591,2394520","Pilgrimage to Hailes","gallery",[2394520,2431591,6499900,2717370,2728829]);galleries[170516]=new gallery(170516,"2717259,2716452,2708476,2708429,2708418","Greenbelt Festival 08","gallery",[2708429,2708476,2708479,2708418,2716452,2717259]);var imageSets=new Object();imageSets[1]="6690926,6676405,6676403,6676398,6676392,6676383,6676375,6676343,6647680,6534154,6513717,6513603,6513421,6513401,6513380,6513364,6513347,2748275,2747747,2729432,2729424,2729416,2729209,2729105,2729053,2729052,2728829,2717370,2717259,2716452,2708476,2708429,2708418,2563048,2563026,2563006,2562996,2562985,2562805,2557922,2557903,2550925,2539212,2536063,2522974,2504091,2431591,2398825,2398821,2394520,2055109,2055104,2041426";imageSets[2]="6690926,6676405,6676403,6676398,6676392,6676383,6676375,6676343,6647680,6534154,6513717,6513603,6513421,6513401,6513380,6513364,6513347,2748275,2747747,2729432,2729424,2729416,2729367,2729209,2729105,2729053,2729052,2728829,2717370,2717259,2716452,2708476,2708429,2708418,2563048,2563026,2563006,2562996,2562985,2562805,2557922,2557903,2550925,2539212,2536063,2522974,2504091,2431591,2398825,2398821,2394520,2055109,2055104,2041426";imageSets[3]="6690926,6676405,6676403,6676398,6676392,6676383,6676375,6676343,6647680,6606307,6606302,6605330,6534154,6513717,6513603,6513421,6513401,6513380,6513364,6513347,6499900,2748990,2748980,2748969,2748275,2747747,2729432,2729424,2729416,2729367,2729209,2729105,2729053,2729052,2728829,2717370,2717259,2716452,2708479,2708476,2708429,2708418,2563871,2563048,2563026,2563006,2562996,2562985,2562805,2557922";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/Phill/images";break}switch(a){case 1:b="http://www1.clikpic.com/Phill/images";break}switch(a){case 2:b="http://admin.clikpic.com/Phill/images";break}switch(a){case 24:b="http://tpc15/clikpic/Phill/images";break}switch(a){case 4:b="http://www.clikchurch.com/Phill/images";break}switch(a){case 5:b="http://www2.clikpic.com/Phill/images";break}switch(a){case 22:b="http://tpc5/clikpic/Phill/images";break}switch(a){case 23:b="http://tpc10/clikpic/Phill/images";break}switch(a){case 25:b="http://tpc16/clikpic/Phill/images";break}switch(a){case 15:b="http://www3.clikpic.com/Phill/images";break}switch(a){case 18:b="http://www4.clikpic.com/Phill/images";break}switch(a){case 19:b="http://www5.clikpic.com/Phill/images";break}switch(a){case 31:b="http://www7.clikpic.com/Phill/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Phill/images";break}switch(a){case 33:b="http://www8.clikpic.com/Phill/images";break}switch(a){case 34:b="http://www9.clikpic.com/Phill/images";break}switch(a){case 35:b="http://admin3.clikpic.com/Phill/images";break}switch(a){case 37:b="http://admin4.clikpic.com/Phill/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="Phill Hopkins: "+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>"}if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Order this print:</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="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+'<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+'")'})}}};