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[2348103]=new thumbnail(2348103,"153011","Tower","Culross1_thumb.jpg",130,195,5);thumbnails[2348110]=new thumbnail(2348110,"153011","The Wheel","Falkirk Wheel 1_thumb.jpg",130,195,5);thumbnails[2348120]=new thumbnail(2348120,"153011","Modern Engineering","Falkirk Wheel 2_thumb.jpg",130,87,5);thumbnails[2348129]=new thumbnail(2348129,"153011","Bridge At Night","Forth rd-night-bw_thumb.JPG",130,62,5);thumbnails[2348134]=new thumbnail(2348134,"153011","Mausoleum","Hamilton Mausoleum_thumb.JPG",130,195,5);thumbnails[2348141]=new thumbnail(2348141,"153011","Castle","Kilchurn Castle Loch Awe_thumb.JPG",130,195,5);thumbnails[2348167]=new thumbnail(2348167,"153011","Rooftops","Linlithgow Palace 2_thumb.jpg",130,195,5);thumbnails[2348173]=new thumbnail(2348173,"153011","Windows","Linlithgow Palace 3_thumb.jpg",130,87,5);thumbnails[2348180]=new thumbnail(2348180,"153011","Old Times","St Andrews_thumb.jpg",130,195,5);thumbnails[2348313]=new thumbnail(2348313,"153011","Door With a View","St Andrews 1_thumb.jpg",130,195,5);thumbnails[2348317]=new thumbnail(2348317,"153013","Stone Bridge ","Bridge at Aberfoyle_thumb.JPG",130,87,5);thumbnails[2348327]=new thumbnail(2348327,"153013","Old And The New","Campse Fells_thumb.JPG",130,195,5);thumbnails[2348334]=new thumbnail(2348334,"153013","Old ruin 1","Campsie Fells 1_thumb.JPG",130,87,5);thumbnails[2348342]=new thumbnail(2348342,"153013","Old ruin 2","Campsie Fells 3_thumb.JPG",130,195,5);thumbnails[2348347]=new thumbnail(2348347,"153013","Firth of Forth","Culross - Firth of Forth_thumb.JPG",130,87,5);thumbnails[2348353]=new thumbnail(2348353,"153013","Sunsets","Loch Ard Aberfoyle_thumb.JPG",130,87,5);thumbnails[2348357]=new thumbnail(2348357,"153013","Sunset 1","Loch Ard Aberfoyle 1_thumb.JPG",130,195,5);thumbnails[2348365]=new thumbnail(2348365,"153013","Nice View","Loch Venachar_thumb.JPG",130,195,5);thumbnails[2348370]=new thumbnail(2348370,"153013","Things You Find On a Beach","North Berwick_thumb.jpg",130,195,5);thumbnails[2348377]=new thumbnail(2348377,"153013","River Tweed","River Tweed Peebles_thumb.jpg",130,87,5);thumbnails[2348389]=new thumbnail(2348389,"153013","Views","View From Conic Hill Balmaha_thumb.JPG",130,195,5);thumbnails[2348394]=new thumbnail(2348394,"153013","Waterfall","Waterfall Camsie Fells_thumb.JPG",130,195,5);thumbnails[2348401]=new thumbnail(2348401,"153013","Gate to The Hills","Woodland Conic Hill Balmaha_thumb.jpg",130,195,5);thumbnails[2348419]=new thumbnail(2348419,"153012","Wildcat","Palacerigg Country Park_thumb.jpg",130,195,5);thumbnails[2348425]=new thumbnail(2348425,"153012","Donkey","Palacerigg Country Park 1_thumb.jpg",130,195,5);thumbnails[2348437]=new thumbnail(2348437,"153014","Spiders Web","Linlithgow Palace 1_thumb.jpg",130,87,5);thumbnails[2348446]=new thumbnail(2348446,"153014","Window With a View","Murdoch Country park_thumb.JPG",130,195,5);thumbnails[2348455]=new thumbnail(2348455,"153014","Steam Train","Summerlee Coatbridge_thumb.jpg",130,87,5);thumbnails[2348467]=new thumbnail(2348467,"153000","Old ","Old Coal Pump Station North Lanarkshire_thumb.jpg",130,87,5);thumbnails[2348504]=new thumbnail(2348504,"153000","Bridge Over Water","Bridge River Clyde City Centre_thumb.JPG",130,87,5);thumbnails[2348508]=new thumbnail(2348508,"153000","Lighthouse","Canary Islands-Menorca_thumb.JPG",130,195,5);thumbnails[2348510]=new thumbnail(2348510,"153000","Chatelherault","Chatelherault Hamilton_thumb.jpg",130,87,5);thumbnails[2348514]=new thumbnail(2348514,"153000","House With Character","Culross2_thumb.JPG",130,195,5);thumbnails[2348516]=new thumbnail(2348516,"153000","Wheel","Falkirk Wheel_thumb.JPG",130,195,5);thumbnails[2348523]=new thumbnail(2348523,"153000","Science ","Glasgow Science centre_thumb.JPG",130,195,5);thumbnails[2348531]=new thumbnail(2348531,"153000","Expensive Windows","Scottish Parliament_thumb.JPG",130,195,5);thumbnails[2355628]=new thumbnail(2355628,"153000","Linlithgow Palace","Linlighgow  Palace 1_thumb.jpg",130,87,5);thumbnails[2355659]=new thumbnail(2355659,"153000","Graveyard","Stirling 1_thumb.jpg",130,195,5);thumbnails[2355670]=new thumbnail(2355670,"153000","Village Centre","Culross 1_thumb.jpg",130,195,5);thumbnails[2355679]=new thumbnail(2355679,"153000","Bridge's","Forth Rd Bridge a_thumb.jpg",130,56,5);thumbnails[2355695]=new thumbnail(2355695,"153000","Graveyard at Night","Stirling 2_thumb.JPG",130,87,5);thumbnails[2355713]=new thumbnail(2355713,"153010","Motorway Flyover ","M8 Fly-over at night North Lanarkshire_thumb.jpg",130,87,5);thumbnails[2355728]=new thumbnail(2355728,"153010","Tree","Glen Nevis_thumb.JPG",130,195,5);thumbnails[2355736]=new thumbnail(2355736,"153010","Shells","Shells - Loch Fynn_thumb.JPG",130,87,5);thumbnails[2355749]=new thumbnail(2355749,"153010","Spring in Inverness","Inverness 1_thumb.jpg",130,87,5);thumbnails[2355762]=new thumbnail(2355762,"153002","Robin","Robin_thumb.JPG",130,163,5);thumbnails[2355805]=new thumbnail(2355805,"153003","Sunset 3","Loch Ard Aberfoyle 4_thumb.JPG",130,195,5);thumbnails[2355845]=new thumbnail(2355845,"153003","Sunset 4","Campsie Fells - Carron Valley_thumb.JPG",130,195,5);thumbnails[2355870]=new thumbnail(2355870,"153003","Early Morning Mountain View","Glen Coe 2_thumb.JPG",130,51,5);thumbnails[2356230]=new thumbnail(2356230,"153003","Reflections","Aberfoyle Loch Ard_thumb.JPG",130,87,5);thumbnails[2356242]=new thumbnail(2356242,"153003","Rocks","Anstruther_thumb.jpg",130,87,5);thumbnails[2356255]=new thumbnail(2356255,"153003","Top of The World","Tignes - French Alps 2_thumb.JPG",130,195,5);thumbnails[2356288]=new thumbnail(2356288,"153003","Pond at Mountain Top","Glen Coe Mountains_thumb.JPG",130,87,5);thumbnails[2358104]=new thumbnail(2358104,"153003","Mountain Top","Ben Venue_thumb.JPG",130,87,5);thumbnails[2358121]=new thumbnail(2358121,"153003","Evening Sunset Reflections","Carron Valley Sunset 4_thumb.jpg",130,195,5);thumbnails[2358138]=new thumbnail(2358138,"153003","The Countryside","Counrty View Abington Area 1_thumb.JPG",130,195,5);thumbnails[2358150]=new thumbnail(2358150,"153003","Relfections On Ice","Loch Fyne_thumb.jpg",130,195,5);thumbnails[2358159]=new thumbnail(2358159,"153003","Boat Refections","Loch Leven Glen Coe_thumb.JPG",130,195,5);thumbnails[2358429]=new thumbnail(2358429,"153003","Fishing Boat","Firth Of Lorn_thumb.JPG",130,56,5);thumbnails[2358432]=new thumbnail(2358432,"153003","Reflections On a Loch","Loch Leven Kinlochleven_thumb.JPG",130,87,5);thumbnails[2358435]=new thumbnail(2358435,"153003","Mirror Image","Glen Coe 4_thumb.jpg",130,55,5);thumbnails[2358439]=new thumbnail(2358439,"153003","Boat On The Loch","Loch Ard Aberfoyle1_thumb.jpg",130,87,5);thumbnails[2358441]=new thumbnail(2358441,"153003","The Bonnie Banks","Loch Lommond 1_thumb.jpg",130,87,5);thumbnails[2358442]=new thumbnail(2358442,"153003","Sunset At Sea","Sunset Firth of Jura_thumb.JPG",130,87,5);thumbnails[2358453]=new thumbnail(2358453,"153003","A Wee Waterfall","Waterfall Campsie Fells_thumb.JPG",130,195,5);thumbnails[2358455]=new thumbnail(2358455,"153003","A Nice Sunset","Sunset Abington Area_thumb.JPG",130,87,5);thumbnails[2363637]=new thumbnail(2363637,"153010","Stump","Tree Stump_thumb.jpg",130,104,5);thumbnails[2363657]=new thumbnail(2363657,"153010","Tree Carving","Chatelherault Hamilton 1_thumb.jpg",130,87,5);thumbnails[2363689]=new thumbnail(2363689,"153010","Silhouette","Ochill Hills Alva_thumb.jpg",130,87,5);thumbnails[2363703]=new thumbnail(2363703,"153010","Tree Silhouette","Sunset Near Kilsyth North Lanarkshire_thumb.JPG",130,195,5);thumbnails[2363708]=new thumbnail(2363708,"153010","Robert The Bruce","Stirling Castle 1_thumb.JPG",130,195,5);thumbnails[2363763]=new thumbnail(2363763,"153000","Stirling Castle","Stirling Castle_thumb.JPG",130,53,5);thumbnails[2363768]=new thumbnail(2363768,"153000","Door","Linlithgow Palace door_thumb.JPG",130,195,5);thumbnails[2363845]=new thumbnail(2363845,"153003","God Rays","View From Ben Ledi_thumb.JPG",130,87,5);thumbnails[2363851]=new thumbnail(2363851,"153003","Night Glow","Linlithgow Loch_thumb.jpg",130,87,5);thumbnails[2406899]=new thumbnail(2406899,"153003","A Cold Winter's Morning","Glen Coe 1_thumb.jpg",130,56,5);thumbnails[2406900]=new thumbnail(2406900,"153003","Hillside View","Hillside Near Abington 1_thumb.JPG",130,195,5);thumbnails[2406902]=new thumbnail(2406902,"153003","Mountains","Ben Aan Trossachs_thumb.JPG",130,60,5);thumbnails[2406904]=new thumbnail(2406904,"153003","Grassy Sunset View","Kilsyth at Forth & Clyde Canal_thumb.JPG",130,195,5);thumbnails[2406906]=new thumbnail(2406906,"153003","Loch View","Sunset Coatbridge Lochs_thumb.jpg",130,195,5);thumbnails[2406907]=new thumbnail(2406907,"153003","House By The Loch","Dunkeld_thumb.JPG",130,87,5);thumbnails[2406908]=new thumbnail(2406908,"153003","Red Glow","Sunset Near Glenmavis North Lanarkshire_thumb.JPG",130,87,5);thumbnails[2406909]=new thumbnail(2406909,"153003","Carron Valley","Carron Valley sunset 1_thumb.jpg",130,87,5);thumbnails[2563405]=new thumbnail(2563405,"180278","","IMG_2464 (2)4_thumb.JPG",130,195,5);thumbnails[2563412]=new thumbnail(2563412,"180278","","IMG_2471 (1)3_thumb.JPG",130,195,5);thumbnails[2909858]=new thumbnail(2909858,"153003","Summer Sunset at Stathcyde Park","Sunset at Strathclyde Park1_thumb.jpg",130,195,5);thumbnails[2909890]=new thumbnail(2909890,"153003","Sea Reflections","Marsalforn Gozo - Malta_thumb.jpg",130,72,5);thumbnails[2909898]=new thumbnail(2909898,"153013","Running Water","Burn at Campsie Fells_thumb.JPG",130,195,5);thumbnails[2909939]=new thumbnail(2909939,"153003","Desert Valley","Egypt Near The Valley Of The Kings_thumb.jpg",130,86,5);thumbnails[2916339]=new thumbnail(2916339,"153010","Gorgeous Bloom","Gorgeous Bloom_thumb.JPG",130,195,5);thumbnails[2916341]=new thumbnail(2916341,"153010","Starburst","Starburst_thumb.JPG",130,195,5);thumbnails[2917733]=new thumbnail(2917733,"153003","Gozo","Gozo -Malta_thumb.JPG",130,175,5);thumbnails[2950024]=new thumbnail(2950024,"153003","Abandoned","Abandoned_thumb.jpg",130,87,5);thumbnails[2950028]=new thumbnail(2950028,"153003","House On The Hill","House on a hill_thumb.jpg",130,87,5);thumbnails[2950030]=new thumbnail(2950030,"153003","Mountain Stream","Mountain Stream_thumb.jpg",130,195,5);thumbnails[3081992]=new thumbnail(3081992,"153003","Sunset on Golden Pond","Sunset on golden pond_thumb.JPG",130,87,5);thumbnails[3081995]=new thumbnail(3081995,"153003","Tree Sillhouette","Tree Sillhouette_thumb.JPG",130,87,5);thumbnails[3154156]=new thumbnail(3154156,"153003","Autum Reflections","Autum Reflections_thumb.JPG",130,87,5);thumbnails[3154161]=new thumbnail(3154161,"153010","Autum Time Again","Autum Time_thumb.JPG",130,195,5);thumbnails[3154165]=new thumbnail(3154165,"153000","Pavillion","Pavillion_thumb.JPG",130,87,5);thumbnails[3154177]=new thumbnail(3154177,"153003","Spot The Dog","Spot The Dog_thumb.JPG",130,65,5);thumbnails[3166594]=new thumbnail(3166594,"193858","Lilly The Cat","Lilly (1)_thumb.JPG",130,195,5);thumbnails[3166596]=new thumbnail(3166596,"193858","Lilly The Cat 2","Lilly(2)_thumb.JPG",130,195,5);thumbnails[3166599]=new thumbnail(3166599,"153003","First Snowfall ","First Snowfall_thumb.JPG",130,87,5);thumbnails[3167716]=new thumbnail(3167716,"193858","Lilly The Cat 3","Lilly(3)_thumb.JPG",130,87,5);thumbnails[3216611]=new thumbnail(3216611,"153003","Freezing Afternoon","Freezing Afternoon_thumb.JPG",130,55,5);thumbnails[3216639]=new thumbnail(3216639,"153003","boat on Ard","Boat_thumb.JPG",130,195,5);thumbnails[3249604]=new thumbnail(3249604,"153003","Cold Misty Day","Cold Misty Day_thumb.jpg",130,195,5);thumbnails[3249606]=new thumbnail(3249606,"153003","Mist On Pond","Misty Pond_thumb.jpg",130,195,5);thumbnails[3249610]=new thumbnail(3249610,"153003","Winter View","Winter Views_thumb.jpg",130,73,5);thumbnails[3249629]=new thumbnail(3249629,"153011","Castle Shadows","Castle Shadows_thumb.JPG",130,180,5);thumbnails[3266929]=new thumbnail(3266929,"153013","Cairn","Top Of The Hill_thumb.JPG",130,87,5);thumbnails[3266936]=new thumbnail(3266936,"153013","Views Across","View Across_thumb.JPG",130,87,5);thumbnails[3271264]=new thumbnail(3271264,"153003","Still Evening Sunset Glow","Still Evening Sunset_thumb.JPG",130,85,5);thumbnails[3396105]=new thumbnail(3396105,"153014","Connection","Connection_thumb.jpg",130,195,5);thumbnails[3396112]=new thumbnail(3396112,"153003","Connel bridge","Connel Bridge Oban_thumb.jpg",130,66,5);thumbnails[3396124]=new thumbnail(3396124,"153013","Fallen Gate","Dalry_thumb.JPG",130,87,5);thumbnails[3396135]=new thumbnail(3396135,"153013","Tranquil Setting","Firth of Lorne 1_thumb.jpg",130,195,5);thumbnails[3396150]=new thumbnail(3396150,"153003","Evening clouds","Firth of Lorne 3_thumb.jpg",130,195,5);thumbnails[3396164]=new thumbnail(3396164,"153003","Tranquil bay","Kentallen Loch Linnhe_thumb.jpg",130,66,5);thumbnails[3396178]=new thumbnail(3396178,"153000","Light","Oban_thumb.jpg",130,195,5);thumbnails[5254245]=new thumbnail(5254245,"193858","Daisy","Daisy_11_thumb.jpg",130,195,5);thumbnails[5254439]=new thumbnail(5254439,"153003","Loch Lubnaig","Loch_Lubnaig_thumb.JPG",130,68,5);thumbnails[5254449]=new thumbnail(5254449,"153003","Dam Wall","IMG_3305_thumb.JPG",130,195,5);thumbnails[5254464]=new thumbnail(5254464,"153003","Evening Autum Sunset On Loch","IMG_3315a_thumb.jpg",130,80,5);thumbnails[5254473]=new thumbnail(5254473,"153013","Bare Trees","IMG_3417_thumb.JPG",130,195,5);thumbnails[5254481]=new thumbnail(5254481,"153011","Canal Reflections","IMG_3428_1_thumb.JPG",130,195,5);thumbnails[5254590]=new thumbnail(5254590,"153003","Loch Reflections","IMG_3487_thumb.JPG",130,87,5);thumbnails[5254594]=new thumbnail(5254594,"153014","Forst","IMG_3497_1_thumb.JPG",130,87,5);thumbnails[5254600]=new thumbnail(5254600,"153003","Clouds Below","IMG_3529_thumb.JPG",130,72,5);thumbnails[5276156]=new thumbnail(5276156,"153013","Winter Coating","IMG_3566_2_thumb.JPG",130,195,5);thumbnails[5276165]=new thumbnail(5276165,"153014","Winter Coating 2","IMG_3573_2_thumb.JPG",130,74,5);thumbnails[5276175]=new thumbnail(5276175,"153013","Winter Wall 2","IMG_3578_2_thumb.JPG",130,195,5);thumbnails[5295849]=new thumbnail(5295849,"153003","Winter Loch View","IMG_36471_thumb.jpg",130,63,5);thumbnails[5295857]=new thumbnail(5295857,"153003","Finglas Reservoir","IMG_36571_thumb.jpg",130,67,5);thumbnails[5295860]=new thumbnail(5295860,"153013","River Clyde","IMG_3645_01_thumb.jpg",130,87,5);thumbnails[5398392]=new thumbnail(5398392,"180278","","IMG_0021aa_thumb.jpg",130,182,5);var galleries=new Object();galleries[153002]=new gallery(153002,"2355762","Animals","gallery",[2355762]);galleries[153012]=new gallery(153012,"2348425,2348419","Animals","gallery",[2348419,2348425]);galleries[153000]=new gallery(153000,"3396178,3154165,2363768,2363763,2355695,2355679,2355670,2355659,2355628,2348531","Architecture","gallery",[2348467,2348504,2348508,2348510,2348514,2348516,2348523,2348531,2355628,2355659,2355670,2355679,2355695,2363763,2363768,3154165,3396178]);galleries[153011]=new gallery(153011,"2348103","Architecture","gallery",[2348103,2348110,2348120,2348129,2348134,2348141,2348167,2348173,2348180,2348313,3249629,5254481]);galleries[153009]=new gallery(153009,"2348103","Black & White Collection","gallery",[]);galleries[152988]=new gallery(152988,"2356255","Colour Collection","gallery",[]);galleries[153003]=new gallery(153003,"2356255","Landscape","gallery",[2355805,2355845,2355870,2356230,2356242,2356255,2356288,2358104,2358121,2358138,2358150,2358159,2358429,2358432,2358435,2358439,2358441,2358442,2358453,2358455,2363845,2363851,2406899,2406900,2406902,2406904,2406906,2406907,2406908,2406909,2909858,2909890,2909939,2917733,2950024,2950028,2950030,3081992,3081995,3154156,3154177,3166599,3216611,3216639,3249604,3249606,3249610,3271264,3396112,3396150,3396164,5254439,5254449,5254464,5254590,5254600,5295849,5295857]);galleries[153013]=new gallery(153013,"5295860,5276175,5276156,5254473,3396135,3396124,3266936,3266929,2909898,2348401","Landscape","gallery",[2348317,2348327,2348334,2348342,2348347,2348353,2348357,2348365,2348370,2348377,2348389,2348394,2348401,2909898,3266929,3266936,3396124,3396135,5254473,5276156,5276175,5295860]);galleries[199367]=new gallery(199367,"","Latest Photographs","gallery",[]);galleries[153010]=new gallery(153010,"3154161,2916341,2916339,2363708,2363703,2363689,2363657,2363637,2355749,2355736","Micellaneous","gallery",[2355713,2355728,2355736,2355749,2363637,2363657,2363689,2363703,2363708,2916339,2916341,3154161]);galleries[153014]=new gallery(153014,"5276165,5254594,3396105,2348455,2348446,2348437","Miscellaneous","gallery",[2348437,2348446,2348455,3396105,5254594,5276165]);galleries[193858]=new gallery(193858,"5254245,3167716,3166596,3166594","Pet Portraits","gallery",[3166594,3166596,3167716,5254245]);galleries[180278]=new gallery(180278,"5398392,2563412,2563405","Portraits","gallery",[2563405,2563412,5398392]);var imageSets=new Object();imageSets[1]="5295857,5276175,5276165,5254600,5254594,5254590,5254481,5254473,5254464,5254439,5254245,3396164,3396112,3271264,3249606,3216639,3216611,3166599,3166594,3154177,3154161,3154156,2916339,2909890,2356255,2355762,2348531,2348514,2348508,2348134";imageSets[2]="2356255,2348103";imageSets[3]="5276175,5276165";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/a1photoimage/images";break}switch(a){case 1:b="http://www1.clikpic.com/a1photoimage/images";break}switch(a){case 2:b="http://admin.clikpic.com/a1photoimage/images";break}switch(a){case 24:b="http://tpc15/clikpic/a1photoimage/images";break}switch(a){case 4:b="http://www.clikchurch.com/a1photoimage/images";break}switch(a){case 5:b="http://www2.clikpic.com/a1photoimage/images";break}switch(a){case 22:b="http://tpc5/clikpic/a1photoimage/images";break}switch(a){case 23:b="http://tpc10/clikpic/a1photoimage/images";break}switch(a){case 25:b="http://tpc16/clikpic/a1photoimage/images";break}switch(a){case 15:b="http://www3.clikpic.com/a1photoimage/images";break}switch(a){case 18:b="http://www4.clikpic.com/a1photoimage/images";break}switch(a){case 19:b="http://www5.clikpic.com/a1photoimage/images";break}switch(a){case 31:b="http://www7.clikpic.com/a1photoimage/images";break}switch(a){case 32:b="http://admin2.clikpic.com/a1photoimage/images";break}switch(a){case 33:b="http://www8.clikpic.com/a1photoimage/images";break}switch(a){case 34:b="http://www9.clikpic.com/a1photoimage/images";break}switch(a){case 35:b="http://admin3.clikpic.com/a1photoimage/images";break}switch(a){case 37:b="http://admin4.clikpic.com/a1photoimage/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="A1 Photo-Images: "+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;resizePhotoInfo();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="A1PHOTOIMAGE">';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+'")'})}}};