IE = navigator.appName=="Microsoft Internet Explorer";
NS = navigator.appName=="Netscape";
bVer = parseInt(navigator.appVersion);

var newWin=null;

function popup(loc, name, width, height, scrollbars) {
	var _params = "width="+width+",height="+height+",toolbar=no,location=no,status=no,menubar=no,scrollbars="+scrollbars+",resizable=yes";

	// CENTER ON BROWSERS WHICH SUPPORT JSCRIPT 1.2
	if (bVer >= 4) {
		_left = ((screen.width-width) >>1 );
		_top = ((screen.height-height) >>1 );
	} else {
		_left = ((500-width) >>1 );
		_top = ((569-height) >>1 );
	}

	if (IE && (navigator.appVersion.indexOf('AOL') < 0)) _params += ",top=" + _top + ",left=" + _left;
	else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;

	newWin = window.open(loc, name, _params);
	if (newWin != null && !(IE && bVer < 5))
		newWin.focus(); // MSIE4 DOESN'T FOCUS WINDOWS
}

