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[891581]=new thumbnail(891581,"68374","Thornton Force","P2197894_thumb.jpg",130,173,18);thumbnails[895130]=new thumbnail(895130,"68656","Rydal Mount Gardens","P4111905_thumb.jpg",130,98,18);thumbnails[899894]=new thumbnail(899894,"68760","Ullswater","P4122043_thumb.jpg",130,173,18);thumbnails[900644]=new thumbnail(900644,"68962","Maryport Harbour","maryport harbour_thumb.jpg",130,98,18);thumbnails[900645]=new thumbnail(900645,"68962","Maryport Yachts","maryport boats_thumb.jpg",130,96,18);thumbnails[902981]=new thumbnail(902981,"68997","Ennerdale Swans","P10411721_thumb.jpg",130,94,18);thumbnails[903374]=new thumbnail(903374,"68374","Beezley Falls","P2197916_thumb.jpg",130,98,18);thumbnails[903376]=new thumbnail(903376,"68760","Ullswater Boathouse portrait","P4122017_thumb.jpg",130,173,18);thumbnails[903377]=new thumbnail(903377,"68760","Ullswater Boats","P4122045_thumb.jpg",130,103,18);thumbnails[903379]=new thumbnail(903379,"68962","Maryport Yacht","maryport yacht_thumb.jpg",130,176,18);thumbnails[907397]=new thumbnail(907397,"68996","Caldbeck Moors","view to scotland_thumb.jpg",130,98,18);thumbnails[938430]=new thumbnail(938430,"68997","Great Gable 001","P4282626_thumb.jpg",130,98,18);thumbnails[972409]=new thumbnail(972409,"68760","Ullswater Boathouse 001","P41220131_thumb.jpg",130,95,18);thumbnails[1008261]=new thumbnail(1008261,"68760","Ullswater boathouse 002","P4121998_thumb.jpg",130,98,18);thumbnails[1032947]=new thumbnail(1032947,"77094","Coire An Lochain 002","P5313830_thumb.jpg",130,98,18);thumbnails[1032953]=new thumbnail(1032953,"77094","Loch Morlich 001","P5313878_thumb.jpg",130,98,18);thumbnails[1032954]=new thumbnail(1032954,"77094","Loch Morlich 002","P5313914_thumb.jpg",130,98,18);thumbnails[1230747]=new thumbnail(1230747,"77094","Glenmore Forest 001","P7291219_thumb.jpg",130,98,18);thumbnails[1230749]=new thumbnail(1230749,"77094","Loch Morlich 003","P7291250_thumb.jpg",130,98,18);thumbnails[1230752]=new thumbnail(1230752,"77094","Glenmore Forest 002","P7291225r_thumb.jpg",130,98,18);thumbnails[1230790]=new thumbnail(1230790,"77094","Loch Morlich Sunset","P7291311_thumb.jpg",130,98,18);thumbnails[1294140]=new thumbnail(1294140,"68997","Yewbarrow","P8211803_thumb.jpg",130,98,18);thumbnails[1294142]=new thumbnail(1294142,"68997","Wastwater","P8211823_thumb.jpg",130,173,18);thumbnails[1294146]=new thumbnail(1294146,"68997","Stepping stones to Kirk Fell","P8211840_thumb.jpg",130,98,18);thumbnails[1294148]=new thumbnail(1294148,"68997","Wasdale Head","P8211881_thumb.jpg",130,98,18);thumbnails[1294151]=new thumbnail(1294151,"68997","Great Gable 004","P8211924_thumb.jpg",130,98,18);thumbnails[1294159]=new thumbnail(1294159,"68997","Lingmell Beck looking onto Great Gable","P8211942_thumb.jpg",130,173,18);thumbnails[1295882]=new thumbnail(1295882,"68997","Kirk Fell and Great Gable","P8211876_thumb.jpg",130,98,18);thumbnails[1295885]=new thumbnail(1295885,"91829","Brockhole visitor centre","P81315571_thumb.jpg",130,98,18);thumbnails[1295887]=new thumbnail(1295887,"91829","View to Windermere from Brockhole Gardens","P81315711_thumb.jpg",130,173,18);thumbnails[1314128]=new thumbnail(1314128,"68997","sunset on lingmell beck ","P8272045_thumb.jpg",130,173,18);thumbnails[1314134]=new thumbnail(1314134,"68997","Lingmell beck to Wasdale","P8272096_thumb.jpg",130,98,18);thumbnails[1314146]=new thumbnail(1314146,"68997","Last light on Great Gable","P8272105raw_thumb.jpg",130,98,18);thumbnails[1348051]=new thumbnail(1348051,"68997","St Olaf's Church","P8211897_thumb.jpg",130,98,18);thumbnails[1348080]=new thumbnail(1348080,"68997","Lingmell Stones ","P8272032raw_thumb.jpg",130,173,18);thumbnails[1348096]=new thumbnail(1348096,"68997","Wastwater shore","P8272101raw_thumb.jpg",130,98,18);thumbnails[1348113]=new thumbnail(1348113,"68997","Scafell Range","P8272102raw_thumb.jpg",130,98,18);thumbnails[1521456]=new thumbnail(1521456,"77094","Last light on Loch Morlich","P7301457_thumb.jpg",130,98,18);thumbnails[1521578]=new thumbnail(1521578,"77094","Sunlight on the Cairngorms","P7291237_thumb.jpg",130,98,18);thumbnails[3583607]=new thumbnail(3583607,"219036","Isle of Skye Port","P8242568_thumb.jpg",130,98,18);thumbnails[3583613]=new thumbnail(3583613,"219036","Portree","P8242579_thumb.jpg",130,97,18);thumbnails[3599461]=new thumbnail(3599461,"220049","Swindale Common","P3173815_thumb.jpg",130,173,18);thumbnails[3615097]=new thumbnail(3615097,"68997","Gable through the gate","P8211909_thumb.jpg",130,98,18);thumbnails[900822]=new thumbnail(900822,"78770","Troutdale pinnacle Summit","topofblack_thumb.jpg",130,173,18);thumbnails[1492843]=new thumbnail(1492843,"78770","Bouldering on the Bowderstone","PA1722061_thumb.jpg",130,173,18);thumbnails[902985]=new thumbnail(902985,"73413","Red Squirrel","P4021203_thumb.jpg",130,94,18);thumbnails[976874]=new thumbnail(976874,"73413","Trio Ponies","P41422951_thumb.jpg",130,98,18);thumbnails[1090797]=new thumbnail(1090797,"73413","Chaffinch-Dodd Wood","P6180923_thumb.jpg",130,92,18);thumbnails[1295891]=new thumbnail(1295891,"73413","Great Spotted Woodpecker","P8131728_thumb.jpg",130,173,18);thumbnails[3047596]=new thumbnail(3047596,"73413","Seal","P8242736_thumb.jpg",130,87,18);thumbnails[1521685]=new thumbnail(1521685,"104439","Sunlight On The Cairngorms","111_thumb.jpg",130,98,18);thumbnails[1521710]=new thumbnail(1521710,"104439","Castlerigg Stone Cricle","PA202235m_thumb.jpg",130,98,18);thumbnails[1521712]=new thumbnail(1521712,"104439","Crummock Water & Melbreak","PA232344m_thumb.jpg",130,98,18);thumbnails[1521713]=new thumbnail(1521713,"104439","Derwent Water Island","PA242434m_thumb.jpg",130,98,18);thumbnails[1521715]=new thumbnail(1521715,"104439","Glenmore forest<br>\r\n<br>\r\n<br>\r\n","P7291227m1_thumb.jpg",130,173,18);thumbnails[3583600]=new thumbnail(3583600,"104439","Eileen Donan Castle","DSCF01591_thumb.jpg",130,98,18);thumbnails[3583646]=new thumbnail(3583646,"104439","Skye village","P8242644_thumb.jpg",130,98,18);thumbnails[3615093]=new thumbnail(3615093,"104439","Great Gable","P8211904_thumb.jpg",130,98,18);thumbnails[3615161]=new thumbnail(3615161,"104439","Morning mist","PA242393bw2_thumb.jpg",130,173,18);thumbnails[900679]=new thumbnail(900679,"68289","St Johns In The Vale","P2177433_thumb.jpg",130,98,18);thumbnails[902979]=new thumbnail(902979,"68289","Walla Crag Tree","treemono1_thumb.jpg",130,168,18);thumbnails[903375]=new thumbnail(903375,"68289","Skiddaw reflections","skiddaw_thumb.jpg",130,98,18);thumbnails[907399]=new thumbnail(907399,"68289","Keswick Launch","launch_thumb.jpg",130,98,18);thumbnails[995607]=new thumbnail(995607,"68289","Storm clouds over Ashness Bridge","P5193410raw_thumb.jpg",130,98,18);thumbnails[995610]=new thumbnail(995610,"68289","Ashness Bridge 002","P5193414raw_thumb.jpg",130,173,18);thumbnails[995622]=new thumbnail(995622,"68289","Ashness Bridge 004","P5193402_thumb.jpg",130,173,18);thumbnails[1518459]=new thumbnail(1518459,"68289","Friars Crag & Derwent Water","PA2424792_thumb.jpg",130,98,18);thumbnails[1518487]=new thumbnail(1518487,"68289","Derwent Mist","PA2423651_thumb.jpg",130,97,18);thumbnails[1518537]=new thumbnail(1518537,"68289","Derwent Water Island","PA2424341_thumb.jpg",130,98,18);thumbnails[1518547]=new thumbnail(1518547,"68289","Castlerigg Stone Circle","PA2022351_thumb.jpg",130,98,18);thumbnails[3615090]=new thumbnail(3615090,"68289","Castlerigg In Sunlight","PA202278_thumb.jpg",130,98,18);thumbnails[3615151]=new thumbnail(3615151,"68289","Catbells Dawn","PA2424152_thumb.jpg",130,98,18);thumbnails[3615154]=new thumbnail(3615154,"68289","Early morning mist on Derwent Water","PA242397_thumb.jpg",130,98,18);thumbnails[899911]=new thumbnail(899911,"68291","Buttermere Church","buttermerechurch2_thumb.jpg",130,100,18);thumbnails[900658]=new thumbnail(900658,"68291","Buttermere Wood","P2036700_thumb.jpg",130,98,18);thumbnails[900667]=new thumbnail(900667,"68291","Robinson summit","P2036615r_thumb.jpg",130,98,18);thumbnails[902983]=new thumbnail(902983,"68291","Crummock Reflections","P4021126_thumb.jpg",130,98,18);thumbnails[902986]=new thumbnail(902986,"68291","Crummock Reflections 02","P4021133_thumb.jpg",130,173,18);thumbnails[960815]=new thumbnail(960815,"68291","Rannerdale Bluebells 001","P5013070_thumb.jpg",130,173,18);thumbnails[971176]=new thumbnail(971176,"68291","Rannerdale Bluebells 002","P5013081_thumb.jpg",130,173,18);thumbnails[971197]=new thumbnail(971197,"68291","Rannerdale Bluebells 003","P5013088_thumb.jpg",130,98,18);thumbnails[971198]=new thumbnail(971198,"68291","Rannerdale Bluebells 004","P5013055_thumb.jpg",130,173,18);thumbnails[971199]=new thumbnail(971199,"68291","Rannerdale Bluebells 005","P5013042_thumb.jpg",130,98,18);thumbnails[995795]=new thumbnail(995795,"68291","Rannerdale stream","P5013061_thumb.jpg",130,173,18);thumbnails[1203014]=new thumbnail(1203014,"68291","Buttermere Pines","P7241128_thumb.jpg",130,98,18);thumbnails[1518554]=new thumbnail(1518554,"68291","Melbreak & Crummock Water","PA2323481_thumb.jpg",130,98,18);thumbnails[1518559]=new thumbnail(1518559,"68291","Melbreak & Crummock Water 02","PA2323341_thumb.jpg",130,173,18);var galleries=new Object();galleries[68656]=new gallery(68656,"895130","Ambleside/Grassmere","gallery",[895130]);galleries[77094]=new gallery(77094,"1521578,1521456,1230790,1230752,1230749,1230747,1032954,1032953,1032947","Cairngorms","gallery",[1032947,1032953,1032954,1230747,1230749,1230752,1230790,1521456,1521578]);galleries[68996]=new gallery(68996,"907397","Caldbeck","gallery",[907397]);galleries[68962]=new gallery(68962,"903379,900644","Coastal","gallery",[900644,900645,903379]);galleries[68374]=new gallery(68374,"891581","Ingleton Falls","gallery",[891581,903374]);galleries[219036]=new gallery(219036,"3583613,3583607","Isle of Skye","gallery",[3583607,3583613]);galleries[220049]=new gallery(220049,"3599461","North East Lake District","gallery",[3599461]);galleries[68760]=new gallery(68760,"1008261,972409,903377,903376","Ullswater","gallery",[899894,903376,903377,972409,1008261]);galleries[68997]=new gallery(68997,"1348113,1348096,1348080,1348051,1314146,1314134,1314128,1295882,1294159,1294151,1294148,1294146,1294142,938430,902981","Wastwater And Ennerdale","gallery",[902981,938430,1294140,1294142,1294146,1294148,1294151,1294159,1295882,1314128,1314134,1314146,1348051,1348080,1348096,1348113,3615097]);galleries[91829]=new gallery(91829,"1295887,1295885","Windermere","gallery",[1295885,1295887]);galleries[68285]=new gallery(68285,"3599461,1518559,1518554,1518547,1518537,1518487,1518459,1348113,1348096,1348080,1348051,1314146,1314134,1314128,1295887,1295885,1295882,1294159,1294151,1294148,1294146,1294142,1203014,1008261,995622,995610,995607,972409,971199,971198,971197,971176,960815,938430,907399,907397,903379,903377,903376,903375,902986,902983,902981,902979,900679,900667,900658,900644,899911,895130","lake district","gallery",[]);galleries[77093]=new gallery(77093,"1521578,1521456,1230790,1230752,1230749,1230747,1032954,1032953,1032947","Scotland","gallery",[]);galleries[78770]=new gallery(78770,"1492843,900822","Climbing","gallery",[900822,1492843]);galleries[73413]=new gallery(73413,"3047596,1295891,1090797,976874,902985","wildlife","gallery",[902985,976874,1090797,1295891,3047596]);galleries[68373]=new gallery(68373,"891581","Yorkshire","gallery",[]);galleries[104439]=new gallery(104439,"3615093,3583646,3583600,1521715,1521713,1521710,1521685","Monochrome","gallery",[1521685,1521710,1521712,1521713,1521715,3583600,3583646,3615093,3615161]);galleries[68289]=new gallery(68289,"1518547,1518537,1518487,1518459,995622,995610,995607,907399,903375,902979,900679","Borrowdale","gallery",[900679,902979,903375,907399,995607,995610,995622,1518459,1518487,1518537,1518547,3615090,3615151,3615154]);galleries[68291]=new gallery(68291,"1518559,1518554,1203014,971199,971198,971197,971176,960815,902986,902983,900667,900658,899911","Crummock/Buttermere","gallery",[899911,900658,900667,902983,902986,960815,971176,971197,971198,971199,995795,1203014,1518554,1518559]);var imageSets=new Object();imageSets[1]="3615151,3615090,3599461,1518547,1314128,1295887,1295885,1295882,1294151,1294146,1230752,1230749,1230747,1203014,1032954,1008261,995622,995610,995607,972409,971199,960815,938430,907399,903377,903376,903375,902986,902983,902979,900822,900679,900644,899894,895130,891581";imageSets[2]="3615093,3599461,3583646,3583600,3047596,1521715,1521713,1521710,1521685,1521578,1521456,1518559,1518554,1518547,1518537,1518487,1518459,1492843,1348113,1348096,1348080,1348051,1314146,1314134,1314128,1295891,1295887,1295885,1295882,1294159,1294151,1294148,1294146,1294142,1230790,1230752,1230749,1230747,1203014,1090797,1032954,1032953,1032947,1008261,995622,995610,995607,976874,972409,971199,971198,971197,971176,960815,938430,907399,907397,903379,903377,903376,903375,902986,902985,902983,902981,902979,900822,900679,900667,900658,900644,899911,895130,891581";imageSets[3]="3615161,3615154,3615151,3615097,3615093,3615090,3599461,3583646,3583613,3583607,3583600,3047596,1521715,1521713,1521712,1521710,1521685,1521578,1521456,1518559,1518554,1518547,1518537,1518487,1518459,1492843,1348113,1348096,1348080,1348051,1314146,1314134,1314128,1295891,1295887,1295885,1295882,1294159,1294151,1294148,1294146,1294142,1294140,1230790,1230752,1230749,1230747,1203014,1090797,1032954";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/Richard1/images";break}switch(a){case 1:b="http://www1.clikpic.com/Richard1/images";break}switch(a){case 2:b="http://admin.clikpic.com/Richard1/images";break}switch(a){case 4:b="http://www.clikchurch.com/Richard1/images";break}switch(a){case 5:b="http://www2.clikpic.com/Richard1/images";break}switch(a){case 15:b="http://www3.clikpic.com/Richard1/images";break}switch(a){case 21:b="http://www6.clikpic.com/Richard1/images";break}switch(a){case 18:b="http://www4.clikpic.com/Richard1/images";break}switch(a){case 19:b="http://www5.clikpic.com/Richard1/images";break}switch(a){case 22:b="http://tpc5/clikpic/Richard1/images";break}switch(a){case 23:b="http://tpc10/clikpic/Richard1/images";break}switch(a){case 24:b="http://tpc15/clikpic/Richard1/images";break}switch(a){case 25:b="http://tpc16/clikpic/Richard1/images";break}switch(a){case 31:b="http://www7.clikpic.com/Richard1/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Richard1/images";break}switch(a){case 33:b="http://www8.clikpic.com/Richard1/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="Travel Adventure Photography: "+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+'")'})}}};