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[3382634]=new thumbnail(3382634,"330401","Mystery<br>\r\n<br>\r\n<br>\r\n<br>\r\n<br>\r\n","Mystery-LowRes-600_thumb.jpg",130,75,15);thumbnails[3382642]=new thumbnail(3382642,"330401","Avian 1<br>\r\n","Avian1-Email-600_thumb.jpg",130,106,15);thumbnails[3382649]=new thumbnail(3382649,"330401","Just Passing Through<br>\r\n","JustPassingThrough-LowRes-600_thumb.jpg",130,90,15);thumbnails[3382653]=new thumbnail(3382653,"330401","Spooky Electric<br>\r\n","SpookyElectric-LowRes-600_thumb.jpg",130,68,15);thumbnails[3382661]=new thumbnail(3382661,"330401","Superstrings","Superstrings-Email-600_thumb.jpg",130,105,15);thumbnails[3420390]=new thumbnail(3420390,"330401","November Streets 1","NovStreets1-LowRes-600_thumb.jpg",130,189,15);thumbnails[3420417]=new thumbnail(3420417,"330401","November Streets 2","NovStreets2-LowRes-600_thumb.jpg",130,188,15);thumbnails[3420438]=new thumbnail(3420438,"330401","Europa","Europa-LowRes-600_thumb.jpg",130,195,15);thumbnails[3420491]=new thumbnail(3420491,"330401","Journeys ","Journeys-Email-600_thumb.jpg",130,193,15);thumbnails[3420555]=new thumbnail(3420555,"330401","Warm Pads","WarmPads-LowRes-600_thumb.jpg",130,183,15);thumbnails[3502175]=new thumbnail(3502175,"330401","Siderial Ice","SiderialIce-LowRes-600_thumb.jpg",130,100,15);thumbnails[3502698]=new thumbnail(3502698,"330401","Slumber","Slumber-LowRes-600_thumb.jpg",130,189,15);thumbnails[3576740]=new thumbnail(3576740,"330401","Cool Vox ","CoolVox-LowRes-600_thumb.jpg",130,86,15);thumbnails[3736293]=new thumbnail(3736293,"332344","Across The Water","AcrossThe_Water-Email_thumb.jpg",130,382,15);thumbnails[3736461]=new thumbnail(3736461,"332344","Ascent to Acropolis","AscentToAcropolis-Email_thumb.jpg",130,382,15);thumbnails[3736503]=new thumbnail(3736503,"332344","By The Caldera","ByTheCaldera-Email1_thumb.jpg",130,385,15);thumbnails[3736599]=new thumbnail(3736599,"332344","Infusion<br>\r\n","Infusion-Email-600_thumb.jpg",130,130,15);thumbnails[3736603]=new thumbnail(3736603,"332344","Presentation","Presentation-Email-400_thumb.jpg",130,130,15);thumbnails[3736610]=new thumbnail(3736610,"332344","Spice Alive","SpiceAlive-Email-400_thumb.jpg",130,130,15);thumbnails[4061133]=new thumbnail(4061133,"330401","Ceramica 1","Ceramica1-LowRes_thumb.jpg",130,118,15);thumbnails[4061134]=new thumbnail(4061134,"330401","Ceramica 2","Ceramica2-LowRes_thumb.jpg",130,118,15);thumbnails[4061135]=new thumbnail(4061135,"330401","Ceramica 3","Ceramica3-LowRes_thumb.jpg",130,118,15);thumbnails[4061136]=new thumbnail(4061136,"330401","Ceramica 4","Ceramica4-LowRes_thumb.jpg",130,118,15);thumbnails[4062558]=new thumbnail(4062558,"330401","Ceramica 5","Ceramica5-LowRes_thumb.jpg",130,118,15);thumbnails[5718225]=new thumbnail(5718225,"330401","Built To Last","BuiltToLast-LowRes-600_thumb.jpg",130,127,15);thumbnails[5718240]=new thumbnail(5718240,"330401","Console","Console-Email-600_thumb.jpg",130,104,15);thumbnails[5718296]=new thumbnail(5718296,"332344","Browsers Arcade","BrowsersArcade-LowRes_thumb.jpg",130,130,15);thumbnails[5718465]=new thumbnail(5718465,"332344","Colours Of The Market","ColoursOfTheMarket-LowRes_thumb.jpg",130,92,15);thumbnails[5718537]=new thumbnail(5718537,"332344","Light and Shade","LightShade-LowRes_thumb.jpg",130,92,15);thumbnails[5718565]=new thumbnail(5718565,"332344","Piero Snack Bar","PieroSnackBar-LowRes_thumb.jpg",130,130,15);thumbnails[5718572]=new thumbnail(5718572,"332344","Pride of Place","PrideOfPlace-LowRes_thumb.jpg",130,130,15);thumbnails[5718579]=new thumbnail(5718579,"332344","Black Cabs","BlackCabs-LowRes_thumb.jpg",130,92,15);thumbnails[5745516]=new thumbnail(5745516,"330401","Blue Notes","BlueNotes-Email-600_thumb.jpg",130,101,15);thumbnails[5745517]=new thumbnail(5745517,"330401","Duet<br>\r\n<br>\r\n","Duet-Email-600_thumb.jpg",130,101,15);thumbnails[5745518]=new thumbnail(5745518,"330401","Playing The Shapes","PlayingTheShapes-Email-600_thumb.jpg",130,100,15);thumbnails[5745519]=new thumbnail(5745519,"330401","Between the Weather and the Rock","BetweenTheWeatherTheRock-Email-600_thumb.jpg",130,65,15);thumbnails[5745520]=new thumbnail(5745520,"330401","Storm Form","StormForm-LowRes-600_thumb.jpg",130,136,15);thumbnails[5745521]=new thumbnail(5745521,"330401","Through The Old Town","ThroughTheOldTown-Email-600_thumb.jpg",130,95,15);thumbnails[5839718]=new thumbnail(5839718,"330432","The Art Publishing Group","animlogo_thumb.gif",130,126,15);thumbnails[5839792]=new thumbnail(5839792,"330439","Image By Design Licensing<br>\r\n<br>\r\n","IBD_thumb.jpg",130,33,15);thumbnails[5882816]=new thumbnail(5882816,"332329","Londonart","LondonArt_thumb.jpg",130,33,15);thumbnails[5882958]=new thumbnail(5882958,"332329","AllPosters","Allposters_thumb.jpg",130,36,15);thumbnails[5883262]=new thumbnail(5883262,"332344","Pork Pie Jazz","PorkPieJazz-LowRes_thumb.jpg",130,182,15);thumbnails[5883265]=new thumbnail(5883265,"332344","The Sound of Salzburg<br>\r\n","TheSoundOfSalzburg-LowRes_thumb.jpg",130,85,15);thumbnails[5883323]=new thumbnail(5883323,"330401","Untitled","Untitled-Email-600_thumb.jpg",130,251,15);thumbnails[5928446]=new thumbnail(5928446,"332344","Angry Mob","AngryMob-LowRes_thumb.jpg",130,130,15);thumbnails[5977185]=new thumbnail(5977185,"332344","Ship Of Fools","ShipOfFools-LowRes_thumb.jpg",130,130,15);thumbnails[6317298]=new thumbnail(6317298,"330401","Shale","Shale-LowRes_thumb.jpg",130,91,15);thumbnails[6317302]=new thumbnail(6317302,"330401","Shards","Shards-LowRes_thumb.jpg",130,130,15);thumbnails[6397789]=new thumbnail(6397789,"330401","Avatar","Avatar-LowRes_thumb.jpg",130,90,15);thumbnails[6397794]=new thumbnail(6397794,"330401","Balance","Balance-LowRes_thumb.jpg",130,76,15);thumbnails[6397797]=new thumbnail(6397797,"330401","Circular Impressions","CircularImpressions-LowRes_thumb.jpg",130,68,15);thumbnails[6397801]=new thumbnail(6397801,"330401","Desert Song","DesertSong-LowRes_thumb.jpg",130,90,15);thumbnails[6397817]=new thumbnail(6397817,"330401","Duskwood","DuskWood-LowRes_thumb.jpg",130,93,15);thumbnails[6397839]=new thumbnail(6397839,"330401","Greek Day's End","GeekDaysEnd-LowRes_thumb.jpg",130,130,15);thumbnails[6397878]=new thumbnail(6397878,"330401","Interplay","Interplay-LowRes_thumb.jpg",130,90,15);thumbnails[6397881]=new thumbnail(6397881,"330401","Iron Man","IronMan-LowRes_thumb.jpg",130,94,15);thumbnails[6397882]=new thumbnail(6397882,"330401","Phases","Phases-LowRes_thumb.jpg",130,90,15);thumbnails[6397884]=new thumbnail(6397884,"330401","Special Light","SpecialLight-LowRes_thumb.jpg",130,90,15);thumbnails[6397904]=new thumbnail(6397904,"332344","Deity","Deity-LowRes_thumb.jpg",130,81,15);thumbnails[6397927]=new thumbnail(6397927,"332344","Firecat","FireCat-LowRes_thumb.jpg",130,251,15);thumbnails[6397936]=new thumbnail(6397936,"332344","Moon Bears","Moonbears-LowRes_thumb.jpg",130,76,15);thumbnails[6397967]=new thumbnail(6397967,"332344","Pile On","PileOn-LowRes_thumb.jpg",130,81,15);thumbnails[6397968]=new thumbnail(6397968,"332344","Sentinal","Sentinal-LowRes_thumb.jpg",130,81,15);thumbnails[6397970]=new thumbnail(6397970,"332344","Twin Grin","TwinGrin-LowRes_thumb.jpg",130,84,15);thumbnails[6399813]=new thumbnail(6399813,"332344","Street Market 1","StreetMarket1-LowRes_thumb.jpg",130,130,15);thumbnails[6399814]=new thumbnail(6399814,"","Street Market 2","StreetMarket2-LowRes_thumb.jpg",130,130,15);thumbnails[6399834]=new thumbnail(6399834,"332344","Opening Up","OpeningUp-LowRes_thumb.jpg",130,81,15);thumbnails[6399839]=new thumbnail(6399839,"332344","Kabhi Kabhi","KabhiKabhi-LowRes_thumb.jpg",130,72,15);thumbnails[6399844]=new thumbnail(6399844,"332344","Night Lights","NightLights-LowRes_thumb.jpg",130,210,15);thumbnails[6399856]=new thumbnail(6399856,"332344","Aegean Gold","AegeanGold-LowRes_thumb.jpg",130,180,15);thumbnails[6648812]=new thumbnail(6648812,"330401","Anatolia","Anatolia-LowRes_thumb.jpg",130,94,15);thumbnails[6648817]=new thumbnail(6648817,"330401","Old Gold","OldGold-LowRes_thumb.jpg",130,90,15);thumbnails[6648820]=new thumbnail(6648820,"330401","Oxides","Oxides-LowRes_thumb.jpg",130,94,15);thumbnails[6648827]=new thumbnail(6648827,"330401","Pulse","Pulse-LowRes_thumb.jpg",130,94,15);thumbnails[6648837]=new thumbnail(6648837,"330401","Samarkand","Samarkand-LowRes_thumb.jpg",130,94,15);thumbnails[6649113]=new thumbnail(6649113,"330401","Sandbox","Sandbox-LowRes_thumb.jpg",130,94,15);thumbnails[6653480]=new thumbnail(6653480,"330401","Construct","Construct-LowRes_thumb.jpg",130,94,15);thumbnails[6655018]=new thumbnail(6655018,"330401","Tectonics","Tectonics-LowRes_thumb.jpg",130,94,15);thumbnails[6662713]=new thumbnail(6662713,"330401","Spirit Walker","SpiritWalker-LowRes_thumb.jpg",130,130,15);thumbnails[6662971]=new thumbnail(6662971,"330401","Funky Town 1","FunkyTown1-LowRes_thumb.jpg",130,130,15);thumbnails[5745511]=new thumbnail(5745511,"330401","Slipstreams","Slipstream-Email-600_thumb.jpg",130,93,15);var galleries=new Object();galleries[330401]=new gallery(330401,"6662971,6662713,6655018,6653480,6649113,6648837,6648827,6648820,6648817,6648812","Abstracts","gallery",[3382634,3382642,3382649,3382653,3382661,3420390,3420417,3420438,3420491,3420555,3502175,3502698,3576740,4061133,4061134,4061135,4061136,4062558,5718225,5718240,5745516,5745517,5745518,5745519,5745520,5745521,5883323,6317298,6317302,6397789,6397794,6397797,6397801,6397817,6397839,6397878,6397881,6397882,6397884,6648812,6648817,6648820,6648827,6648837,6649113,6653480,6655018,6662713,6662971,5745511]);galleries[330439]=new gallery(330439,"5839792","Licensing","section396022",[5839792]);galleries[332329]=new gallery(332329,"5882958,5882816","Online Purchasing","section398304",[5882816,5882958]);galleries[330432]=new gallery(330432,"5839718","Publishers","section396015",[5839718]);galleries[332344]=new gallery(332344,"6399856,6399844,6399839,6399834,6399813,6397970,6397968,6397967,6397936,6397927","Various","gallery",[3736293,3736461,3736503,3736599,3736603,3736610,5718296,5718465,5718537,5718565,5718572,5718579,5883262,5883265,5928446,5977185,6397904,6397927,6397936,6397967,6397968,6397970,6399813,6399834,6399839,6399844,6399856]);var imageSets=new Object();imageSets[1]="6662971,6655018,6648812,3420555";imageSets[3]="6662971,6662713,6655018,6653480,6649113,6648837,6648827,6648820,6648817,6648812,6399856,6399844,6399839,6399834,6399814,6399813,6397970,6397968,6397967,6397936,6397927,6397904,6397884,6397882,6397881,6397878,6397839,6397817,6397801,6397797,6397794,6397789,6317302,6317298,5977185,5928446,5883323,5883265,5883262,5882958,5882816,5839792,5839718,5745521,5745520,5745519,5745518,5745517,5745516,5745511";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/chrismills/images";break}switch(a){case 1:b="http://www1.clikpic.com/chrismills/images";break}switch(a){case 2:b="http://admin.clikpic.com/chrismills/images";break}switch(a){case 24:b="http://tpc15/clikpic/chrismills/images";break}switch(a){case 4:b="http://www.clikchurch.com/chrismills/images";break}switch(a){case 5:b="http://www2.clikpic.com/chrismills/images";break}switch(a){case 22:b="http://tpc5/clikpic/chrismills/images";break}switch(a){case 23:b="http://tpc10/clikpic/chrismills/images";break}switch(a){case 25:b="http://tpc16/clikpic/chrismills/images";break}switch(a){case 15:b="http://www3.clikpic.com/chrismills/images";break}switch(a){case 18:b="http://www4.clikpic.com/chrismills/images";break}switch(a){case 19:b="http://www5.clikpic.com/chrismills/images";break}switch(a){case 31:b="http://www7.clikpic.com/chrismills/images";break}switch(a){case 32:b="http://admin2.clikpic.com/chrismills/images";break}switch(a){case 33:b="http://www8.clikpic.com/chrismills/images";break}switch(a){case 34:b="http://www9.clikpic.com/chrismills/images";break}switch(a){case 35:b="http://admin3.clikpic.com/chrismills/images";break}switch(a){case 37:b="http://admin4.clikpic.com/chrismills/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="Chris Mills Artworks: "+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+'")'})}}};