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[6016559]=new thumbnail(6016559,"245614","Spring Kitchin","kitchin_thumb.jpg",130,166,1);thumbnails[6016966]=new thumbnail(6016966,"245614","Scotland’s places in<br>\r\nhistorical photographs","old_cities5parter1_thumb.jpg",130,83,1);thumbnails[5267366]=new thumbnail(5267366,"245614","The Decade 2000-2009","the_decade_thumb.jpg",130,166,1);thumbnails[5267354]=new thumbnail(5267354,"245614","Story of the Forth","story_of_the_forth_thumb.jpg",130,166,1);thumbnails[5267349]=new thumbnail(5267349,"245614","Story of the Clyde","story_of_the_clyde_thumb.jpg",130,166,1);thumbnails[5131561]=new thumbnail(5131561,"245614","Scotland's crooks & capers","crooks_supplement_thumb.jpg",130,166,1);thumbnails[4916531]=new thumbnail(4916531,"245614","Above Scotland<br>\r\npart 1","above_scotland_cover_1_thumb.jpg",130,167,1);thumbnails[4916630]=new thumbnail(4916630,"245614","Above Scotland<br>\r\npart 2","above_scotland_cover_2_thumb.jpg",130,167,1);thumbnails[4793310]=new thumbnail(4793310,"245614","Autumn woodland walks 2009 - three parter series","autumn_woodland_walks_part_1_web_thumb.jpg",130,184,1);thumbnails[4793302]=new thumbnail(4793302,"245614","Autumn water walks 2009 - three parter series","autumn_water_walks_part_2_web_thumb.jpg",130,184,1);thumbnails[4793298]=new thumbnail(4793298,"245614","Autumn hill walks 2009 - three parter series","SOS_autumn_hill_walks_part_3_web_thumb.jpg",130,184,1);thumbnails[4793258]=new thumbnail(4793258,"245614","Autumn walks 2009 - three parter","3Dcover_autumn_walks_3_parter_thumb.jpg",130,63,1);thumbnails[4089781]=new thumbnail(4089781,"245614","SCOTTISH WALKS<BR>part 1","TS-walking-book-part-one_final-1_thumb.jpg",130,182,1);thumbnails[4089787]=new thumbnail(4089787,"245614","SCOTTISH WALKS<BR>part 2","SOS-walking-guide-booklet-part-2-final-1_thumb.jpg",130,182,1);thumbnails[4089796]=new thumbnail(4089796,"245614","CALEDONIAN CURRIES<BR>SCOTLAND ON SUNDAY","SOS-2009-curry-book_final-1_thumb.jpg",130,184,1);thumbnails[4089798]=new thumbnail(4089798,"245614","SHIPWRECK SCOTLAND<BR>Five centuries of Scottish shipwrecks","TS-A5-shipwrecks-booklet_final-1_thumb.jpg",130,182,1);thumbnails[4089802]=new thumbnail(4089802,"245614","Unseen Scotland<BR>Caught In Time","unseen-scotland-tabloid_v2-1_thumb.jpg",130,167,1);thumbnails[4793440]=new thumbnail(4793440,"37612","Dunnottar Castle","20090919_1853p_thumb.jpg",130,86,1);thumbnails[4793480]=new thumbnail(4793480,"37612","Arbroath Harbour","20090919_1778p_thumb.jpg",130,89,1);thumbnails[6016057]=new thumbnail(6016057,"37612","River Garry","20100518_3414_Panorama_thumb.jpg",130,84,1);thumbnails[6016458]=new thumbnail(6016458,"37612","The Queen's View<br>\r\nand Loch Tummel","20100518_3652_Panorama_thumb.jpg",130,82,1);thumbnails[4745383]=new thumbnail(4745383,"37612","Scotland's landscape","0674p_thumb.jpg",130,86,1);thumbnails[4745422]=new thumbnail(4745422,"37612","Scotland's landscape","1689p_thumb.jpg",130,56,1);thumbnails[4745415]=new thumbnail(4745415,"37612","Scotland's landscape","1760p_thumb.jpg",130,83,1);thumbnails[4745410]=new thumbnail(4745410,"37612","Scotland's landscape","1757p_thumb.jpg",130,87,1);thumbnails[3684110]=new thumbnail(3684110,"37612","between Ben Lawers and Loch Tye","_MG_1819_1024_thumb.jpg",130,87,1);thumbnails[3789671]=new thumbnail(3789671,"37612","East coast - Scottish Borders","IMG_20090425_0062800__thumb.JPG",130,87,1);thumbnails[3789667]=new thumbnail(3789667,"37612","East coast - Scottish Borders","IMG_20090425_0047800__thumb.JPG",130,87,1);thumbnails[3789675]=new thumbnail(3789675,"37612","East coast - Scottish Borders","IMG_20090425_0074800__thumb.JPG",130,87,1);thumbnails[3789688]=new thumbnail(3789688,"37612","East coast - Scottish Borders","IMG_20090425_0141800__thumb.JPG",130,87,1);thumbnails[3789681]=new thumbnail(3789681,"37612","East coast - Scottish Borders","IMG_20090425_0122800__thumb.JPG",130,87,1);thumbnails[3684206]=new thumbnail(3684206,"37612","Loch Tay","_MG_1802_1024_thumb.jpg",130,195,1);thumbnails[3684207]=new thumbnail(3684207,"37612","Loch Tay","_MG_1805_1024_thumb.jpg",130,87,1);thumbnails[3711580]=new thumbnail(3711580,"37612","St Abbs","1891_1893_HDR_LR_thumb.jpg",130,87,1);thumbnails[3711583]=new thumbnail(3711583,"37612","St Abbs","1894_1896_HDR_LR_thumb.jpg",130,68,1);thumbnails[3711601]=new thumbnail(3711601,"37612","St Abbs","st_abbs_LR_thumb.jpg",130,37,1);thumbnails[3711594]=new thumbnail(3711594,"37612","St Abbs","2037_2039_HDR_LR_thumb.jpg",130,87,1);thumbnails[3711585]=new thumbnail(3711585,"37612","St Abbs","1951_1953_HDR_LR_thumb.jpg",130,87,1);thumbnails[3711551]=new thumbnail(3711551,"37612","St Abbs","_MG_1879_LR_thumb.jpg",130,170,1);thumbnails[3711590]=new thumbnail(3711590,"37612","St Abbs","1968_1970_HDR_LR_thumb.jpg",130,87,1);thumbnails[3711578]=new thumbnail(3711578,"37612","St Abbs","_MG_1906_LR_thumb.jpg",130,87,1);thumbnails[476773]=new thumbnail(476773,"37612","I dedicate this picture to Marta","512_IMG_1925_1_thumb.jpg",130,87,1);thumbnails[476775]=new thumbnail(476775,"37612","Calton Hill","512_IMG_1932_2_thumb.jpg",130,87,1);thumbnails[478357]=new thumbnail(478357,"37612","Carlton Hill","512_IMG_1940 carlton hill 2_thumb.jpg",130,182,1);thumbnails[476779]=new thumbnail(476779,"37612","Granton Harbour, Edinburgh","512_IMG_6756_thumb.jpg",130,93,1);thumbnails[477655]=new thumbnail(477655,"37612","Sunset","512_IMG_1835_1_thumb.jpg",130,195,1);thumbnails[477663]=new thumbnail(477663,"37612","Aberdovey, Wales","IMG_6041_1_thumb.jpg",130,87,1);thumbnails[2196513]=new thumbnail(2196513,"145300","","www_MG_8115_thumb.jpg",130,195,1);thumbnails[2196516]=new thumbnail(2196516,"145300","","www_MG_8112_thumb.jpg",130,130,1);thumbnails[2196518]=new thumbnail(2196518,"145300","","www_MG_8128_thumb.jpg",130,195,1);thumbnails[2196521]=new thumbnail(2196521,"145300","","www_MG_8344_thumb.jpg",130,87,1);thumbnails[2196531]=new thumbnail(2196531,"145300","","www_MG_8242_thumb.jpg",130,195,1);thumbnails[2196534]=new thumbnail(2196534,"145300","","www_MG_8265_thumb.jpg",130,86,1);thumbnails[2196535]=new thumbnail(2196535,"145300","","www_MG_0789_thumb.jpg",130,89,1);thumbnails[2196538]=new thumbnail(2196538,"145300","","www_MG_8303_thumb.jpg",130,112,1);thumbnails[2930119]=new thumbnail(2930119,"145300","","_MG_8360_scottish gas hq_LR_thumb.jpg",130,89,1);thumbnails[2930191]=new thumbnail(2930191,"145300","Port of Leith","_MG_0028_port_LR_thumb.jpg",130,79,1);thumbnails[1499255]=new thumbnail(1499255,"103005","","2_lr_thumb.jpg",130,196,1);thumbnails[1499256]=new thumbnail(1499256,"103005","Highland cow in city this is possible in Edinburgh here is everything possible","7_lr_thumb.jpg",130,130,1);thumbnails[1499257]=new thumbnail(1499257,"103005","Leith","8_lr_thumb.jpg",130,102,1);thumbnails[1499259]=new thumbnail(1499259,"103005","steps","12_lr_thumb.jpg",130,130,1);thumbnails[1499260]=new thumbnail(1499260,"103005","reflections","13_lr_thumb.jpg",130,130,1);thumbnails[1499262]=new thumbnail(1499262,"103005","Old Town","14_lr_thumb.jpg",130,130,1);thumbnails[1499263]=new thumbnail(1499263,"103005","Princess Street","15_lr_thumb.jpg",130,130,1);thumbnails[1499265]=new thumbnail(1499265,"103005","drums on street","17_lr_thumb.jpg",130,130,1);thumbnails[1499266]=new thumbnail(1499266,"103005","plane","18_lr_thumb.jpg",130,130,1);thumbnails[1499270]=new thumbnail(1499270,"103005","The Scottish Parliament","23_lr_thumb.jpg",130,166,1);thumbnails[1499271]=new thumbnail(1499271,"103005","'western' side of Edinburgh","24_lr_thumb.jpg",130,167,1);thumbnails[1499273]=new thumbnail(1499273,"103005","'western' side of Edinburgh","25_lr_thumb.jpg",130,130,1);thumbnails[1499274]=new thumbnail(1499274,"103005","'western' side of Edinburgh","28_lr_thumb.jpg",130,169,1);thumbnails[1499275]=new thumbnail(1499275,"103005","'western' side of Edinburgh","29_lr_thumb.jpg",130,100,1);thumbnails[1499276]=new thumbnail(1499276,"103005","reflections","34_lr_thumb.jpg",130,130,1);thumbnails[1499278]=new thumbnail(1499278,"103005","Leith Docks","51_lr_thumb.jpg",130,130,1);thumbnails[5380284]=new thumbnail(5380284,"180990","foliage","20100117_2877_thumb.jpg",130,192,1);thumbnails[5380458]=new thumbnail(5380458,"180990","Foliage","20100117_2886_thumb.jpg",130,192,1);thumbnails[5380467]=new thumbnail(5380467,"180990","Foliage","20100117_2889_thumb.jpg",130,192,1);thumbnails[5380476]=new thumbnail(5380476,"180990","Foliage","20100117_2892_thumb.jpg",130,192,1);thumbnails[5380481]=new thumbnail(5380481,"180990","Foliage","20100117_2885_thumb.jpg",130,141,1);thumbnails[1499253]=new thumbnail(1499253,"103003","Waverley Station","1_lr_thumb.jpg",130,130,1);thumbnails[1499258]=new thumbnail(1499258,"103003","waiting for a train","10_lr_thumb.jpg",130,130,1);thumbnails[1499267]=new thumbnail(1499267,"103003","Lunch at museum","19_lr_thumb.jpg",130,130,1);thumbnails[1499277]=new thumbnail(1499277,"103003","Tollcross","44_lr_thumb.jpg",130,130,1);thumbnails[2062625]=new thumbnail(2062625,"84695",")(","www_1271_hdr_thumb.jpg",130,87,1);thumbnails[2062638]=new thumbnail(2062638,"84695","Night vision","www_1303_hdr_thumb.jpg",130,86,1);thumbnails[2062659]=new thumbnail(2062659,"84695","","www_1282_hdr_thumb.jpg",130,87,1);thumbnails[2062661]=new thumbnail(2062661,"84695","","www_9392_hdr_thumb.jpg",130,195,1);thumbnails[2062675]=new thumbnail(2062675,"84695","","www_kid_hdr_thumb.jpg",130,181,1);thumbnails[2062676]=new thumbnail(2062676,"84695","","www_1275_hdr_thumb.jpg",130,87,1);thumbnails[2069792]=new thumbnail(2069792,"84695","","www_petr_hdr_thumb.jpg",130,156,1);thumbnails[2069798]=new thumbnail(2069798,"84695","","www_1555_hdr_thumb.jpg",130,156,1);thumbnails[477680]=new thumbnail(477680,"77362","Duke of Gloucester","512_IMG_8467a_thumb.jpg",130,87,1);thumbnails[477682]=new thumbnail(477682,"77362","Duke of Gloucester","512_IMG_8550_thumb.jpg",130,87,1);thumbnails[477686]=new thumbnail(477686,"77362","Duke of Gloucester","512_IMG_8597_thumb.jpg",130,87,1);thumbnails[2062635]=new thumbnail(2062635,"77362","","triptik1_thumb.jpg",130,46,1);thumbnails[2062647]=new thumbnail(2062647,"77362","","triptik2_thumb.jpg",130,46,1);thumbnails[848694]=new thumbnail(848694,"37613","Secret Garden","IMG_6152_1_thumb.jpg",130,98,1);thumbnails[627034]=new thumbnail(627034,"37613","giraffe at the city","IMG_5242_1_thumb.jpg",130,201,1);thumbnails[5324324]=new thumbnail(5324324,"37613","Orchid","20100103_2876_thumb.jpg",130,87,1);var galleries=new Object();galleries[245614]=new gallery(245614,"4793310,4793302,4793298,4089798,4089796,4089787,4089781","DTP","section298029",[6016559,6016966,5267366,5267354,5267349,5131561,4916531,4916630,4793310,4793302,4793298,4793258,4089781,4089787,4089796,4089798,4089802]);galleries[37612]=new gallery(37612,"6016057,4793480,4793440,4745422,4745410,4745383,3789671,3789667","Landscapes","gallery",[4793440,4793480,6016057,6016458,4745383,4745422,4745415,4745410,3684110,3789671,3789667,3789675,3789688,3789681,3684206,3684207,3711580,3711583,3711601,3711594,3711585,3711551,3711590,3711578,476773,476775,478357,476779,477655,477663]);galleries[145300]=new gallery(145300,"2930191,2930119,2196538,2196535,2196531,2196521,2196516,2196513","Industry and Machinery","gallery",[2196513,2196516,2196518,2196521,2196531,2196534,2196535,2196538,2930119,2930191]);galleries[103005]=new gallery(103005,"1499276,1499275,1499274,1499273,1499271,1499270,1499266,1499265","streets","gallery",[1499255,1499256,1499257,1499259,1499260,1499262,1499263,1499265,1499266,1499270,1499271,1499273,1499274,1499275,1499276,1499278]);galleries[180990]=new gallery(180990,"5380481,5380476,5380467,5380458,5380284","nature","gallery",[5380284,5380458,5380467,5380476,5380481]);galleries[103003]=new gallery(103003,"1499267,1499258,1499253","movement","gallery",[1499253,1499258,1499267,1499277]);galleries[84695]=new gallery(84695,"2069798,2062676,2062661,2062659","HDR","gallery",[2062625,2062638,2062659,2062661,2062675,2062676,2069792,2069798]);galleries[77362]=new gallery(77362,"2062647,2062635,477686,477682,477680","portraits","gallery",[477680,477682,477686,2062635,2062647]);galleries[37613]=new gallery(37613,"5324324","Other","gallery",[848694,627034,5324324]);var imageSets=new Object();imageSets[1]="6016057,5380476,5380467,5380458,5380284";imageSets[2]="6016057,5380481,5380476,5380467,5380458,5380284,5324324,4793480,4793440,4793310,4793302,4793298,4745422,4745410,4745383,4089798,4089796,4089787,4089781,3789671,3789667,2930191,2930119,2196538,2196535,2196531,2196521,2196516,2196513,2069798,2062676,2062661,2062659,1499276,1499275,1499274,1499273,1499271,1499270,1499267,1499266,1499265,1499258,1499253";imageSets[3]="6016966,6016559,6016458,6016057,5380481,5380476,5380467,5380458,5380284,5324324,5267366,5267354,5267349,5131561,4916630,4916531,4793480,4793440,4793310,4793302,4793298,4793258,4745422,4745415,4745410,4745383,4089802,4089798,4089796,4089787,4089781,3789688,3789681,3789675,3789671,3789667,3711601,3711594,3711590,3711585,3711583,3711580,3711578,3711551,3684207,3684206,3684110,2930191,2930119,2196538";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/quall/images";break}switch(a){case 1:b="http://www1.clikpic.com/quall/images";break}switch(a){case 2:b="http://admin.clikpic.com/quall/images";break}switch(a){case 24:b="http://tpc15/clikpic/quall/images";break}switch(a){case 4:b="http://www.clikchurch.com/quall/images";break}switch(a){case 5:b="http://www2.clikpic.com/quall/images";break}switch(a){case 22:b="http://tpc5/clikpic/quall/images";break}switch(a){case 23:b="http://tpc10/clikpic/quall/images";break}switch(a){case 25:b="http://tpc16/clikpic/quall/images";break}switch(a){case 15:b="http://www3.clikpic.com/quall/images";break}switch(a){case 18:b="http://www4.clikpic.com/quall/images";break}switch(a){case 19:b="http://www5.clikpic.com/quall/images";break}switch(a){case 31:b="http://www7.clikpic.com/quall/images";break}switch(a){case 32:b="http://admin2.clikpic.com/quall/images";break}switch(a){case 33:b="http://www8.clikpic.com/quall/images";break}switch(a){case 34:b="http://www9.clikpic.com/quall/images";break}switch(a){case 35:b="http://admin3.clikpic.com/quall/images";break}switch(a){case 37:b="http://admin4.clikpic.com/quall/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="'+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="Quall Design Edinburgh: "+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+'")'})}}};