
//----------------------------------------------------------
// GENERIC POPUP SCRIPT WITH scroll,width,height PARAMETERS
//----------------------------------------------------------
function popup(url, name, width, height, scroll)
{

// center the window
//var toppos = (screen.availHeight-height)/2;
//var leftpos = (screen.availWidth-width)/2;

// screen resolution
var scrheight = screen.availHeight;
var scrwidth = screen.availWidth;

// where to position the window
var toppos = scrheight * 0.1;
var leftpos = scrwidth * 0.1;

// create the window command
command = "aWindow=window.open('" + url + "', '" + name +"', 'width=" + width + ",height=" + height + ",scrollbars=" + scroll + ",toolbar=no,menubar=no,top=" + toppos +",left="+ leftpos +",screenX="+ toppos +",screenY="+ leftpos +",resizable=yes')";

//alert(command);
// execute the command
eval(command);

}