if (!window.openPopupWindow)
{
	function openPopupWindow(url, oAttrs)
	{
		if (typeof oAttrs != 'object')
		{
			oAttrs = new Object();
		}
		if (typeof oAttrs.width == 'undefined')
		{
			oAttrs.width = 400;
		}
		if (typeof oAttrs.height == 'undefined')
		{
			oAttrs.height = 400;
		}
		if (typeof oAttrs.top == 'undefined')
		{
			oAttrs.top = (screen.height - oAttrs.height) / 2;
		}
		if (typeof oAttrs.left == 'undefined')
		{
			oAttrs.left = (screen.width - oAttrs.width) / 2;
		}
		if (typeof oAttrs.resizable == 'undefined')
		{
			oAttrs.resizable = true;
		}
		if (typeof oAttrs.scrollbars == 'undefined')
		{
			oAttrs.scrollbars = true;
		}
		
		var windowAttributes = '';
		for (var i in oAttrs)
		{
			if (!(typeof oAttrs[i] == 'boolean' && false == oAttrs[i]))
			{
				windowAttributes += i;
				if (typeof oAttrs[i] != 'boolean')
				{
					windowAttributes += '=' + oAttrs[i];
				}
				windowAttributes += ',';
			}
		}
		windowAttributes = windowAttributes.replace(/,$/,'');
		
		var win = window.open(url, 'popupWindow', windowAttributes);
		win.focus();
		
		return win;
	}
}
