rem: console.write ("Closed slot " + this.name); 
context: function openSessionSetup (sessionReturnWindow){	var profileName 	= getCurrItemValue ("pgProfileName");	var titleBar		= getGUIObjectByName ("pgSessionSetupTitleBar");	// Setup remaining slots.	for (var i = 1; i <= g_GameAttributes.numSlots; i++)	{		if (i == 1)		{			// Set the host player's name on the setup screen.			getGUIObjectByName ("pgSessionSetupP" + i).caption = "(Host)";		}		else		{//			pushItem ("pgSessionSetupP" + i, "session");			pushItem ("pgSessionSetupP" + i, "Open");			pushItem ("pgSessionSetupP" + i, "Closed");//			pushItem ("pgSessionSetupP" + i, "local");//			pushItem ("pgSessionSetupP" + i, "AI");			// Set other slots to Open.			var result = setCurrItemValue ("pgSessionSetupP" + i, "Open");			// Setup onchange event (closing and opening affects host slots).			getGUIObjectByName ("pgSessionSetupP" + i).onSelectionChange = function (event)			{				var slotNumber = this.name.substring (this.name.length-1, this.name.length);				switch (getCurrItemValue (this.name))				{					case "Open":						// If "Open" selected, 										// Open the slot.						g_GameAttributes.slots[slotNumber-1].assignOpen();						console.write ("Opened slot " + this.name);					break;					case "Closed":						// If "Closed" selected,						// And slot is occupied,						if (g_GameAttributes.slots[slotNumber-1].assignment == "session")						{							// Remove player name from slot list.							removeItem (this.name, g_GameAttributes.slots[slotNumber-1].player);							// Prompt that player was kicked.							// (Change this to a chat message when functionality available.)							console.write (g_GameAttributes.slots[slotNumber-1].player + " was kicked by the host.");						}								// Close the slot.						g_GameAttributes.slots[slotNumber-1].assignClosed();						console.write ("Closed slot " + this.name);					break;					default:					break;				}			}		}		// Make objects non-interactive to client.		if (sessionType == "Client") guiDisable ("pgSessionSetupP" + i);	}	// Set the title for the setup screen	switch (sessionType)	{		case "Host":			titleBar.caption = "Hosting: " + g_NetServer.serverName;			// Reveal type-specific Session Setup objects.			guiUnHide ("pgSessionSetupMP");			guiUnHide ("pgSessionSetupMPHost");			guiUnHide ("pgSessionSetupMaster");		break;		case "Client":			titleBar.caption = "Joining: " // g_NetServer.serverName;			// Reveal type-specific Session Setup objects.			guiUnHide ("pgSessionSetupMP");			guiUnHide ("pgSessionSetupMPClient");			// Disable objects that clients shouldn't be able to modify.			guiDisable ("pgSessionSetupMapName");			guiDisable ("pgSessionSetupStartButton");		break;		case "Skirmish":			titleBar.caption = "Skirmish";			// Reveal type-specific Session Setup objects.			guiUnHide ("pgSessionSetupSkirmish");			guiUnHide ("pgSessionSetupMaster");		break;		default:		break;	}	// Reveal GUI.	guiHide	("pgVersionNumber");	if (sessionReturnWindow != "")		guiSwitch (sessionReturnWindow, "pgSessionSetup");	else		openMainMenuSubWindow ("pgSessionSetup");}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1070/b17df7db8cb5dfd89e982c72f156c1b0d3e0e940/functions_page_pregame_setup.js/clean/binaries/data/mods/official/gui/test/functions_page_pregame_setup.js