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[3199492]=new thumbnail(3199492,"225169","Fowlsheugh Waterfall","_MG_0870_1_2smallbw_thumb.jpg",130,195,32);thumbnails[3199531]=new thumbnail(3199531,"225169","Dunottar Panorama","castlepanosmall_thumb.jpg",130,52,32);thumbnails[3199634]=new thumbnail(3199634,"225169","Stonehaven Harbour","panoharboursmall_thumb.jpg",130,36,32);thumbnails[3201751]=new thumbnail(3201751,"225169","Stonehaven Bay","3044914285_71bd7fc214[1]_thumb.jpg",130,87,32);thumbnails[3202760]=new thumbnail(3202760,"225169","Boat at Stonehaven Harbour","2041013481_13dec6d346[1]_thumb.jpg",130,87,32);thumbnails[3202907]=new thumbnail(3202907,"225169","Catterline","2917655805_2be9e68c6a[1]_thumb.jpg",130,195,32);thumbnails[3209266]=new thumbnail(3209266,"225169","Field","2547964602_3899f052bd[1]_thumb.jpg",130,195,32);thumbnails[3655342]=new thumbnail(3655342,"225169","St Cyrus","3323576856_794b7c1b0d_b1_thumb.jpg",130,87,32);thumbnails[3685665]=new thumbnail(3685665,"225169","Stonehaven harbour","3294365529_4f4096e83e_b1_thumb.jpg",130,87,32);thumbnails[3685670]=new thumbnail(3685670,"225169","St Cyrus","3322748809_4c969a75e9_b1_thumb.jpg",130,195,32);thumbnails[3685688]=new thumbnail(3685688,"225169","Balmedie","3395767585_361924d265_b1_thumb.jpg",130,63,32);thumbnails[4130966]=new thumbnail(4130966,"225169","Sailing Boat","DSC_1205web_thumb.jpg",130,86,32);thumbnails[4130967]=new thumbnail(4130967,"225169","Stonehaven Harbour","DSC_1185web_thumb.jpg",130,86,32);thumbnails[4130971]=new thumbnail(4130971,"225169","St James' Church","DSC_1173_5web_thumb.jpg",130,195,32);thumbnails[4735530]=new thumbnail(4735530,"225169","Aberdeen Harbour","DSC_33771_thumb.jpg",130,53,32);thumbnails[4750557]=new thumbnail(4750557,"225169","Sun over feild","3821732396_ac94f2fed21_thumb.jpg",130,87,32);thumbnails[4750562]=new thumbnail(4750562,"225169","Sunset at horizon","3821740914_5520861bc7_b1_thumb.jpg",130,196,32);thumbnails[4770734]=new thumbnail(4770734,"225169","Stormy Sea","3937919118_000031d3b81_thumb.jpg",130,138,32);thumbnails[4820520]=new thumbnail(4820520,"225169","River","DSC_362011_thumb.jpg",130,87,32);thumbnails[4820527]=new thumbnail(4820527,"225169","River","DSC_3625_thumb.jpg",130,87,32);thumbnails[5181533]=new thumbnail(5181533,"225169","Balmedie","DSC_5176web_thumb.jpg",130,87,32);thumbnails[5181538]=new thumbnail(5181538,"225169","Balmedie","DSC_5175web_thumb.jpg",130,86,32);thumbnails[5840701]=new thumbnail(5840701,"225169","View from Empire State Building","_DSC7451_1_thumb.JPG",130,87,32);thumbnails[6276958]=new thumbnail(6276958,"225169","St Cyrus Beach","_DSC15161_thumb.jpg",130,87,32);thumbnails[6336130]=new thumbnail(6336130,"225169","Wellington Road Loch","IMG_2110_thumb.jpg",130,87,32);thumbnails[6336137]=new thumbnail(6336137,"225169","Wellington Road Loch","IMG_2117_thumb.jpg",130,87,32);thumbnails[6336140]=new thumbnail(6336140,"225169","Wellington Road Loch","IMG_2123_thumb.jpg",130,195,32);thumbnails[6574546]=new thumbnail(6574546,"289221","Scottish Bioenergy","DSC_4441_1_thumb.JPG",130,87,32);thumbnails[6574548]=new thumbnail(6574548,"289221","Scottish Bioenergy","DSC_4449_1_thumb.JPG",130,87,32);thumbnails[6574552]=new thumbnail(6574552,"289221","Scottish Bioenergy","DSC_4451_1_thumb.JPG",130,87,32);thumbnails[6574555]=new thumbnail(6574555,"289221","Scottish Bioenergy","DSC_4457_1_thumb.JPG",130,87,32);thumbnails[6574578]=new thumbnail(6574578,"289221","Scottish Bioenergy","DSC_4683_1_thumb.JPG",130,87,32);thumbnails[6574593]=new thumbnail(6574593,"289221","Scottish Bioenergy","DSC_4696_1_thumb.JPG",130,195,32);thumbnails[6574596]=new thumbnail(6574596,"289221","Scottish Bioenergy","DSC_4700_1_thumb.JPG",130,195,32);thumbnails[6574757]=new thumbnail(6574757,"289221","Queens Pub","IMG_2047_1_thumb.JPG",130,195,32);thumbnails[6574760]=new thumbnail(6574760,"289221","Queens Pub","IMG_2056-1_1_1_thumb.JPG",130,87,32);thumbnails[6574766]=new thumbnail(6574766,"289221","Queens Pub","IMG_2060-1_1_1_thumb.JPG",130,87,32);thumbnails[6305386]=new thumbnail(6305386,"287183","Guests at Wedding Anniversary","guestpatalan_thumb.jpg",130,65,32);thumbnails[6305387]=new thumbnail(6305387,"287183","Guests at Wedding Anniversary","everyonepatalan_thumb.jpg",130,87,32);thumbnails[6305535]=new thumbnail(6305535,"287183","Casual shots of guests","casualguest_thumb.jpg",130,217,32);thumbnails[6340512]=new thumbnail(6340512,"287183","Bouquet from a wedding.","bouquet1_thumb.jpg",130,195,32);thumbnails[6408984]=new thumbnail(6408984,"287183","Marisha and Andy","_DSC2379_thumb.jpg",130,195,32);thumbnails[6409003]=new thumbnail(6409003,"287183","Marisha and Andy","_DSC2398_thumb.jpg",130,87,32);thumbnails[6574288]=new thumbnail(6574288,"287183","Craig and Laura's Wedding","_DSC4695_1_thumb.JPG",130,195,32);thumbnails[6574322]=new thumbnail(6574322,"287183","Craig and Laura's Wedding","_DSC4699_1_thumb.JPG",130,195,32);thumbnails[6574326]=new thumbnail(6574326,"287183","Craig and Laura's Wedding","_DSC4728_1_thumb.JPG",130,195,32);thumbnails[6574459]=new thumbnail(6574459,"287183","Craig and Laura's Wedding","_DSC8549_1_thumb.JPG",130,87,32);thumbnails[6574489]=new thumbnail(6574489,"287183","Craig and Laura's Wedding","_DSC8559_1_thumb.JPG",130,195,32);thumbnails[6574493]=new thumbnail(6574493,"287183","Craig and Laura's Wedding","_DSC8607_1_thumb.JPG",130,87,32);thumbnails[6574496]=new thumbnail(6574496,"287183","Craig and Laura's Wedding","_DSC8614_1_thumb.JPG",130,195,32);thumbnails[6574498]=new thumbnail(6574498,"287183","Craig and Laura's Wedding","_DSC8654_1_thumb.JPG",130,195,32);thumbnails[6574503]=new thumbnail(6574503,"287183","Craig and Laura's Wedding","_DSC8679_1_thumb.JPG",130,195,32);thumbnails[6574507]=new thumbnail(6574507,"287183","Craig and Laura's Wedding","_DSC8908_1_thumb.JPG",130,87,32);thumbnails[6574559]=new thumbnail(6574559,"287183","Jillian and Keith's Wedding","DSC_4537_1_thumb.JPG",130,195,32);thumbnails[6574563]=new thumbnail(6574563,"287183","Jillian and Keith's Wedding","DSC_4597_1_thumb.JPG",130,195,32);thumbnails[6574574]=new thumbnail(6574574,"287183","Jillian and Keith's Wedding","DSC_4599_1_thumb.JPG",130,60,32);thumbnails[6574685]=new thumbnail(6574685,"287183","Chris and Anna's Wedding","DSC_5489_1_thumb.JPG",130,65,32);thumbnails[6574709]=new thumbnail(6574709,"287183","Chris and Anna's Wedding","DSC_5537_1_thumb.JPG",130,195,32);thumbnails[6574712]=new thumbnail(6574712,"287183","Chris and Anna's Wedding","DSC_5627_1_thumb.JPG",130,87,32);thumbnails[6574715]=new thumbnail(6574715,"287183","Chris and Anna's Wedding","DSC_5637_1_thumb.JPG",130,195,32);thumbnails[6574731]=new thumbnail(6574731,"287183","Chris and Anna's Wedding","DSC_5643_1_thumb.JPG",130,195,32);thumbnails[6574734]=new thumbnail(6574734,"287183","Chris and Anna's Wedding","DSC_5680_1_thumb.JPG",130,195,32);thumbnails[6574736]=new thumbnail(6574736,"287183","Chris and Anna's Wedding","DSC_5694_1_thumb.JPG",130,87,32);thumbnails[6574739]=new thumbnail(6574739,"287183","Chris and Anna's Wedding","DSC_5705_1_thumb.JPG",130,87,32);thumbnails[6574740]=new thumbnail(6574740,"287183","Kimberley and Arthur's Wedding","DSC_6628_1_thumb.JPG",130,87,32);thumbnails[6574742]=new thumbnail(6574742,"287183","Kimberley and Arthur's Wedding","DSC_6635_1_thumb.JPG",130,87,32);thumbnails[6574745]=new thumbnail(6574745,"287183","Kimberley and Arthur's Wedding","DSC_6640_1_thumb.JPG",130,195,32);thumbnails[6574755]=new thumbnail(6574755,"287183","Kimberley and Arthur's Wedding","DSC_6687_1_thumb.JPG",130,87,32);thumbnails[6574941]=new thumbnail(6574941,"287183","Jeni and George's Wedding","_DSC1884_1_thumb.JPG",130,87,32);thumbnails[6574944]=new thumbnail(6574944,"287183","Jeni and George's Wedding","_DSC1900_thumb.JPG",130,87,32);thumbnails[6574946]=new thumbnail(6574946,"287183","Jeni and George's Wedding","_DSC1943_thumb.JPG",130,195,32);thumbnails[6574948]=new thumbnail(6574948,"287183","Jeni and George's Wedding","_DSC2021_thumb.JPG",130,87,32);thumbnails[6574951]=new thumbnail(6574951,"287183","Marisha and Andy's Wedding","_DSC2277_thumb.JPG",130,87,32);thumbnails[6574954]=new thumbnail(6574954,"287183","Marisha and Andy's Wedding","_DSC2369_thumb.JPG",130,87,32);thumbnails[6574957]=new thumbnail(6574957,"287183","Marisha and Andy's Wedding","_DSC2409_thumb.JPG",130,195,32);thumbnails[6309271]=new thumbnail(6309271,"349898","Jennifer","_DSC1829_thumb.jpg",130,87,32);thumbnails[6574509]=new thumbnail(6574509,"349898","Morgan","20080609_3293_1_thumb.JPG",130,87,32);thumbnails[6574513]=new thumbnail(6574513,"349898","Alanah","DSC_2210_1_thumb.JPG",130,195,32);thumbnails[6574516]=new thumbnail(6574516,"349898","Alanah","DSC_2220_1_thumb.JPG",130,87,32);thumbnails[6574519]=new thumbnail(6574519,"349898","Alanah","DSC_2265_1_thumb.JPG",130,195,32);thumbnails[6574523]=new thumbnail(6574523,"349898","Lucy","DSC_2914_1_thumb.JPG",130,195,32);thumbnails[6574526]=new thumbnail(6574526,"349898","Lucy","DSC_2934_1_thumb.JPG",130,195,32);thumbnails[6574530]=new thumbnail(6574530,"349898","Lucy","DSC_2940_1_thumb.JPG",130,87,32);thumbnails[6574533]=new thumbnail(6574533,"349898","Lucy","DSC_2968_1_thumb.JPG",130,87,32);thumbnails[6574535]=new thumbnail(6574535,"349898","Lucy","DSC_2974_1_thumb.JPG",130,195,32);thumbnails[6574537]=new thumbnail(6574537,"349898","Holly","DSC_4227_1_thumb.JPG",130,87,32);thumbnails[6574539]=new thumbnail(6574539,"349898","Holly","DSC_4229_1_thumb.JPG",130,87,32);thumbnails[6574542]=new thumbnail(6574542,"349898","Holly","DSC_4231_1_thumb.JPG",130,195,32);thumbnails[5989069]=new thumbnail(5989069,"337392","A series of images for a final major project exhibition.","fridge_thumb.jpg",130,87,32);thumbnails[5989072]=new thumbnail(5989072,"337392","A series of images for a final major project exhibition.","fridge3_thumb.jpg",130,87,32);thumbnails[5989073]=new thumbnail(5989073,"337392","A series of images for a final major project exhibition.","incupboard_thumb.jpg",130,195,32);thumbnails[5989074]=new thumbnail(5989074,"337392","A series of images for a final major project exhibition.","outcupboard_thumb.jpg",130,195,32);var galleries=new Object();galleries[289221]=new gallery(289221,"6574766,6574760,6574757,6574596,6574593,6574578,6574555,6574552,6574548,6574546","Commercial","section275626",[6574546,6574548,6574552,6574555,6574578,6574593,6574596,6574757,6574760,6574766]);galleries[225169]=new gallery(225169,"4750557","Landscape","section275626",[3199492,3199531,3199634,3201751,3202760,3202907,3209266,3655342,3685665,3685670,3685688,4130966,4130967,4130971,4735530,4750557,4750562,4770734,4820520,4820527,5181533,5181538,5840701,6276958,6336130,6336137,6336140]);galleries[349897]=new gallery(349897,"6574957,6574954,6574951,6574948,6574946,6574944,6574941,6574755,6574745,6574742","Portraits","section275626",[]);galleries[287183]=new gallery(287183,"6574957,6574954,6574951,6574948,6574946,6574944,6574941,6574755,6574745,6574742","Weddings","section275626",[6305386,6305387,6305535,6340512,6408984,6409003,6574288,6574322,6574326,6574459,6574489,6574493,6574496,6574498,6574503,6574507,6574559,6574563,6574574,6574685,6574709,6574712,6574715,6574731,6574734,6574736,6574739,6574740,6574742,6574745,6574755,6574941,6574944,6574946,6574948,6574951,6574954,6574957]);galleries[349898]=new gallery(349898,"6574542,6574539,6574537,6574535,6574533,6574530,6574526,6574523,6574519,6574516","Portraits","section275626",[6309271,6574509,6574513,6574516,6574519,6574523,6574526,6574530,6574533,6574535,6574537,6574539,6574542]);galleries[337392]=new gallery(337392,"5989074,5989073,5989072,5989069","Contextual","section275626",[5989069,5989072,5989073,5989074]);var imageSets=new Object();imageSets[1]="6574954,6574951,6574685,6574516,6574513,6574509,6574507,6574503,6574498,6574496,6574493,6574489,6574459,6574326,6574322,6574288,6409003,6408984,6340512,6336140,6336137,6336130,6309271,6305535,6305387,6305386,6276958,5840701,5181538,5181533,4820527,4820520,4770734,4750562,4750557,4735530,4130971,4130967,4130966,3685688,3685670,3685665,3655342,3209266,3202907,3202760,3201751,3199634,3199531,3199492";imageSets[2]="4750557";imageSets[3]="6574957,6574954,6574951,6574948,6574946,6574944,6574941,6574766,6574760,6574757,6574755,6574745,6574742,6574740,6574739,6574736,6574734,6574731,6574715,6574712,6574709,6574685,6574596,6574593,6574578,6574574,6574563,6574559,6574555,6574552,6574548,6574546,6574542,6574539,6574537,6574535,6574533,6574530,6574526,6574523,6574519,6574516,6574513,6574509,6574507,6574503,6574498,6574496,6574493,6574489";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/calumriddell/images";break}switch(a){case 1:b="http://www1.clikpic.com/calumriddell/images";break}switch(a){case 2:b="http://admin.clikpic.com/calumriddell/images";break}switch(a){case 24:b="http://tpc15/clikpic/calumriddell/images";break}switch(a){case 4:b="http://www.clikchurch.com/calumriddell/images";break}switch(a){case 5:b="http://www2.clikpic.com/calumriddell/images";break}switch(a){case 22:b="http://tpc5/clikpic/calumriddell/images";break}switch(a){case 23:b="http://tpc10/clikpic/calumriddell/images";break}switch(a){case 25:b="http://tpc16/clikpic/calumriddell/images";break}switch(a){case 15:b="http://www3.clikpic.com/calumriddell/images";break}switch(a){case 18:b="http://www4.clikpic.com/calumriddell/images";break}switch(a){case 19:b="http://www5.clikpic.com/calumriddell/images";break}switch(a){case 31:b="http://www7.clikpic.com/calumriddell/images";break}switch(a){case 32:b="http://admin2.clikpic.com/calumriddell/images";break}switch(a){case 33:b="http://www8.clikpic.com/calumriddell/images";break}switch(a){case 34:b="http://www9.clikpic.com/calumriddell/images";break}switch(a){case 35:b="http://admin3.clikpic.com/calumriddell/images";break}switch(a){case 37:b="http://admin4.clikpic.com/calumriddell/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("section275626"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section275626.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("section275626"!=""){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="Calum Riddell 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> 				&pound;"+(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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="c-r-p@hotmail.co.uk">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="c-r-p@hotmail.co.uk">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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+'")'})}}};