var latitude = -25.446018;
var longitude = -49.292269;

function eventoOnLoad() {
	window.focus();
	redimensionar();
	if(GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("map"));
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.setCenter(new GLatLng(latitude, longitude), 15);
		map.openInfoWindow(map.getCenter(), document.getElementById('endereco'))
	}
}

function redimensionar() {
	// VERIFICAR A ALTURA E LARGURA INTERNA DO BROWSER: =============
	if (self.innerHeight) {	
		// todos browsers menos o IE:
		largura = self.innerWidth;
		altura = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		// IE em strict mode:
		largura  = document.documentElement.clientWidth;
		altura = document.documentElement.clientHeight;
	} else if (document.body) {
		// outros explorers:
		largura = document.body.clientWidth;
		altura = document.body.clientHeight;
	}
	document.getElementById('map').style.width = largura + 'px';
	document.getElementById('map').style.height = altura + 'px';
}
window.onresize = redimensionar;

