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");			// Restore default cursor.			setCursor ("arrow-default");			// 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);	}			// Set starting UI layout.	GUIType=rb;	flipGUI (GUIType);		// Initialise Resource Pools by attaching them to the Player object.	// (CPlayer code takes care of giving a copy to each player.)	createResources();		// Set session UI sprites to match the skin for the player's civilisation.	// (We don't have skins for all civs yet, so we're using the standard menu skin. But it should be settable from here later.)	setSkin ("wheat");	}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/e9655fefdb51ef804d4c1ff63fddf44e10986136/functions_page_pregame_load.js/buggy/binaries/data/mods/official/gui/test/functions_page_pregame_load.js