function popWin(winURL, winName, winWidth, winHeight, st, sb, rs, vPos, hPos) {

if (!vPos) { vPos = 'center'; }
if (!hPos) { hPos = 'center'; }

hAdjuster = sb ? -30 : -15; 
vAdjuster = st ? -75 : -60; 

switch (vPos) {
case 'top'		: topPos = 0; break;
case 'bottom'	: topPos = screen.height - winHeight + vAdjuster; break;
case 'center'	: topPos = (screen.height - winHeight + vAdjuster) / 2; break;
default			: vPos = vPos + ''; topPos = vPos.match(/^＼d+$/); }

switch (hPos) {
case 'left'		: leftPos = 0; break;
case 'right'	: leftPos = screen.width - winWidth + hAdjuster; break;
case 'center'	: leftPos = (screen.width - winWidth + hAdjuster) / 2; break;
default			: hPos = hPos + ''; leftPos = hPos.match(/^＼d+$/);
}

var position = 'width='+winWidth+',height='+winHeight+',left='+leftPos+',top='+topPos+',';
var property = position+'toolbar=0,location=0,directories=0,menubar=0,status='+st+',scrollbars='+sb+',resizable='+rs;

winName = window.open(winURL, winName, property);
self.onBlur = winName.focus();

}

