
var imgTitles = new Array();
var imgDescriptions = new Array();
var imgFileNames = new Array();
var currentGallery;
var currentImg;
var currentImgIdx;
var timerIdx = 0;
var doSlideShow=false;
var bImgLoaded = false;

function SetupPageForImage ()
{
	var args=window.document.location.search;
	var argArray = args.split (/[\?&]+/);
	currentImg = argArray[1];
	currentGallery = parseInt (argArray[0], 10); 
	if (currentGallery == 0)
	{
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300661.JPG");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_wip4.jpg");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_wip5.jpg");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300662.JPG");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300660.JPG");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300665.JPG");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300663.JPG");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300664.JPG");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_wip1.jpg");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_wip2.jpg");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300654.JPG");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300667.JPG");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300653.JPG");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300666.JPG");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300655.JPG");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300656.JPG");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300657.JPG");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_wip3.jpg");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_seat_in_progress_kirkcudbright.jpg");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300658.JPG");
		imgTitles.push ("Kirkcudbright Academy Remembrance Garden"); imgDescriptions.push ("Remembrance garden in kirkcudbright academy as featured on the Beechgrove Garden. Features here included a slate pyramid, cobbled spiral, slabbed pathways and dry stone dykes with incorpated  seating."); imgFileNames.push ("../images/galleries/categories/decorative/kirkcudbright_academy/tn_S4300659.JPG");

		imgTitles.push ("Heriot-Watt University grounds linked brochs"); imgDescriptions.push ("A series of six dry stone brochs with turf top.  These brochs were installed as an area where the students at Heriot-Watt University can go to read or study. I have also carried out extensive repointing work to the walls in the walled garden and constructed a dry stone barbeque as well as various other little jobs around the grounds."); imgFileNames.push ("../images/galleries/categories/decorative/herriot_watt_university/tn_S4300731.JPG");
		imgTitles.push ("Heriot-Watt University grounds linked brochs"); imgDescriptions.push ("A series of six dry stone brochs with turf top.  These brochs were installed as an area where the students at Heriot-Watt University can go to read or study. I have also carried out extensive repointing work to the walls in the walled garden and constructed a dry stone barbeque as well as various other little jobs around the grounds."); imgFileNames.push ("../images/galleries/categories/decorative/herriot_watt_university/tn_S4300728.JPG");
		imgTitles.push ("Heriot-Watt University grounds linked brochs"); imgDescriptions.push ("A series of six dry stone brochs with turf top.  These brochs were installed as an area where the students at Heriot-Watt University can go to read or study. I have also carried out extensive repointing work to the walls in the walled garden and constructed a dry stone barbeque as well as various other little jobs around the grounds."); imgFileNames.push ("../images/galleries/categories/decorative/herriot_watt_university/tn_S4300732.JPG");
		imgTitles.push ("Heriot-Watt University grounds linked brochs"); imgDescriptions.push ("A series of six dry stone brochs with turf top.  These brochs were installed as an area where the students at Heriot-Watt University can go to read or study. I have also carried out extensive repointing work to the walls in the walled garden and constructed a dry stone barbeque as well as various other little jobs around the grounds."); imgFileNames.push ("../images/galleries/categories/decorative/herriot_watt_university/tn_S4300729.JPG");
		imgTitles.push ("Heriot-Watt University grounds linked brochs"); imgDescriptions.push ("A series of six dry stone brochs with turf top.  These brochs were installed as an area where the students at Heriot-Watt University can go to read or study. I have also carried out extensive repointing work to the walls in the walled garden and constructed a dry stone barbeque as well as various other little jobs around the grounds."); imgFileNames.push ("../images/galleries/categories/decorative/herriot_watt_university/tn_S4300733.JPG");

		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Fine graded gravel path with york stone slabbed edging on herbaceous border."); imgFileNames.push ("../images/galleries/categories/decorative/johnstoneburn_house/tn_S4300695.JPG");
		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Fine graded gravel path with york stone slabbed edging on herbaceous border."); imgFileNames.push ("../images/galleries/categories/decorative/johnstoneburn_house/tn_S4300696.JPG");
		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Timber edged paths laid out with fine blaze finish (very fine graded gravel) and central dry stone pond with fountain."); imgFileNames.push ("../images/galleries/categories/decorative/johnstoneburn_house/tn_S4300697.JPG");
		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Timber edged paths laid out with fine blaze finish (very fine graded gravel) and central dry stone pond with fountain."); imgFileNames.push ("../images/galleries/categories/decorative/johnstoneburn_house/tn_S4300698.JPG");
		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Timber edged paths laid out with fine blaze finish (very fine graded gravel) and central dry stone pond with fountain."); imgFileNames.push ("../images/galleries/categories/decorative/johnstoneburn_house/tn_S4300699.JPG");
		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Timber edged paths laid out with fine blaze finish (very fine graded gravel) and central dry stone pond with fountain."); imgFileNames.push ("../images/galleries/categories/decorative/johnstoneburn_house/tn_S4300700.JPG");
		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Timber edged paths laid out with fine blaze finish (very fine graded gravel) and central dry stone pond with fountain."); imgFileNames.push ("../images/galleries/categories/decorative/johnstoneburn_house/tn_S4300701.JPG");
		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Timber edged paths laid out with fine blaze finish (very fine graded gravel) and central dry stone pond with fountain."); imgFileNames.push ("../images/galleries/categories/decorative/johnstoneburn_house/tn_S4300702.JPG");
		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Timber edged paths laid out with fine blaze finish (very fine graded gravel) and central dry stone pond with fountain."); imgFileNames.push ("../images/galleries/categories/decorative/johnstoneburn_house/tn_S4300703.JPG");
		
		imgTitles.push ("Windows in walls"); imgDescriptions.push ("This was an interesting idea which added a whole new dimension to an othewise plain masonry wall. There are four windows in total all constructed using granite cube sets, contrasting nicely with the stone of the surrounding wall."); imgFileNames.push ("../images/galleries/categories/decorative/windows_in_walls/tn_S4300715.JPG");
		imgTitles.push ("Windows in walls"); imgDescriptions.push ("This was an interesting idea which added a whole new dimension to an othewise plain masonry wall. There are four windows in total all constructed using granite cube sets, contrasting nicely with the stone of the surrounding wall."); imgFileNames.push ("../images/galleries/categories/decorative/windows_in_walls/tn_S4300716.JPG");
		imgTitles.push ("Windows in walls"); imgDescriptions.push ("This was an interesting idea which added a whole new dimension to an othewise plain masonry wall. There are four windows in total all constructed using granite cube sets, contrasting nicely with the stone of the surrounding wall."); imgFileNames.push ("../images/galleries/categories/decorative/windows_in_walls/tn_S4300717.JPG");
		imgTitles.push ("Windows in walls"); imgDescriptions.push ("This was an interesting idea which added a whole new dimension to an othewise plain masonry wall. There are four windows in total all constructed using granite cube sets, contrasting nicely with the stone of the surrounding wall."); imgFileNames.push ("../images/galleries/categories/decorative/windows_in_walls/tn_S4300718.JPG");
		imgTitles.push ("Windows in walls"); imgDescriptions.push ("This was an interesting idea which added a whole new dimension to an othewise plain masonry wall. There are four windows in total all constructed using granite cube sets, contrasting nicely with the stone of the surrounding wall."); imgFileNames.push ("../images/galleries/categories/decorative/windows_in_walls/tn_S4300719.JPG");

