//window.onload = load();
//window.onunload = GUnload();

function load () {

	

var map = document.getElementById("map");
	if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(40.35062427268473,-3.8757920265197754), 12);


var html = "<div class=\"bubble\">";
html += "<h1>Valverauto, S.A</h1>";
html += "<p>Pol. Las Nieves</p>";
html += "<p>C/ Puerto de Guadarrama, 30</p>";
html += "<p>28955-Móstoles (Madrid)</p>";
html += "<p>Tno. 91 616 16 56";
html += "</p></div>";

html2 = "<div class='infobox'><img src='./pix/meet.png'"+
			"width='24' height='24'>Direcciones:  <b>Hasta Aquí </b>" + 
			"<br />Introduzca su dirección Inicial<form action='http://maps.google.es/maps' method='get' " +
			"target='_blank'>" +
			"<input type='text' SIZE=30 MAXLENGTH=180 name='saddr' id='saddr' value=''><br />Ejemplo:Duero, 1, villaviciosa de odón, madrid<br />" +
			"<INPUT value='Enviar' TYPE='SUBMIT'>" +
			"<input type='hidden' name='daddr' value='" + 40.35062427268473 + "," + -3.8757920265197754 + "'></form></div>";



// Place a marker in the center of the map and open the info window
// automatically
var marker = new GMarker(map.getCenter());
GEvent.addListener(marker, "click", function() {
  marker.openInfoWindowTabsHtml([new GInfoWindowTab("Situación",html),new GInfoWindowTab("Cómo llegar", html2)]);
});
map.addOverlay(marker);
//Se abre la burbuja informativa
marker.openInfoWindowTabsHtml([new GInfoWindowTab("Situación",html), new GInfoWindowTab("Cómo llegar", html2)]);
	
	

		
	}
 	else {
		alert("Sorry, your browser cannot handle the true power of Google Maps");
	}
}





