function popUp(URL) {

w = screen.availWidth;
h = screen.availHeight;

var popW = 400, popH = 250;

var leftPos = (w-popW)/2, topPos = (h-popH)/2;

day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=" +popW+ ",height=" +popH+ ",top=" +topPos+ ",left=" +leftPos+ "');");

}