<!--
var m_oChatWin = null;
var m_oGameServerWin = null;
var m_oBrowserWin = null;
var m_oNickColorsWin = null;

// Objective: Pops up a browser window.
// Arguments: - urlPage, string;
//		      - nWidth, nHeight, integer;
//			  - bResizable, boolean;
//			  - bScrollbars, boolean;
//			  - sName, string.
// Returns:   object. Returns a reference to the new window object.
function popup(urlPage, nWidth, nHeight, bResizable, bScrollbars, sName)
{
	if (bResizable == null) bResizable = 1;
	if (bScrollbars == null) bScrollbars = 1;
	if (sName == null) sName = "";
	bResizable = bResizable ? 1 : 0
	bScrollbars = bScrollbars ? 1 : 0

	try
	{
		var oPopupWin = window.open(urlPage, sName, "width=" + nWidth + ",height=" + nHeight + ",resizable=" + bResizable + ",menubar=0,status=0,toolbar=0,location=0,scrollbars=" + bScrollbars + ",directories=0,left=50,top=50");
		oPopupWin.focus();
		return oPopupWin
	}
	catch(e) {}
}


// Objective: Popup the chat window. If the chat window is already open, then try to focus on it.
// Arguments: None.
function popupChat()
{
	var bIsOpen = false;

	try
	{
		//alert (m_oChatWin.location.href.indexOf("chat"))
		bIsOpen = (m_oChatWin.location.href.indexOf("chat") > 0) ? true : false;
		
	}
	catch(e) {}

	if (bIsOpen)
	{
		m_oChatWin.focus()
	}
	else
	{
		 m_oChatWin = popup("chat", 720, 560, false, false, "popupChat");
	}

}
//-->