// Google Webcam Map

//    <script type="text/javascript">


function displarge(url) {
 document.getElementById("largeimg").src = "./loading.jpg";
 document.getElementById("largeimg").src = url;
 document.getElementById("picsurround").style.display = 'block';
}


    //<![CDATA[

    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
   		map.addControl(new GLargeMapControl());
		//map.addControl(new GMapTypeControl());
		//map.addControl(new GOverviewMapControl());
		map.setCenter(new GLatLng(54.438103, -3.050079), 10, G_HYBRID_MAP);
		

   		// Create webcam icons
		var icon = new GIcon();
		icon.image = "assets/images/webcamicon.png";
		icon.iconSize=new GSize(32,32);
   		icon.shadowSize=new GSize(56,32);
  		icon.iconAnchor=new GPoint(16,32);
  		icon.infoWindowAnchor=new GPoint(16,0);
		
		// Creates a marker at the given point with the given html
		
		function createMarker(point, html, icon) {
		  var marker = new GMarker(point, icon);
		   GEvent.addListener(marker, "click", function() {
		  //GEvent.addListener(marker, "mouseover", function() {
			marker.openInfoWindowHtml(html);
			//map.setCenter(point, 13);
		  });
		 // GEvent.addListener(marker, "mouseout", function() {
		//	marker.closeInfoWindowHtml(html);
			//map.setCenter(point, 13);
		 // });
		  GEvent.addListener(marker, 'infowindowclose', function() { 
	        // This event resets the map centre when info window closes. 
        	//map.setCenter(new GLatLng(54.438103, -3.050079), 10, G_HYBRID_MAP); 
			 map.panTo(new GLatLng(54.438103, -3.050079));
  		  });
		  return marker;
		 }
		
		//		   GEvent.addListener(marker, 'infowindowclose', function() { 
	        // This event resets the map centre when info window closes. 
        //	map.setCenter(GLatLng(54.438103, -3.050079), 10, G_HYBRID_MAP);       
  		//  });
		//  
		
		// Lorton
