//popup function to open a window in the center of the screen
//Usage syntax: <a href="whatever.html" onclick="return popup(this.href, width_of_window, height_of_window)">

function popup(url, width, height)
{
	if (!window.open) return true;
	var winl = (screen.width - width) / 2;
    var wint = (screen.height - height) / 2;

	popupWindow = window.open(url, '', 'status=yes,scrollbars=yes,resizable=yes,width=' + (width + 48) + ',height=' + (height + 80)+',left =' + winl +',top = ' + wint);
	if (popupWindow.focus) popupWindow.focus();
	return false;
}
