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

		/*Home*/
		AddPin(47.41817160075825, 13.682184219360341, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/home_white.png);width:20px;height:30px;'></div>", "<h3>Almfrieden Ramsau</h3>");
		
		/*tour*/
		var suedwandhuette = [new VELatLong(47.45098921628182, 13.618218898773192), new VELatLong(47.454297419700715, 13.622016906738295), new VELatLong(47.45513894701621, 13.622424602508545), new VELatLong(47.45882409766893, 13.621265888214124), new VELatLong(47.459999229192995, 13.617660999298103), new VELatLong(47.45976710652918, 13.615386486053465)];
		AddPolyline( suedwandhuette, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Türlwandhütte - Südwandhütte</h2>", "<p></p>");
		/*tour*/
		var rittisbergrundweg = [new VELatLong(47.422657833910634, 13.62420558929442), new VELatLong(47.42628719262707, 13.613348007202148), new VELatLong(47.42654849679789, 13.60317707061769), new VELatLong(47.42556134090198, 13.59699726104735), new VELatLong(47.42635977724909, 13.59292030334472), new VELatLong(47.425677477850606, 13.58968019485474), new VELatLong(47.423964431874815, 13.583972454071041), new VELatLong(47.42338372567217, 13.57929468154908), new VELatLong(47.41885399744191, 13.572256565094), new VELatLong(47.41660350678252, 13.570904731750494), new VELatLong(47.41165208874293, 13.587684631347665), new VELatLong(47.40947389817763, 13.592298030853266), new VELatLong(47.40839929098179, 13.60309123992921), new VELatLong(47.412378132245685, 13.626523017883297), new VELatLong(47.412378132245685, 13.626523017883297), new VELatLong(47.41635667292127, 13.627681732177718), new VELatLong(47.42079950539131, 13.628025054931642), new VELatLong(47.422657833910634, 13.62420558929442)];
		AddPolyline( rittisbergrundweg, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Rittisbergrundweg</h2>", "<p></p>");
		/*tour*/
		var panoramaweg = [new VELatLong(47.430206618986595, 13.610901832580584), new VELatLong(47.43006146025203, 13.61287593841554), new VELatLong(47.42768079988188, 13.62098693847656), new VELatLong(47.426693665221165, 13.625750541687005), new VELatLong(47.425793614543, 13.629913330078118), new VELatLong(47.42727433491066, 13.630599975585929), new VELatLong(47.42727433491066, 13.63403320312499), new VELatLong(47.42792758065445, 13.636136054992663), new VELatLong(47.4280146794744, 13.644354343414323), new VELatLong(47.42675173247838, 13.653130531311035), new VELatLong(47.42531454903539, 13.65797996520996), new VELatLong(47.42582264867606, 13.662958145141605), new VELatLong(47.42464675347744, 13.664267063140867), new VELatLong(47.4252709974094, 13.665962219238294), new VELatLong(47.42448706198019, 13.670532703399656), new VELatLong(47.42556134090198, 13.674244880676278), new VELatLong(47.42638881106985, 13.677999973297107)];
		AddPolyline( panoramaweg, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Panoramaweg Ramsau</h2>", "<p></p>");
		/*tour*/
		var skiweg = [new VELatLong(47.44974133111485, 13.618433475494394), new VELatLong(47.448159666671636, 13.618347644805914), new VELatLong(47.447971024618425, 13.621351718902604), new VELatLong(47.44673757913495, 13.622939586639395), new VELatLong(47.445460569807764, 13.621394634246812), new VELatLong(47.44277584683084, 13.616652488708489), new VELatLong(47.44175996997393, 13.617618083953861), new VELatLong(47.44071504759839, 13.615794181823746), new VELatLong(47.437986541328826, 13.614807128906254), new VELatLong(47.436767375770536, 13.616008758544917), new VELatLong(47.43434347462225, 13.61446380615233), new VELatLong(47.431904946436575, 13.619034290313726), new VELatLong(47.43440153343992, 13.62735986709595), new VELatLong(47.43345806971563, 13.631737232208264), new VELatLong(47.43264522586608, 13.632938861846926), new VELatLong(47.42744853456839, 13.63392591476442), new VELatLong(47.42765176677374, 13.63480567932128)];
		AddPolyline( skiweg, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Almenweg Ramsau</h2>", "<p></p>");
		/*tour*/
		var rittis = [new VELatLong(47.422657833910634, 13.62420558929442), new VELatLong(47.41995742868514, 13.625879287719725), new VELatLong(47.4174601565011, 13.622703552246106), new VELatLong(47.41385922995397, 13.61004352569581), new VELatLong(47.414614283342786, 13.610858917236342), new VELatLong(47.41571780343677, 13.61051559448242), new VELatLong(47.41525316621584, 13.606867790222159), new VELatLong(47.4166761047568, 13.602662086486806), new VELatLong(47.41734400142382, 13.606309890747067), new VELatLong(47.4191153385105, 13.610601425170902), new VELatLong(47.41946379125075, 13.613734245300279)];
		AddPolyline( rittis, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Rittis - Märchenweg</h2>", "<p></p>");
		/*tour*/
		var Silberkahr = [new VELatLong(47.43551915319531, 13.717020750045778), new VELatLong(47.43948143196977, 13.715121746063225), new VELatLong(47.442209860716346, 13.713490962982195), new VELatLong(47.44337085130866, 13.713512420654315), new VELatLong(47.44380621617513, 13.713083267211912), new VELatLong(47.44376267985063, 13.71267557144166)];
		AddPolyline( Silberkahr, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Silberkahrklamm</h2>", "<p></p>");
		/*tour*/
		var gletscher = [new VELatLong(47.46778925170177, 13.626265525817887), new VELatLong(47.46903670858749, 13.625729084014884), new VELatLong(47.47067576390512, 13.623132705688478), new VELatLong(47.47404074382286, 13.620042800903308), new VELatLong(47.47453386932964, 13.618776798248286), new VELatLong(47.47440333655759, 13.61682415008545), new VELatLong(47.474562876568285, 13.614871501922615), new VELatLong(47.47584643084755, 13.61291885375978), new VELatLong(47.47578841777132, 13.611567020416276), new VELatLong(47.4745411211408, 13.610955476760868)];
		AddPolyline( gletscher, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Gletscherwanderung zur Dachsteinwarte</h2>", "<p></p>");
		/*tour*/
		var Pernerweg = [new VELatLong(47.450147622559456, 13.6175537109375), new VELatLong(47.44782591488634, 13.60708236694336), new VELatLong(47.4512503978022, 13.60948562622072), new VELatLong(47.453920178946326, 13.6024045944214), new VELatLong(47.454152327423145, 13.595795631408686), new VELatLong(47.455922425859185, 13.597726821899402), new VELatLong(47.45751836517065, 13.596568107604979), new VELatLong(47.456734910107045, 13.592791557311998), new VELatLong(47.45772148124455, 13.589959144592303), new VELatLong(47.45728623155397, 13.580989837646474), new VELatLong(47.457663448160645, 13.575496673583979), new VELatLong(47.46439485867022, 13.567342758178714), new VELatLong(47.464757517956606, 13.560798168182364), new VELatLong(47.468238919805785, 13.563394546508805), new VELatLong(47.46974745566581, 13.56697797775267), new VELatLong(47.47003755375196, 13.571419715881346), new VELatLong(47.4692252750756, 13.57644081115723), new VELatLong(47.46558437177419, 13.59749078750611), new VELatLong(47.46493159352538, 13.608713150024426), new VELatLong(47.46335038594635, 13.61448526382445), new VELatLong(47.45973809112414, 13.615257740020743)];
		AddPolyline( Pernerweg, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Pernerweg - die Route über das Tor</h2>", "<p></p>");
		/*tour*/
		var Gutenberghaus = [new VELatLong(47.4272598182465, 13.677914142608662), new VELatLong(47.43203558473963, 13.677635192871099), new VELatLong(47.43633195265374, 13.683686256408686), new VELatLong(47.444081945393634, 13.686990737915057), new VELatLong(47.44660697733151, 13.68836402893068), new VELatLong(47.44811613395017, 13.68759155273439), new VELatLong(47.449306015369864, 13.682913780212392), new VELatLong(47.450844114876695, 13.683900833129886)];
		AddPolyline( Gutenberghaus, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Wanderung zum Guttenberghaus</h2>", "<p></p>");
		/*tour*/
		var Jungfrauen = [new VELatLong(47.43360321908188, 13.631801605224625), new VELatLong(47.44570726720747, 13.632788658142085), new VELatLong(47.44710036022087, 13.635492324829091)];
		AddPolyline( Jungfrauen, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Jungfrauensteig</h2>", "<p></p>");
		/*tour*/
		var Rosegger = [new VELatLong(47.43360321908188, 13.631801605224625), new VELatLong(47.43679640385022, 13.632059097290034), new VELatLong(47.44161484310728, 13.623647689819329)];
		AddPolyline( Rosegger, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Roseggersteig</h2>", "<p></p>");
		/*tour*/
		var Kulmbergrunde = [new VELatLong(47.42123505702344, 13.636436462402347), new VELatLong(47.42158349573476, 13.643066883087146), new VELatLong(47.42013165255694, 13.64800214767455), new VELatLong(47.41743111775579, 13.651049137115479), new VELatLong(47.417387559607825, 13.656499385833735), new VELatLong(47.417590830656756, 13.67145538330079), new VELatLong(47.416443790886774, 13.675017356872571), new VELatLong(47.41388827066912, 13.677334785461415), new VELatLong(47.411390710631615, 13.677442073822014), new VELatLong(47.41057752598941, 13.67521047592162), new VELatLong(47.40842833470778, 13.670361042022694), new VELatLong(47.40742631690588, 13.659353256225584), new VELatLong(47.40800719911326, 13.653752803802487), new VELatLong(47.407978155155035, 13.637316226959241), new VELatLong(47.41618243655785, 13.638303279876702), new VELatLong(47.42123505702344, 13.636264801025385)];
		AddPolyline( Kulmbergrunde, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Kulmbergrunde</h2>", "<p></p>");
		/*tour*/
		var Sattelberg = [new VELatLong(47.41722784609029, 13.675146102905257), new VELatLong(47.418534578818665, 13.682999610900872), new VELatLong(47.421699641459384, 13.696818351745593), new VELatLong(47.422193257930445, 13.702011108398438), new VELatLong(47.42085757915045, 13.711667060852045), new VELatLong(47.4191153385105, 13.708963394165039), new VELatLong(47.41867976934218, 13.70308399200438), new VELatLong(47.42114794698528, 13.695616722106928),];
		AddPolyline( Sattelberg, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Sattelbergweg - Kinderlehrpfad</h2>", "<p></p>");
		/*tour*/
		var Dureggrundweg = [new VELatLong(47.430177587271714, 13.61103057861327), new VELatLong(47.42640332797425, 13.6036491394043), new VELatLong(47.425416169355884, 13.596954345703141), new VELatLong(47.42797113008243, 13.586311340332042), new VELatLong(47.429655013665325, 13.580045700073251), new VELatLong(47.43482245795243, 13.577985763549817), new VELatLong(47.444633399494975, 13.582363128662095), new VELatLong(47.4485224379493, 13.585796356201156), new VELatLong(47.446810135552305, 13.600859642028812), new VELatLong(47.4449236361737, 13.60652446746827), new VELatLong(47.43903151789523, 13.607769012451172), new VELatLong(47.43485148710505, 13.609206676483156), new VELatLong(47.430177587271714, 13.61103057861327)];
		AddPolyline( Dureggrundweg, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Dureggrundweg</h2>", "<p></p>");
		/*tour
		var Jungfrauen = [new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong(), new VELatLong()];
		AddPolyline( Jungfrauen, "<div style='background-image:url(/modules/mod_enzo_wandermaps/images/wandern.png);width:25px;height:25px;'></div>", "<h2>Jungfrauensteig</h2>", "<p></p>");*/
		

		//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);
         $('divInfo').innerHTML = latLong1;
      }*/
	/*addpin*/
	function AddPin(late, lone, icon, infobox)
	{
		var shape = new VEShape(VEShapeType.Pushpin, new VELatLong(late, lone));
        shape.SetCustomIcon(icon);
        //map.ClearInfoBoxStyles();
        //shape.SetTitle("<h2>Pernerhof</h2>");
        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();
});