// 		var point = new GLatLng(54.618920, -3.310000);
//		map.addOverlay(createMarker(point, '<div class="bubble"><img src="http://lakelandbarn.co.uk/cam/cam01.jpg" alt="" width="576" height="432"/><p><strong>Lorton Weather Webcam</strong> - Lorton Vale looking South towards<br />Hopegill Head and Whiteside<br /><br />Visit <a href="http://www.lortonweather.co.uk/" target="_blank">Lorton Weather</a>, live weather data for the north west<br />Lake District.</p></div>', icon));
		// Keswick
		var point = new GLatLng(54.600138,-3.136575);
		map.addOverlay(createMarker(point, '<div class="bubble"><img src="http://www.dedicam.co.uk/fullsize.jpg" alt="" width="352" height="288" /><p><strong>George Fisher Webcam</strong> - Keswick looking North<br />towards Skidaw and Blencathra<br /><br />Visit <a href="http://www.georgefisheronline.co.uk/" target="_blank">George Fisher</a> outdoor equipment specialist.</p></div>', icon));
		// Coniston
		var point = new GLatLng(54.368915,-3.076276);
		map.addOverlay(createMarker(point, '<div class="bubble"><a href="http://www.coppermines.co.uk/webcam32.jpg" target="_blank"><img src="http://www.coppermines.co.uk/webcam32.jpg" alt="" width="426" height="319"/></a><p><strong>Coniston Webcam</strong> - Coniston town centre looking<br />towards St. Andrews Church, Barclays Bank,<br />the Yewdale Hotel and down to the Crown Inn.<br /><br />Curtesy of<br /><a href="http://www.coppermines.co.uk/" target="_blank">Coniston Coppermines & Lakes holiday cottages</a></p></div>', icon));
		// Bassenthwaite
		var point = new GLatLng(54.681190, -3.232750);
		map.addOverlay(createMarker(point, '<div class="bubble"><img src="http://intermedia.remotemanager.co.uk/image/1000/-/tmp/?cam=cad9c67ceb7bd2608b628b8e235f96f6&b=no&f=yes&c=yes&q=50&m=yes&_nocache=3a8ee4471d7570cc20865d9554f9c666" alt="" width="426" height="320"/><p><strong>Armathwaite Hall Webcam</strong> - Looking south towards<br />Bassenthwaite Lake.<br /><br />Curtesy of <a href="http://www.armathwaite-hall.com" target="_blank"> Armathwaite Hall luxury hotel</a></p></div>', icon));
		// Osprey Watch
		var point = new GLatLng(54.638727, -3.224916);
		map.addOverlay(createMarker(point, '<div class="bubble"><img src="http://www.bbc.co.uk/cumbria/webcams/livecam/osprey_latest.jpg" alt="" width="384" height="288"/><p><strong>Osprey Watch Webcam</strong> - the osprey nest overlooking <br />Bassenthwaite lake, updated every 10 minutes from<br />10am until around 3pm.<br /><br />Visit the <a href="http://www.ospreywatch.co.uk" target="_blank"> Lake District Osprey Project</a> for the latest news</p></div>', icon));
		// Windermere Ferry
	var point = new GLatLng(54.353170, -2.938900);
	map.addOverlay(createMarker(point, '<div class="bubble"><a href="http://ferrycam.remotemanager.co.uk/image/1000/-/tmp/?cam=3df2b8ebdf92e80f5f311bcd7d4ee823&amp;b=no&amp;f=yes&amp;c=yes&amp;q=70&amp;m=yes&amp;_nocache=6dca2e9ff3bed1e126ee3fd5d02af62e" target="_blank"><img src=http://ferrycam.remotemanager.co.uk/image/1000/-/tmp/?cam=3df2b8ebdf92e80f5f311bcd7d4ee823&amp;b=no&amp;f=yes&amp;c=yes&amp;q=70&amp;m=yes&amp;_nocache=6dca2e9ff3bed1e126ee3fd5d02af62e" alt="" width="426" height="320"/></a><p><strong>Windermere Ferry Videocam</strong><br />Looking Eastwards across Windermere.<br /><br />Curtesy of the <br /><a href="http://www.fba.org.uk/" target="_blank">Freshwater Biological Association</a></p></div>', icon));
	//map.addOverlay(createMarker(point, '<div class="bubble"><a href="http://webcam.fba.org.uk/axis-cgi/mjpg/video.cgi?resolution=426x319" target="_blank"><img src="http://webcam.fba.org.uk/axis-cgi/mjpg/video.cgi?resolution=240x180" alt="" width="240" height="180"/></a><p><strong>Windermere Ferry Videocam</strong><br />Looking Eastwards across Windermere.<br /><br />Curtesy of the <br /><a href="http://www.fba.org.uk/" target="_blank">Freshwater Biological Association</a></p></div>', icon));
		// Consiton
//		var point = new GLatLng(54.365919444444,-3.0496480555556);
//		map.addOverlay(createMarker(point, '<div class="bubble"><a href="http://bankground-cumbria.remotemanager.co.uk/image/1000/-/tmp/?cam=ff068e2de82d41b923a0fe4ae0116f3f&b=no&f=yes&c=yes&q=50&m=yes&_nocache=6e8997dc6e5da7e69da26defc7b8ef74" target="_blank"><img src="http://bankground-cumbria.remotemanager.co.uk/image/1000/-/tmp/?cam=ff068e2de82d41b923a0fe4ae0116f3f&b=no&f=yes&c=yes&q=50&m=yes&_nocache=6e8997dc6e5da7e69da26defc7b8ef74" alt="" width="426" height="320"/></a><p><strong>Bank Ground Coniston Webcam</strong> - aspect changes to<br />looking in all directions.<br /><br />Curtesy of the <a href="http://www.bankground.com/" target="_blank">Bank Ground</a> bed & breakfast and self-catering<br />holiday cottage accommodation</p></div>', icon));
		// Scafell
		var point = new GLatLng(54.399263,-3.269398);
		map.addOverlay(createMarker(point, '<div class="bubble"><img src="http://www.brookhouseinn.co.uk/public/images/scawfell.jpg" alt="" width="320" height="240"/><p><strong>Scafell Webcam</strong> - Looking North East from Boot<br />towards Black Apron with Scafell in the<br />background.<br /><br />Curtesy of the <a href="http://www.brookhouseinn.co.uk" target="_blank">Brook House Inn</a> country inn,<br /> restaurant and hotel</p></div>', icon));		

}
	  
	  
    }

    //]]>
//    </script>  