//		imgTitles.push ("B & Q Charity Garden"); imgDescriptions.push (""); imgFileNames.push ("../images/galleries/categories/decorative/b_and_q_charity_garden/tn_S4300714.JPG");
	}
	if (currentGallery == 1)
	{
		imgTitles.push ("Scottish Seabird Centre, North Berwick"); imgDescriptions.push ("Working alongside several other dry stone wallers we completed extensive works to the exterior of the Scottish Seabird Centre.  We used a technique known as cladding to conceal the breezeblock walls with this attractive dry stone work."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/scottish_seabird_centre/tn_S4300704.JPG");
		imgTitles.push ("Scottish Seabird Centre, North Berwick"); imgDescriptions.push ("Working alongside several other dry stone wallers we completed extensive works to the exterior of the Scottish Seabird Centre.  We used a technique known as cladding to conceal the breezeblock walls with this attractive dry stone work."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/scottish_seabird_centre/tn_S4300705.JPG");
		imgTitles.push ("Scottish Seabird Centre, North Berwick"); imgDescriptions.push ("Working alongside several other dry stone wallers we completed extensive works to the exterior of the Scottish Seabird Centre.  We used a technique known as cladding to conceal the breezeblock walls with this attractive dry stone work."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/scottish_seabird_centre/tn_S4300706.JPG");
		imgTitles.push ("Scottish Seabird Centre, North Berwick"); imgDescriptions.push ("Working alongside several other dry stone wallers we completed extensive works to the exterior of the Scottish Seabird Centre.  We used a technique known as cladding to conceal the breezeblock walls with this attractive dry stone work."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/scottish_seabird_centre/tn_S4300707.JPG");
		imgTitles.push ("Scottish Seabird Centre, North Berwick"); imgDescriptions.push ("Working alongside several other dry stone wallers we completed extensive works to the exterior of the Scottish Seabird Centre.  We used a technique known as cladding to conceal the breezeblock walls with this attractive dry stone work."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/scottish_seabird_centre/tn_S4300708.JPG");
		imgTitles.push ("Scottish Seabird Centre, North Berwick"); imgDescriptions.push ("Working alongside several other dry stone wallers we completed extensive works to the exterior of the Scottish Seabird Centre.  We used a technique known as cladding to conceal the breezeblock walls with this attractive dry stone work."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/scottish_seabird_centre/tn_S4300709.JPG");
		imgTitles.push ("Scottish Seabird Centre, North Berwick"); imgDescriptions.push ("Working alongside several other dry stone wallers we completed extensive works to the exterior of the Scottish Seabird Centre.  We used a technique known as cladding to conceal the breezeblock walls with this attractive dry stone work."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/scottish_seabird_centre/tn_S4300710.JPG");
		imgTitles.push ("Scottish Seabird Centre, North Berwick"); imgDescriptions.push ("Working alongside several other dry stone wallers we completed extensive works to the exterior of the Scottish Seabird Centre.  We used a technique known as cladding to conceal the breezeblock walls with this attractive dry stone work."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/scottish_seabird_centre/tn_S4300711.JPG");

		imgTitles.push ("Castle Stewart"); imgDescriptions.push ("This is a project I worked on while still an apprentice. It took several months to complete and featured a two and a half metre high boundary wall with a doorway, an arch, a decorative saltire constructed using slate and several inset seats. The garden also featured a dry stone stage and swimming pool."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/castle_stewart/tn_castle_stewart.jpg");
		imgTitles.push ("Castle Stewart"); imgDescriptions.push ("This is a project I worked on while still an apprentice. It took several months to complete and featured a two and a half metre high boundary wall with a doorway, an arch, a decorative saltire constructed using slate and several inset seats. The garden also featured a dry stone stage and swimming pool."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/castle_stewart/tn_castle_stewart2.jpg");

		imgTitles.push ("Heriot-Watt University grounds linked brochs"); imgDescriptions.push ("A series of six dry stone brochs with turf top.  These brochs were installed as an area where the students at Heriot-Watt University can go to read or study. I have also carried out extensive repointing work to the walls in the walled garden and constructed a dry stone barbeque as well as various other little jobs around the grounds."); imgFileNames.push ("../images/galleries/categories/decorative/herriot_watt_university/tn_S4300731.JPG");
		imgTitles.push ("Heriot-Watt University grounds linked brochs"); imgDescriptions.push ("A series of six dry stone brochs with turf top.  These brochs were installed as an area where the students at Heriot-Watt University can go to read or study. I have also carried out extensive repointing work to the walls in the walled garden and constructed a dry stone barbeque as well as various other little jobs around the grounds."); imgFileNames.push ("../images/galleries/categories/decorative/herriot_watt_university/tn_S4300728.JPG");
		imgTitles.push ("Heriot-Watt University grounds linked brochs"); imgDescriptions.push ("A series of six dry stone brochs with turf top.  These brochs were installed as an area where the students at Heriot-Watt University can go to read or study. I have also carried out extensive repointing work to the walls in the walled garden and constructed a dry stone barbeque as well as various other little jobs around the grounds."); imgFileNames.push ("../images/galleries/categories/decorative/herriot_watt_university/tn_S4300732.JPG");
		imgTitles.push ("Heriot-Watt University grounds linked brochs"); imgDescriptions.push ("A series of six dry stone brochs with turf top.  These brochs were installed as an area where the students at Heriot-Watt University can go to read or study. I have also carried out extensive repointing work to the walls in the walled garden and constructed a dry stone barbeque as well as various other little jobs around the grounds."); imgFileNames.push ("../images/galleries/categories/decorative/herriot_watt_university/tn_S4300729.JPG");
		imgTitles.push ("Heriot-Watt University grounds linked brochs"); imgDescriptions.push ("A series of six dry stone brochs with turf top.  These brochs were installed as an area where the students at Heriot-Watt University can go to read or study. I have also carried out extensive repointing work to the walls in the walled garden and constructed a dry stone barbeque as well as various other little jobs around the grounds."); imgFileNames.push ("../images/galleries/categories/decorative/herriot_watt_university/tn_S4300733.JPG");

		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Reinstatement of dry stone walls around paved seating area with several sets of steps incorporated."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/johnstoneburn_house/tn_S4300688.JPG");
		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Reinstatement of dry stone walls around paved seating area with several sets of steps incorporated."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/johnstoneburn_house/tn_S4300689.JPG");
		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Reinstatement of dry stone walls around paved seating area with several sets of steps incorporated."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/johnstoneburn_house/tn_S4300690.JPG");
		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Reinstatement of dry stone walls around paved seating area with several sets of steps incorporated."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/johnstoneburn_house/tn_S4300691.JPG");
		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Reinstatement of dry stone walls around paved seating area with several sets of steps incorporated."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/johnstoneburn_house/tn_S4300692.JPG");
		imgTitles.push ("Estate gardens"); imgDescriptions.push ("Reinstatement of dry stone walls around paved seating area with several sets of steps incorporated."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/johnstoneburn_house/tn_S4300693.JPG");
					
		imgTitles.push ("Pond with fountain and steps"); imgDescriptions.push ("This pond was constructed using breezeblocks with a liner stretched over the breezeblock and secured beneath the copes. The exterior was then carefully clad in the same stone and style as I used in the surrounding walls and steps. The lizard on the wall above the pond spills water from its mouth."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/kirkhill_gardens_edinburgh/tn_kirkhill_gardens_edinburgh.jpg");
		imgTitles.push ("Pond with fountain and steps"); imgDescriptions.push ("This pond was constructed using breezeblocks with a liner stretched over the breezeblock and secured beneath the copes. The exterior was then carefully clad in the same stone and style as I used in the surrounding walls and steps. The lizard on the wall above the pond spills water from its mouth."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/kirkhill_gardens_edinburgh/tn_kirkhill_gardens_edinburgh2.jpg");
					
		imgTitles.push ("Retaining Wall In Garden"); imgDescriptions.push ("Attractive retaining wall in garden with steps featured either side."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/retaining_wall_in_garden/tn_S4300669.JPG");
		imgTitles.push ("Retaining Wall In Garden"); imgDescriptions.push ("Attractive retaining wall in garden with steps featured either side."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/retaining_wall_in_garden/tn_S4300670.JPG");
		imgTitles.push ("Retaining Wall In Garden"); imgDescriptions.push ("Attractive retaining wall in garden with steps featured either side."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/retaining_wall_in_garden/tn_S4300671.JPG");
		imgTitles.push ("Retaining Wall In Garden"); imgDescriptions.push ("Attractive retaining wall in garden with steps featured either side."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/retaining_wall_in_garden/tn_S4300672.JPG");
					
		imgTitles.push ("Royal Highland Show Ingleston"); imgDescriptions.push ("Dry stone raised bed on roundabout at the offices for the Royal Highland Show. Also display wall with pillars at one of the main gates into the Highland Show grounds at Ingleston."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/royal_highland_show_ingleston/tn_roundabout_highland_show_of.jpg");
		imgTitles.push ("Royal Highland Show Ingleston"); imgDescriptions.push ("Dry stone raised bed on roundabout at the offices for the Royal Highland Show. Also display wall with pillars at one of the main gates into the Highland Show grounds at Ingleston."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/royal_highland_show_ingleston/tn_royal_highland_show_inglest.jpg");
					
		imgTitles.push ("Miscellaneous Jobs"); imgDescriptions.push ("Constructing dry stone arch over stream."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/miscellaneous/tn_arch_over_stream.jpg");
		imgTitles.push ("Miscellaneous Jobs"); imgDescriptions.push ("Dry stone wall lining the driveway of a property in Edinburgh with hand dressed copes."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/miscellaneous/tn_barnton_edinburgh.jpg");
		imgTitles.push ("Miscellaneous Jobs"); imgDescriptions.push ("Dry stone work at caravan park in Berwick upon Tweed."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/miscellaneous/tn_berwick_upon_tweed_caravan_.jpg");
		imgTitles.push ("Miscellaneous Jobs"); imgDescriptions.push ("Dry stone wall around seating area in garden."); imgFileNames.push ("../images/galleries/categories/dry_stone_work/miscellaneous/tn_wall_with_2_stairs.jpg");
	}
	if (currentGallery == 2)
	{
		imgTitles.push ("Pillars"); imgDescriptions.push ("Pillars supporting gates at Heriot-Watt University."); imgFileNames.push ("../images/galleries/categories/masonry/pillars/tn_S4300736.JPG");
		imgTitles.push ("Pillars"); imgDescriptions.push ("Pillars supporting gates at Heriot-Watt University."); imgFileNames.push ("../images/galleries/categories/masonry/pillars/tn_S4300737.JPG");

		imgTitles.push ("Repair work, Edinburgh"); imgDescriptions.push ("Repair to masonry wall on curve in Edinburgh."); imgFileNames.push ("../images/galleries/categories/masonry/repair_work_edinburgh/tn_S4300720.JPG");
		imgTitles.push ("Repair work, Edinburgh"); imgDescriptions.push ("Repair to masonry wall on curve in Edinburgh."); imgFileNames.push ("../images/galleries/categories/masonry/repair_work_edinburgh/tn_S4300721.JPG");

		imgTitles.push ("St Andrews bus station"); imgDescriptions.push ("One of the more interesting masonry jobs I have worked on, we had move this wall stone by stone five metres back to widen the road.  This was done by carefully numbering and photographing each of the stones as we stripped the wall down to ensure we reconstructed it as it was originally."); imgFileNames.push ("../images/galleries/categories/masonry/st_andrews/tn_S4300646.JPG");
		imgTitles.push ("St Andrews bus station"); imgDescriptions.push ("One of the more interesting masonry jobs I have worked on, we had move this wall stone by stone five metres back to widen the road.  This was done by carefully numbering and photographing each of the stones as we stripped the wall down to ensure we reconstructed it as it was originally."); imgFileNames.push ("../images/galleries/categories/masonry/st_andrews/tn_S4300647.JPG");
		imgTitles.push ("St Andrews bus station"); imgDescriptions.push ("One of the more interesting masonry jobs I have worked on, we had move this wall stone by stone five metres back to widen the road.  This was done by carefully numbering and photographing each of the stones as we stripped the wall down to ensure we reconstructed it as it was originally."); imgFileNames.push ("../images/galleries/categories/masonry/st_andrews/tn_S4300648.JPG");
		imgTitles.push ("St Andrews bus station"); imgDescriptions.push ("One of the more interesting masonry jobs I have worked on, we had move this wall stone by stone five metres back to widen the road.  This was done by carefully numbering and photographing each of the stones as we stripped the wall down to ensure we reconstructed it as it was originally."); imgFileNames.push ("../images/galleries/categories/masonry/st_andrews/tn_S4300649.JPG");
//		imgTitles.push ("St Andrews bus station"); imgDescriptions.push ("One of the more interesting masonry jobs I have worked on, we had move this wall stone by stone five metres back to widen the road.  This was done by carefully numbering and photographing each of the stones as we stripped the wall down to ensure we reconstructed it as it was originally."); imgFileNames.push ("../images/galleries/categories/masonry/st_andrews/tn_S4300650.JPG");
//		imgTitles.push ("St Andrews bus station"); imgDescriptions.push ("One of the more interesting masonry jobs I have worked on, we had move this wall stone by stone five metres back to widen the road.  This was done by carefully numbering and photographing each of the stones as we stripped the wall down to ensure we reconstructed it as it was originally."); imgFileNames.push ("../images/galleries/categories/masonry/st_andrews/tn_S4300651.JPG");
		imgTitles.push ("St Andrews bus station"); imgDescriptions.push ("One of the more interesting masonry jobs I have worked on, we had move this wall stone by stone five metres back to widen the road.  This was done by carefully numbering and photographing each of the stones as we stripped the wall down to ensure we reconstructed it as it was originally."); imgFileNames.push ("../images/galleries/categories/masonry/st_andrews/tn_S4300652.JPG");

		imgTitles.push ("Succoth Avenue, Edinburgh"); imgDescriptions.push ("New masonry wall bordering garden with pillar."); imgFileNames.push ("../images/galleries/categories/masonry/succoth_avenue/tn_S4300722.JPG");
		imgTitles.push ("Succoth Avenue, Edinburgh"); imgDescriptions.push ("New masonry wall bordering garden with pillar."); imgFileNames.push ("../images/galleries/categories/masonry/succoth_avenue/tn_S4300723.JPG");
		imgTitles.push ("Succoth Avenue, Edinburgh"); imgDescriptions.push ("New masonry wall bordering garden with pillar."); imgFileNames.push ("../images/galleries/categories/masonry/succoth_avenue/tn_S4300724.JPG");
		imgTitles.push ("Succoth Avenue, Edinburgh"); imgDescriptions.push ("New masonry wall bordering garden with pillar."); imgFileNames.push ("../images/galleries/categories/masonry/succoth_avenue/tn_S4300725.JPG");
		imgTitles.push ("Succoth Avenue, Edinburgh"); imgDescriptions.push ("New masonry wall bordering garden with pillar."); imgFileNames.push ("../images/galleries/categories/masonry/succoth_avenue/tn_S4300726.JPG");

		imgTitles.push ("Roadside wall, Edinburgh"); imgDescriptions.push ("This wall had to be stripped down and moved 3 metres back to widen the road. This was another project at Heriot-Watt University."); imgFileNames.push ("../images/galleries/categories/masonry/more_masonry_work/tn_S4300734.JPG");
		imgTitles.push ("Roadside wall, Edinburgh"); imgDescriptions.push ("This wall had to be stripped down and moved 3 metres back to widen the road. This was another project at Heriot-Watt University."); imgFileNames.push ("../images/galleries/categories/masonry/more_masonry_work/tn_S4300735.JPG");
	}
	if (currentGallery == 3)
	{
		imgTitles.push ("Australia"); imgDescriptions.push ("The covers for this wall had to be cut and dressed by hand to a uniform size. This was a painstaking process, but achieved a very pleasing result."); imgFileNames.push ("../images/galleries/categories/projects_abroad/australia/tn_australia_dressing_stone.jpg");
		imgTitles.push ("Australia"); imgDescriptions.push ("The covers for this wall had to be cut and dressed by hand to a uniform size. This was a painstaking process, but achieved a very pleasing result."); imgFileNames.push ("../images/galleries/categories/projects_abroad/australia/tn_australia1.jpg");
		imgTitles.push ("Australia"); imgDescriptions.push ("When this wall was built it was the highest free standing dry stone wall in the southern hemisphere, standing at five metres at its highest through to three and a half at its lowest. This is an excellent example of the size and strength which can be achieved using the art of dry stone walling."); imgFileNames.push ("../images/galleries/categories/projects_abroad/australia/tn_australia_one_big_frame.jpg");
		imgTitles.push ("Australia"); imgDescriptions.push ("When this wall was built it was the highest free standing dry stone wall in the southern hemisphere, standing at five metres at its highest through to three and a half at its lowest. This is an excellent example of the size and strength which can be achieved using the art of dry stone walling."); imgFileNames.push ("../images/galleries/categories/projects_abroad/australia/tn_australia_rock_pile.jpg");
		imgTitles.push ("Australia"); imgDescriptions.push ("When this wall was built it was the highest free standing dry stone wall in the southern hemisphere, standing at five metres at its highest through to three and a half at its lowest. This is an excellent example of the size and strength which can be achieved using the art of dry stone walling."); imgFileNames.push ("../images/galleries/categories/projects_abroad/australia/tn_australia_wide_angle.jpg");

		imgTitles.push ("Lexington, Kentucky"); imgDescriptions.push ("This was the first job I worked on with the Dry Stone Conservancy. It was a restoration of a dry stone wall around a family cemetary."); imgFileNames.push ("../images/galleries/categories/projects_abroad/lexington_kentucky/tn_boundary_wall.jpg");
		imgTitles.push ("Lexington, Kentucky"); imgDescriptions.push ("This was the first job I worked on with the Dry Stone Conservancy. It was a restoration of a dry stone wall around a family cemetary."); imgFileNames.push ("../images/galleries/categories/projects_abroad/lexington_kentucky/tn_family_cemetary_wall2.jpg");
		imgTitles.push ("Lexington, Kentucky"); imgDescriptions.push ("This was the first job I worked on with the Dry Stone Conservancy. It was a restoration of a dry stone wall around a family cemetary."); imgFileNames.push ("../images/galleries/categories/projects_abroad/lexington_kentucky/tn_family_cemetary_wall.jpg");

		imgTitles.push ("Cherokee National Park, Kentucky"); imgDescriptions.push ("Once again working with the Dry Stone Conservancy this was a project to restore a large retaining wall supporting a roadway in the Cherokee National Park in Louisville, Kentucky."); imgFileNames.push ("../images/galleries/categories/projects_abroad/louisville_cherokee_national_park/tn_louisville1.jpg");
		imgTitles.push ("Cherokee National Park, Kentucky"); imgDescriptions.push ("Once again working with the Dry Stone Conservancy this was a project to restore a large retaining wall supporting a roadway in the Cherokee National Park in Louisville, Kentucky."); imgFileNames.push ("../images/galleries/categories/projects_abroad/louisville_cherokee_national_park/tn_louisville2.jpg");
		imgTitles.push ("Cherokee National Park, Kentucky"); imgDescriptions.push ("Once again working with the Dry Stone Conservancy this was a project to restore a large retaining wall supporting a roadway in the Cherokee National Park in Louisville, Kentucky."); imgFileNames.push ("../images/galleries/categories/projects_abroad/louisville_cherokee_national_park/tn_louisville.jpg");

		imgTitles.push ("Chalet in the Alps, Switzerland"); imgDescriptions.push ("This was a particularly nice job, set high in the Swiss Alps with breathtaking views over Lake Geneva. Working alongside dykers from Switzerland, Italy and Germany, myself and two colleagues from Scotland constructed this free-standing boundary wall with a larger semi-retaining section on the roadside."); imgFileNames.push ("../images/galleries/categories/projects_abroad/switzerland/alps/tn_switzerland_2a.jpg");
		imgTitles.push ("Chalet in the Alps, Switzerland"); imgDescriptions.push ("This was a particularly nice job, set high in the Swiss Alps with breathtaking views over Lake Geneva. Working alongside dykers from Switzerland, Italy and Germany, myself and two colleagues from Scotland constructed this free-standing boundary wall with a larger semi-retaining section on the roadside."); imgFileNames.push ("../images/galleries/categories/projects_abroad/switzerland/alps/tn_switzerland_2b.jpg");
		imgTitles.push ("Chalet in the Alps, Switzerland"); imgDescriptions.push ("This was a particularly nice job, set high in the Swiss Alps with breathtaking views over Lake Geneva. Working alongside dykers from Switzerland, Italy and Germany, myself and two colleagues from Scotland constructed this free-standing boundary wall with a larger semi-retaining section on the roadside."); imgFileNames.push ("../images/galleries/categories/projects_abroad/switzerland/alps/tn_switzerland_2c.jpg");
		imgTitles.push ("Chalet in the Alps, Switzerland"); imgDescriptions.push ("This was a particularly nice job, set high in the Swiss Alps with breathtaking views over Lake Geneva. Working alongside dykers from Switzerland, Italy and Germany, myself and two colleagues from Scotland constructed this free-standing boundary wall with a larger semi-retaining section on the roadside."); imgFileNames.push ("../images/galleries/categories/projects_abroad/switzerland/alps/tn_switzerland_2d.jpg");

		imgTitles.push ("Garden wall, Switzerland"); imgDescriptions.push ("Traditional dry stone wall in a typically picturesque Swiss vilage."); imgFileNames.push ("../images/galleries/categories/projects_abroad/switzerland/garden/tn_switzerland_garden1.jpg");
		imgTitles.push ("Garden wall, Switzerland"); imgDescriptions.push ("Traditional dry stone wall in a typically picturesque Swiss vilage."); imgFileNames.push ("../images/galleries/categories/projects_abroad/switzerland/garden/tn_switzerland_garden2.jpg");

		imgTitles.push ("Potomac Canal, Washington DC"); imgDescriptions.push ("Reinstatement of retaining wall on the Potomac canal in Washington, DC.  This is another example of the work the Dry Stone Conservancy do all over America to maintain the traditional dry stone walls (stone fences as they call them). Almost every single stone on the face of this wall had to be slung and placed using a crane, making this one of the more challenging jobs I have worked on."); imgFileNames.push ("../images/galleries/categories/projects_abroad/washington_dc_potomac_canal/tn_potomac1.jpg");
		imgTitles.push ("Potomac Canal, Washington DC"); imgDescriptions.push ("Reinstatement of retaining wall on the Potomac canal in Washington, DC.  This is another example of the work the Dry Stone Conservancy do all over America to maintain the traditional dry stone walls (stone fences as they call them). Almost every single stone on the face of this wall had to be slung and placed using a crane, making this one of the more challenging jobs I have worked on."); imgFileNames.push ("../images/galleries/categories/projects_abroad/washington_dc_potomac_canal/tn_potomac2.jpg");
		imgTitles.push ("Potomac Canal, Washington DC"); imgDescriptions.push ("Reinstatement of retaining wall on the Potomac canal in Washington, DC.  This is another example of the work the Dry Stone Conservancy do all over America to maintain the traditional dry stone walls (stone fences as they call them). Almost every single stone on the face of this wall had to be slung and placed using a crane, making this one of the more challenging jobs I have worked on."); imgFileNames.push ("../images/galleries/categories/projects_abroad/washington_dc_potomac_canal/tn_potomac3.jpg");
	}
	
	// Figure out which index it was
	if (argArray.length == 3 && argArray[2] == "slideshow")
	{
		ToggleSlideshow ();
	}

	SetCurrentPicture (currentImg);
}

function ImgLoaded ()
{
	if (doSlideShow)
	{
		timerIdx = window.setTimeout ("NextPicture();", 5000);
	}
	bImgLoaded = true;
}

function SetCurrentPicture (idx)
{
	currentImg = parseInt(idx,10);
	window.document.getElementById("sub_category").innerText=imgTitles[currentImg];
	window.document.getElementById("photo_description").innerText=imgDescriptions[currentImg];
	var fileName = imgFileNames[currentImg]
	fileName = fileName.replace (/\/tn_/,"/");
	bImgLoaded = false;
	window.document.getElementById("image").src=fileName;
	window.document.getElementById("img_title").scrollIntoView();

	if (currentImg == 0)
	{
		window.document.getElementById("previous_picture").style.visibility = "hidden";
		window.document.getElementById("go_to_start").style.visibility = "hidden";
	}
	else
	{
		window.document.getElementById("previous_picture").style.visibility = "visible";
		window.document.getElementById("go_to_start").style.visibility = "visible";
	}
	if (currentImg == imgTitles.length - 1)
	{
		if (doSlideShow)
		{
			ToggleSlideshow ();
		}
		window.document.getElementById("toggle_slideshow").style.visibility = "hidden";
		window.document.getElementById("go_to_end.style").visibility = "hidden";
		window.document.getElementById("next_picture.style").visibility = "hidden";
	}
	else
	{
		window.document.getElementById("toggle_slideshow").style.visibility = "visible";
		window.document.getElementById("go_to_end").style.visibility = "visible";
		window.document.getElementById("next_picture").style.visibility = "visible";
	}
}

function PrevPicture ()
{
	if (timerIdx > 0)
	{
		window.clearTimeout (timerIdx);
	}
	if (currentImg > 0)
	{
		SetCurrentPicture (currentImg - 1);
	}
}

function NextPicture ()
{
	if (timerIdx > 0)
	{
		window.clearTimeout (timerIdx);
	}
	if (currentImg < imgTitles.length - 1)
	{
		SetCurrentPicture (currentImg + 1);
	}
}

function ToggleSlideshow ()
{
	doSlideShow = ! doSlideShow;
	
	if (doSlideShow)
	{
		window.document.getElementById("toggle_slideshow").innerText = "Stop Slideshow";
		if (bImgLoaded && timerIdx == 0)
		{
			ImgLoaded ();
		}		
	}
	else
	{
		if (timerIdx > 0)
		{
			window.clearTimeout (timerIdx);
			timerIdx = 0;
		}
		window.document.getElementById("toggle_slideshow").innerText = "Start Slideshow";		
	}
}

function BackToGallery ()
{
	if (currentGallery == 0)
	{
		window.location = "gallery_decorative.html#thumb_" + currentImg;
	}
	if (currentGallery == 1)
	{
		window.location = "gallery_dry_stone_work.html#thumb_" + currentImg;
	}
	if (currentGallery == 2)
	{
		window.location = "gallery_masonry.html#thumb_" + currentImg;
	}
	if (currentGallery == 3)
	{
		window.location = "gallery_projects_abroad.html#thumb_" + currentImg;
	}
}
