function NeuFenster()
{
	InfoFenster=window.open("https://www.bg-bab.ac.at/klassen.php","Zweitfenster","width=800,height=1000,menubar=no,location=no,resizable=no,scrollbars=no,status=no,toolbar=no");
	InfoFenster.focus();
}

function window_open()
{
	Info = window.open("std.htm","Infofenster","height=350,width=245,menubar=no,location=no,resizable=no,scrollbars=no,status=no,toolbar=no");
	Info.focus();
}

function hide()
{
	location.href = 'index.php';
	document.getElementById('Werbung').style.visibility = 'hidden';
}

var werb;
var rpGeschw = 8;
var rpGrad = 0;
var rpX = 170, rpY = 170;
var rpRadius = 150;
var ani_geschw = 8;

function ani_le_ri() {
	x_pos = parseInt(ani.style.left.replace(/px/g,''));
	x_pos = x_pos+=2;
	ani.style.left = x_pos + "px";
	if (x_pos + 71 < document.documentElement.clientWidth) {
		window.setTimeout("ani_le_ri()", 20);
	} else {
		document.getElementById('Animation').style.visibility = 'hidden';
	}
 }

function rpKreis() {
  rpGrad += rpGeschw / 1000;
  if (rpGrad > 360)
    rpGrad = 0;
  werb.style.top = Math.round(rpY + (rpRadius * Math.cos(rpGrad))) + "px";
  werb.style.left = Math.round(rpX + (rpRadius * Math.sin(rpGrad))) + "px";
  window.setTimeout("rpKreis()", 100 / rpGeschw);
}

function Werbung() {
  document.getElementById('Werbung').style.visibility = 'visible';
  werb = document.getElementById("Werbung");
  werb.style.position = "absolute";
  werb.style.top = 0 + "px";
  werb.style.left = 0 + "px";
  rpKreis();
}

function anim() {
  document.getElementById('Animation').style.visibility = 'visible';
  ani = document.getElementById("Animation");
  ani.style.position = "absolute";
  ani.style.top = 100 + Math.round(Math.random() * (document.documentElement.clientHeight-200)) + "px";
  ani.style.left = "-100px";
  ani_le_ri();
}

function bookMark(){

var URL = location.href;
var Text = document.title;

if (navigator.userAgent.match(/Safari/)=="Safari") {
	alert(" \nSie verwenden Safari oder Chrome.\n\nDrücken sie Strg + D\num ein Lesezeichen zu erstellen!");
}

if (navigator.userAgent.match(/Opera/)=="Opera") {
	alert(" \nSie verwenden Opera.\n\nDrücken sie Strg + D\num ein Lesezeichen zu erstellen!");
}
else
{
	if (window.sidebar)
	  {
	  // firefox
	  window.sidebar.addPanel(Text,URL,"");
	  }
	else if(document.all)
	  {
	  // ie
	  window.external.AddFavorite(URL,Text);
	  }
	}
}


function GetMap() {
	
	var map = null;
	var selStyle = VEMapStyle.Aerial;
	var selMode = VEMapMode.Mode2D;
	var zoom = 17;
	var Koordinaten_Karte = new VELatLong(47.8155, 16.240395);
	var Koordinaten_Pin = new VELatLong(47.8160, 16.2403);
	var fixed=0;
	var showSwitch=0;

	map = new VEMap('myMap');
	map.LoadMap(Koordinaten_Karte, zoom, selStyle, fixed, selMode, showSwitch);
	
	var shape = new VEShape(VEShapeType.Pushpin, Koordinaten_Pin);
	shape.SetTitle('BG Babenbergerring');
	shape.SetDescription('<br>Babenbergerring 10<br>A-2700 Wr. Neustadt');
	shape.SetCustomIcon('images/tempel.png');
	shape.SetPhotoURL("http://www.bg-bab.ac.at/images/schule_klein.jpg");
	shape.SetMinZoomLevel(15);
	map.AddShape(shape);
	
	
	/*var options = new VERouteOptions();
	var Koordinaten_Bahnhof = new VELatLong(47.811497351409066, 16.2348747253418);
	options.RouteMode = VERouteMode.Walking;
	map.GetDirections([Koordinaten_Bahnhof, Koordinaten_Karte], options);*/

}

function Karte() {
	GetMap();
}
