/* <![CDATA[ */ 

function initialize() {
      

			//create a map object
        		var abmap = new GMap2(document.getElementById("myMap"));

			


			//set the co-ordinates 
			var location = new GLatLng(57.269900, -3.733000);

			var centre= new GLatLng(57.264000, -3.740000);


			

			// set centre of the map and the scale	
			abmap.setCenter(centre, 10);

			//set the address
        		var abAddress = ("Garten House" + "<br />" + "Boat of Garten" + "<br />" + "Inverness-shire" + "<br />" + "PH24 3BX");

			//create the marker and position it on the map
        		var abmarker = new GMarker(location);
			abmap.addOverlay(abmarker);
				

			  
        //create a listener for the balloon for the mouse click
			GEvent.addListener(abmarker, "click", function() 
				{
    				abmarker.openInfoWindowHtml(abAddress);
  				});

			abmap.addOverlay(abmarker);

			//create controls for direction and zoom
			abmap.addControl(new GSmallMapControl());

			abmap.addControl(new LocalSearch());


  
      			}


/* ]]> */

/* <![CDATA[ */ 


// create an object to hold the images and captions



var show = [ 
	    { "caption":"Outside", "image":"1.jpg"}, 
	    { "caption":"Livingroom", "image":"2.jpg"}, 
	    { "caption":"Bedroom", "image":"3.jpg"}, 
	    { "caption":"Kitchen", "image":"4.jpg"}, 
	    { "caption":"Conservatory", "image":"5.jpg"}, 
	    { "caption":"Bathroom", "image":"6.jpg"},
	    { "caption":"Outside2", "image":"7.jpg"},
	    { "caption":"Livingroom", "image":"8.jpg"}, 
	    { "caption":"Bedroom", "image":"9.jpg"}, 
	    { "caption":"Kitchen", "image":"10.jpg"}, 
	    { "caption":"Conservatory", "image":"11.jpg"}, 
	    { "caption":"Bathroom", "image":"12.jpg"},
	    { "caption":"Outside2", "image":"13.jpg"},
	    { "caption":"Livingroom", "image":"14.jpg"}, 
	    { "caption":"Bedroom", "image":"15.jpg"}, 
	    { "caption":"Kitchen", "image":"16.jpg"}, 
	    { "caption":"Conservatory", "image":"17.jpg"}, 
	    { "caption":"Bathroom", "image":"18.jpg"},
	    { "caption":"Outside2", "image":"19.jpg"},
	    { "caption":"Outside2", "image":"20.jpg"},
	    { "caption":"View", "image":"21.jpg"}
	   ]; 

var counter=0;

function slideshow(){
			
		    // step through the images
	            if (counter<20) counter++;
		    else   counter=0;
			
		    // display the image and caption from the object
	
		    document.images.slide.src=(show[counter]["image"]);
		    //document.getElementById("dynamiccaption").innerHTML=(show[counter]["caption"]);
			
				    
		    //call function "slideshow()" every second to step through the images
		    timer=setTimeout("slideshow()",2000);	
		    
		   }



function stopshow(){
		
		   // stop calling the slideshow() function
		   clearTimeout(timer);
		   
		   }



function forward(){

		   // stop calling the slideshow() function
		   // clearTimeout(timer);
		     
		   // step through the images
       	           if (counter!=20) counter++;
		   else counter=0;

		   // display the image and caption from the object
		   document.images.slide.src=(show[counter]["image"]);
		   // document.getElementById("dynamiccaption").innerHTML=(show[counter]["caption"]);
		   
		  }


function back(){

		// stop calling the slideshow() function
	        // clearTimeout(timer);
		
		// step through the images	
		if (counter!=0)	counter--;
		else counter=20;
			
		
	        // display the image and caption from the object
		document.images.slide.src=(show[counter]["image"]);
		// document.getElementById("dynamiccaption").innerHTML=(show[counter]["caption"]);
			
	       }


/* ]]> */ 

