
function unload() { 
	if ( app ) {
		app.destruct();
		delete app;
	}
}
function resize() { resizeMap(); }

function fullScreenButtonPressed() {
	var button = _$('expand_button');
	if ( button.value == _s("grosse Karte",true) ) {
		expandWindow();
		resizeMap();
		button.value = _s("kleine Karte",true);
	}
	else {
		contractWindow();
		resizeMap();
		button.value = _s("grosse Karte",true);
	}
}

function resizeMap() {
	try {
		var widthReduction = kMapWidthReduction();
		var heightReduction = kMapHeightReduction();
		var map = document.getElementById('map');
		var baro = document.getElementById('baro');
		var leftElement = document.getElementById("linkeSpalte");
		var win = getWindowDimension();
		var map_breite = (win.width - widthReduction) + 'px';
		var canvas_breite = (win.width - widthReduction - kCanvasWidthReduction()) + 'px';
		map.style.width = map_breite;
		map.style.height = (win.height - heightReduction) + 'px';
		if (baro) { baro.style.width = canvas_breite; }
		leftElement.style.height = (win.height - kLeftColumnHeightReduction()) + 'px';
	}
	catch (e) {
		alert(e + 'catched error in resizeMap');
	}
}

var app; 

function startRadarApp() {
	setCSSVisible('header');
	setCSSVisible('footer');
	setCSSVisible('baro');
	setCSSVisible('dropdowns');
	resizeMap();
	app = new radarMap ( );
}

var baseIcon = new GIcon();

baseIcon.iconSize=new GSize(21,23);
baseIcon.shadowSize=new GSize(32,32);
baseIcon.iconAnchor=new GPoint(11,12);
baseIcon.infoWindowAnchor=new GPoint(20,0);

rIcon = new GIcon(baseIcon,
	"images/centerMarker.png");
radarIcon = { icon:rIcon, draggable:false };
