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[820415]=new thumbnail(820415,"62577","Basin Sunset","Basin Sunset up1_thumb.jpg",130,94,18);thumbnails[841156]=new thumbnail(841156,"62577","Kirkie Steps","Kirkie Steps 500 wee_thumb.jpg",130,85,18);thumbnails[820439]=new thumbnail(820439,"62577","The Beach","The Beach up_thumb.jpg",130,81,18);thumbnails[820433]=new thumbnail(820433,"62577","Skyline","Skyline up_thumb.jpg",130,96,18);thumbnails[820434]=new thumbnail(820434,"62577","Sleepyhillock","Sleepyhillock up_thumb.jpg",130,79,18);thumbnails[847452]=new thumbnail(847452,"62577","Railway Bridge","Railway Bridge 500_thumb.jpg",130,87,18);thumbnails[841172]=new thumbnail(841172,"62577","New Bridge","GBridge  500 wee_thumb.jpg",130,86,18);thumbnails[820429]=new thumbnail(820429,"62577","Morning Rush Hour","Morning Rush Hour up_thumb.jpg",130,96,18);thumbnails[1843133]=new thumbnail(1843133,"62577","Brick Built Bridge","Brick Built Bridge upload_thumb.jpg",130,61,18);thumbnails[820462]=new thumbnail(820462,"62577","Under Observation","Seafront Sunrise up_thumb.jpg",130,84,18);thumbnails[820432]=new thumbnail(820432,"62577","Seafront","Seafront up_thumb.jpg",130,92,18);thumbnails[820437]=new thumbnail(820437,"62577","Spiral","Spiral up_thumb.jpg",130,90,18);thumbnails[820430]=new thumbnail(820430,"62577","'She takes the<br>\r\n early morning train.....'","Off to Work up_thumb.jpg",130,70,18);thumbnails[2487905]=new thumbnail(2487905,"62577","Links Park","Links park Lo res_thumb.jpg",130,88,18);thumbnails[820440]=new thumbnail(820440,"62577","Glaxo","The Glaxo up_thumb.jpg",130,81,18);thumbnails[2339249]=new thumbnail(2339249,"62577","The Island","Island Med_thumb.jpg",130,59,18);thumbnails[848691]=new thumbnail(848691,"62577","Harbour","The Docks 500_thumb.jpg",130,86,18);thumbnails[1177888]=new thumbnail(1177888,"62577","Auld Kirk","Auld Kirk 500_thumb.jpg",130,183,18);thumbnails[1177889]=new thumbnail(1177889,"62577","Beachfront","Beachfront 500_thumb.jpg",130,202,18);thumbnails[825537]=new thumbnail(825537,"62577","Dorward House","Dorward House wee_thumb.jpg",130,167,18);thumbnails[3102680]=new thumbnail(3102680,"62577","Abstract","Abstract Lo Res_thumb.jpg",130,82,18);thumbnails[3102708]=new thumbnail(3102708,"62577","Float","Float Lo-Res_thumb.jpg",130,71,18);thumbnails[3102758]=new thumbnail(3102758,"62577","Oil Supply","Harbour Lo Res_thumb.jpg",130,76,18);thumbnails[909459]=new thumbnail(909459,"62577","'Tide's Oot'","The Beach GE 500_thumb.jpg",130,76,18);thumbnails[3360698]=new thumbnail(3360698,"62577","Montrose Harbour","Montrose Harbour for GE web_thumb.jpg",130,76,18);thumbnails[1177890]=new thumbnail(1177890,"62577","Academy","Academy 500_thumb.jpg",130,64,18);thumbnails[3105593]=new thumbnail(3105593,"62577","Wild Geese","Wild Geese Lo Res_thumb.jpg",130,82,18);thumbnails[3105658]=new thumbnail(3105658,"62577","Cenotaph","Cenotaph Lo Res_thumb.jpg",130,80,18);thumbnails[3105663]=new thumbnail(3105663,"62577","New Wynd","New Wynd Lo 2 Res_thumb.jpg",130,72,18);thumbnails[3885803]=new thumbnail(3885803,"62577","First Tee","First_Tee_F_thumb.jpg",130,54,18);thumbnails[1843153]=new thumbnail(1843153,"62577","Hush","Hush upload_thumb.jpg",130,194,18);thumbnails[1283677]=new thumbnail(1283677,"63033","Reflected Light","Reflection_thumb.jpg",130,177,18);thumbnails[820486]=new thumbnail(820486,"63033","Ferryden","Don't let us be strangers up_thumb.jpg",130,66,18);thumbnails[820481]=new thumbnail(820481,"63033","The 'Lichthoose'","Scurdieness up_thumb.jpg",130,153,18);thumbnails[820479]=new thumbnail(820479,"63033","Daybreak","Scurdieness Sunrise up_thumb.jpg",130,79,18);thumbnails[820469]=new thumbnail(820469,"63033","Flight","Flight Original up_thumb.jpg",130,90,18);thumbnails[1283669]=new thumbnail(1283669,"63033","'It's a new dawn, it's a new day....'","Sunrise Scurdieness_thumb.jpg",130,54,18);thumbnails[1283673]=new thumbnail(1283673,"63033","'Softly as a morning sunrise...'","15 It's a new day 3 F reduced_thumb.jpg",130,87,18);thumbnails[2487857]=new thumbnail(2487857,"63033","'What a difference a day makes...'","'What a difference a day makes Lo res_thumb.jpg",130,59,18);thumbnails[2487903]=new thumbnail(2487903,"63033","South Esk","Ferryden Lo res_thumb.jpg",130,74,18);thumbnails[2487914]=new thumbnail(2487914,"63033","Pilot Boat","Pilot Boat 2 Lo res_thumb.jpg",130,58,18);thumbnails[3105670]=new thumbnail(3105670,"63033","Wake","Ferryden + Boat Lo res 2_thumb.jpg",130,70,18);thumbnails[3360706]=new thumbnail(3360706,"63033","Usan Lass","Usan Lass  Lo res_thumb.jpg",130,87,18);thumbnails[2487908]=new thumbnail(2487908,"63033","Scurdieness","Scurdieness Lo res_thumb.jpg",130,98,18);thumbnails[820569]=new thumbnail(820569,"63035","Spring","Springtime up_thumb.jpg",130,73,18);thumbnails[820549]=new thumbnail(820549,"63035","Grand Entrance","Grand Entrance up_thumb.jpg",130,79,18);thumbnails[820552]=new thumbnail(820552,"63035","Crisp","Kinnell up_thumb.jpg",130,86,18);thumbnails[1986015]=new thumbnail(1986015,"63035","House of Dun","Sudial 2 in focus Use upload_thumb.jpg",130,89,18);thumbnails[1985994]=new thumbnail(1985994,"63035","Safe Haven","Arb Harb upload_thumb.jpg",130,58,18);thumbnails[1986001]=new thumbnail(1986001,"63035","Bridge of Dun","Bridge of Dun 2 upload_thumb.jpg",130,92,18);thumbnails[1986019]=new thumbnail(1986019,"63035","'Come rain or come shine....'","Sunshine after the rain to upload_thumb.jpg",130,92,18);thumbnails[820556]=new thumbnail(820556,"63035","Field of Gold","Lunan Bay up_thumb.jpg",130,166,18);thumbnails[1843122]=new thumbnail(1843122,"63035","Poppies","Poppies 1 to upload_thumb.jpg",130,82,18);thumbnails[820573]=new thumbnail(820573,"63035","Glow","Sunset up_thumb.jpg",130,195,18);thumbnails[1986136]=new thumbnail(1986136,"63035","Life's a Beach","Lunan Bay Horse sml_thumb.jpg",130,72,18);thumbnails[2487939]=new thumbnail(2487939,"63035","'Between you, me and....'","gatepost lo res_thumb.jpg",130,181,18);thumbnails[3102686]=new thumbnail(3102686,"63035","Ripple on Pebble","Auchmithie 6 Lo Res_thumb.jpg",130,58,18);thumbnails[3102689]=new thumbnail(3102689,"63035","Auchmithie","Auchmithie 7 Lo-Res_thumb.jpg",130,195,18);thumbnails[1842952]=new thumbnail(1842952,"123998","Brass","Brass resized_thumb.jpg",130,182,18);thumbnails[820446]=new thumbnail(820446,"123998","Minesweeper","Minesweeper up_thumb.jpg",130,191,18);thumbnails[820450]=new thumbnail(820450,"123998","Seafarers","Seafarers up_thumb.jpg",130,187,18);thumbnails[841162]=new thumbnail(841162,"123998","Bamse","Bamse 500 wee_thumb.jpg",130,88,18);thumbnails[820442]=new thumbnail(820442,"123998","The Marquis","The Marquis up_thumb.jpg",130,81,18);thumbnails[1842977]=new thumbnail(1842977,"123998","Love is in the Air","Love is in the air resized_thumb.jpg",130,90,18);thumbnails[841168]=new thumbnail(841168,"123998","Robert Burns","Rabbie 500 wee_thumb.jpg",130,173,18);thumbnails[820423]=new thumbnail(820423,"123998","Farmers' Market","farmers Market up_thumb.jpg",130,81,18);thumbnails[3102694]=new thumbnail(3102694,"123998","Castle Place Autumn","Autumn Marquis Lo-Res_thumb.jpg",130,204,18);thumbnails[820444]=new thumbnail(820444,"123998","Home Support<br>\r\n","Links Park up_thumb.jpg",130,81,18);thumbnails[1843007]=new thumbnail(1843007,"123999","A92 Dusk","A92 resized_thumb.jpg",130,82,18);thumbnails[1843009]=new thumbnail(1843009,"123999","Bruce","Bruce resized_thumb.jpg",130,84,18);thumbnails[1843011]=new thumbnail(1843011,"123999","Frosty Morning","Frosty Trees resized_thumb.jpg",130,87,18);thumbnails[1843111]=new thumbnail(1843111,"123999",'"Hats, Scarves and Flags!"',"Hats & Scarves resized_thumb.jpg",130,89,18);thumbnails[1843019]=new thumbnail(1843019,"123999","Corgarff Castle","Corgarff resized_thumb.jpg",130,86,18);thumbnails[1843023]=new thumbnail(1843023,"123999","Debating Chamber","Debating Chamber resized_thumb.jpg",130,87,18);thumbnails[1843027]=new thumbnail(1843027,"123999","Happy New Year!","Glasgow Hog resized_thumb.jpg",130,86,18);thumbnails[1843029]=new thumbnail(1843029,"123999","Isle of May","Isle of May resized_thumb.jpg",130,86,18);thumbnails[1986091]=new thumbnail(1986091,"123999","Long Johns Haven","Johnshaven sml_thumb.jpg",130,87,18);thumbnails[1986096]=new thumbnail(1986096,"123999","Shoretack","Shoretack sml_thumb.jpg",130,89,18);thumbnails[1843033]=new thumbnail(1843033,"123999",'"Meet You Here."',"Landmark resized_thumb.jpg",130,82,18);thumbnails[1843123]=new thumbnail(1843123,"123999","Up","up resized_thumb.jpg",130,83,18);thumbnails[1843038]=new thumbnail(1843038,"123999","Round in Circles","Princes Square resized_thumb.jpg",130,88,18);thumbnails[1843041]=new thumbnail(1843041,"123999","Islay","Port Ellen Islay resized_thumb.jpg",130,81,18);thumbnails[1843051]=new thumbnail(1843051,"123999","St Vincent Street","St Vincent St resized_thumb.jpg",130,88,18);thumbnails[1843046]=new thumbnail(1843046,"123999","Sheildaeg","Sheildaeg resized_thumb.jpg",130,98,18);thumbnails[1843057]=new thumbnail(1843057,"123999","Tay Bridge Sunset","Tay Bridge resized_thumb.jpg",130,80,18);thumbnails[1843064]=new thumbnail(1843064,"123999","The Waverley","Waverley resized_thumb.jpg",130,68,18);thumbnails[3105665]=new thumbnail(3105665,"123999","Duck Bay Marina","Duck Bay Marina dodged Lo Res_thumb.jpg",130,87,18);thumbnails[1843069]=new thumbnail(1843069,"123999","Washed Up","Washed up resized_thumb.jpg",130,160,18);thumbnails[3105560]=new thumbnail(3105560,"123999","Kibble Palace","Kibble Palace Lo Res_thumb.jpg",130,87,18);thumbnails[3102714]=new thumbnail(3102714,"123999","Gourdon Harbour","Gourdon Harbour 3 Lo Res_thumb.jpg",130,60,18);thumbnails[2339222]=new thumbnail(2339222,"123999","St Palladius Church","St Palladius Med_thumb.jpg",130,89,18);thumbnails[3105899]=new thumbnail(3105899,"123999","Dunnottar Castle","Dunotter B&W 2 A4 Print Lo-Res_thumb.jpg",130,87,18);thumbnails[3102705]=new thumbnail(3102705,"123999","Cloud Howe","Cloud Howe Lo Res_thumb.jpg",130,83,18);thumbnails[3105577]=new thumbnail(3105577,"123999","Take a Pew","Take a Pew Lo Res_thumb.jpg",130,82,18);thumbnails[3105655]=new thumbnail(3105655,"123999","Summit","Summit burned Lo Res_thumb.jpg",130,87,18);thumbnails[4671725]=new thumbnail(4671725,"269214","","33-Happy-Couple-F_thumb.jpg",130,85,18);thumbnails[4671729]=new thumbnail(4671729,"269214","","51-DSC_3787_thumb.jpg",130,165,18);thumbnails[4671727]=new thumbnail(4671727,"269214","","42-Edit-F-End_thumb.jpg",130,106,18);thumbnails[4671731]=new thumbnail(4671731,"269214","","54-DSC_3818_thumb.jpg",130,91,18);thumbnails[4671732]=new thumbnail(4671732,"269214","","70-DSC_3846_thumb.jpg",130,181,18);thumbnails[4671741]=new thumbnail(4671741,"269214","","Edit-3996_thumb.jpg",130,86,18);thumbnails[4671745]=new thumbnail(4671745,"269214","","Edit-4083_thumb.jpg",130,84,18);thumbnails[1843126]=new thumbnail(1843126,"269214","","Wedding Faro resized_thumb.jpg",130,81,18);thumbnails[4671748]=new thumbnail(4671748,"269214","","Edit-4106_thumb.jpg",130,85,18);thumbnails[4671759]=new thumbnail(4671759,"269214","","Edit-4225_thumb.jpg",130,84,18);thumbnails[4671761]=new thumbnail(4671761,"269214","","Edit-4289_thumb.jpg",130,92,18);thumbnails[4671765]=new thumbnail(4671765,"269214","","Edit-4430_thumb.jpg",130,79,18);thumbnails[4671780]=new thumbnail(4671780,"269214","","Edit-5275_thumb.jpg",130,202,18);thumbnails[4671779]=new thumbnail(4671779,"269214","","Edit-5137_thumb.jpg",130,176,18);thumbnails[4671770]=new thumbnail(4671770,"269214","","Edit-5013-a_thumb.jpg",130,208,18);thumbnails[4671768]=new thumbnail(4671768,"269214","","Edit-4822_thumb.jpg",130,86,18);thumbnails[4671776]=new thumbnail(4671776,"269214","","Edit-5131_thumb.jpg",130,68,18);thumbnails[4671782]=new thumbnail(4671782,"269214","","Edit-5971-b_thumb.jpg",130,83,18);thumbnails[4671781]=new thumbnail(4671781,"269214","","Edit-5934-a_thumb.jpg",130,89,18);thumbnails[5091531]=new thumbnail(5091531,"269214","","Edit_8865_thumb.jpg",130,91,18);thumbnails[5091595]=new thumbnail(5091595,"269214","","Edit_0228_R_thumb.jpg",130,87,18);thumbnails[5091524]=new thumbnail(5091524,"269214","","Edit_8561_thumb.jpg",130,75,18);thumbnails[1843076]=new thumbnail(1843076,"124000","8th Avenue","8th Ave  resized_thumb.jpg",130,88,18);thumbnails[1843109]=new thumbnail(1843109,"124000","Duke Ellington Orchestra","Blue Note resized_thumb.jpg",130,87,18);thumbnails[1843079]=new thumbnail(1843079,"124000","Sculptured Beach","Alicante Beach resized_thumb.jpg",130,66,18);thumbnails[1843084]=new thumbnail(1843084,"124000","Look Out","Turret  resized_thumb.jpg",130,84,18);thumbnails[1843088]=new thumbnail(1843088,"124000","Park Avenue","Park Ave  resized_thumb.jpg",130,77,18);thumbnails[1843092]=new thumbnail(1843092,"124000","Cool Pool","Pool  resized_thumb.jpg",130,82,18);thumbnails[1843103]=new thumbnail(1843103,"124000","Pottery","Pottery Portugal resized_thumb.jpg",130,94,18);thumbnails[1843106]=new thumbnail(1843106,"124000","Manhattan Bridge","Manhattan  Bridge resized_thumb.jpg",130,57,18);var galleries=new Object();galleries[62577]=new gallery(62577,"3885803,3360698,3105663,3105658,3105593,3102758,3102708,3102680,2487905,2339249,1843153,1843133,1177890,1177889,1177888,909459,848691,847452,841172,841156,825537,820462,820439,820437,820434,820433,820432,820415","Montrose","gallery",[820415,841156,820439,820433,820434,847452,841172,820429,1843133,820462,820432,820437,820430,2487905,820440,2339249,848691,1177888,1177889,825537,3102680,3102708,3102758,909459,3360698,1177890,3105593,3105658,3105663,3885803,1843153]);galleries[63033]=new gallery(63033,"3360706,3105670,2487914,2487908,2487857,1283677,1283673,1283669,820486,820479,820469","Ferryden and Scurdieness","gallery",[1283677,820486,820481,820479,820469,1283669,1283673,2487857,2487903,2487914,3105670,3360706,2487908]);galleries[63035]=new gallery(63035,"3102689,3102686,2487939,1986136,1986019,1986015,1986001,1985994,1843122,820573,820569,820556,820552,820549","Angus","gallery",[820569,820549,820552,1986015,1985994,1986001,1986019,820556,1843122,820573,1986136,2487939,3102686,3102689]);galleries[123998]=new gallery(123998,"3102694,1842977,1842952,820450,820446,820442,820423","Montrose Folk","gallery",[1842952,820446,820450,841162,820442,1842977,841168,820423,3102694,820444]);galleries[123999]=new gallery(123999,"3105899,3105665,3105655,3105577,3105560,3102714,2339222,1986096,1986091,1843123,1843111,1843069,1843057,1843051,1843046,1843041,1843038,1843033,1843029,1843027,1843023,1843007","Scotland","gallery",[1843007,1843009,1843011,1843111,1843019,1843023,1843027,1843029,1986091,1986096,1843033,1843123,1843038,1843041,1843051,1843046,1843057,1843064,3105665,1843069,3105560,3102714,2339222,3105899,3102705,3105577,3105655]);galleries[269214]=new gallery(269214,"1843126","Weddings","gallery",[4671725,4671729,4671727,4671731,4671732,4671741,4671745,1843126,4671748,4671759,4671761,4671765,4671780,4671779,4671770,4671768,4671776,4671782,4671781,5091531,5091595,5091524]);galleries[124000]=new gallery(124000,"1843109,1843106,1843092,1843088,1843084,1843079,1843076","Other Places","gallery",[1843076,1843109,1843079,1843084,1843088,1843092,1843103,1843106]);var imageSets=new Object();imageSets[1]="3885803,3360706,3360698,3105663,3105593,3102758,3102708,3102694,3102686,3102680,2487939,2487908,2487857,2339249,1986136,1986019,1843153,1843133,1283677,1283673,1283669,1177890,1177889,1177888,909459,848691,847452,841172,841156,820486,820479,820469,820462,820450,820446,820442,820439,820437,820434,820433,820432,820423,820415";imageSets[2]="3885803,3360706,3360698,3105899,3105670,3105665,3105663,3105658,3105655,3105593,3105577,3105560,3102758,3102714,3102708,3102694,3102689,3102686,3102680,2487939,2487914,2487908,2487905,2487857,2339249,2339222,1986136,1986096,1986091,1986019,1986015,1986001,1985994,1843153,1843133,1843126,1843123,1843122,1843111,1843109,1843106,1843092,1843088,1843084,1843079,1843076,1843069,1843057,1843051,1843046,1843041,1843038,1843033,1843029,1843027,1843023,1843007,1842977,1842952,1283677,1283673,1283669,1177890,1177889,1177888,909459,848691,847452,841172,841156,825537,820573,820569,820556,820552,820549,820486,820479,820469,820462,820450,820446,820442,820439,820437,820434,820433,820432,820423,820415";imageSets[3]="5091595,5091531,5091524,4671782,4671781,4671780,4671779,4671776,4671770,4671768,4671765,4671761,4671759,4671748,4671745,4671741,4671732,4671731,4671729,4671727,4671725,3885803,3360706,3360698,3105899,3105670,3105665,3105663,3105658,3105655,3105593,3105577,3105560,3102758,3102714,3102708,3102705,3102694,3102689,3102686,3102680,2487939,2487914,2487908,2487905,2487903,2487857,2339249,2339222,1986136";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/basontheslates/images";break}switch(a){case 1:b="http://www1.clikpic.com/basontheslates/images";break}switch(a){case 2:b="http://admin.clikpic.com/basontheslates/images";break}switch(a){case 4:b="http://www.clikchurch.com/basontheslates/images";break}switch(a){case 5:b="http://www2.clikpic.com/basontheslates/images";break}switch(a){case 15:b="http://www3.clikpic.com/basontheslates/images";break}switch(a){case 21:b="http://www6.clikpic.com/basontheslates/images";break}switch(a){case 18:b="http://www4.clikpic.com/basontheslates/images";break}switch(a){case 19:b="http://www5.clikpic.com/basontheslates/images";break}switch(a){case 22:b="http://tpc5/clikpic/basontheslates/images";break}switch(a){case 23:b="http://tpc10/clikpic/basontheslates/images";break}switch(a){case 24:b="http://tpc15/clikpic/basontheslates/images";break}switch(a){case 25:b="http://tpc16/clikpic/basontheslates/images";break}switch(a){case 31:b="http://www7.clikpic.com/basontheslates/images";break}switch(a){case 32:b="http://admin2.clikpic.com/basontheslates/images";break}switch(a){case 33:b="http://www8.clikpic.com/basontheslates/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="gable-end 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>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</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="updateCartValue(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';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">';b=b+'	<input type="hidden" name="item_option" value="'+a+'">';b=b+'	<input type="hidden" name="site" value="BASONTHESLATES">';b=b+'	<input type="hidden" name="item_number" value="'+c.id+'">';b=b+'	<input type="hidden" name="quantity" value="1">';b=b+'	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button">';b=b+'	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';b=b+"</form>";b=b+'<div class="clearing">&nbsp;</div>';b=b+'<div id="confirmContainer">';b=b+'<div id="paymentConfirm">Item added to cart</div>';b=b+"</div>";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+'")'})}}};