add:    createResources();  
context: function startMap (mapName, losSetting, openWindow){	// Starts the map, closing the current window.	// mapName: 	.pmp to load.	// openWindow: 	Window group (usually parent string) of control that called the function. It'll be hidden.	// Check whether we have a correct file extension, to avoid crashes	extension = mapName.substring (mapName.length, mapName.length-4);	if (extension != ".pmp")	{		// Add .pmp to the file name.		mapName =  mapName + ".pmp";	}	// Set up game	g_GameAttributes.mapFile = mapName;	g_GameAttributes.losSetting = losSetting;	// Close setup window	closeMainMenuSubWindow (openWindow);	// Display loading screen.		startLoadingScreen();        // Begin game session.        if (! startGame())        {                // Failed to start the game; go back to the main menu.                guiSwitch ("ld", "pg");                // Show an error message                btCaptions = new Array("OK");                btCode = new Array("");                messageBox(400, 200, "The game could not be started with the given parameters. You probably have entered an invalid map name.", "Error", 0, btCaptions, btCode);        }}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/795e07990e4fc2e5f2e5b31da6555bb14672f821/functions_page_pregame_load.js/clean/binaries/data/mods/official/gui/test/functions_page_pregame_load.js