var chat_win = null;
var w = 480, h = 340;
if (document.all)
	{
	w = document.body.clientWidth; 
	h = document.body.clientHeight;
	}
if (document.layers)
	{ 
	w = window.innerWidth; 
	h = window.innerHeight; 
	}

function openBrWindow(theURL, winName, features)
	{
	chat_win = window.open(theURL, winName, features);
	if (chat_win.moveTo)
		chat_win.moveTo(w/2, h/2);
	}

function abrechat()
	{
	if (chat_win && chat_win.open && !chat_win.closed)
		chat_win.focus();
	else
		openBrWindow('utils/intro.php', 'chat', 'width = 550, height = 350, resizable = no, titlebar = no, toolbar = no, scrollbars = no, status = no');
	}
