function popupWin(uri, winWidth, winHeight, winName,scrollbars) {
var posCode = ''
var wdt = 0
var hgt = 0

if (!winName) {var winName = 'win' + Math.floor(Math.random()*1000)}
if ( winWidth )  wdt  = winWidth; else wdt = 700
if ( winHeight ) hgt = winHeight; else hgt = screen.height-100

posX = Math.round((screen.width - wdt) / 2);
posY = Math.round((screen.height - hgt) / 2) - 35;
if ( (screen.height < 481) && (hgt > 450) ) { hgt = 450 }
posCode = ",left="+posX+",top="+posY;
var scrollbars = scrollbars ? 'no' : 'no';
popupedWin = window.open( uri, winName, 'status=no,menubar=no,toolbar=no,resizable=no,scrollbars='+scrollbars+',location=no,width='+wdt+',height='+hgt+posCode);
popupedWin.focus();
					
return false;
}
