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[447422]=new thumbnail(447422,"","","Dusty_Elephant_thumb.JPG",130,195,1);thumbnails[447452]=new thumbnail(447452,"","","Maasai_Morani_thumb.JPG",130,195,1);thumbnails[447601]=new thumbnail(447601,"","","CBR work in Kigali_thumb.JPG",130,195,1);thumbnails[447636]=new thumbnail(447636,"","","CP patient, Kigali_thumb.JPG",130,195,1);thumbnails[447638]=new thumbnail(447638,"","","Kigali_thumb.JPG",130,195,1);thumbnails[447641]=new thumbnail(447641,"","","Little Boy in Kigali_thumb.JPG",130,195,1);thumbnails[447643]=new thumbnail(447643,"","","Sunday_thumb.JPG",130,195,1);thumbnails[447644]=new thumbnail(447644,"","","Sunday at work_thumb.JPG",130,195,1);thumbnails[447674]=new thumbnail(447674,"","","Club Foot, Sudan_thumb.JPG",130,195,1);thumbnails[448417]=new thumbnail(448417,"","","Girl in Wheelchair, Kampala_thumb.JPG",130,195,1);thumbnails[448422]=new thumbnail(448422,"","","Joyce, Kampala_thumb.JPG",130,195,1);thumbnails[449072]=new thumbnail(449072,"","","logipi_thumb.JPG",130,185,1);thumbnails[450597]=new thumbnail(450597,"","","CBR girl 1_thumb.JPG",130,195,1);thumbnails[450603]=new thumbnail(450603,"","","girl with walker 3_thumb.JPG",130,208,1);thumbnails[450604]=new thumbnail(450604,"","","women looking on_thumb.JPG",130,236,1);thumbnails[450623]=new thumbnail(450623,"","","Little boy_thumb.JPG",130,195,1);thumbnails[484017]=new thumbnail(484017,"","","Indian Baby_thumb.JPG",130,87,1);thumbnails[484096]=new thumbnail(484096,"","","Well at Ahmedabad_thumb.JPG",130,195,1);thumbnails[485224]=new thumbnail(485224,"","","Hindu dances_thumb.JPG",130,211,1);thumbnails[485236]=new thumbnail(485236,"","","7_thumb.jpg",130,199,1);thumbnails[532360]=new thumbnail(532360,"","","IMG_5398_thumb.JPG",130,195,1);thumbnails[532362]=new thumbnail(532362,"","","8_thumb.jpg",130,192,1);thumbnails[532364]=new thumbnail(532364,"","","IMG_5751_thumb.JPG",130,195,1);thumbnails[532366]=new thumbnail(532366,""," ","IMG_5869_thumb.JPG",130,195,1);thumbnails[580856]=new thumbnail(580856,"","","12_thumb.jpg",130,207,1);thumbnails[580862]=new thumbnail(580862,"","","Kigali 7_thumb.JPG",130,195,1);thumbnails[580870]=new thumbnail(580870,"","","Ban_thumb.JPG",130,87,1);thumbnails[580922]=new thumbnail(580922,"","","Kigali 8_thumb.JPG",130,195,1);thumbnails[580980]=new thumbnail(580980,"","","street_kids_thumb.JPG",130,195,1);thumbnails[580982]=new thumbnail(580982,"","","IMG_9910_thumb.JPG",130,78,1);thumbnails[580986]=new thumbnail(580986,"","","IMG_4874_thumb.JPG",130,195,1);thumbnails[636168]=new thumbnail(636168,"","","at home_thumb.JPG",130,195,1);thumbnails[636169]=new thumbnail(636169,"","","IMG_6736_thumb.JPG",130,195,1);thumbnails[636172]=new thumbnail(636172,"","","IMG_6764_thumb.JPG",130,195,1);thumbnails[636183]=new thumbnail(636183,"","","IMG_7064_thumb.JPG",130,195,1);thumbnails[745408]=new thumbnail(745408,"","","lion 2_thumb.JPG",130,195,1);thumbnails[745420]=new thumbnail(745420,"","","Copy_of_giraffes_3_thumb.JPG",130,181,1);thumbnails[745425]=new thumbnail(745425,"","","13_thumb.jpg",130,195,1);thumbnails[745431]=new thumbnail(745431,"","","14_thumb.jpg",130,87,1);thumbnails[745435]=new thumbnail(745435,"","","cheetah 3_thumb.JPG",130,195,1);thumbnails[745437]=new thumbnail(745437,"","","cheetah 2_thumb.JPG",130,195,1);thumbnails[745445]=new thumbnail(745445,"","","15_thumb.jpg",130,195,1);thumbnails[745461]=new thumbnail(745461,"","","lion_thumb.JPG",130,195,1);thumbnails[2143558]=new thumbnail(2143558,"","The Olonana Hotel Maasai Mara","olonana_lg_lounge_thumb.jpg",130,106,1);thumbnails[2143569]=new thumbnail(2143569,"","Trips to Samburu District","IMG_9705_thumb.JPG",130,87,1);thumbnails[2143580]=new thumbnail(2143580,"","The finished piece","IMG_1830_thumb.JPG",130,105,1);thumbnails[2657203]=new thumbnail(2657203,"","This is a picture of my painting 'The Elegant Killer’ hung in Olonana Lodge. ","IMG_7317_thumb.JPG",130,87,1);thumbnails[2695347]=new thumbnail(2695347,"","","91_thumb.jpg",130,195,1);thumbnails[2695977]=new thumbnail(2695977,"","","IMG_6196_thumb.JPG",130,195,1);thumbnails[2696012]=new thumbnail(2696012,"","","IMG_6205_2_thumb.jpg",130,195,1);thumbnails[2696114]=new thumbnail(2696114,"","","IMG_3886_thumb.JPG",130,87,1);thumbnails[2696118]=new thumbnail(2696118,"","","IMG_3994_thumb.JPG",130,195,1);thumbnails[3601029]=new thumbnail(3601029,"","","5_thumb.JPG",130,87,1);thumbnails[3601031]=new thumbnail(3601031,"","","6_thumb.JPG",130,195,1);thumbnails[3601308]=new thumbnail(3601308,"","","10_thumb.jpg",130,92,1);thumbnails[3602020]=new thumbnail(3602020,"","","IMG_8367_thumb.JPG",130,87,1);thumbnails[3602025]=new thumbnail(3602025,"","","IMG_8560_thumb.JPG",130,86,1);thumbnails[3602027]=new thumbnail(3602027,"","","IMG_8507_thumb.JPG",130,195,1);thumbnails[3602041]=new thumbnail(3602041,"","","IMG_8350_thumb.JPG",130,205,1);thumbnails[3602042]=new thumbnail(3602042,"","","IMG_8591_thumb.JPG",130,87,1);thumbnails[3602045]=new thumbnail(3602045,"","","IMG_8340_thumb.JPG",130,195,1);thumbnails[3602927]=new thumbnail(3602927,"","","IMG_3949_2_thumb.JPG",130,87,1);thumbnails[3602933]=new thumbnail(3602933,"","","IMG_4449_2_thumb.JPG",130,195,1);thumbnails[3658686]=new thumbnail(3658686,"","","21_thumb.jpg",130,113,1);thumbnails[4062790]=new thumbnail(4062790,"","","IMG_5936_2_thumb.jpg",130,195,1);thumbnails[4062793]=new thumbnail(4062793,"","","IMG_5948_2_thumb.jpg",130,195,1);thumbnails[4062796]=new thumbnail(4062796,"","","IMG_6232_2_thumb.jpg",130,195,1);thumbnails[447602]=new thumbnail(447602,"","","3_thumb.jpg",130,87,1);thumbnails[448423]=new thumbnail(448423,"","","2_thumb.JPG",130,195,1);thumbnails[448428]=new thumbnail(448428,"","","1_thumb.JPG",130,195,1);thumbnails[3600823]=new thumbnail(3600823,"","","IMG_3659_thumb.jpg",130,87,1);thumbnails[3608687]=new thumbnail(3608687,"","","16_thumb.JPG",130,169,1);thumbnails[3630488]=new thumbnail(3630488,"","","IMG_3161_2_thumb.JPG",130,195,1);thumbnails[449063]=new thumbnail(449063,"","","IMG_9998_thumb.jpg",130,195,1);thumbnails[636185]=new thumbnail(636185,"","","4_thumb.JPG",130,87,1);thumbnails[3600867]=new thumbnail(3600867,"","","IMG_3545_thumb.jpg",130,195,1);thumbnails[3630491]=new thumbnail(3630491,"","","IMG_3169_2_thumb.JPG",130,195,1);thumbnails[448408]=new thumbnail(448408,"","","IMG_3473_thumb.jpg",130,195,1);thumbnails[3630492]=new thumbnail(3630492,"","","IMG_3543_2_thumb.JPG",130,91,1);thumbnails[447465]=new thumbnail(447465,"","","IMG_3440_thumb.jpg",130,195,1);thumbnails[3608689]=new thumbnail(3608689,"","","17_thumb.JPG",130,195,1);thumbnails[3630494]=new thumbnail(3630494,"","","IMG_3558_2_thumb.JPG",130,48,1);thumbnails[447463]=new thumbnail(447463,"","","IMG_3530_thumb.jpg",130,195,1);thumbnails[2696156]=new thumbnail(2696156,"","","IMG_2794_thumb.JPG",130,195,1);thumbnails[3608693]=new thumbnail(3608693,"","","18_thumb.JPG",130,195,1);thumbnails[580859]=new thumbnail(580859,"","","IMG_3499_thumb.jpg",130,195,1);thumbnails[2696158]=new thumbnail(2696158,"","","IMG_2992_thumb.JPG",130,195,1);thumbnails[447473]=new thumbnail(447473,"","","IMG_3619_thumb.jpg",130,195,1);thumbnails[3608771]=new thumbnail(3608771,"","","19_thumb.JPG",130,195,1);thumbnails[3658683]=new thumbnail(3658683,"","","IMG_3084_2_thumb.JPG",130,87,1);thumbnails[3600935]=new thumbnail(3600935,"","","IMG_3495_thumb.jpg",130,195,1);thumbnails[3608770]=new thumbnail(3608770,"","","20_thumb.JPG",130,195,1);thumbnails[3600936]=new thumbnail(3600936,"","","IMG_3403_thumb.jpg",130,195,1);thumbnails[3600937]=new thumbnail(3600937,"","","IMG_3496_thumb.jpg",130,195,1);thumbnails[3600938]=new thumbnail(3600938,"","","IMG_3513_thumb.jpg",130,195,1);thumbnails[448411]=new thumbnail(448411,"","","In_operation_thumb.JPG",130,195,1);thumbnails[3600949]=new thumbnail(3600949,"","","IMG_3524_thumb.jpg",130,87,1);thumbnails[485490]=new thumbnail(485490,"143158","Nairobi Rhino ","Nairobi Rhinos 2_thumb.JPG",130,103,1);thumbnails[447737]=new thumbnail(447737,"143158","Tsavo ","Tsavo_thumb.JPG",130,92,1);thumbnails[2876959]=new thumbnail(2876959,"143158","Botswana Afternoons","Botswana Afternoons - website_thumb.JPG",130,88,1);thumbnails[985408]=new thumbnail(985408,"143158","Amboseli Walk","Amboseli Walk - lightened 2_thumb.JPG",130,95,1);thumbnails[907926]=new thumbnail(907926,"143158","Warthogs in the sun ","warthogs_thumb.JPG",130,97,1);thumbnails[2476569]=new thumbnail(2476569,"143158","The Elegant Killer","LOWRES_thumb.jpg",130,101,1);thumbnails[3029183]=new thumbnail(3029183,"143158","The Threat of Evening","The Threat of Evening - website_thumb.JPG",130,98,1);thumbnails[3040933]=new thumbnail(3040933,"143158","Amboseli's Child","Amboseli's Child - small_thumb.JPG",130,103,1);thumbnails[3167034]=new thumbnail(3167034,"143158","On the Hot Grass ","low res 2_thumb.JPG",130,107,1);thumbnails[3189024]=new thumbnail(3189024,"143158","Through the Dust","C0047_001_ web res_thumb.JPG",130,85,1);thumbnails[3222306]=new thumbnail(3222306,"143158","Out in the Open","Out in the open - lowres_thumb.JPG",130,108,1);thumbnails[3227300]=new thumbnail(3227300,"143158","Wintery Days","wintery days - lowres_thumb.JPG",130,165,1);thumbnails[3321838]=new thumbnail(3321838,"143158","Two's Company","Two's Company - small_thumb.JPG",130,116,1);thumbnails[4478727]=new thumbnail(4478727,"143158","A Promising Future ","Rhino_-_Nakuru_-_small_thumb.JPG",130,107,1);thumbnails[4566717]=new thumbnail(4566717,"143158","Big Country","Final_Image_-_small1234_thumb.JPG",130,69,1);thumbnails[447293]=new thumbnail(447293,"143165","The Old Man Says.....","11 - 2_thumb.JPG",130,182,1);thumbnails[447294]=new thumbnail(447294,"143165","And My Little Brother","and my little brother_thumb.jpg",130,159,1);thumbnails[447356]=new thumbnail(447356,"143165","On Malawi's Floor","On Malawi's Floor 2_thumb.JPG",130,102,1);thumbnails[447359]=new thumbnail(447359,"143165","Watering the Cattle","watering the cattle_thumb.JPG",130,97,1);thumbnails[447360]=new thumbnail(447360,"143165","Little Boy","Little Boy 2_thumb.JPG",130,176,1);thumbnails[581145]=new thumbnail(581145,"143165","Helen and Ida","First Christmas_thumb.JPG",130,195,1);thumbnails[592957]=new thumbnail(592957,"143156","After the Races - Moscow Flyer","mossy 3_thumb.JPG",130,184,1);thumbnails[1179801]=new thumbnail(1179801,"143156","Jackson River","Jack 2_thumb.JPG",130,147,1);thumbnails[907956]=new thumbnail(907956,"143164","Wicklow Sheep","wicklow sheep 2_thumb.JPG",130,91,1);thumbnails[985399]=new thumbnail(985399,"143164","This is what you'll see on an icy day on the A5 heading towards Holyhead.","Wales_thumb.JPG",130,122,1);thumbnails[1849028]=new thumbnail(1849028,"143164","Part of my new line of work - on sale at the Lawson Gallery Cambridge","poetic 1_thumb.JPG",130,166,1);thumbnails[1849036]=new thumbnail(1849036,"143164","Part of my new line of work - on sale at the Lawson Gallery Cambridge","poetic 2_thumb.JPG",130,103,1);thumbnails[1849037]=new thumbnail(1849037,"143164","Part of my new line of work - on sale at the Lawson Gallery Cambridge","poetic 3_thumb.JPG",130,129,1);thumbnails[1849039]=new thumbnail(1849039,"143164","Part of my new line of work - on sale at the Lawson Gallery Cambridge","poetic 4_thumb.JPG",130,131,1);thumbnails[1918039]=new thumbnail(1918039,"143164","This painting is a scene reminiscent of the farmland behind my house, but stylised to make it darker and more sinister, in an attempt to create a greater sense of atmosphere. ","Darkest Bird - new_thumb.JPG",130,104,1);thumbnails[3129721]=new thumbnail(3129721,"190667","A detail from 'The Threat of Evening'","face_thumb.JPG",130,114,1);thumbnails[3129725]=new thumbnail(3129725,"190667","A detail from 'Amboseli's Child'","cropping_thumb.JPG",130,159,1);thumbnails[3189322]=new thumbnail(3189322,"190667","Detail from 'On the Hot Grass'","Detail1_thumb.jpg",130,237,1);thumbnails[3189324]=new thumbnail(3189324,"190667","Detail from 'Through the Dust'","Detail 21_thumb.jpg",130,87,1);thumbnails[3601330]=new thumbnail(3601330,"190667","","detail2_thumb.jpg",130,201,1);thumbnails[2878056]=new thumbnail(2878056,"190667","Detail from 'Amboseli Walk'","detail 2_thumb.JPG",130,87,1);thumbnails[2876962]=new thumbnail(2876962,"190667","This is a detail from 'Botswana Afternoons'. ","B_thumb. A. - for website.JPG",130,194,1);thumbnails[2668107]=new thumbnail(2668107,"190667","A detail from 'The Elegant Killer'","detail for website_thumb.jpg",130,264,1);thumbnails[4486439]=new thumbnail(4486439,"190667","","Final_Image_detail_2_thumb.JPG",130,65,1);thumbnails[1745474]=new thumbnail(1745474,"143166","This is drawing of a Maasai Moran in Amboseli, Kenya. ","Maasai Moran Drawing_thumb.JPG",130,177,1);thumbnails[1747224]=new thumbnail(1747224,"143166","This is a drawing of a lion in the Maasai Mara. He was pretty lazy and gave me ample time to draw and photograph him. ","Drawing of Lion_thumb.JPG",130,73,1);thumbnails[1751394]=new thumbnail(1751394,"143166","This is out of the sketchbook I took to Malawi. It's done in chalk pastels on coloured paper.  ","scan0006_thumb.jpg",130,91,1);var galleries=new Object();galleries[143158]=new gallery(143158,"3029183","Wildlife","section184454",[485490,447737,2876959,985408,907926,2476569,3029183,3040933,3167034,3189024,3222306,3227300,3321838,4478727,4566717]);galleries[143165]=new gallery(143165,"447294","Portraits","section184454",[447293,447294,447356,447359,447360,581145]);galleries[143156]=new gallery(143156,"1179801,592957","Equestrian ","section184454",[592957,1179801]);galleries[143164]=new gallery(143164,"1918039,1849039,1849037,1849036,1849028,985399,907956","British & Irish Landscapes","section184454",[907956,985399,1849028,1849036,1849037,1849039,1918039]);galleries[190667]=new gallery(190667,"3189324","Details","section184454",[3129721,3129725,3189322,3189324,3601330,2878056,2876962,2668107,4486439]);galleries[143166]=new gallery(143166,"1745474","From Sketchbooks","section184454",[1745474,1747224,1751394]);var imageSets=new Object();imageSets[1]="3601330";imageSets[2]="3630491,3630488,3608693,3189324,3029183,2696156,2696118,2695977,2143558,1745474,1179801,592957,580986,580862,532364,449063,448423,447674,447638,447463,447294";imageSets[3]="4566717,4486439,4478727,4062796,4062793,4062790,3658686,3658683,3630494,3630492,3630491,3630488,3608771,3608770,3608693,3608689,3608687,3602933,3602927,3602045,3602042,3602041,3602027,3602025,3602020,3601330,3601308,3601031,3601029,3600949,3600938,3600937,3600936,3600935,3600867,3600823,3321838,3227300,3222306,3189324,3189322,3189024,3167034,3129725,3129721,3040933,3029183,2878056,2876962,2876959";function randomListVal(a){arrayVals=a.split(",");if(arrayVals.length){pos=Math.round(Math.random()*(arrayVals.length-1));val=arrayVals[pos]}else{val=0}return val}function getServerPath(a){var b=-1;switch(a){case 34:b="http://www9.clikpic.com/kmcallister/images";break}switch(a){case 1:b="http://www1.clikpic.com/kmcallister/images";break}switch(a){case 2:b="http://admin.clikpic.com/kmcallister/images";break}switch(a){case 4:b="http://www.clikchurch.com/kmcallister/images";break}switch(a){case 5:b="http://www2.clikpic.com/kmcallister/images";break}switch(a){case 15:b="http://www3.clikpic.com/kmcallister/images";break}switch(a){case 21:b="http://www6.clikpic.com/kmcallister/images";break}switch(a){case 18:b="http://www4.clikpic.com/kmcallister/images";break}switch(a){case 19:b="http://www5.clikpic.com/kmcallister/images";break}switch(a){case 22:b="http://tpc5/clikpic/kmcallister/images";break}switch(a){case 23:b="http://tpc10/clikpic/kmcallister/images";break}switch(a){case 24:b="http://tpc15/clikpic/kmcallister/images";break}switch(a){case 25:b="http://tpc16/clikpic/kmcallister/images";break}switch(a){case 31:b="http://www7.clikpic.com/kmcallister/images";break}switch(a){case 32:b="http://admin2.clikpic.com/kmcallister/images";break}switch(a){case 33:b="http://www8.clikpic.com/kmcallister/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("section184454"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section184454.html">'}}html+='<img src="'+backgrounds[imageID].src+'" width="'+backgrounds[imageID].width+'" height="'+backgrounds[imageID].height+'" class="mainhomepageimage photo" id="mainSample" name="mainSample" alt="'+backgrounds[imageID].caption+'" border="0">';if("section184454"!=""){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="Keith McAllister: "+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+'")'})}}};