
function picWin(pic,ww,wh) {
  var screen_height = screen.height;
  var screen_width  = screen.width;
  var window_center_height = (screen_height - wh)/2;
  var window_center_width  = (screen_width  - ww) /2;
  if (navigator.appName == "Netscape") {
    imagewindow = window.open('sites/bild.php?pict='+pic,'_blank','statusbar=no,toolbar=no,resizable=no,scrollbars=no,menubar=no,status=0,innerWidth='+ww+',innerHeight='+wh+',screenX='+window_center_width+',screenY='+window_center_height+'');
  }
  else {
    imagewindow = window.open('sites/bild.php?pict='+pic,'_blank','statusbar=no,toolbar=no,resizable=no,scrollbars=no,menubar=no,status=0,width='+ww+',height='+wh+',left='+window_center_width+',top='+window_center_height+'');
  }
}
//<![CDATA[
function load() {
			if (GBrowserIsCompatible()) {
				var map = new GMap2(document.getElementById("map"));
				map.addControl(new GLargeMapControl());
				map.addControl(new GMapTypeControl());
				map.setCenter(new GLatLng( 46.50907,8.69164), 7);
				// Die Registerkarten-Inhalte
				text =	"<p style='margin:0;'><b>Gotthard Open</b><br>"+
								"Eishalle Valascia<br>"+
								"CH - 6775 Ambri Piotta</p>";
				planer=	"<form name='form1' method='post' target='_blank' action='' onSubmit='formsend1()'>"+
								"<p style='margin:0;'><b>Ihre Startadresse:</b><br>"+
								"(z.B. Grabenstrasse 4, 7304, Maienfeld)<br>"+
								"<input type='text' name='textfield' id='standort-route'>"+
								"<input type='submit' name='Submit' value='anzeigen'></p>"+
								"</form>";
				var infoTabs = [
					new GInfoWindowTab("Adresse", text),
					new GInfoWindowTab("Routenplaner", planer)
				];
				
				// Setzt den Marker ins Zentrum der Karte und öffnet den Blopp automatisch
				var marker = new GMarker(map.getCenter());
				GEvent.addListener(marker, "click", function() {
					marker.openInfoWindowTabsHtml(infoTabs);
				});
				map.addOverlay(marker);
				marker.openInfoWindowTabsHtml(infoTabs);
			}
		}
		function formsend1(){
			var ort = document.form1.textfield.value;
			document.form1.action = "http://maps.google.de/maps?daddr=Pista+di+ghiaccio+La+Valascia%2C+Ambri+Sopra+72%2C+6775+Quinto%2C+Schweiz&saddr="+ort;
			document.frm.submit();
		}
//]]>