/*
*	Event handler called when the window loads, at this point we need
*	to instantiate the Flash application, this is done using SWFObject
*	which will trigger the auto-update mechanism if the required version
*	of Flash cannot be found.
*/
// function windowLoadHandler(){
// 	var so = new SWFObject("FlightMapsV5.swf", "flightmaps", "100%", "100%", "9", "#FFFFFF");
// 	so.addParam("scale", "noscale");
// 	so.addParam("allowScriptAccess", "always");
// 	so.addVariable("styleFileURL",		"css/en.swf");
// 	so.addVariable("localeFileURL",		"xml/en.xml");
// 	so.addVariable("prefsFileURL",		"xml/prefs.xml");
// 	so.addVariable("baseMapURL",		"map/mercator_en.swf");
// 	so.addVariable("loadingMessage",	"Loading, please wait...");
// 	so.useExpressInstall('expressinstall.swf');
// 	so.write("flightmaps");
// 
// 	windowResizeHandler();
// }
/*
*	Event handler called whenever the browser window changes size, we need
*	to manually reposition and resize our children as the doc-type doesnt
*	allow this to happen automatically.
*/
function windowResizeHandler(){
	var window_w		= getWindowWidth();
	var window_h		= getWindowHeight();
	var header_h		= 0; // must correspond with value set in flightmaps.css
	var flightmaps_w	= window_w;
	var flightmaps_h	= window_h - header_h;
	setStyle("flightmaps", "width",  flightmaps_w + "px");
	setStyle("flightmaps", "height", flightmaps_h + "px");
}

window.onload = windowResizeHandler;
window.onresize = windowResizeHandler;