var popupWin = false;
function getCenter() {
	x = 300; y = 50;
	if (window.screen) {
		if(screen.availWidth) {
			x = screen.availWidth / 2 - 150;
			y = screen.availHeight / 2 - 200;
		} else if (screen && screen.width) {
			x = screen.width / 2 - 150;
			y = screen.height / 2 - 200;
		}
	}
	if (x < 0) { x = 10; } else if (x > 800) { x = 500; }
	if (y < 0) { y = 10; } else if (y > 600) { y = 500; }
	return 'screenX='+x+ ',left='+x+ ',screenY='+y+ ',top='+y;
}
function popupHelp(url) {
	return popup(url, "help", 350, 200);
}
function popup(url) {
	return popup(url, "popup");
}
function popup(url, title) {
	return popup(url, title, 400, 500);
}
function popup(url, title, width, height) {
	window.open(url, "help", "width=" + width + ",height=" + height + ",scrollbars=yes,toolbar=no;locationbar=no;statusbar=no,resizable=yes");
	return false;
}
function popup(_url, _ttl, _wid, _hig, _lft, _top, _sbr, _tbr, _lbr, _stt, _mbr, _rsz) {
	if(!_url) _url="/en_US/entry/entry.tmpl?_sid=57048%3A23EAF22CDE7E959";
	if(!_ttl) _ttl="popup";
	if(!_wid) _wid="200";
	if(!_hig) _hig="200";
	if(!_lft) _pos=getCenter();
	else _pos=",screenX=" + _lft + ",left=" + _lft + ",screenY" + _top + ",top=" + _top;
	if(!_sbr) _sbr="yes";
	if(!_tbr) _tbr="no";
	if(!_lbr) _lbr="no";
	if(!_stt) _stt="no";
	if(!_mbr) _mbr="no";
	if(!_rsz) _rsz="no";
	popupWin = window.open(_url, _ttl, "width=" + _wid + ",height=" + _hig + _pos + ",scrollbars=" + _sbr + ",toolbar=" + _tbr + ",location=" + _lbr + ",status=" + _stt + ",menubar=" + _mbr + ",resizable=" + _rsz);
	setTimeout('popupWin.focus()', 100);
	return false;
}
function nw(_url) {
	if(!_url) _url="/en_US/entry/entry.tmpl?_sid=57048%3A23EAF22CDE7E959";
	_ttl="_blank";
	_wid=(screen.availWidth >= 825)?825:(screen.availWidth-20);
	_hig=475;
	_pos=getCenter();
	_sbr=1;
	_tbr=1;
	_lbr=1;
	_stt=1;
	_mbr=1;
	_rsz=1;
	popupWin = window.open(_url, _ttl, "width=" + _wid + ",height=" + _hig + _pos + ",scrollbars=" + _sbr + ",toolbar=" + _tbr + ",location=" + _lbr + ",status=" + _stt + ",menubar=" + _mbr + ",resizable=" + _rsz);
	setTimeout('popupWin.focus()', 100);
	return false;
}