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[5681054]=new thumbnail(5681054,"75775","The Chocolate Shop (Churchtown) SOLD - Commission ","chocolate_shop_thumb.jpg",100,200,18);thumbnails[5681068]=new thumbnail(5681068,"75775","Duped SOLD","butterflies_thumb.jpg",130,86,18);thumbnails[5681111]=new thumbnail(5681111,"75775","Birth of Time","Midnight-1_thumb.jpg",130,85,18);thumbnails[5687328]=new thumbnail(5687328,"75775","No Show Without Punch (The Cliche)","DSC01035_thumb.JPG",130,94,18);thumbnails[6354475]=new thumbnail(6354475,"75775","duped 2 ","GSearl-14-07-10-122_thumb.jpg",130,86,18);thumbnails[879844]=new thumbnail(879844,"66131","Love on the Rocks SOLD   ","Image 001_thumb.tif1.jpg",130,132,18);thumbnails[879858]=new thumbnail(879858,"66131","Puzzle of Love SOLD  ","Image 017_thumb.tif1.jpg",130,107,18);thumbnails[879860]=new thumbnail(879860,"66131","I Spy Love","Image 002_thumb.tif1.jpg",130,129,18);thumbnails[879867]=new thumbnail(879867,"66131","Ancient Love  SOLD","Image 003_thumb.tif1.jpg",130,96,18);thumbnails[879869]=new thumbnail(879869,"66131","Fairground Attraction   SOLD","Image 005_thumb.tif1.jpg",130,99,18);thumbnails[879873]=new thumbnail(879873,"66131","Don't Hide Your Love SOLD","Image 006_thumb.tif1.jpg",130,96,18);thumbnails[879880]=new thumbnail(879880,"66131","When Love Leaves SOLD","Image 009_thumb.tif1.jpg",130,91,18);thumbnails[879882]=new thumbnail(879882,"66131","Love is in the Air SOLD","Image 010_thumb.tif1.jpg",130,92,18);thumbnails[879887]=new thumbnail(879887,"66131","The Three Little Pigs SOLD","Image 011_thumb.tif1.jpg",130,100,18);thumbnails[879888]=new thumbnail(879888,"66131","The Game of Love SOLD","Image 013_thumb.tif1.jpg",130,108,18);thumbnails[1485173]=new thumbnail(1485173,"66131","Hearts of Gold SOLD","Image 040_thumb.tif.jpg",130,102,18);thumbnails[4436879]=new thumbnail(4436879,"66131","Purple Heart","IMG_5733Picture-1_thumb.jpg",130,131,18);thumbnails[4436898]=new thumbnail(4436898,"66131","Blue Heart","IMG_5734Picture-1_thumb.jpg",130,131,18);thumbnails[872035]=new thumbnail(872035,"66134","Land of Nod SOLD ","Searl painting 13_thumb.TIF1.jpg",130,165,18);thumbnails[875256]=new thumbnail(875256,"66134","Seven Seas of Love SOLD","Searl painting 6_thumb.TIF1.jpg",130,79,18);thumbnails[875267]=new thumbnail(875267,"66134","Fishing for the Answer","Searl painting 7_thumb.TIF1.jpg",130,78,18);thumbnails[875274]=new thumbnail(875274,"66134","Seeing Double SOLD","Searl painting 8_thumb.TIF2.jpg",130,104,18);thumbnails[875279]=new thumbnail(875279,"66134","Flight of Fancy","Searl painting 9_thumb.TIF1.jpg",130,102,18);thumbnails[875285]=new thumbnail(875285,"66134","The Three Kings SOLD","CNV000071_thumb.JPG",130,71,18);thumbnails[875291]=new thumbnail(875291,"66134","The Seven Sins SOLD","CNV000081_thumb.JPG",130,134,18);thumbnails[875297]=new thumbnail(875297,"66134","Inshaws garden    SOLD","CNV000091_thumb.JPG",130,103,18);thumbnails[875429]=new thumbnail(875429,"66134","Unsure Intentions SOLD","CNV000111_thumb.JPG",130,132,18);thumbnails[879810]=new thumbnail(879810,"66134","Lilac Balloons Over L.A. SOLD","Image 021_thumb.tif1.jpg",130,86,18);thumbnails[879823]=new thumbnail(879823,"66134","Maggie's Garden SOLD","Image 034_thumb.tif1.jpg",130,131,18);thumbnails[881507]=new thumbnail(881507,"66134","The Sandmen SOLD ","Searl painting 12_thumb.TIF1.jpg",130,165,18);thumbnails[2097741]=new thumbnail(2097741,"66134"," Spring SOLD","image 045_thumb.tif.jpg",130,199,18);thumbnails[2097746]=new thumbnail(2097746,"66134","Autumn SOLD","image 046_thumb.tif.jpg",130,199,18);thumbnails[2271070]=new thumbnail(2271070,"66134","Gone But Not Forgotten SOLD","image 048_thumb.tif.jpg",130,88,18);thumbnails[2271083]=new thumbnail(2271083,"66134","Summer SOLD","image 049_thumb.tif.jpg",130,197,18);thumbnails[2374505]=new thumbnail(2374505,"66134","Winter  SOLD ","image 050_thumb.tif.jpg",130,196,18);thumbnails[4065199]=new thumbnail(4065199,"66134","Sweet Delights","grant1_thumb.jpg",117,200,18);thumbnails[4065203]=new thumbnail(4065203,"66134","The Chocolate House SOLD","grant4_thumb.jpg",118,200,18);thumbnails[4065207]=new thumbnail(4065207,"66134","Seven Sins of Man","grant3_thumb.jpg",130,130,18);thumbnails[4065210]=new thumbnail(4065210,"66134","Seven Sins of Women","grant2_thumb.jpg",130,130,18);thumbnails[4436967]=new thumbnail(4436967,"66134","Birth of the Balloons","IMG_5732Picture-1_thumb.jpg",130,86,18);thumbnails[879891]=new thumbnail(879891,"66135","The Greedy Pig","Image 0292_thumb.jpg",130,164,18);thumbnails[879893]=new thumbnail(879893,"66135","Who Ate All the Pies","Image 0302_thumb.jpg",130,163,18);thumbnails[881476]=new thumbnail(881476,"66135","Scrumping SOLD","Image 031_thumb.tif1.jpg",130,103,18);thumbnails[881479]=new thumbnail(881479,"66135","Life Is Not a Bowl of Cherries SOLD","Image 032_thumb.tif1.jpg",130,102,18);thumbnails[881490]=new thumbnail(881490,"66135","Pig in Pink Boat SOLD ","Image 012_thumb.tif1.jpg",130,87,18);thumbnails[881498]=new thumbnail(881498,"66135","Father and Son","Image 007_thumb.tif1.jpg",102,200,18);thumbnails[881500]=new thumbnail(881500,"66135","Mother and Daughter","Image 008_thumb.tif1.jpg",103,200,18);thumbnails[881501]=new thumbnail(881501,"66135","Pig in Red Boat SOLD ","Image 004_thumb.tif1.jpg",130,85,18);thumbnails[871973]=new thumbnail(871973,"66136","Obsevatory SOLD","Image 014_thumb.tif1.jpg",130,143,18);thumbnails[875243]=new thumbnail(875243,"66136","Purple Rain ","Searl painting 5_thumb.TIF1.jpg",130,129,18);thumbnails[883373]=new thumbnail(883373,"66136","This Sceptred Isle SOLD","Image 033_thumb.tif1.jpg",130,134,18);thumbnails[883382]=new thumbnail(883382,"66136","The Egg Collection (As featured on Channel Five's The Big Art Challenge) SOLD ","Searl painting 4_thumb.TIF1.jpg",130,181,18);thumbnails[883408]=new thumbnail(883408,"66136","The Hurting SOLD","Image 023_thumb.tif1.jpg",130,43,18);thumbnails[883483]=new thumbnail(883483,"66136","The Twelve SOLD","Image 024_thumb.tif1.jpg",130,133,18);thumbnails[883486]=new thumbnail(883486,"66136","The Boy SOLD","Image 025_thumb.tif1.jpg",130,180,18);thumbnails[883491]=new thumbnail(883491,"66136","The Last Family SOLD","Image 020_thumb.tif1.jpg",130,126,18);thumbnails[1485168]=new thumbnail(1485168,"66136","Picture Yourself SOLD","Image 039_thumb.tif.jpg",130,92,18);thumbnails[1786964]=new thumbnail(1786964,"66136","Natural History of the Alchemist","Image 044_thumb.tif.jpg",130,103,18);thumbnails[1786973]=new thumbnail(1786973,"66136","Natural History of the Alchemist (Detail)","Image 044A_thumb.tif.jpg",130,138,18);thumbnails[2732460]=new thumbnail(2732460,"66136","Creative Creatures SOLD","image 0521_thumb.jpg",130,86,18);thumbnails[2957951]=new thumbnail(2957951,"66136","Bable","image 054_thumb.tif.jpg",130,131,18);thumbnails[3465594]=new thumbnail(3465594,"66136","Spaceman the Dream Maker","space1-1_thumb.jpg",130,82,18);thumbnails[3465610]=new thumbnail(3465610,"66136","Flawed Perfection","egg2-1_thumb.jpg",130,116,18);thumbnails[4436827]=new thumbnail(4436827,"66136","Paradise Lost SOLD","Paradise_Lost_SOLD12_thumb.JPG",130,116,18);thumbnails[931338]=new thumbnail(931338,"66136","Harm","Image 037_thumb.tif.jpg",130,104,18);thumbnails[879896]=new thumbnail(879896,"66137","99 Red Balloons SOLD","Image 015_thumb.tif1.jpg",130,90,18);thumbnails[881475]=new thumbnail(881475,"66137","21 Blue Kites","Image 026_thumb.tif1.jpg",130,175,18);thumbnails[881502]=new thumbnail(881502,"66137","21 Pink Balloons","Image 027_thumb.tif1.jpg",130,176,18);thumbnails[881504]=new thumbnail(881504,"66137","40 Red Balloons SOLD","Image 018_thumb.tif1.jpg",130,88,18);thumbnails[881505]=new thumbnail(881505,"66137","Jacob's Ladder ","Image 019_thumb.tif1.jpg",130,128,18);thumbnails[881506]=new thumbnail(881506,"66137","Needle in a Haystack","Image 022_thumb.tif1.jpg",130,135,18);thumbnails[1012493]=new thumbnail(1012493,"66137","Taking a Dip SOLD","Image 038_thumb.tif.jpg",130,102,18);thumbnails[1559508]=new thumbnail(1559508,"66137","Solid Geometry 2","Image 042_thumb.jpg",130,129,18);thumbnails[1559514]=new thumbnail(1559514,"66137","Big Geometry","Image 043A_thumb.jpg",130,131,18);thumbnails[2957893]=new thumbnail(2957893,"66137","The Oncoming Storm SOLD","image 053_thumb.tif.jpg",130,86,18);thumbnails[883496]=new thumbnail(883496,"66138","Bringing in the Harvest SOLD","Image 0282_thumb.jpg",130,103,18);thumbnails[883499]=new thumbnail(883499,"66138","Blue Golfer SOLD","CNV000051_thumb.jpg",130,165,18);thumbnails[883503]=new thumbnail(883503,"66138","Yellow Golfer SOLD","CNV000061_thumb.jpg",130,167,18);thumbnails[883539]=new thumbnail(883539,"66138","The Potato Pickers SOLD ","CNV000011_thumb.jpg",130,105,18);thumbnails[883572]=new thumbnail(883572,"66138","Trainspotting SOLD","Image 016_thumb.tif1.jpg",130,90,18);thumbnails[2097740]=new thumbnail(2097740,"66138","Memories of Avignon 2 SOLD - Commission     ","image 047_thumb.tif.jpg",130,104,18);thumbnails[2374502]=new thumbnail(2374502,"66138","Lol's Dream SOLD - Commission","image 051_thumb.tif.jpg",130,103,18);thumbnails[4741381]=new thumbnail(4741381,"66138"," The Beach Babe ","The_Beach_Babe1_thumb.jpg",130,197,18);thumbnails[875304]=new thumbnail(875304,"66139","The Secret Garden SOLD","CNV000101_thumb.JPG",130,131,18);thumbnails[894847]=new thumbnail(894847,"66139","Memories of Avignon    SOLD","CNV00002-11_thumb.jpg",130,102,18);thumbnails[897766]=new thumbnail(897766,"66139","Luna","Searl painting 2_thumb.TIF1.jpg",130,196,18);thumbnails[897776]=new thumbnail(897776,"66139","Solar SOLD","Searl painting 1_thumb.TIF1.jpg",130,194,18);thumbnails[897785]=new thumbnail(897785,"66139","Helter-skelter","Searl painting 10_thumb.TIF1.jpg",130,185,18);thumbnails[897793]=new thumbnail(897793,"66139","Observatory","Searl painting 11_thumb.TIF1.jpg",130,182,18);thumbnails[897796]=new thumbnail(897796,"66139","Clouds SOLD","Searl painting 3_thumb.TIF1.jpg",130,95,18);thumbnails[897803]=new thumbnail(897803,"66139","Ilkley 1896    SOLD","CNV000031_thumb.jpg",130,85,18);thumbnails[897807]=new thumbnail(897807,"66139","The Birth of the Ark Royal 1952 SOLD   ","CNV000042_thumb.jpg",130,95,18);thumbnails[1485190]=new thumbnail(1485190,"66139","Solid Geometry 1","Image 041_thumb.tif.jpg",130,130,18);var galleries=new Object();galleries[75775]=new gallery(75775,"6354475,5687328,5681111,5681068,5681054","New Works","gallery",[5681054,5681068,5681111,5687328,6354475]);galleries[66131]=new gallery(66131,"1485173,879888,879887,879882,879880,879873,879869,879867,879860,879844","Romantic Hearts","gallery",[879844,879858,879860,879867,879869,879873,879880,879882,879887,879888,1485173,4436879,4436898]);galleries[66134]=new gallery(66134,"4436967,4065210,4065207,4065203,4065199,2271083,2271070,2097746,2097741,881507,879823,879810,875429,875291,875279,875274,875267,875256,872035","Balloons & Kites","gallery",[872035,875256,875267,875274,875279,875285,875291,875297,875429,879810,879823,881507,2097741,2097746,2271070,2271083,2374505,4065199,4065203,4065207,4065210,4436967]);galleries[66135]=new gallery(66135,"881479,881476,879893,879891","Pigs","gallery",[879891,879893,881476,881479,881490,881498,881500,881501]);galleries[66136]=new gallery(66136,"4436827,3465610,3465594,2957951,2732460,1786973,1786964,1485168,931338,883491,883486,883382,883373,871973","Fantastical","gallery",[871973,875243,883373,883382,883408,883483,883486,883491,1485168,1786964,1786973,2732460,2957951,3465594,3465610,4436827,931338]);galleries[66137]=new gallery(66137,"2957893,1012493,881506,881505,881504,881475,879896","Two Colour","gallery",[879896,881475,881502,881504,881505,881506,1012493,1559508,1559514,2957893]);galleries[66138]=new gallery(66138,"4741381,2097740,883539,883499,883496","Figurative","gallery",[883496,883499,883503,883539,883572,2097740,2374502,4741381]);galleries[66139]=new gallery(66139,"1485190,897807,897803,894847","Early Works","gallery",[875304,894847,897766,897776,897785,897793,897796,897803,897807,1485190]);var imageSets=new Object();imageSets[1]="6354475,5687328,5681111,5681068,5681054,4741381,4436967,4436827,4065210,4065207,4065203,4065199,3465610,3465594,2957951,2957893,2732460,2271083,2271070,2097746,2097741,2097740,1786973,1786964,1485190,1485173,1485168,1012493,931338,897807,897803,894847,883539,883496,883491,883408,883382,883373,881506,881505,881504,881479,881476,879896,879893,879891,879888,879887,879882,879880,879873,879869,879867,879860,879844,879823,879810,875429,875279,875274,875267,875256,871973";imageSets[2]="6354475,5687328,5681111,5681068,5681054,4741381,4436967,4436827,4065210,4065207,4065203,4065199,3465610,3465594,2957951,2957893,2732460,2271083,2271070,2097746,2097741,2097740,1786973,1786964,1485190,1485173,1485168,1012493,931338,897807,897803,894847,883539,883499,883496,883491,883486,883382,883373,881507,881506,881505,881504,881479,881476,881475,879896,879893,879891,879888,879887,879882,879880,879873,879869,879867,879860,879844,879823,879810,875429,875291,875279,875274,875267,875256,872035,871973";imageSets[3]="6354475,5687328,5681111,5681068,5681054,4741381,4436967,4436827";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/grantsearlart/images";break}switch(a){case 1:b="http://www1.clikpic.com/grantsearlart/images";break}switch(a){case 2:b="http://admin.clikpic.com/grantsearlart/images";break}switch(a){case 24:b="http://tpc15/clikpic/grantsearlart/images";break}switch(a){case 4:b="http://www.clikchurch.com/grantsearlart/images";break}switch(a){case 5:b="http://www2.clikpic.com/grantsearlart/images";break}switch(a){case 22:b="http://tpc5/clikpic/grantsearlart/images";break}switch(a){case 23:b="http://tpc10/clikpic/grantsearlart/images";break}switch(a){case 25:b="http://tpc16/clikpic/grantsearlart/images";break}switch(a){case 15:b="http://www3.clikpic.com/grantsearlart/images";break}switch(a){case 18:b="http://www4.clikpic.com/grantsearlart/images";break}switch(a){case 19:b="http://www5.clikpic.com/grantsearlart/images";break}switch(a){case 31:b="http://www7.clikpic.com/grantsearlart/images";break}switch(a){case 32:b="http://admin2.clikpic.com/grantsearlart/images";break}switch(a){case 33:b="http://www8.clikpic.com/grantsearlart/images";break}switch(a){case 34:b="http://www9.clikpic.com/grantsearlart/images";break}switch(a){case 35:b="http://admin3.clikpic.com/grantsearlart/images";break}switch(a){case 37:b="http://admin4.clikpic.com/grantsearlart/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="Grant Searl Art: "+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+'")'})}}};