function popwin(url,title,wsize,hsize,rsize,scroll,status,toolbar,location)
{
var leftpos;
var toppos;
// get top and left positions based on user's resolution so window is centered.
leftpos = (window.screen.width/2) - ((wsize/2) + 10); // half the screen width minus half the new window width (plus 5 pixel borders).
toppos = (window.screen.height/2) - ((hsize/2) + 50); // half the screen height minus half the new window height (plus title and status bars).
var popup=window.open(url,title,'height=' + hsize + ',width=' + wsize + ',left=' + leftpos + ',top=' + toppos + ',screenX=' + leftpos + ',screenY=' + toppos + ',resizable=' + rsize + ',scrollbars=' + scroll + ',status=' + status + ',toolbar=' + toolbar + ',location=' + location);
}
