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[4808372]=new thumbnail(4808372,"274956","DX2 2814a","DX2_2814a_thumb.jpg",130,86,1);thumbnails[4808420]=new thumbnail(4808420,"274956","DX2 2854","DX2_2854_thumb.jpg",130,86,1);thumbnails[4808436]=new thumbnail(4808436,"274956","DX2 2842","DX2_2842_thumb.jpg",130,196,1);thumbnails[4808448]=new thumbnail(4808448,"274956","DX2 2820a","DX2_2820a_thumb.jpg",130,86,1);thumbnails[4808373]=new thumbnail(4808373,"274956","Living roomkitchen","Living_roomkitchen_thumb.jpg",130,86,1);thumbnails[4808421]=new thumbnail(4808421,"274956","DX2 2855","DX2_2855_thumb.jpg",130,86,1);thumbnails[4808437]=new thumbnail(4808437,"274956","DX2 2846a","DX2_2846a_thumb.jpg",130,170,1);thumbnails[4808449]=new thumbnail(4808449,"274956","DX2 2822a","DX2_2822a_thumb.jpg",130,86,1);thumbnails[4808422]=new thumbnail(4808422,"274956","IMG 3162a","IMG_3162a_thumb.jpg",130,98,1);thumbnails[4808438]=new thumbnail(4808438,"274956","DX2 2850a","DX2_2850a_thumb.jpg",130,86,1);thumbnails[4808450]=new thumbnail(4808450,"274956","DX2 2829a","DX2_2829a_thumb.jpg",130,86,1);thumbnails[4808423]=new thumbnail(4808423,"274956","IMG 3164","IMG_3164_thumb.jpg",130,98,1);thumbnails[4808439]=new thumbnail(4808439,"274956","DX2 2850a1","DX2_2850a1_thumb.jpg",130,86,1);thumbnails[4808451]=new thumbnail(4808451,"274956","DX2 2835a","DX2_2835a_thumb.jpg",130,196,1);thumbnails[4808440]=new thumbnail(4808440,"274956","DX2 2852a","DX2_2852a_thumb.jpg",130,84,1);thumbnails[4808452]=new thumbnail(4808452,"274956","DX2 2839","DX2_2839_thumb.jpg",130,86,1);thumbnails[1684278]=new thumbnail(1684278,"107059","The site in May 2006 from Garage end on Ritchie Street ","EmptySite03fromHowardS_thumb.jpg",130,195,1);thumbnails[1684279]=new thumbnail(1684279,"107059","The brambles at the Ritchie St end  May 2006","EmptySite04RitchieStree_thumb.jpg",130,87,1);thumbnails[1684276]=new thumbnail(1684276,"107059","The Empty site at existing gable  May 2006","EmptySite01fromHowardS_thumb.jpg",130,87,1);thumbnails[1684274]=new thumbnail(1684274,"107059","Veiw of what is now the car park and stair to Bute Terrace","Carparkasbought02from_thumb.jpg",130,195,1);thumbnails[1684277]=new thumbnail(1684277,"107059","Another view of the site in May 2006 looking toward Ritchie Street.","EmptySite02fromHowardS_thumb.jpg",130,195,1);thumbnails[1684275]=new thumbnail(1684275,"107059","Car parking space opposite","CarparkasboughtfromHow_thumb.jpg",130,87,1);thumbnails[3490214]=new thumbnail(3490214,"107060","The car park nearing completion","Car-park-garden-before-plan_thumb.jpg",130,98,1);thumbnails[3490396]=new thumbnail(3490396,"107060","The car park nearing completion.","Car-park-garden-before-plan1_thumb.jpg",130,98,1);thumbnails[3490400]=new thumbnail(3490400,"107060","The car park monoblocked.","The-car-park-monoblocked_thumb.jpg",130,98,1);thumbnails[3490453]=new thumbnail(3490453,"107060","Newly planted garden above the car park.","Carpark-&-garden_thumb.jpg",130,98,1);thumbnails[1684406]=new thumbnail(1684406,"113449","Foundations showing holes which later become sealed access hatches which are primarily for construction use but also provide future maintainance access. The door openings for the cycle stores can also be seen in the back wall.","Foundationshatches_thumb.jpg",130,98,1);thumbnails[1684424]=new thumbnail(1684424,"113449","A view of Stairwell No 2 nearest the garage. The floor slabs will later lay on the inner blockwork while the outer skin goes all the way to the underside of the roof. This then forms a complete fire break between the flats and the stairwell.","Foundationsstairwell02_thumb.jpg",130,98,1);thumbnails[1684427]=new thumbnail(1684427,"113449","Stairwell two filled with Type 1.<br>\r\nType 1 is a type of clean new infill.<br>\r\nSee next pic ! ","Foundationsstairwell02type11_thumb.jpg",130,98,1);thumbnails[1684442]=new thumbnail(1684442,"113449","The Ground under the foundations is finished with a layer of heavy waterproof sheet and topped off with concrete. The excess blue sheet is later trimmed back to just above the concrete level. It will never be seen again !","Stairwell01solum_thumb.jpg",130,98,1);thumbnails[1684429]=new thumbnail(1684429,"113449","This is a shot of the existing building gable. The blockwork seen against the existing stone is built up as two skins of 100mm block with a 50mm cavity. These skins are tied together with stainless steel ties but the new wall is independent of the old building.","Partywallstart_thumb.jpg",130,98,1);thumbnails[1684439]=new thumbnail(1684439,"113449","The top of the heavy retaining wall built to support the road and pavement of Howard Street.<br>\r\nYou can see the reinforcement in place and two service ducts in the foreground.It is now ready for its final pour of concrete.","reinforcementatpavement_thumb.jpg",130,173,1);thumbnails[1684405]=new thumbnail(1684405,"113449","A super view of the back courtyard on a very tidy day!<br>\r\nThe spaces for the doors the cycle storage areas can been easily seen.","Foundationsbacktidy_thumb.jpg",130,98,1);thumbnails[1684443]=new thumbnail(1684443,"113449","100mm drains will collect roof rainwater and lead to a 150 main running under the centre of the building.","Startofdrains_thumb.jpg",130,98,1);thumbnails[1684447]=new thumbnail(1684447,"113449","The two main drains.<br>\r\n","Drains_thumb.jpg",130,98,1);thumbnails[1684448]=new thumbnail(1684448,"113449","The two main drains in the centre of the buiding, one for rainwater and the other for waste water and sewage.These are later lagged in fibreglass ","Drainsbuiltin_thumb.jpg",130,98,1);thumbnails[1684440]=new thumbnail(1684440,"113449","In the event of a serious blockage there is access available at start of the pipes. These are called rodding eyes and allow a plumber to rod the main pipes all the way to the manhole under the bin store !<br>\r\nThe supporting blocks are temporary and are replaced with built piers when the red collars are built in.<br>\r\n","Roddingend_thumb.jpg",130,98,1);thumbnails[1684450]=new thumbnail(1684450,"113449","On the top of the block foundation , heavy treated timbers called wall plates are bedded on a layer of damp proof and fixed to the blockwork. <br>\r\nThese wall plates then support the ground floor joists.  ","Wallplates_thumb.jpg",130,98,1);thumbnails[1684428]=new thumbnail(1684428,"113449","The wall at the right hand side is the building gable end. The big hole to the left is the start of the foundations to the car park area and bin store.","Foundationswallbinsroreramp_thumb.jpg",130,98,1);thumbnails[1684504]=new thumbnail(1684504,"113449","Oops, The day the hydraulic hose failed on the digger. Now all cleaned up ! ","Thedaythehosefailed1_thumb.jpg",130,98,1);thumbnails[1692258]=new thumbnail(1692258,"113930","Early ferry","Earlyferry_thumb.jpg",130,98,1);thumbnails[1692260]=new thumbnail(1692260,"113930","Early ferry04","Earlyferry04_thumb.jpg",130,98,1);thumbnails[1692256]=new thumbnail(1692256,"113930","Early ferry02","Earlyferry02_thumb.jpg",130,98,1);thumbnails[1692259]=new thumbnail(1692259,"113930","Early ferry03","Earlyferry03_thumb.jpg",130,98,1);thumbnails[1692269]=new thumbnail(1692269,"113930","Lorry arrives","Lorryarrives_thumb.jpg",130,98,1);thumbnails[1692253]=new thumbnail(1692253,"113930","Daybreak02","Daybreak02_thumb.jpg",130,98,1);thumbnails[1692252]=new thumbnail(1692252,"113930","Daybreak","Daybreak_thumb.jpg",130,98,1);thumbnails[1692254]=new thumbnail(1692254,"113930","Daybreak03","Daybreak03_thumb.jpg",130,98,1);thumbnails[1692255]=new thumbnail(1692255,"113930","Daybreak04","Daybreak04_thumb.jpg",130,98,1);thumbnails[1692268]=new thumbnail(1692268,"113930","From the top 031","Fromthetop031_thumb.jpg",130,98,1);thumbnails[1692273]=new thumbnail(1692273,"113930","Timber on site 03","Timberonsite03_thumb.jpg",130,98,1);thumbnails[1692274]=new thumbnail(1692274,"113930","Timber on site","Timberonsite_thumb.jpg",130,98,1);thumbnails[1692264]=new thumbnail(1692264,"113930","First joists","Firstjoists_thumb.jpg",130,98,1);thumbnails[1692262]=new thumbnail(1692262,"113930","First joists03","Firstjoists03_thumb.jpg",130,98,1);thumbnails[1692267]=new thumbnail(1692267,"113930","From the top 03","Fromthetop03_thumb.jpg",130,98,1);thumbnails[1692272]=new thumbnail(1692272,"113930","Timber on site 02","Timberonsite02_thumb.jpg",130,98,1);thumbnails[1692271]=new thumbnail(1692271,"113930","Telehandler","Telehandler_thumb.jpg",130,98,1);thumbnails[1692265]=new thumbnail(1692265,"113930","First joists04","Firstjoists04_thumb.jpg",130,98,1);thumbnails[1692261]=new thumbnail(1692261,"113930","First joists 02","Firstjoists02_thumb.jpg",130,98,1);thumbnails[1692266]=new thumbnail(1692266,"113930","From the top 02","Fromthetop02_thumb.jpg",130,98,1);thumbnails[1692270]=new thumbnail(1692270,"113930","Rear Scaffold","RearScaffold_thumb.jpg",130,98,1);thumbnails[3490476]=new thumbnail(3490476,"213440","The living area taking shape.","Timber-frame-2_thumb.jpg",130,173,1);thumbnails[3490469]=new thumbnail(3490469,"213440","The timber frame takes shape.","Framed-Curve_thumb.jpg",130,173,1);thumbnails[3490484]=new thumbnail(3490484,"213440","The interior progresses.","Interior-in-progress_thumb.jpg",130,98,1);thumbnails[3490489]=new thumbnail(3490489,"213440","Lots of electric cables and plaster.","cables-&-plaster_thumb.jpg",130,98,1);thumbnails[3490506]=new thumbnail(3490506,"213440","Early morning start.","Early-start_thumb.jpg",130,98,1);thumbnails[3490621]=new thumbnail(3490621,"213440","The Scaffolding goes up gradually.","Scaffolding-taking-shape_thumb.jpg",130,98,1);thumbnails[3490511]=new thumbnail(3490511,"213440","The gable view.","Gable-view_thumb.jpg",130,77,1);thumbnails[3490514]=new thumbnail(3490514,"213440","The roof ready for tiling.","Roof_thumb.jpg",130,98,1);thumbnails[3490614]=new thumbnail(3490614,"213440","The tiles progressing.","Roof2_thumb.jpg",130,98,1);thumbnails[3490628]=new thumbnail(3490628,"213440","The windows arrive - made in Scotland!","Window-van_thumb.jpg",130,98,1);thumbnails[3490631]=new thumbnail(3490631,"213440","The scaffolding coming down.","Scaffold-away_thumb.jpg",130,173,1);thumbnails[3490633]=new thumbnail(3490633,"213440","The scaffolding being loaded.","Scaffold-away2_thumb.jpg",130,98,1);thumbnails[3490635]=new thumbnail(3490635,"213440","The scaffolding going back to the mainland.","Scaffold-away-3_thumb.jpg",130,98,1);thumbnails[3490668]=new thumbnail(3490668,"213440","The date on the gable.","Date-on-gable_thumb.jpg",130,98,1);thumbnails[1565145]=new thumbnail(1565145,"211441","Finished from HowardSt","Pictures-new-camera-27_thumb.11.jpg",130,98,1);thumbnails[3458663]=new thumbnail(3458663,"211441","","Pictures-new-camera-27_thumb.11-1.jpg",130,98,1);thumbnails[3490671]=new thumbnail(3490671,"211441","The car park and landscaping.","Carpark-&-garden1_thumb.jpg",130,98,1);thumbnails[3458656]=new thumbnail(3458656,"211458","","222_thumb.jpg",130,98,1);thumbnails[3458658]=new thumbnail(3458658,"211458","","231_thumb.jpg",130,98,1);thumbnails[3490676]=new thumbnail(3490676,"211458","Ground floor kitchen - without the breakfast bar.","Ground-floor-kitchen-2_thumb.jpg",130,98,1);thumbnails[3490680]=new thumbnail(3490680,"211458","The kitchen in 8M.","Kitchen-9_thumb.jpg",130,98,1);thumbnails[3490682]=new thumbnail(3490682,"211458","The entrance hall interior.","Entrance-hall_thumb.jpg",130,98,1);thumbnails[3490684]=new thumbnail(3490684,"211458","A white kitchen.","White-kitchen_thumb.jpg",130,98,1);thumbnails[3490692]=new thumbnail(3490692,"211458","A warm colour combination of kitchen units & worktop.","1or-2-kitchen_thumb.jpg",130,98,1);thumbnails[4460158]=new thumbnail(4460158,"211458","Furnished Living Room","Living-Room-web1_thumb.jpg",130,98,1);thumbnails[3458627]=new thumbnail(3458627,"211457","","175_thumb.jpg",130,98,1);thumbnails[3458624]=new thumbnail(3458624,"211457","Aerial","Aerial-010_thumb.jpg",130,97,1);thumbnails[3458629]=new thumbnail(3458629,"211457","","176_thumb.jpg",130,98,1);thumbnails[3458632]=new thumbnail(3458632,"211457","","201_thumb.jpg",130,98,1);thumbnails[3458655]=new thumbnail(3458655,"211457","","204_thumb.jpg",130,98,1);thumbnails[4460139]=new thumbnail(4460139,"211457","Furnished Living Room","Living-Room-web_thumb.jpg",130,98,1);thumbnails[4460250]=new thumbnail(4460250,"211457","","100-web_thumb.jpg",130,130,1);thumbnails[4460257]=new thumbnail(4460257,"211457","","First-Time-buyers_thumb.jpg",130,130,1);thumbnails[3490695]=new thumbnail(3490695,"211457","Flowers and palmtrees on the Millport promenade.","Flowers-&-palm-trees_thumb.jpg",130,98,1);thumbnails[3490699]=new thumbnail(3490699,"211457","One of the stunning views from the top of the Island.","View-from-top-of-hill_thumb.jpg",130,98,1);var galleries=new Object();galleries[274956]=new gallery(274956,"4808452,4808451,4808450,4808449,4808448,4808440,4808439,4808438,4808437,4808436","Furnished Show Flat","gallery",[4808372,4808420,4808436,4808448,4808373,4808421,4808437,4808449,4808422,4808438,4808450,4808423,4808439,4808451,4808440,4808452]);galleries[107059]=new gallery(107059,"1684278,1684276,1684275","Original Site","gallery",[1684278,1684279,1684276,1684274,1684277,1684275]);galleries[107060]=new gallery(107060,"3490214","The car park","gallery",[3490214,3490396,3490400,3490453]);galleries[113449]=new gallery(113449,"1684405","Foundations","gallery",[1684406,1684424,1684427,1684442,1684429,1684439,1684405,1684443,1684447,1684448,1684440,1684450,1684428,1684504]);galleries[113930]=new gallery(113930,"1692258","The Timber Frame arrives","gallery",[1692258,1692260,1692256,1692259,1692269,1692253,1692252,1692254,1692255,1692268,1692273,1692274,1692264,1692262,1692267,1692272,1692271,1692265,1692261,1692266,1692270]);galleries[213440]=new gallery(213440,"3490476","Under Construction","gallery",[3490476,3490469,3490484,3490489,3490506,3490621,3490511,3490514,3490614,3490628,3490631,3490633,3490635,3490668]);galleries[211441]=new gallery(211441,"3458663","Finished External","gallery",[1565145,3458663,3490671]);galleries[211458]=new gallery(211458,"4460158,3490692,3490684,3490682,3490680,3490676,3458658,3458656","Finished Internal","gallery",[3458656,3458658,3490676,3490680,3490682,3490684,3490692,4460158]);galleries[211457]=new gallery(211457,"3458632","Home page general","gallery",[3458627,3458624,3458629,3458632,3458655,4460139,4460250,4460257,3490695,3490699]);var imageSets=new Object();imageSets[1]="4808420,4460257,4460250,3458663,3458658,3458655,3458632,3458629,3458627,3458624,1565145";imageSets[2]="3490476,3490214,3458663,3458632,1692258,1684405,1684278,1684276,1684275";imageSets[3]="4808420,4460257";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/Cumbraeclubcourt/images";break}switch(a){case 1:b="http://www1.clikpic.com/Cumbraeclubcourt/images";break}switch(a){case 2:b="http://admin.clikpic.com/Cumbraeclubcourt/images";break}switch(a){case 24:b="http://tpc15/clikpic/Cumbraeclubcourt/images";break}switch(a){case 4:b="http://www.clikchurch.com/Cumbraeclubcourt/images";break}switch(a){case 5:b="http://www2.clikpic.com/Cumbraeclubcourt/images";break}switch(a){case 22:b="http://tpc5/clikpic/Cumbraeclubcourt/images";break}switch(a){case 23:b="http://tpc10/clikpic/Cumbraeclubcourt/images";break}switch(a){case 25:b="http://tpc16/clikpic/Cumbraeclubcourt/images";break}switch(a){case 15:b="http://www3.clikpic.com/Cumbraeclubcourt/images";break}switch(a){case 18:b="http://www4.clikpic.com/Cumbraeclubcourt/images";break}switch(a){case 19:b="http://www5.clikpic.com/Cumbraeclubcourt/images";break}switch(a){case 31:b="http://www7.clikpic.com/Cumbraeclubcourt/images";break}switch(a){case 32:b="http://admin2.clikpic.com/Cumbraeclubcourt/images";break}switch(a){case 33:b="http://www8.clikpic.com/Cumbraeclubcourt/images";break}switch(a){case 34:b="http://www9.clikpic.com/Cumbraeclubcourt/images";break}switch(a){case 35:b="http://admin3.clikpic.com/Cumbraeclubcourt/images";break}switch(a){case 37:b="http://admin4.clikpic.com/Cumbraeclubcourt/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="Cumbrae Club Court - Millport, Isle of Cumbrae: "+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+'")'})}}};