/*
* phpUA
* United Admins © 2004
* http://www.unitedadmins.com/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*
*/

// watch.js: Created by Kris Splittgerber (kris@phpua.com)

// Update Player [row and image] (external -- called by phpUA)
function p(id, name, frags, ping) {
	xGetElementById("player_" + id + "_name").innerHTML = name;
	xGetElementById("player_" + id + "_frags").childNodes[0].nodeValue = frags;
	xGetElementById("player_" + id + "_ping").childNodes[0].nodeValue = ping;
}

// Clear [row and image] (external -- called by phpUA)
function c(count) {
	for (i = count; i < xGetElementById("server_maxplayers").childNodes[0].nodeValue; i++) {
		xGetElementById("player_" + i + "_name").innerHTML = " ";
		xGetElementById("player_" + i + "_frags").childNodes[0].nodeValue = " ";
		xGetElementById("player_" + i + "_ping").childNodes[0].nodeValue = " ";
	}
}

function s(mapname, numplayers, maxplayers) {
	xGetElementById("server_mapname").childNodes[0].nodeValue = mapname;
	xGetElementById("server_numplayers").childNodes[0].nodeValue = numplayers;
	xGetElementById("server_maxplayers").childNodes[0].nodeValue = maxplayers;
}