function popup(mylink, windowname, width, height, attributes)
{
	if (!window.focus) return true;
	var left = Math.round((screen.width/2) - (width/2));
	var top = Math.round((screen.height/2) - (height/2));
	if (attributes != "") attributes = "," + attributes;
	attributes = "width=" + width + ",left=" + left + ",height=" + height + ",top=" + top + attributes;
	var href;
	if (typeof(mylink) == 'string')
		href = mylink;
	else
		href = mylink.href;
	var newwin = window.open(href, windowname, attributes);
	if (newwin == null) alert("Your browser has blocked a popup window from this site.");
	return false;
}
