
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 theHeight = getWindowDimension().height;
		theHeight -= getHeight('pageHeader');
		theHeight -= getHeight('dropdowns');
		theHeight -= getHeight('pageFoot');
		_$('linkeSpalte').style.height = theHeight;
		theHeight -= getHeight('baro');
		_$('map').style.height = theHeight;
		if (theTripMgr)
			theTripMgr.resetBarograf();
	}
	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 };

