﻿// JavaScript Document
	//document.write('<script type="text/javascript" src="../../js/extlargemapcontrol'+(document.location.search.indexOf('packed')>-1?'_packed':'')+'.js"><'+'/script>');
	
	document.write('<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key='+gmapsApiKey+'&amp;hl='+msDirLang+'"><'+'/script>');
	
	//document.write('<script type="text/javascript" src="http://www.google.com/jsapi?key='+gmapsApiKey+'"><'+'/script>');
	
	google.load('maps', '2');

    function startGmaps() {
	//*********************************************************************************************************
           
		  
      
      var map = new GMap2(document.getElementById("mapdiv"));
	  
      map.setCenter(new GLatLng(coordMsX, coordMsY), 14);
	  
	  //add new control
/*	  if (GBrowserIsCompatible()) {
        var extLargeMapControl = new ExtLargeMapControl();
        map.addControl(extLargeMapControl);
      }*/

      // The following line makes the map Earth-enabled by adding the
      // "Earth" button to the map type control.  Note that you still
      // need to add a map type control (GMapTypeControl,
      // GMenuMapTypeControl, or GHierarchicalMapTypeControl) to the
      // the map (as is done below) for the "Earth" button and the rest
      // of the map type buttons to show up at all.
      // Also, be sure you are loading v=2.x of the Maps API and not
      // v=2, otherwise the G_SATELLITE_3D_MAP map type will not
      // work properly.
	  
      map.addMapType(G_SATELLITE_3D_MAP);

      map.addControl(new GHierarchicalMapTypeControl());
      map.addControl(new GLargeMapControl());
      
      var marker = new GMarker(new GLatLng(coordMsX, coordMsY));
	  
      GEvent.addListener(marker, "click", function() {
        
		//open popup window
        marker.openInfoWindowHtml(htmlGmaps);
      });
	  
/*	  	map.addOverlay(new GLayer("com.panoramio.all"));
      	map.addOverlay(new GLayer("org.wikipedia.en"));*/
	  
      map.addOverlay(marker);
      GEvent.trigger(marker, "click");
	  
	  

    }
