window.addEvent('domready', function(){
	
	var map = null;
	var zoomLevel = 12;
	
	function GetMap()
     {
        map = new VEMap('myMap');
		map.LoadMap(new VELatLong(47.41817160075825, 13.682184219360341), 15, VEMapStyle.Hybrid, false, VEMapMode.Mode2D, true, 1);
        map.SetMouseWheelZoomToCenter(false);

		/*Home*/
		AddPin(47.41817160075825, 13.682184219360341, "<div style='background-image:url(/modules/mod_enzo_sommermaps/images/home.png);width:20px;height:30px;'></div>", "", "Pernerhof");

		

		//map.AttachEvent("onclick", GetLatLong);
     }
	/*latlong anzeige
	function GetLatLong(e)
      {
         var x = e.mapX;
         var y = e.mapY;
         pixel = new VEPixel(x, y);
         latLong1 = map.PixelToLatLong(pixel);
         $('topleiste').getElement('.mitem14').innerHTML = latLong1;
      }*/
	/*addpin*/
	function AddPin(late, lone, icon, infobox, headline)
	{
		var shape = new VEShape(VEShapeType.Pushpin, new VELatLong(late, lone));
        shape.SetCustomIcon(icon);
        //map.ClearInfoBoxStyles();
        shape.SetTitle(headline);
        shape.SetDescription(infobox);
        map.AddShape(shape);
    }
	/*addline*/
	function AddPolyline(points, icon, tit, infobox)
      {
         var shape = new VEShape(VEShapeType.Polyline, points);
         //Set the line color
         var lineColor = new VEColor(203,0,16,1.0);
         shape.SetLineColor(lineColor);
         //Set the line width
         var lineWidth = 4;
         shape.SetLineWidth(lineWidth);
		//Icon
         shape.SetCustomIcon(icon);
		shape.SetTitle(tit);
		shape.SetDescription(infobox);
         //Add the shape the the map
         map.AddShape(shape);
      }
	
	
	
	
	GetMap();
});
